query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
get the ObjectID and store it in the session variable | function OBJM_setCurrentSessionState(&$respData)
{
parse_str($respData) ;
$projID = $PROJECTID;
$PageID = $PAGEID;
$objID = $OBJECTID;
$_SESSION['currEditableObjID'] = $objID;
$_SESSION['currPageID'] = $PageID;
$_SESSION['currProjID'] = $projID;
$respData = 'OK';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSessionID();",
"public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}",
"final function getSession_id() {\n\t\treturn $this->getSessionId();\n\t}",
"public function getSessionID()\n {\n return $this->_session;\n }",
"public static function getSessionid();",
"public function getSessionid()\n {\n return $this->sessionid;\n }",
"public function getSessionID()\n {\n return $this->sessionID;\n }",
"function get_id ()\r\n {\r\n return $_SESSION[\"id\"];\r\n }",
"protected function _getId ()\n {\n return session_id();\n }",
"public function getSessionID() {\n return $this->sessionID;\n }",
"public function getSessionID()\n {\n return $this->getKey('SessionID');\n }",
"public static function getIdFromSession()\n\t{\n\n\t\treturn $_SESSION[User::SESSION]['iduser'];\t\t\n\n\t}",
"public function getObjectID();",
"public function getSessionID() {\n if(isset($this->data['booking']['session']['id'])) {\n return $this->data['booking']['session']['id'];\n }\n return null;\n\n }",
"private function getEntryIdFromSession()\n {\n return Session::get($this->session_key, 0);\n }",
"protected function getSessionId()\n {\n return \\Session::getId();\n }",
"public function getId()\n {\n return $this->_session->getId();\n }",
"public static function get_id() {\n self::$_id = $_SESSION['id'];\n return self::$_id;\n }",
"function getSessionId() {\n\t\treturn $this->session_id;\n\t}",
"public function getSession()\r\n {\r\n return $this->sessionID;\r\n }",
"function get_id () {\n\t\treturn $this->session_id ?: false;\n\t}",
"public function getId()\n {\n return $this->getValue('session_id');\n }",
"public function get_session_id()\n {\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectID()\n {\n return $this->_objectID;\n }",
"public function getObjectIdent();",
"public static function getId(){\n\t\treturn session_id();\n\t}",
"protected function getSessionId() {\r\n\t\treturn $this->id;\r\n\t}",
"function put_id() {\n \n if($this->name == \"\") {\n $this->name = $this->classname;\n }\n \n // if we stop using the session id- we should remove the session id from\n // the current QUERYSTRING/ or the HTTP_GET_VARS ????\n die(\"This has not been coded yet.\");\n }",
"public function getId() {\n\t\treturn session_id();\n\t}",
"public static function getId() {\n return (int)$_SESSION['user']['id'];\n }",
"public function getID()\n {\n // this only works for web users!\n return $this->session->userdata('ID');\n }",
"function sess_id()\n {\n return session_id();\n }",
"public function getObjectIdent() {}",
"public function getObjectIdent() {}",
"public function getSessionId() {\n $this->_session_id = $this->pub_session_id;\n return $this->pub_session_id;\n }",
"public function getSessionId()\r\n\t{\r\n\t\treturn $this->session;\r\n\t}",
"public function getSessionId()\n {\n return $this->session_id;\n }",
"public function getSessionId()\n {\n return $this->session_id;\n }",
"public function getSessionId()\n {\n return $this->session_id;\n }",
"public function getSessionId()\n {\n return $this->session_id;\n }",
"public function getSessionId()\n {\n return $this->session_id;\n }",
"public function getIdentifierByObject($object) {\n\t\treturn $this->persistenceSession->getIdentifierByObject($object);\n\t}",
"public function objId()\n {\n return $this->objId;\n }",
"function getId( $Object );",
"public function getObjectIdentifier();",
"public function getSessionId()\n {\n return session_id();\n }",
"public function updateId() {\n $this->Id = session_id();\n }",
"public function getId(): string\n {\n return session_id();\n }",
"protected function get_user_id() {\n session_start();\n \n return session_id();\n }",
"protected function _getSeoObjectId()\n {\n return oxRegistry::getConfig()->getRequestParameter('oxcid');\n }",
"private function store($id, $object) {\n switch ($this->mode) {\n case 'session' :\n $_SESSION[$id] = serialize($object);\n return;\n }\n }",
"public function getId(): string\n {\n return session()->getId();\n }",
"public function getSessionKey();",
"public static function getSessionId(){\n return self::$sessionId;\n }",
"protected function get_object_id() {\n\t\t$id = rgget( 'id' );\n\t\t$id = absint( $id );\n\t\treturn $id; // example in the case of form id\n\t}",
"function get_id() {\n \n $id_okay = true;\n \n if($this->name == \"\") {\n $this->name = $this->classname;\n }\n \n if(\"\" == ($id = isset($_GET[$this->name]) ? $_GET[$this->name] : \"\")) {\n $id = isset($_POST[$this->name]) ? $_POST[$this->name] : \"\";\n }\n \n ## check if the id consists of chars that make up a session\n if(ereg('[^a-z0-9]', $id)){\n\t\t$id_okay = false;\n\t}\n \n if( \"\" == $id || !$id_okay) {\n $newid=true;\n // I'll have to work on this class to figure out how this link works\n $id = md5(uniqid($this->magic));\n }\n \n if(isset($_SERVER['QUERY_STRING'])) {\n $_SERVER['QUERY_STRING'] = ereg_replace(\"(^|&)\".quotemeta(urlencode($this->name)).\"=(.)*(&|$)\",\"\\\\1\", $_SERVER['QUERY_STRING']);\n }\n \n $this->id = $id;\n }",
"public function getObjectId() {\n\t\t\treturn SERIA_Meta::getNamedObjectId($this);\n\t\t}",
"public static function sessionData(): object {\n return Session::instance()->get(AccessControl::SESSION_AUTH_KEY);\n }",
"public function getId()\n {\n return isset($this->sessionStorage->user['id']) ? (int) $this->sessionStorage->user['id'] : 0;\n }",
"public function getSessionId()\n {\n\t\tif($this->session_id != null){\n\t\t\treturn $this->session_id;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n }",
"public static function getCurrentID() {\n return Session::get(Privilege::SESSION_NAME_ID);\n }",
"function getUserId() {\n session_start();\n return $_SESSION['USER_ID'];\n}",
"function lade_user_id(){\n //Session initiieren\n session_start();\n $UserSessionID = intval($_SESSION['user_id']);\n return $UserSessionID;\n}",
"public function getId()\n {\n if (!$this->hasIdentity()) {\n $id = 0;\n } else {\n $id = (int)$this->modelSession['id'];\n }\n\n return $id;\n }",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"public static function GetSessionIdentity ();",
"public function getSessionId() {}",
"function getSessionRelatedBySessionId() {\n\t\t$fk_value = $this->getsession_id();\n\t\tif (null === $fk_value) {\n\t\t\treturn null;\n\t\t}\n\t\treturn Session::retrieveByPK($fk_value);\n\t}",
"public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\n }",
"public function getSessionId();",
"public function getSessionId();",
"public function getId()\n {\n $session = new Zend_Session_Namespace('Unodor_Account');\n return $session->idaccount;\n }",
"function saveSecurityModel(&$obj) {\n\t\tglobal $g_sm_session_id;\n\t\t$_SESSION[$g_sm_session_id] = $obj;\n\t}",
"public function getCustomerSessionID(){\r\n\t\treturn $this->customerSessionID;\r\n\t}",
"function saveUserId($id) {\n session_start();\n $_SESSION['USER_ID'] = $id;\n}",
"function store_id_in_session($username)\n{\n $_SESSION['username'] = $username;\n $_SESSION['loggedin'] = true;\n}",
"function set_id ($id)\r\n {\r\n $_SESSION[\"id\"] = $id;\r\n }",
"public function getUserIdFromSessionId($session_id);",
"private function getCurrentID() {\n if ($this->sessionid > 0) {\n\t\t\treturn $this->sessionid;\n\t\t}\n $cookie_id = 0;\n\t\tif (isset($GLOBALS[\"_COOKIE\"][\"sessionid\"])) {\n\t\t\t$cookie_array = explode('|', $GLOBALS[\"_COOKIE\"][\"sessionid\"]);\n\t\t\tif ($cookie_array[0]) {\n\t\t\t\t$cookie_id = $cookie_array[0];\n\t\t\t}\n\t\t}\n\t\treturn $cookie_id;\n }",
"function startSession($d){\n session_start();\n $_SESSION[\"id\"] = $d;\n echo($_SESSION[\"id\"]);\n }",
"function getLoggedInID(){\n\n\tsession_start();\n\t\t$return = $_SESSION['userID'];\n\tsession_write_close();\n\treturn $return;\n}",
"public function getSessId()\n {\n return $this->sess_id;\n }",
"public function getObjectIdentifier($object);",
"public function getIdentity ()\n\t{\n\t\treturn $this->session->get('user');\n\t}",
"private function getSessionId()\n {\n $request = Request::factory(self::$apiUrl . self::$authPath)\n ->method(Request::POST)\n ->headers('content-type', 'application/json')\n ->body(json_encode([\n 'domain' => self::$apiDomain,\n 'apiKey' => self::$apiKey,\n ]))\n ->execute();\n $setCookie = $request->headers('set-cookie');\n preg_match('/JSESSIONID=(?<id>\\w+);/', $setCookie, $jSessionId);\n\n return $jSessionId['id'];\n }",
"function get_revision_stamp($obj)\n{\n\tif($obj->session->userdata('editsessionid')){\n\t\t$revisionstamp = $obj->session->userdata('editsessionid');\n\t}\n\telse\n\t{\n\t\t$revisionstamp = strtotime('now');\n\t\t$obj->session->set_userdata('editsessionid', $revisionstamp);\n\t}\n\treturn $revisionstamp;\n}",
"function userid() {\n return $_SESSION['user']['id'];\n}",
"public function getId()\n {\n $this->checkIfStarted();\n\n return session_id();\n }",
"public function getSession() \r\n\t{\t\t\t\r\n\t\t$this->url = $this->server . \"/X?op=login_request\" .\r\n\t\t\t\"&user_name=\" . $this->username .\r\n\t\t\t\"&user_password=\" . $this->password;\r\n\r\n\t\t// get login_response from Metalib\r\n\r\n\t\t$this->xml = $this->getResponse($this->url, $this->timeout);\r\n\t\t\r\n\t\t// extract session ID\r\n\t\t\r\n\t\t$objSession = $this->xml->getElementsByTagName(\"session_id\")->item(0);\r\n\t\treturn $objSession->nodeValue;\r\n\t}",
"protected function _session() {\n\t\treturn $this->_crud()->Session;\n\t}",
"public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }"
] | [
"0.73259157",
"0.7212702",
"0.713236",
"0.70653033",
"0.6996906",
"0.69799054",
"0.69516957",
"0.6933173",
"0.6918101",
"0.69053423",
"0.68070936",
"0.67806655",
"0.672962",
"0.66660756",
"0.6652238",
"0.6637522",
"0.66199607",
"0.66092914",
"0.6603086",
"0.65822566",
"0.6566828",
"0.65523547",
"0.6540353",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.65253854",
"0.6487649",
"0.6478004",
"0.64733046",
"0.6457454",
"0.6433447",
"0.6428157",
"0.64114136",
"0.6410228",
"0.6397607",
"0.6397607",
"0.6382258",
"0.6344291",
"0.6233911",
"0.6233911",
"0.6233911",
"0.6233911",
"0.6233911",
"0.61696535",
"0.61566466",
"0.6147238",
"0.6125185",
"0.6115542",
"0.60829777",
"0.6070809",
"0.6023171",
"0.60204214",
"0.6018558",
"0.59979",
"0.5995643",
"0.59928787",
"0.59916884",
"0.5979865",
"0.59749043",
"0.59743017",
"0.5970427",
"0.5969864",
"0.5958818",
"0.5953729",
"0.594094",
"0.59335345",
"0.5930003",
"0.591852",
"0.59182745",
"0.59125394",
"0.5904138",
"0.5903121",
"0.5903121",
"0.58668095",
"0.5861569",
"0.58535504",
"0.5843808",
"0.58436394",
"0.5830118",
"0.58106303",
"0.5785887",
"0.57800853",
"0.57799345",
"0.57798505",
"0.5775431",
"0.57290137",
"0.5728725",
"0.5728065",
"0.5718536",
"0.5710657",
"0.5707396",
"0.5706523",
"0.5697463"
] | 0.0 | -1 |
using the slide array now generate the code | function OBJM_getSlideShowInfocode(&$codestr, $myslidearr)
{
//$codestr="";
$tempstr = "";
$gEffectSep = $GLOBALS['gEffectSep'];
// write the code into the script node
$tempstr = "var slidearr = []; var gslideIndex = 0; ";
$codestr = $codestr . $tempstr;
$arrlen = count($myslidearr);
$nItems = 0;
for($j =0; $j < $arrlen; $j++)
{
$tempstr = "slidearr[" . $j . "] = [";
$nItems = count($myslidearr[$j]);
for ($k = 0; $k < $nItems; $k++) {
$tempstr = $tempstr . "'" . $myslidearr[$j][$k] . "'";
if ($k + 1 < $nItems) {
$tempstr = $tempstr . ",";
}
}
$tempstr = $tempstr . "] ; ";
$codestr = $codestr . $tempstr;
}
// var str = "slideSel = '[data-type='NVBUTTONS']'; $(slideSel).show();"
//now write the function related codes here
//$tempstr = "$(document).ready(function() {showSlideData(gslideIndex);});";
$tempstr = "";
$tempstr = $tempstr .'function showSlideData(slideIndex) {
var length = slidearr[slideIndex].length;
var slideSel = "div.OBJECT_CONTAINER";
$(slideSel).hide();
slideSel = "#ALL_DATA_CONTAINER";
var param;
var paramstr="";
if( (gSlideEffect.length > 0 ) && (gSlideEffect[slideIndex][0] != "none") )
{
var arrlen = gSlideEffect[slideIndex].length;
paramstr =\'{\';
for(var n=3; n < arrlen; n++)
{
if(gSlideEffect[slideIndex][n])
paramstr += gSlideEffect[slideIndex][n] + \',\';
}
paramstr += \'}\';
var effectParamstr ="param=" + paramstr; ;
eval(effectParamstr);
if(gSlideEffect[slideIndex][0] == "flip")
{
$(slideSel).hide();
$(slideSel).show().flip(param);
}
else
$(slideSel).show(gSlideEffect[slideIndex][0],param, gSlideEffect[slideIndex][2]);
}
else
{
$(slideSel).show();
}
slideSel = "[data-type=NVBUTTONS]";
$(slideSel).show();
var elemArr;
var elem;
var effectVal;
var JQSel;
var effectcode;
var effectPropArr;
var effectParam;
for (var k = 0; k < length; k++) {
slideSel = "[data-layerid=" + slidearr[slideIndex][k] + "]";
elemArr = $(slideSel).toArray();
for(var n=0; n < elemArr.length; n++)
{
effectVal = elemArr[n].getAttribute("data-effect");
JQSel = $("#"+elemArr[n].id);
if((!effectVal)|| (effectVal == "null") )
$(JQSel).show();
else
{
effectPropArr = effectVal.split("' . $gEffectSep .'");
effectParam = "{";
for(var a=3; a <effectPropArr.length; a++)
{
if(effectPropArr[a])
effectParam += effectPropArr[a]+\',\';
}
effectParam += "}";
var str = "effectParam="+ effectParam;
eval(str);
var animtime ;
var initdelay ;
str = \'animtime=\'+effectPropArr[2];
eval(str);
str = \'initdelay=\'+effectPropArr[1];
eval(str);
if(effectPropArr[0]== "flip")
{
$(JQSel).hide();
$(JQSel).delay(initdelay).show().flip(effectParam);
}
else
$(JQSel).delay(initdelay).show(effectPropArr[0],effectParam, animtime, "");
}
}
}
var slidelen = slidearr.length;
if (slideIndex + 1 == slidelen) {
DisableButton("NEXTSLIDEBTN", true);
}
else {
DisableButton("NEXTSLIDEBTN", false);
}
JQSel = "#PREVSLIDEBTN";
if (slideIndex - 1 < 0) {
DisableButton("PREVSLIDEBTN", true);
}
else {
DisableButton("PREVSLIDEBTN", false);
}
}' ;
$tempstr = $tempstr ."function showNextSlideData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) { return; } gslideIndex++; showSlideData(gslideIndex); InitializeAutoShow(); }";
$tempstr = $tempstr ."function showPrevSlideData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) { return; } gslideIndex--; showSlideData(gslideIndex); InitializeAutoShow(); }";
$codestr = $codestr . $tempstr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function slide(){\r\n\t\t\r\n\t}",
"function OBJM_getAutoSlideShowInfoCode(&$codestr)\r\n{\r\n\t$tempstr = \"\"; \r\n\t$codestr = \"\"; \r\n\tif(!isset($_SESSION['sceneCompXMLDOM']) )\r\n\t\treturn false;\r\n\tif(!isset($_SESSION['sceneCompXMLFilePath']))\r\n\t\treturn false;\r\n\t\r\n\t$sceneArr;\t\r\n\t$retval = $_SESSION['sceneCompXMLDOM']->load($_SESSION['sceneCompXMLFilePath']);\r\n\tif($retval != true)\r\n\t\treturn false ;\r\n\t$parentNode = $_SESSION['sceneCompXMLDOM']->documentElement;\r\n\t$parentNode = $parentNode->firstChild;\r\n\t$parentNode = $parentNode->firstChild;\r\n\t$type = $parentNode->getAttribute('type');\r\n\tif($type != 'PAGE')\r\n\t\treturn false;\r\n\t$pageID = $parentNode->getAttribute('id');\r\n\t\r\n\t$retval = CDOC_COMMON_getChildrenList($_SESSION['sceneCompXMLDOM'],$_SESSION['sceneCompXMLFilePath'],$pageID, 'data-type', 'SCENE', 'id', $sceneArr);\r\n\tif($retval != true)return false;\r\n\t\r\n\t$scenearrlen = count($sceneArr);\r\n\tif($scenearrlen <= 0 )\r\n\t\treturn false;\t\r\n\t\r\n\t//then formualate the initial code \r\n\t$tempstr = \"var gSlideDuration = 0; var gAutoSlideTimer = 0; var gTimeOut = 100; var gAVPlayerObject =0; var gCurrentSlideIndex = 0; var gAVPlayerInitOffsetTime = 0; var gEndIndex = 0;\"; \r\n\t$codestr = $codestr . $tempstr;\r\n\t\r\n\t$tempstr = \"sSlideInfo.prototype.id = 0; sSlideInfo.prototype.AVObjectID = 0; sSlideInfo.prototype.duration = 0; sSlideInfo.prototype.startTime = -1; function sSlideInfo() {sSlideInfo.prototype.id = 0;sSlideInfo.prototype.AVObjectID = 0;sSlideInfo.prototype.duration = 0;\tsSlideInfo.prototype.startTime = -1;}\"; \r\n\t$codestr = $codestr . $tempstr;\r\n\t\r\n\t$tempstr = \"var gSlideNum =\" . $scenearrlen .\";\"; \r\n\t$codestr = $codestr . $tempstr;\r\n\t\r\n\t$tempstr = \"var gSlideInfoList = new Array(gSlideNum); for(var i=0; i < gSlideNum; i++) {gSlideInfoList[i] = new sSlideInfo(); }\";\r\n\t$codestr = $codestr . $tempstr; \r\n\t\r\n\t//now iterate over each Scene node , get the timing params\r\n\tfor($i=0; $i < $scenearrlen; $i++)\r\n\t{\r\n\t\t$sceneID = $sceneArr[$i];\r\n\t\t$node = $_SESSION['sceneCompXMLDOM']->getElementById($sceneID); \r\n\t\t$AVObjID = $node->getAttribute('data-AVObjID'); \r\n\t\t$startTime = $node->getAttribute('data-startTime'); \r\n\t\t$duration = $node->getAttribute('data-duration');\r\n\t\t\r\n\t\t$tempstr = \" gSlideInfoList[\" . $i . \"].AVObjectID='\" . $AVObjID. \"';\"; \r\n\t\t$codestr =$codestr . $tempstr; \r\n\t\t\r\n\t\t$tempstr = \" gSlideInfoList[\" . $i . \"].duration=Number(\" . $duration. \");\";\r\n\t\t$codestr =$codestr . $tempstr;\r\n\t\t\r\n\t\t$tempstr = \" gSlideInfoList[\" . $i . \"].startTime=Number(\". $startTime . \");\";\r\n\t\t$codestr =$codestr . $tempstr;\t\t\r\n\t} \r\n\t\r\n\t\t//$tempstr = \"function InitializeAutoShow() {if(gSlideInfoList.length < 1) return ; gEndIndex = gSlideInfoList.length-1; if( (!gAVPlayerObject) && (gSlideInfoList[0].AVObjectID != 0) ) gAVPlayerObject = document.getElementById(gSlideInfoList[0].AVObjectID); else gAVPlayerObject = 0; if(gAVPlayerObject){gAVPlayerObject.pause();gAVPlayerObject.currentTime = gSlideInfoList[gCurrentSlideIndex].startTime;gAVPlayerInitOffsetTime = gAVPlayerObject.currentTime; } if(!gAutoSlideTimer){gAutoSlideTimer = setInterval(function() {AutoShowTimerHandle(); }, gTimeOut); gSlideDuration = 0; if(gAVPlayerObject) gAVPlayerObject.play(); showSlideData(gCurrentSlideIndex); } }\";\r\n\t\t$tempstr = \" function InitializeAutoShow() {if(gSlideInfoList.length < 1) return ; gEndIndex = gSlideInfoList.length-1; if(gSlideInfoList[gslideIndex].AVObjectID != 0) {if(!gAVPlayerObject) gAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID);\tif(gAVPlayerObject){ gAVPlayerObject.pause(); gAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime; gAVPlayerInitOffsetTime = gAVPlayerObject.currentTime; }} else { if(gAVPlayerObject)\tgAVPlayerObject.pause(); gAVPlayerObject = 0; } if(gAutoSlideTimer){ clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; } if(!gAutoSlideTimer){ gAutoSlideTimer = setInterval(function() {AutoShowTimerHandle(); }, gTimeOut); gSlideDuration = 0; if(gAVPlayerObject) gAVPlayerObject.play(); showSlideData(gslideIndex); }}\";\r\n\t\t$codestr = $codestr .$tempstr;\t\r\n\t\t\r\n\t\t$tempstr = \"function OnLoadMetadata(){\tInitializeAutoShow();}\";\r\n\t\t$codestr = $codestr .$tempstr;\r\n\t\t\r\n\t\t//$tempstr = \"function AutoShowTimerHandle(){if(gAVPlayerObject) gSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime); else gSlideDuration += (gTimeOut/1000); if(gSlideDuration >= gSlideInfoList[gCurrentSlideIndex].duration) { gCurrentSlideIndex++; if(gCurrentSlideIndex == gEndIndex+1) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) { gAVPlayerObject.pause(); gAVPlayerObject = 0; } } else { if(gAVPlayerObject) { gAVPlayerInitOffsetTime = gSlideInfoList[gCurrentSlideIndex].startTime; } gSlideDuration = 0; } showSlideData(gCurrentSlideIndex); } }\";\r\n\t\t//$tempstr = \"function AutoShowTimerHandle(){if(gAVPlayerObject) gSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime); else gSlideDuration += (gTimeOut/1000); if( (gSlideDuration >= gSlideInfoList[gslideIndex].duration) && (gslideIndex < gSlideInfoList.length-1) ) { if(gslideIndex == gEndIndex) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) gAVPlayerObject.pause(); } else { gslideIndex++; if(!gSlideInfoList[gslideIndex].AVObjectID) { if( (gAVPlayerObject) && (gAVPlayerObject.paused != true)) { gAVPlayerObject.pause(); gAVPlayerObject = 0; } } else { if(!gAVPlayerObject) { gAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID); } if( (gAVPlayerObject) && (gAVPlayerObject.paused == true)) { gAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime; gAVPlayerObject.play(); } if(gAVPlayerObject) { gAVPlayerInitOffsetTime = gSlideInfoList[gslideIndex].startTime; } } gSlideDuration = 0; } showSlideData(gslideIndex); } else if(gslideIndex >= gSlideInfoList.length-1) { var endTime = gSlideInfoList[gslideIndex].startTime + gSlideInfoList[gslideIndex].duration; if( (gAVPlayerObject) && (gAVPlayerObject.currentTime >= endTime) ) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) gAVPlayerObject.pause(); } else if( (!gAVPlayerObject) && (gSlideDuration >= gSlideInfoList[gslideIndex].duration) ) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; }}}\" ;\r\n\t\t$tempstr = \"function AutoShowTimerHandle(){\r\n\t\tif(gAVPlayerObject) \r\n\t\t\tgSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime);\r\n\t\telse\r\n\t\t\tgSlideDuration += (gTimeOut/1000); \r\n\t\tif( (gSlideDuration >= gSlideInfoList[gslideIndex].duration) && (gslideIndex < gSlideInfoList.length-1) ) { \r\n\t\t\tif(gslideIndex == gEndIndex) { \r\n\t\t\t\tclearInterval(gAutoSlideTimer); \r\n\t\t\t\tgAutoSlideTimer = 0; \r\n\t\t\t\tif(gAVPlayerObject)\r\n\t\t\t\t\tgAVPlayerObject.pause();\r\n\t\t\t} \r\n\t\telse {\r\n\t\t\tgslideIndex++;\r\n\t\t\tif(!gSlideInfoList[gslideIndex].AVObjectID) {\r\n\t\t\t\tif( (gAVPlayerObject) && (gAVPlayerObject.paused != true)) {\r\n\t\t\t\t\tgAVPlayerObject.pause(); \r\n\t\t\t\t\tgAVPlayerObject = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t if((gAVPlayerObject) && (gAVPlayerObject.id != gSlideInfoList[gslideIndex].AVObjectID)) {\r\n\t\t\t\t gAVPlayerObject.pause();\r\n\t\t\t\t gAVPlayerObject = 0;\r\n\t\t\t\t } \t\t \r\n\t\t\t\tif(!gAVPlayerObject) { \r\n\t\t\t\t\tgAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID);\r\n\t\t\t\t\t} \r\n\t\t\t\tif( (gAVPlayerObject) && (gAVPlayerObject.paused == true)) {\r\n\t\t\t\t\tgAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime;\r\n\t\t\t\t\tgAVPlayerObject.play(); \r\n\t\t\t\t\t}\r\n\t\t\t\tif(gAVPlayerObject) { \r\n\t\t\t\t\tgAVPlayerInitOffsetTime = gSlideInfoList[gslideIndex].startTime;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\tgSlideDuration = 0; \r\n\t\t\t} \r\n\t\tshowSlideData(gslideIndex);\r\n\t\t}\r\n\telse if(gslideIndex >= gSlideInfoList.length-1) { \r\n\t\tvar endTime = gSlideInfoList[gslideIndex].startTime + gSlideInfoList[gslideIndex].duration;\r\n\t\tif( (gAVPlayerObject) && (gAVPlayerObject.currentTime >= endTime) ) {\r\n\t\t\tclearInterval(gAutoSlideTimer); \r\n\t\t\tgAutoSlideTimer = 0; \r\n\t\t\tif(gAVPlayerObject) gAVPlayerObject.pause();\r\n\t\t\t} else if( (!gAVPlayerObject) && (gSlideDuration >= gSlideInfoList[gslideIndex].duration) ) {\r\n\t\t\t\tclearInterval(gAutoSlideTimer);\r\n\t\t\t\tgAutoSlideTimer = 0; \r\n\t\t\t\t}\r\n\t\t}\r\n\t} \"; \r\n\t\t$codestr = $codestr .$tempstr;\r\n\t// add to the code \r\n\t\r\n\t//complete the code with other functions \r\n\t\r\n\t\treturn true; \r\n\t//return \r\n}",
"protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }",
"function itransform_ibanner_slider () { \r\n\r\n\t$itrans_slogan = esc_attr(get_theme_mod('banner_text', of_get_option('itrans_slogan')));\r\n\t$sliderscpeed = get_theme_mod('itrans_sliderspeed', (of_get_option('sliderspeed', 6000)/1000))*1000;\r\n\r\n\t$upload_dir = wp_upload_dir();\r\n\t$upload_base_dir = $upload_dir['basedir'];\r\n\t$upload_base_url = $upload_dir['baseurl'];\r\n\t\t\t\t\t\r\n\t$arrslidestxt = array();\r\n\t$template_dir = get_template_directory_uri();\r\n for($slideno=1;$slideno<=4;$slideno++){\r\n\t\t\t$strret = '';\r\n\t\t\t\r\n\t\t\t$slide_speed = esc_attr( get_theme_mod('itrans_sliderspeed')*1000 );\r\n\t\t\t$slide_title = esc_attr( get_theme_mod('itrans_slide'.$slideno.'_title', of_get_option ('itrans_slide'.$slideno.'_title', 'Multi-Purpose WP Theme')) );\r\n\t\t\t$slide_desc = esc_attr( get_theme_mod('itrans_slide'.$slideno.'_desc', of_get_option ('itrans_slide'.$slideno.'_desc', 'To start setting up i-transform go to appearance > Customize. Make sure you have installed recommended plugin "TemplatesNext Toolkit" by going appearance > install plugin.')) );\r\n\t\t\t$slide_linktext = esc_attr( get_theme_mod('itrans_slide'.$slideno.'_linktext', of_get_option ('itrans_slide'.$slideno.'_linktext', 'Know More')) );\r\n\t\t\t$slide_linkurl = esc_attr( get_theme_mod('itrans_slide'.$slideno.'_linkurl', of_get_option ('itrans_slide'.$slideno.'_linkurl', 'http://templatesnext.org/icraft/?page_id=783')) );\t\t\t\r\n\t\t\t$slide_image = esc_attr( get_theme_mod('itrans_slide'.$slideno.'_image', of_get_option ('itrans_slide'.$slideno.'_image', get_template_directory_uri() . '/images/slide-'.$slideno.'.jpg')) );\t\t\t\t\r\n \r\n\t\t\t$slider_image_id = itransform_get_attachment_id_from_url( $slide_image );\t\t\t\r\n\t\t\t$slider_resized_image = wp_get_attachment_image( $slider_image_id, \"slider-thumb\" );\r\n\r\n\t\t\t\r\n\t\t\tif ($slider_resized_image==\"\")\r\n\t\t\t{\r\n\t\t\t\t$slider_resized_image = '<img src=\"'.get_template_directory_uri() . '/images/missing-thumb.png\">';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//echo \"<h3>Original Image URL : \".$slide_image.\"</h3>\";\r\n\t\t\t//echo \"<h3>Image ID : \".$slider_image_id.\"</h3>\";\r\n\t\t\t//echo \"<h3>Resized Image URL : \".$slider_resized_image.\"</h3>\";\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif (!$slide_linktext)\r\n\t\t\t{\r\n\t\t\t\t$slide_linktext = __('Read more', 'i-transform');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($slide_title) {\r\n\t\t\t$strret .= '<h2>'.$slide_title.'</h2>';\r\n\t\t\t$strret .= '<p>'.$slide_desc.'</p>';\r\n\t\t\t$strret .= '<a href=\"'.$slide_linkurl.'\" class=\"da-link\">'.$slide_linktext.'</a>';\r\n\t\t\t\r\n\t\t\t\tif( $slide_image!='' ){\r\n\t\t\t\t\tif( file_exists( str_replace($upload_base_url,$upload_base_dir,$slide_image) ) ){\r\n\t\t\t\t\t\t$strret .= '<div class=\"da-img\">' . $slider_resized_image .'</div>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//$slide_image = $template_dir.'/images/no-image.png';\r\n\t\t\t\t\t\t$slide_image = $template_dir.'/images/slide-'.$slideno.'.jpg';\r\n\t\t\t\t\t\t$strret .= '<div class=\"da-img noslide-image-1\"><img src=\"'.$slide_image.'\" alt=\"'.$slide_title.'\" /></div>';\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\t$slide_image = $template_dir.'/images/no-image.png';\r\n\t\t\t\t\t$strret .= '<div class=\"da-img noslide-image\"><img src=\"'.$slide_image.'\" alt=\"'.$slide_title.'\" /></div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($strret !=''){\r\n\t\t\t\t$arrslidestxt[$slideno] = $strret;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t}\r\n\tif(count($arrslidestxt)>0){\r\n\t\techo '<div class=\"ibanner\" data-sliderspeed=\"'.$sliderscpeed.'\">';\r\n echo '\t<div class=\"slidexnav\">';\r\n\t\techo '\t\t<a href=\"#\" class=\"sldprev genericon genericon-leftarrow\"></a>';\r\n\t\techo '\t\t<a href=\"#\" class=\"sldnext genericon genericon-rightarrow\"></a>';\r\n\t\techo '\t</div>';\r\n\t\techo '\t<div id=\"da-slider\" class=\"da-slider\" role=\"banner\">';\r\n\t\t\t\r\n\t\tforeach ( $arrslidestxt as $slidetxt ) :\r\n\t\t\techo '<div class=\"da-slide\">';\t\r\n\t\t\techo\t$slidetxt;\r\n\t\t\techo '</div>';\r\n\r\n\t\tendforeach;\r\n\t\t\r\n\t\techo '\t\t<nav class=\"da-arrows\">';\r\n\t\techo '\t\t\t<span class=\"da-arrows-prev\"></span>';\r\n\t\techo '\t\t\t<span class=\"da-arrows-next\"></span>';\r\n\t\techo '\t\t</nav>';\r\n\t\techo '\t</div>';\r\n\t\techo '</div>';\r\n\t} else\r\n\t{\r\n echo '<div class=\"iheader front\">';\r\n echo ' <div class=\"titlebar\">';\r\n echo ' <h1>';\r\n\t\t\r\n\t\tif ( $itrans_slogan ) {\r\n\t\t\t\t\t\t//bloginfo( 'name' );\r\n\t\t\techo $itrans_slogan;\r\n\t\t} \r\n\t\t//else {\r\n\t\t\t//printf( __( 'Welcome To ', 'i-transform' ) ); bloginfo( 'name' );\r\n\t\t//}\r\n echo ' </h1>';\r\n\t\techo ' \t\t <h2>';\r\n\t\t\t \t\t//bloginfo( 'description' );\r\n\t\t\t\t\t\t//echo of_get_option('itrans_sub_slogan');\r\n\t\techo '\t\t</h2>';\r\n echo ' </div>';\r\n echo '</div>';\r\n\t}\r\n \r\n}",
"public function run()\n {\n Slide::factory()->create([\n 'owner_id'=>1,\n 'title'=>'Slide template',\n 'data'=>'[{\"type\":\"slide\",\"content\":\"## Help\\n- click \\'New Slide\\' to create a slide like this\\n- click \\'exercise slide\\' to create a coding slide (such as the next one)\"},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <!-- type some HTML... -->\\n\\n</body>\\n</html>\",\"javaScript\":\"//type in some javaScript [o_0] ...\\ndocument.write(\\'Hello\\')\\n/** Click on \\'Execute\\' */\"}},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <h1 id=\\'heading\\'>You can act as you \\n would in any other text editor.\\n </h1>\\n <h2 id=\\'heading2\\'>\\n Click \\'Execute\\' to run the JavaScript.\\n </h2>\\n\\n</body>\\n</html>\",\"javaScript\":\"//type in some javaScript [o_0] ...\\ndocument.getElementById(\\'heading\\')\\n.innerText = \\'Hello world !\\';\\n\\n\\n//type in some javaScript [o_0] ...\\ndocument.getElementById(\\'heading2\\')\\n.innerText = \\'Congratulations, you are getting the hang of it.\\';\"}},{\"type\":\"slide\",\"content\":\"<i>Example slide</i>\\n\\n## h2\\n### h3\\n#### h4\\n##### h5\\n###### h6\\n1. List item\\n2. list item \\n\\n- list item\\n- list item\"}]',\n\n ]);\n\n Slide::factory()->create([\n 'owner_id'=>1,\n 'title'=>'Slide template 2',\n 'data'=>'[{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n \\n <style>\\n body {\\n margin:0;\\n padding:0;\\n box-sizing:border-box;\\n }\\n </style>\\n</head>\\n<body>\\n <!-- type some HTML... -->\\n <h1 id=\\'howdy\\'>Howdy</h1>\\n\\n</body>\\n</html>\",\"javaScript\":\"(function(){\\n\\tdocument.write(\\'e\\')\\n console.log(\\'e\\')\\n})()\"}},{\"type\":\"slide\",\"content\":\"# Good job !\\n\"},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <!-- type some HTML... -->\\n\\n</body>\\n</html>\",\"javaScript\":\"//type in some javaScript [o_0] ...\"}}]',\n\n ]);\n\n Slide::factory()->create([\n 'owner_id'=>1,\n 'title'=>'Lesson 1',\n 'data'=>'[{\"type\":\"slide\",\"content\":\"# Welcome\\n- HTML\\n- Tags\\n- Some other stuff\"},{\"type\":\"slide\",\"content\":\"# HTML tags\\n- h1 - h6\\n- div\\n- p\\n\"},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <h1>h1 tag</h1>\\n <h2>h2 tag</h2>\\n <h3>h3 tag</h3>\\n <h4>h4 tag</h4>\\n <h5>h5 tag</h5>\\n <h6>h5 tag</h6>\\n \\n <p>paragrpah</p>\\n <p>paragrpah</p>\\n \\n <div>this is a div</div>\\n <div>this is a div</div>\\n\\n</body>\\n</html>\",\"javaScript\":\"//type in some javaScript [o_0] ...\"}},{\"type\":\"slide\",\"content\":\"## Task\\n- inside of a div element create a h1 element with the text \\\"Hello world\\\"\"},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <!-- type some HTML... -->\\n\\n</body>\\n</html>\",\"javaScript\":\"\"}},{\"type\":\"slide\",\"content\":\"## Inline styling\\n- we use CSS to style elements on a webpage\\n- we can use \\n - css files\\n - the HTML style tag\\n - inline css\\n\\n- We will be using inline CSS today\"},{\"type\":\"slide\",\"content\":\"## How does it work ?\\n- < h1 style=\\'color:red\\'> TEXT </ h1>\\n- < p style=\\'color:red\\'> TEXT </ p>\\n\"},{\"type\":\"exercise\",\"content\":\"Exercise\",\"data\":{\"xml\":\"<!DOCTYPE html>\\n<html>\\n<head>\\n <title>JS Bin</title>\\n\\n <style>\\n </style>\\n</head>\\n<body>\\n <h1>Make this element have a white color and black background color</h1>\\n\\n</body>\\n</html>\",\"javaScript\":\"//type in some javaScript [o_0] ...\"}}]'\n ]);\n\n }",
"public function slide($cur){\n \n $Auth = new Auth($url);\n if(!$Auth->isLoggedIn()){\n header('Location: /user/login');\n }\n \n else {\n \n $this->set('inProcess', true);\n \n $user = $Auth->getProfile();\n $this->set('user', $user);\n \n if(!isset($_SESSION['plan']) || $cur === '1.1'){\n $_SESSION['plan'] = array();\n //$_SESSION['project'] = null;\n }\n \n $position = explode('.', $cur);\n \n $step_no = (int)$position[0];\n $slide_no = (int)$position[1];\n \n $Slide = new Slide;\n $Slidelist = new Slidelist;\n $Project = new Project;\n \n $slidelist = $Slidelist->getList();\n \n $slideIndex = array();\n foreach($slidelist as $s){\n $slideIndex[$s->step][] = $s->position;\n $slideIndex['fullIndex'][] = $s->step . '.' . $s->position;\n }\n \n \n $this->set('step_number', $step_no);\n $this->set('slide_number', $slide_no);\n $this->set('slidelist', $slidelist);\n $this->set('slideindex', $slideIndex);\n \n if(!empty($_SESSION['project'])) {\n $loaded_project = $Project->findOne($_SESSION['project']);\n $this->set('projecthash', $loaded_project->hash);\n }\n \n $slide = $Slidelist->find(array(\n 'position' => $slide_no,\n 'step' => $step_no\n ));\n \n $nextSlide = $slideIndex['fullIndex'][array_search($cur, $slideIndex['fullIndex'], true) + 1];\n $prevSlide = $slideIndex['fullIndex'][array_search($cur, $slideIndex['fullIndex'], true) - 1]; \n /*\n echo $cur; \n echo array_search($cur, $slideIndex['fullIndex']) + 1;\n dbga($slideIndex);\n */\n \n $this->set('nextSlide', $nextSlide);\n $this->set('prevSlide', $prevSlide);\n $this->set('currentSlide', $cur);\n \n $this->set('slide', $slide[0]);\n \n //check if we have a hash for a project\n \n \n if($_GET['p']){\n $hash = $_GET['p'];\n $project = $this->Project->find(array('hash' => $hash));\n \n if(!empty($project) && is_object($project[0])) {\n $_SESSION['project'] = $project[0]->idprojects;\n }\n \n $slidecontent = $Slide->find(array(\n 'project' => $project[0]->idprojects,\n 'step' => $step_no,\n 'slide' => $slide_no,\n ));\n //$slidecontent[0]->full_project = $project[0];\n if($slidecontent){ \n $this->set('original', $slidecontent);\n }\n if(isset($_GET['edit'])){\n $this->set('edit', true);\n }\n if(isset($_GET['back'])){\n $this->set('back', true);\n }\n }\n \n if(isset($_POST) && !empty($_POST)){\n $_SESSION['plan'][$_POST['current_slide']] = $_POST;\n \n // Save Slide to Slide content - Look for a Project Hash and, if Step == 1\n \n if($_POST['current_slide'] === '1.1' && !isset($_POST['project'])){\n \n $ProjectHash = md5( $_SESSION[APPNAME]['USR'] . time() . $_SESSION[APPNAME][SESSIONKEY]);\n \n $data['user'] = $user->id;\n $data['hash'] = $ProjectHash;\n \n $idproject = $this->Project->create($data);\n $_SESSION['project'] = $idproject;\n }\n \n $slide_position = explode('.', $_POST['current_slide']);\n \n \n $slide = array();\n $slide['project'] = $_SESSION['project'];\n $slide['step'] = $slide_position[0];\n $slide['slide'] = $slide_position[1];\n $slide['status'] = 2;\n $slide['choice'] = (!empty($_POST['choice']) ? $_POST['choice'] : null);\n $slide['extra'] = (!empty($_POST['extra']) ? $_POST['extra'] : null);\n \n //Parse Answers\n if(is_array($_POST['answer'])){\n $answer = array_filter($_POST['answer']);\n \n // implode checkboxes in step 4.2\n if($slide['step'] == 4 && $slide['slide'] == 2){\n $answer = implode(', ', $answer);\n }\n else {\n $answer = $answer[0];\n }\n }\n else {\n $answer = $_POST['answer'];\n }\n $slide['answer'] = $answer;\n \n // creating or updating ?\n if(isset($_POST['slide_update']) && !empty($_POST['slide_update'])){\n $toUpdate = $Slide->find(array('step' => $slide['step'],\n 'slide' => $slide['slide'],\n 'project'=> $slide['project']\n ));\n \n \n \n $Slide->update($slide, $toUpdate[0]->idslides);\n \n /** add a filter to sort out exiting pages **/\n if(isset($_POST['edit']) && $_POST['edit'] === 'true'){\n header('Location: /user/projects/?cd=2'); \n }\n \n }\n else {\n // check if we are skipping stuff\n /*if($slide['step'] == 1 && $slide['position'] == 11 && (isset($_GET['skipped']))){\n $slide['answer'] == \n }*/\n \n $r = $Slide->create($slide);\n // Check values in the choice @ the end of Step 3\n if($slide['step'] == 3 && $slide['slide'] == 7 ) {\n $choice = $_POST['choice'];\n if(!in_array('no', $choice)){\n header('Location: /project/slide/4.10');\n }\n }\n }\n }\n }\n }",
"public function run()\n {\n $listSlide = array(\n \t[\n\t 'name' => str_random(4),\n\t 'image_link' => 'slide1.jpg', \n \t],\n ); \n \tforeach ($listSlide as $key => $value) {\n \t\tDB::table('slides')->insert($value);\n \t}\n }",
"public function run()\n {\n $values = [\n 'homepage_slider' => \"<!-- slide 1 here -->\n <div data-src="/img/slides/camera/slide1/img1.jpg">\n <div class="camera_caption fadeFromLeft">\n <div class="container">\n <div class="row">\n <div class="span6">\n <h2 class="animated fadeInDown"><strong>Vim porro dicam reprehendunt <span class="colored">multi usage</span></strong></h2>\n <p class="animated fadeInUp"> Vim porro dicam reprehendunt te, populo quodsi dissentiet cum ad. Ne natum deseruisse vis. Iisque deseruisse sententiae mel ne, dolores appetere vim ut. Sea no tamquam reprimique.</p>\n <a href="#" class="btn btn-success btn-large animated fadeInUp">\n <i class="icon-link"></i> Read more\n </a>\n <a href="#" class="btn btn-theme btn-large animated fadeInUp">\n <i class="icon-download"></i> Download\n </a>\n </div>\n <div class="span6">\n <img src="/img/slides/camera/slide1/screen.png" alt="" class="animated bounceInDown delay1" />\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <!-- slide 2 here -->\n <div data-src="/img/slides/camera/slide2/img1.jpg">\n <div class="camera_caption fadeFromLeft">\n <div class="container">\n <div class="row">\n <div class="span6">\n <img src="/img/slides/camera/slide2/iMac.png" alt="" />\n </div>\n <div class="span6">\n <h2 class="animated fadeInDown"><strong>Put your <span class="colored">Opt in form</span></strong></h2>\n <p class="animated fadeInUp"> Vim porro dicam reprehendunt te, populo quodsi dissentiet cum ad. Ne natum deseruisse vis. Iisque deseruisse sententiae mel ne, dolores appetere vim ut. Sea no tamquam reprimique.</p>\n <form>\n <div class="input-append">\n <input class="span3 input-large" type="text">\n <button class="btn btn-theme btn-large" type="submit">Subscribe</button>\n </div>\n </form>\n </div>\n \n </div>\n </div>\n </div>\n </div>\n \n <!-- slide 3 here -->\n <div data-src="/img/slides/camera/slide2/img1.jpg">\n <div class="camera_caption fadeFromLeft">\n <div class="container">\n <div class="row">\n <div class="span12 aligncenter">\n <h2 class="animated fadeInDown"><strong><span class="colored">Responsive</span> and <span class="colored">cross broswer</span> compatibility</strong></h2>\n <p class="animated fadeInUp">Pellentesque habitant morbi tristique senectus et netus et malesuada</p>\n <img src="img/slides/camera/slide3/browsers.png" alt="" class="animated bounceInDown delay1" />\n </div>\n </div>\n </div>\n </div>\n </div>\",\n 'homepage_main_content' => \"<div class="row">\n <div class="span12">\n <div class="cta-box">\n <div class="row">\n <div class="span8">\n <div class="cta-text">\n <h2>Special price in very <span>limited</span> times</h2>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="span12">\n <div class="row">\n <div class="span4">\n <div class="box flyLeft">\n <div class="icon">\n <i class="ico icon-circled icon-bgdark icon-star icon-3x"></i>\n </div>\n <div class="text">\n <h4>Products</h4>\n <p>\n Lorem ipsum dolor sit amet, has ei ipsum scaevola deseruisse am sea facilisis.\n </p>\n <a href="/products">Learn More</a>\n </div>\n </div>\n </div>\n <div class="span4">\n <div class="box flyIn">\n <div class="icon">\n <i class="ico icon-circled icon-bglight icon-dropbox icon-3x"></i>\n </div>\n <div class="text">\n <h4>Rental</h4>\n <p>\n Lorem ipsum dolor sit amet, has ei ipsum scaevola deseruisse am sea facilisis.\n </p>\n <a href="/rental">Learn More</a>\n </div>\n </div>\n </div>\n <div class="span4">\n <div class="box flyRight">\n <div class="icon">\n <i class="ico icon-circled icon-bgdark icon-laptop active icon-3x"></i>\n </div>\n <div class="text">\n <h4>Services</h4>\n <p>\n Lorem ipsum dolor sit amet, has ei ipsum scaevola deseruisse am sea facilisis.\n </p>\n <a href="/services">Learn More</a>\n </div>\n </div>\n </div>\n </div>\n \n <div class="row">\n <div class="span4">\n <div class="box flyLeft">\n <div class="icon">\n <i class="ico icon-circled icon-bgprimary icon-code icon-3x"></i>\n </div>\n <div class="text">\n <h4>Projects</h4>\n <p>\n Lorem ipsum dolor sit amet, has ei ipsum scaevola deseruisse am sea facilisis.\n </p>\n <a href="/projects">Learn More</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\",\n 'homepage_comment_slider' => \"<div class="span12 aligncenter">\n <h3 class="title">What people <strong>saying</strong> about us</h3>\n <div class="blankline30"></div>\n\n <ul class="bxslider">\n <li>\n <blockquote>\n Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis feugiat.Suspendisse eu erat quam. Vivamus porttitor eros quis nisi lacinia sed interdum lorem vulputate. Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis\n feugiat\n </blockquote>\n <div class="testimonial-autor">\n <img src="img/dummies/testimonial/1.png" alt="" />\n <h4>Hillary Doe</h4>\n <a href="#">www.companyname.com</a>\n </div>\n </li>\n <li>\n <blockquote>\n Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis feugiat.Suspendisse eu erat quam. Vivamus porttitor eros quis nisi lacinia sed interdum lorem vulputate. Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis\n feugiat\n </blockquote>\n <div class="testimonial-autor">\n <img src="img/dummies/testimonial/2.png" alt="" />\n <h4>Michael Doe</h4>\n <a href="#">www.companyname.com</a>\n </div>\n </li>\n <li>\n <blockquote>\n Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis feugiat.Suspendisse eu erat quam. Vivamus porttitor eros quis nisi lacinia sed interdum lorem vulputate. Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis\n feugiat\n </blockquote>\n <div class="testimonial-autor">\n <img src="img/dummies/testimonial/3.png" alt="" />\n <h4>Mark Donovan</h4>\n <a href="#">www.companyname.com</a>\n </div>\n </li>\n <li>\n <blockquote>\n Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis feugiat.Suspendisse eu erat quam. Vivamus porttitor eros quis nisi lacinia sed interdum lorem vulputate. Aliquam a orci quis nisi sagittis sagittis. Etiam adipiscing, justo quis\n feugiat\n </blockquote>\n <div class="testimonial-autor">\n <img src="img/dummies/testimonial/4.png" alt="" />\n <h4>Marry Doe Elliot</h4>\n <a href="#">www.companyname.com</a>\n </div>\n </li>\n </ul>\n\n </div>\",\n 'footer' => \"<div class="container">\n <div class="row">\n <div class="span4">\n <div class="widget">\n <h5 class="widgetheading">Browse pages - Test</h5>\n <ul class="link-list">\n <li><a href="#">Our company</a></li>\n <li><a href="#">Terms and conditions</a></li>\n <li><a href="#icon-rocket icon-white">Privacy policy</a></li>\n <li><a href="#">Press release</a></li>\n <li><a href="#">What we have done</a></li>\n <li><a href="#">Our support forum</a></li>\n </ul>\n \n </div>\n </div>\n <div class="span4">\n <div class="widget">\n <h5 class="widgetheading">Get in touch</h5>\n <address>\n <strong>JLC.</strong><br>\n Somestreet 200 VW, Suite Village A.001<br>\n street 13426 Manila\n </address>\n <p>\n <i class="icon-phone"></i> 09123456789 <br>\n <i class="icon-envelope-alt"></i> [email protected]\n </p>\n </div>\n </div>\n </div>\n </div>\n <div id="sub-footer">\n <div class="container">\n <div class="row">\n <div class="span6">\n <div class="copyright">\n <p><span>&copy; JLC. All right reserved - XD</span></p>\n </div>\n </div>\n </div>\n </div>\n </div>\",\n 'services' => \"<div class="span12">\n <h4 class="title">What we do - Services</h4>\n <p>\n Ei mel semper vocent persequeris, nominavi patrioque vituperata id vim, cu eam gloriatur philosophia deterruisset. Meliore perfecto repudiare ea nam, ne mea duis temporibus. Id quo accusam consequuntur, eum ea debitis urbanitas. Nibh reformidans vim ne.\n </p>\n </div>\",\n 'projects' => \"<div class="span12">\n <h4 class="title">What we do - Projects</h4>\n <p>\n Ei mel semper vocent persequeris, nominavi patrioque vituperata id vim, cu eam gloriatur philosophia deterruisset. Meliore perfecto repudiare ea nam, ne mea duis temporibus. Id quo accusam consequuntur, eum ea debitis urbanitas. Nibh reformidans vim ne.\n </p>\n </div>\"\n ];\n\n\n foreach($values as $key => $value) {\n\n $record = new App\\MdlSettings;\n $record->key = $key;\n $record->value = $value;\n $record->save();\n \n }\n\n }",
"function slide_show()\n \t{\n // Setup show\n $show = ( $this->ipsclass->input['show'] == 'first' ) ? 0 : $this->ipsclass->input['show'];\n\n // Figure out if the user has chosen a value, or if we should go with a default\n $sort_key = ( $this->ipsclass->input['sort_key'] ) ? $this->ipsclass->input['sort_key'] : 'date';\n $order_key = ( $this->ipsclass->input['order_key'] ) ? $this->ipsclass->input['order_key'] : 'DESC';\n $prune_key = ( $this->ipsclass->input['prune_key'] ) ? $this->ipsclass->input['prune_key'] : '30';\n\n if( ! empty( $this->ipsclass->input['cat'] ) )\n {\n $where = \"category_id=\". intval( $this->ipsclass->input['cat'] );\n }\n else\n {\n $where = \"album_id=\". intval( $this->ipsclass->input['album'] );\n }\n\n // Get the picture\n $this->ipsclass->DB->cache_add_query( 'slideshow_image', \n\t\t\t\t\t\t\t array( 'where' => $where,\n\t\t\t\t\t\t\t\t\t 'prune' => $prune,\n 'sort_key' => $sort_key,\n 'order_key' => $order_key,\n 'show' => $show,\n\t\t\t\t\t\t\t), 'gallery_sql_queries' );\t\t\t\t\t\t\t\t\t \n $this->ipsclass->DB->simple_exec();\n \n // Show it\n $i = $this->ipsclass->DB->fetch_row();\n\n if( $this->ipsclass->DB->get_num_rows() )\n {\n $show++;\n $photo = $this->glib->make_image_link( $i );\n $type = ( $this->ipsclass->input['cat'] ) ? \"&cat={$this->ipsclass->input['cat']}\" : \"&album={$this->ipsclass->input['album']}&mid={$i['mid']}\";\n $hfoff = ( $this->ipsclass->input['hfoff'] ) ? \"&hfoff=1\" : \"\";\n\t\t\t\t$close = ( $this->ipsclass->input['closewindow'] ) ? \"&closewindow=1\" : \"\";\n\t\t\t\t$url = \"{$this->ipsclass->base_url}automodule=gallery&cmd=slideshow&show={$show}&duration={$this->ipsclass->input['duration']}&sort_key={$this->ipsclass->input['sort_key']}&order_key={$this->ipsclass->input['order_key']}&prune_key={$this->ipsclass->input['prune_key']}{$type}{$hfoff}{$close}\";\n $this->output .= $this->html->ss_slide( $photo, $url, $i['id'] );\n }\n else\n {\n if( ! empty( $this->ipsclass->input['cat'] ) )\n {\n $url = \"automodule=gallery&cmd=sc&cat={$this->ipsclass->input['cat']}\";\n }\n else\n {\n $url = \"automodule=gallery&cmd=user&user={$this->ipsclass->input['mid']}&op=view_album&album={$this->ipsclass->input['album']}\";\n }\n\n\t\t\t\tif( $this->ipsclass->input['closewindow'] )\n\t\t\t\t{\n\t\t\t\t\techo '<html><body onload=\"javascript:window.close();\"></html>';\n\t\t\t\t\tdie();\n\t\t\t\t}\n \n $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ss_end'], $url );\n }\n\n // Page Info\n $this->title = $this->ipsclass->vars['board_name'].$this->ipsclass->lang['sep'].$this->ipsclass->lang['gallery'];\n $this->nav[] = \"<a href='\".$this->ipsclass->base_url.\"automodule=gallery'>Gallery</a>\";\n $this->nav[] = $i['caption'];\n\t\t\t\n // -------------------------------------------------------\n // Stat Update!\n // -------------------------------------------------------\n $this->ipsclass->DB->simple_update( 'gallery_images', 'views=views+1', \"id={$i['id']}\", 1 );\n $this->ipsclass->DB->simple_exec();\n\n\t\t\tif( $this->ipsclass->input['hfoff'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->print->pop_up_window( $this->title, $this->output );\n\t\t\t}\n }",
"function _circ1($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t\t\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"container zn_slideshow\">\n\n\t\t\t\t<div id=\"ca-container\" class=\"ca-container\">\n <div class=\"ca-wrapper\">\n <?php\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( isset ( $options['single_circ1'] ) && is_array ( $options['single_circ1'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i = 1;\n\t\t\t\t\t\t\t$thumbs = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ( $options['single_circ1'] as $slide ) {\t\t\t\t\t\n\n\t\t\t\t\t\t\t\techo '<div class=\"ca-item ca-item-'.$i.'\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"ca-item-main\">';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"background\"></div><!-- background color -->';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_image'] ) && !empty ( $slide['ww_slide_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-icon\">';\n\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '',$slide['ww_slide_image'] , '336','200', true );\n\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" />';\n\t\t\t\t\t\t\t\t\t\t\techo '</div>';\t\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\t\t// TITle\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_title'] ) && !empty ( $slide['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<h3>'. $slide['ww_slide_title'].'</h3>';\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\t\t// DESC\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_desc'] ) && !empty ( $slide['ww_slide_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<h4>'. $slide['ww_slide_desc'].'</h4>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// DESC\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_read_text'] ) && !empty ( $slide['ww_slide_read_text'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"#\" class=\"ca-more\">'.$slide['ww_slide_read_text'].' <span class=\"icon-chevron-right icon-white\"></span></a>';\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Bottom Title\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_bottom_title'] ) && !empty ( $slide['ww_slide_bottom_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"ca-starting\">'. $slide['ww_slide_bottom_title'].'</span>';\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\techo '</div>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content-wrapper\">';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content\">';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// Content Title\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_content_title'] ) && !empty ( $slide['ww_slide_content_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<h6>'.$slide['ww_slide_content_title'].'</h6>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"#\" class=\"ca-close\"><span class=\"icon-remove\"></span></a>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// Content description\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_desc_full'] ) && !empty ( $slide['ww_slide_desc_full'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content-text\">';\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\techo $slide['ww_slide_desc_full'];\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\techo '</div>';\n\t\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\t\t\t// Link\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_read_text_content'] ) && !empty ( $slide['ww_slide_read_text_content'] ) && isset ( $slide['ww_slide_link']['url'] ) && !empty ( $slide['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$slide['ww_slide_link']['url'].'\" target=\"'.$slide['ww_slide_link']['target'].'\">'.$slide['ww_slide_read_text_content'].'</a>';\n\t\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\t\techo '</div>';\n\t\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div><!-- end ca-item -->';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$i++;\n\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\n </div><!-- end ca-wrapper -->\n </div><!-- end circular content carousel -->\n\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}",
"function tfuse_slideshow($atts, $content) {\n global $slide;\n $slide = array();\n extract(shortcode_atts(array('type_size' => ''), $atts));\n $get_slideshow = do_shortcode($content);\n $uniq = rand(1, 400);\n $i = 0;\n $output = '<div class=\"slider slider_'.$type_size.'\">\n <div class=\"slider_container clearfix\" id=\"slider'.$uniq.'\">';\n while (isset($slide['type'][$i])) {\n if( $slide['type'][$i]=='image' )\n {\n if($type_size=='medium'){\n $width = 600;\n $height = 338;\n }\n elseif($type_size=='small'){\n $width = 430;\n $height = 242;\n }\n else{\n $width = 240;\n $height = 135;\n }\n $getimage = new TF_GET_IMAGE();\n $img = $getimage->width($width)->height($height)->src($slide['content'][$i])->get_img();\n $output .= '<div class=\"slider-item\">'.$img .'</div>';\n }\n else $output .= ' <div class=\"slider-item\"><div class=\"inner\">'.$slide['content'][$i].'</div></div>';\n $i++;\n }\n $output .= '</div>\n <div class=\"slider_pagination\" id=\"slider'.$uniq.'_pag\"></div>\n </div>\n <script>\n jQuery(document).ready(function($) {\n $(\"#slider'.$uniq.'\").carouFredSel({\n pagination : \"#slider'.$uniq.'_pag\",\n infinite: false,\n auto: false,\n height: \"auto\",\n items: 1,\n scroll: {\n fx: \"fade\",\n duration: 200\n }\n });\n });\n </script>';\n return $output;\n}",
"function display_phases($phases, $activity_count, $new_activity_count, $layout) {\n $inquiry_info = pi_info()->getCurrentInquiryInfo();\n drupal_set_title(check_plain($inquiry_info->getInquiryNode()->title));\n\n $show_phase_icons = FALSE;\n $show_activities = FALSE;\n\n if (strpos($layout, 'icon') !== FALSE) {\n $show_phase_icons = TRUE;\n }\n\n if (strpos($layout, 'activity') !== FALSE) {\n $show_activities = TRUE;\n }\n\n if (strpos($layout, 'octagon') !== FALSE) {\n $layout = 'octagon';\n }\n\n\n if (is_array($phases)) {\n //reindex the array to make sure it counts from 0,1,2,3....\n //and does not contain missing indexes\n $phases = array_values($phases);\n }\n\n drupal_add_css(drupal_get_path('module', 'pi') . '/pi_phase.css');\n\n $output = '<p>' . t('These are the phases of <i>@inquiry</i>. ', array('@inquiry' => $inquiry_info->getInquiryNode()->title));\n if (count($phases) > 0) {\n $phase_nodes = $inquiry_info->getPhases();\n $phase_node = array_shift($phase_nodes);\n $output .= t(' You can start at <b>@phase</b>.', array('@phase' => $phase_node->title));\n }\n $output .= '</p>';\n\n $image_path = drupal_get_path('module', 'pi') . '/images/';\n\n if ($layout == 'octagon') {\n // $background_arrows_image = '<ul style=\"\" class=\"phase\">';\n $background_arrows_image .= '<img width=\"150\" height=\"625\" src=\"' . $image_path . 'arrows_loop.png\" />';\n //$left_positions = array('200px', '200px', '200px', '200px', '200px', '200px', '200px', '200px');\n //$top_positions = array('35px', '110px', '185px', '260px', '335px', '410px', '485px', '560px');\n $phase_icons = array('topic.jpg', 'question.jpg', 'method.jpg', 'data_collection.jpg', 'analysis.jpg', 'conclusion.jpg', 'evaluation.jpg', 'presentation.jpg');\n } elseif ($layout == 'list') {\n $background_arrows_image = '<div style=\"position: absolute; top: 5px; left: 150px;\">';\n $background_arrows_image .= '<img width=\"150\" height=\"625\" src=\"' . $image_path . 'arrows_loop.png\" />';\n $left_positions = array('200px', '200px', '200px', '200px', '200px', '200px', '200px', '200px');\n $top_positions = array('35px', '110px', '185px', '260px', '335px', '410px', '485px', '560px');\n $phase_icons = array('topic.jpg', 'question.jpg', 'method.jpg', 'data_collection.jpg', 'analysis.jpg', 'conclusion.jpg', 'evaluation.jpg', 'presentation.jpg');\n } elseif ($layout == 'pentagon') {\n $background_arrows_image = '<div style=\"position: absolute; top: 23px; left: 151px;\">';\n $background_arrows_image .= '<img width=\"300\" height=\"172\" src=\"' . $image_path . 'arrows_pentagon.png\" />';\n $left_positions = array('180px', '345px', '320px', '40px', '15px');\n $top_positions = array('5px', '85px', '165px', '165px', '85px');\n $phase_icons = array('question.jpg', 'method.jpg', 'data_collection.jpg', 'analysis.jpg', 'conclusion.jpg');\n } elseif ($layout === 'octagon') {\n $background_arrows_image = '<div style=\"position: absolute; top: 23px; left: 135px;\">';\n $background_arrows_image .= '<img width=\"426\" height=\"278\" src=\"' . $image_path . 'arrows_octagon.png\" />';\n $left_positions = array('380px', '450px', '450px', '380px', '80px', '10px', '10px', '80px');\n $top_positions = array('10px', '95px', '180px', '270px', '270px', '180px', '95px', '10px');\n $phase_icons = array('topic.jpg', 'question.jpg', 'method.jpg', 'data_collection.jpg', 'analysis.jpg', 'conclusion.jpg', 'evaluation.jpg', 'presentation.jpg');\n };\n\n\n $list = array();\n\n if (is_array($phases)) {\n $count = 1;\n foreach ($phases as $number => $phases) {\n if (isset($phases['data'])) {\n $data = $phases['data'];\n\n if ($phase_icons[$number]) {\n $icon_url = $image_path . $phase_icons[$number];\n } else {\n $icon_url = null;\n }\n\n $title = $data[0];\n $activitys = $activity_count[$number];\n $new_activitys = $new_activity_count[$number];\n\n // $output .= '<li style=\"position: absolute; top: ' . $top_positions[ $number ] . '; left: ' . $left_positions[ $number ] . ';\" class=\"phasebox\">';\n\n\n $list[] = array('data' => display_phases_box($icon_url, $title, $activitys, $new_activitys, $show_phase_icons, $show_activities, $layout), 'class' => $layout . '-phasebox-' . $count);\n\n //$output .= '<li style=\"\" class=\"phase\">';\n //$output .= display_phases_box( $icon_url, $title, $activitys, $new_activitys, $show_phase_icons , $show_activities );\t\t\t\t\t\n //$output .= '</li></ul>';\n }\n if ($layout != 'list') {\n $count = $count + 1;\n }\n }\n }\n\n $title = NULL;\n $type = 'ul';\n $attributes = array('class' => 'phase');\n\n $output .= '<div class=\"' . $layout . '-phasearea\">';\n // $output .= theme('table', $headings, $table);\n $output .= theme_item_list($list, $title, $type, $attributes);\n $output .= '</div>';\n\n // $output .= '</div>';\n return $output;\n}",
"function _static5($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content textpop-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"texts\">';\n\t\t\t\t\t\t// Line 1\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line1'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line1\">'.$options['sc_pop_line1'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 2\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line2'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line2\">'.$options['sc_pop_line2'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 3\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line3'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line3\">'.$options['sc_pop_line3'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 4\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line4'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line4\">'.$options['sc_pop_line4'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\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\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\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\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t?>\n </div><!-- end static-content -->\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"function _circ2($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t\t\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"container zn_slideshow\">\n\n\t\t\t\t<div id=\"ca-container\" class=\"ca-container\">\n <div class=\"ca-wrapper\">\n <?php\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( isset ( $options['single_circ2'] ) && is_array ( $options['single_circ2'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i = 1;\n\t\t\t\t\t\t\t$thumbs = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ( $options['single_circ2'] as $slide ) {\t\t\t\t\t\n\n\t\t\t\t\t\t\t\techo '<div class=\"ca-item ca-item-'.$i.'\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"ca-item-main\">';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_image'] ) && !empty ( $slide['ww_slide_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-icon\">';\n\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '',$slide['ww_slide_image'] , '376','440', true );\n\t\t\t\t\t\t\t\t\t\t\t\t$bg = 'style=\"background-image:url('.$image['url'].');\"';\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '</div>';\t\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\t\techo '<div class=\"background\" '.$bg.'></div><!-- background color -->';\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// TITle\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_title'] ) && !empty ( $slide['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_title_left'] ) && !empty ( $slide['ww_slide_title_left'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$title_pos_l = 'left:'.$slide['ww_slide_title_left'].'px;';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_title_top'] ) && !empty ( $slide['ww_slide_title_top'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$title_pos_t = 'top:'.$slide['ww_slide_title_top'].'px;';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"title_circle\" style=\"'.$title_pos_t.' '.$title_pos_l.'\" data-size=\"'.$slide['ww_slide_title_size'].'\">';\n\t\t\t\t\t\t\t\t\t\t\t\techo '<span>'.$slide['ww_slide_title'].'</span>';\n\t\t\t\t\t\t\t\t\t\t\techo '</div>';\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\t\t// DESC\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_desc'] ) && !empty ( $slide['ww_slide_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<h4>'. $slide['ww_slide_desc'].'</h4>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// DESC\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_read_text'] ) && !empty ( $slide['ww_slide_read_text'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"#\" class=\"ca-more\">'.$slide['ww_slide_read_text'].' <span class=\"icon-chevron-right icon-white\"></span></a>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Bottom Title\n\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_bottom_title'] ) && !empty ( $slide['ww_slide_bottom_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"ca-starting\">'. $slide['ww_slide_bottom_title'].'</span>';\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\techo '</div>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content-wrapper\">';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content\">';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// Content Title\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_content_title'] ) && !empty ( $slide['ww_slide_content_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<h6>'.$slide['ww_slide_content_title'].'</h6>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"#\" class=\"ca-close\"><span class=\"icon-remove\"></span></a>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// Content description\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_desc_full'] ) && !empty ( $slide['ww_slide_desc_full'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"ca-content-text\">';\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\techo $slide['ww_slide_desc_full'];\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\techo '</div>';\n\t\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\t\t\t// Link\n\t\t\t\t\t\t\t\t\t\t\tif ( isset ( $slide['ww_slide_read_text_content'] ) && !empty ( $slide['ww_slide_read_text_content'] ) && isset ( $slide['ww_slide_link']['url'] ) && !empty ( $slide['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$slide['ww_slide_link']['url'].'\" target=\"'.$slide['ww_slide_link']['target'].'\">'.$slide['ww_slide_read_text_content'].'</a>';\n\t\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\t\techo '</div>';\n\t\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div><!-- end ca-item -->';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$i++;\n\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\n </div><!-- end ca-wrapper -->\n </div><!-- end circular content carousel -->\n\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"public function run()\n {\n //\n // source,order,page,published;\n $now = Carbon::now()->toDateTimeString();\n Slide::insert([\n [\"source\" => 1, \"order\" => 11, \"page\" => \"home\", \"published\" => 1, \"created_at\" => $now, \"updated_at\" => $now],\n [\"source\" => 2, \"order\" => 12, \"page\" => \"home\", \"published\" => 1, \"created_at\" => $now, \"updated_at\" => $now],\n [\"source\" => 3, \"order\" => 13, \"page\" => \"home\", \"published\" => 1, \"created_at\" => $now, \"updated_at\" => $now]\n // [\"name\" => \"banner\", \"created_at\" => $now, \"updated_at\" => $now],\n ]);\n // assets / img / banners / bn01 . jpg\n }",
"function _static4($options)\n\t{\n\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\n <div class=\"static-content maps-style\">\n\t\t\t\t<div id=\"google_map\" style=\"width:100%; height:<?php echo $options['sc_map_height'];?>px;\"></div><!-- map container -->\n\t\t\t\t<ul id=\"map_controls\">\n\t\t\t\t\t<li><a id=\"zoom_in\"><span class=\"icon-plus icon-white\"></span></a></li>\n\t\t\t\t\t<li><a id=\"zoom_out\"><span class=\"icon-minus icon-white\"></span></a></li>\n\t\t\t\t\t<li><a id=\"reset\"><span class=\"icon-refresh icon-white\"></span></a></li>\n\t </ul>\n\t\t\t\t<?php\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\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\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\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\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t}\n\t\t\t\t?>\n \n\t\t\t</div>\n \n\t\t\t\n <script type=\"text/javascript\">\n\t(function($){\n\t\t$(document).ready(function() {\n\t\t<?php if ( !empty ( $options['sc_map_icon'] ) ) { ?>\n\t\t\tvar myMarkers = {\n\t\t\t\t\"markers\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"latitude\": \"<?php echo $options['sc_map_latitude'];?>\",\t\t// latitude\n\t\t\t\t\t\t\"longitude\":\"<?php echo $options['sc_map_longitude'];?>\",\t\t// longitude\n\t\t\t\t\t\t\"icon\": \"<?php echo $options['sc_map_icon'];?>\"\t// Pin icon\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t<?php } ?>\n\n\t\t\t\n\t\t\t\n\t\t\t$(\"#google_map\").mapmarker({\n\t\t\t\tzoom : <?php echo $options['sc_map_zoom'];?>,\t\t\t\t\t\t\t// Zoom\n\t\t\t\tcenter: \"<?php echo $options['sc_map_latitude'];?>,<?php echo $options['sc_map_longitude'];?>\",\t\t// Center of map\n\t\t\t\ttype: \"<?php echo $options['sc_map_type'];?>\",\t\t\t\t\t// Map Type\n\t\t\t\tcontrols: \"HORIZONTAL_BAR\",\t\t\t// Controls style\n\t\t\t\tdragging:<?php if ( !empty($options['sc_map_dragg']) ) { echo $options['sc_map_dragg']; } else { echo '0';}?>,\t\t\t\t\t\t\t// Allow dragging?\n\t\t\t\tmousewheel:<?php if ( !empty($options['sc_map_zooming_mousewheel']) ) { echo $options['sc_map_zooming_mousewheel']; } else { echo '0';}?>,\t// Allow zooming with mousewheel\n\t\t\t\t<?php if ( !empty ( $options['sc_map_icon'] ) ) { echo 'markers: myMarkers,';} ?>\t\t\n\t\t\t\tstyling: 0,\t\t\t\t\t\t\t// Bool - do you want to style the map?\n\t\t\t\tfeatureType:\"all\",\n\t\t\t\tvisibility: \"on\",\n\t\t\t\telementType:\"geometry\",\n\t\t\t\thue:\"#00AAFF\",\n\t\t\t\tsaturation:-100,\n\t\t\t\tlightness:0,\n\t\t\t\tgamma:1,\n\t\t\t\tnavigation_control:0\n\t\t\t\t/*\n\t\t\t\tTo play with the map colors and styles you can try this tool right here http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html\n\t\t\t\t*/\n\t\t\t});\n\t\t});\n\t})(jQuery);\n\t</script>\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"public function createSlider() {\r\n $centerId = $this->centerId;\r\n $sliderSectionsId = 1;\r\n $query = \"SELECT id FROM centers_content_details WHERE center_id=$centerId AND section_id=$sliderSectionsId\";\r\n $sliderContentIdQuery = mysql_query($query, $this->connection);\r\n if (mysql_num_rows($sliderContentIdQuery) > 0) {\r\n $asso = mysql_fetch_assoc($sliderContentIdQuery);\r\n $id = $asso['id'];\r\n $sectionsContent = ' <section class=\"content\">\r\n <section class=\"clearfix\" id=\"homeCorpo\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"span12\">\r\n <div class=\"flexslider flexFullScreen mb40 \">\r\n <ul class=\"slides\">';\r\n $masterQuery = \"SELECT * FROM slider_content_list WHERE slider_id=$id ORDER BY slidePriority\";\r\n $slides = mysql_query($masterQuery, $this->connection);\r\n if (mysql_num_rows($slides) > 0) {\r\n $slideNumber = mysql_num_rows($slides);\r\n if ($slideNumber > 0) {\r\n for ($i = 0; $i <= $slideNumber; $i++) {\r\n while ($sectionResult = mysql_fetch_assoc($slides)) {\r\n\r\n\r\n $j = $i + 1;\r\n $k = $j + 1;\r\n $sectionsContent .=\"<li class='slideN$i'>\r\n <img src='./images/slider/super/$sectionResult[slide_img_Title]' alt='$sectionResult[slide_img_alt]' style='width:100%;height: 420px; padding-bottom: 1px;'/>\r\n <div class='caption $sectionResult[caption]'>\r\n <div class='element$j-$j' data-animation='$sectionResult[animatingTypeBig]'>\r\n <h1>$sectionResult[slide_big_title]</h1>\r\n </div>\r\n <div class='element$j-$k' data-animation='$sectionResult[animatingTypeSmall]'>\r\n <h2>$sectionResult[slide_small_title]</h2>\r\n </div>\r\n </li> \";\r\n $i++;\r\n }\r\n }\r\n\r\n $sectionsContent .='</ul> ';\r\n }\r\n\r\n return $sectionsContent .='</div>\r\n </div>\r\n </div>\r\n </div></section>';\r\n }\r\n }\r\n }",
"public function run()\n {\n \t$array = array(\n\t \"html\", \"laravel\", \"htmlycss\",\n\t \"apphtml\", \"javascript\", \"php\",\n\t \"jquery\"\n\t\t);\n\n \t$arrayimagenes = array(\n\t \"html5.jpg\", \"laravel.jpg\", \"htmlycss.jpg\",\n\t \"apphtml.jpg\", \"javascript.jpg\", \"php.jpg\",\n\t \"jquery.jpg\"\n\t\t);\n\n\t\tfor($i=0; $i<count($array); $i++){\n\n\t\t\tswitch ($array[$i]) {\n\t\t\t\tcase 'html':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\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 )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'laravel':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'modelo',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'vista',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'controlador',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\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 )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'htmlycss':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\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)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\n\t\t\t\tcase 'apphtml':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\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)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'javascript':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\t\tcase 'php':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\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)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'jquery':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'jquery',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'jquery'\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)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\tDB::table('categorias')->insert([\n\t\t\t'nombre' => $array[$i],\n\t\t\t'imagen' => \"img/\".$arrayimagenes[$i],\n\t\t\t'tipos_archivos'=>json_encode($codigos),\n\t\t\t'descripsion' => str_random(255)\n\t\t ]);\n\n\t\t}\n\n \n\n\t \n\t }",
"function nirvana_ppslider_output( $slides ) {\n\t$nirvanas = nirvana_get_theme_options();\n\textract($nirvanas);\n\n\tif (count($slides)>0): ?>\n\t<div class=\"slider-wrapper theme-default <?php if($nirvana_fpsliderarrows==\"Visible on Hover\") echo \"slider-navhover\"; ?> slider-<?php echo preg_replace(\"/[^a-z0-9]/i\",\"\", strtolower($nirvana_fpslidernav)); ?>\">\n\t\t <div class=\"ribbon\"></div>\n\t\t <div id=\"slider\" class=\"nivoSlider\">\n\t\t<?php foreach( $slides as $id => $slide ):\n\t\t\t\tif ( $slide['image'] ) { ?>\n\t\t\t\t<a href=\"<?php echo ($slide['link'] ? $slide['link'] : '#'); ?>\">\n\t\t\t\t\t<img src=\"<?php echo $slide['image']; ?>\" data-thumb=\"<?php echo $slide['image']; ?>\" alt=\"<?php echo ( $slide['title'] ? esc_attr($slide['title']) : '' ); ?>\" <?php if ($slide['title'] || $slide['text']) : ?>title=\"#caption<?php echo $id;?>\" <?php endif; ?> />\n\t\t\t\t</a><?php } ?>\n\t\t <?php endforeach; ?>\n\t\t </div>\n\t\t <?php foreach( $slides as $id => $slide ): ?>\n\t\t\t\t<div id=\"caption<?php echo $id;?>\" class=\"nivo-html-caption\">\n\t\t\t\t\t<h2> <?php echo $slide['title'] ?></h2>\n\t\t\t\t\t<div class=\"slider-text-separator\"></div>\n\t\t\t\t\t<div class=\"slide-text\"> <div class=\"inline-slide-text\"> <?php echo $slide['text'] ?></div> </div>\n\t\t\t\t\t<?php if($nirvana_slidereadmore && $slide['link'] ) { ?>\n\t\t\t\t\t<div class=\"readmore\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url($slide['link']) ?>\"><?php echo esc_attr($nirvana_slidereadmore) ?> <i class=\"column-arrow\"></i> </a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</div>\n\n\t\t<?php endforeach; ?>\n\t\t </div>\n\t<?php endif;\n}",
"function _addMootoolsSlide(){\n \t$HTML = '';\n \t$doc = JFactory::getDocument();\n\t\t\t$js = \"<!--\n\t\t\t\t\twindow.addEvent('domready', function(){\n\t\t\t\t\t\tvar mySlide = new Fx.Slide('modjnewstoggle\".$this->num.\"');\n\t\t\t\t\t\tmySlide.hide();\n\t\t\t\t\t\t$('acatoggleclick\".$this->num.\"').addEvent('click', function(e){\n\t\t\t\t\t\t\te = new Event(e);\n\t\t\t\t\t\t\tmySlide.toggle();\n\t\t\t\t\t\t\t//e.stop();\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t//-->\";\n\t\t\t$doc->addScriptDeclaration( $js );\n\t\t\t$link = 'id=\"acatoggleclick'.$this->num.'\"';\n\t\t\t$HTML .= '<center><a '.$link;\n\t\t\t$HTML .= ' style=\"text-decoration: none;\" href=\"#\">';\n\n\t\t\tif (isset($this->mootools_btntext)) {\n\t\t\t\t$HTML .= '<div id=\"aca_clickcontainer\" style=\"padding:4px;\"><center><span>'.$this->mootools_btntext.'</span></center></div></a></center>';\n\t\t\t}else{\n\t\t\t\t$HTML .= '<div id=\"aca_clickcontainer\" style=\"padding:4px;\"><center><span>'. _JNEWS_MOOTOOLS_BTNTEXT .'</span></center></div></a></center>';\n\t\t\t}\n\n\t\t \t$HTML .= '<div id=\"modjnewstoggle'.$this->num.'\">';\n\t\t\t$HTML .= '<div id=\"acamoduletoggle'.$this->num.'\" style=\"padding: 3px;\">';\n\n \treturn $HTML;\n }",
"function sb_slideshow_slides( $sql ) {\n\tglobal $wpdb, $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$slides = get_post_meta( ( ! isset( $post->ID ) ? absint( $_POST['id'] ) : $post->ID ), 'slide', false ); // set single (third parameter) to false to pull ALL records with key \"slide\"\n\n\t$attachments = $wpdb->get_results( $sql );\n\n\t// push all image attachments info into array\n\t$indexes = array();\n\tforeach( $attachments as $attachment ) {\n\t\tarray_push( $indexes, count( $sb_slideshow_slides ) );\n\n\t\t$box = 'library';\n\t\t$order = '';\n\t\tforeach( $slides as $slide ) {\n\t\t\tif( $slide['attachment_id'] == $attachment->ID ) {\n\t\t\t\t$box = 'slides';\n\t\t\t\t$order = $slide['order'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$metadata = wp_get_attachment_metadata( $attachment->ID );\n\n\t\tarray_push( $sb_slideshow_slides, array(\n\t\t\t'box' \t\t\t=> $box,\n\t\t\t'order'\t\t\t=> $order,\n\t\t\t'attachment'\t\t=> array(\n\t\t\t\t'id' \t\t=> $attachment->ID,\n\t\t\t\t'year' \t\t=> mysql2date( 'Y', $attachment->post_date ),\n\t\t\t\t'month' \t=> mysql2date( 'm', $attachment->post_date ),\n\t\t\t\t'width'\t\t=> $metadata['width'],\n\t\t\t\t'height' \t=> $metadata['height'],\n\t\t\t\t'type' \t\t=> $attachment->post_mime_type,\n\t\t\t\t'link'\t\t=> $attachment->post_excerpt,\n\t\t\t\t'content'\t=> $attachment->post_content ),\n\t\t\t\t'image' \t=> '<img src=\"' . sb_get_post_image_url( array( 'width' => $sb_slideshow_interface['slide_width'], 'height' => $sb_slideshow_interface['slide_height'], 'image_id' \t=> $attachment->ID, 'echo' \t=> false ) ) . '\" width=\"' . $sb_slideshow_interface['slide_width'] . '\" height=\"' . $sb_slideshow_interface['slide_height'] . '\" />'\n\t\t\t)\n\t\t);\n\t}\n\n\tusort( $sb_slideshow_slides, 'sb_slideshow_slide_sort' ); // order the elements of the array\n\n\treturn $indexes;\n}",
"public function run()\n {\n $carousel = new Carousel();\n $carousel->title = 'Caissa Park';\n $carousel->img = '';\n $carousel->body = 'Chess activity';\n $carousel->readmore = '';\n $carousel->save();\n\n $carousel = new Carousel();\n $carousel->title = 'The future of chess';\n $carousel->img = '';\n $carousel->body = 'Chess in nature';\n $carousel->readmore = '';\n $carousel->save();\n\n $carousel = new Carousel();\n $carousel->title = 'Chess sunset';\n $carousel->img = '';\n $carousel->body = 'Chess in garden';\n $carousel->readmore = '';\n $carousel->save();\n\n $carousel = new Carousel();\n $carousel->title = 'Chess contest';\n $carousel->img = '';\n $carousel->body = 'Chess in brain';\n $carousel->readmore = '';\n $carousel->save();\n\n $carousel = new Carousel();\n $carousel->title = 'Welcome in the space!';\n $carousel->img = '';\n $carousel->body = 'Icon';\n $carousel->readmore = '';\n $carousel->save();\n\n $carousel = new Carousel();\n $carousel->title = 'Chess principle';\n $carousel->img = '';\n $carousel->body = 'Reference';\n $carousel->readmore = '';\n $carousel->save();\n }",
"public function wizardArray() {}",
"function create_xml( $pmWidth, $pmHeight, $loaderColor,$innerSideColor, $autoplay, $fieldOfView, $sideShadowAlpha, $dropShadowAlpha, $dropShadowDistance, $dropShadowScale, $dropShadowBlurX, $dropShadowBlurY, $menuDistanceX, $menuDistanceY, $menuColor1, $menuColor2, $menuColor3, $controlSize, $controlDistance, $controlColor1 , $controlColor2, $controlAlpha, $controlAlphaOver, $controlsX, $controlsY, $controlsAlign, $tooltipHeight, $tooltipColor, $tooltipTextY, $tooltipTextStyle, $tooltipTextColor, $tooltipMarginLeft, $tooltipMarginRight, $tooltipTextSharpness, $tooltipTextThickness, $infoWidth, $infoBackground, $infoBackgroundAlpha, $infoMargin, $infoSharpness, $infoThickness, $allPages, $allTransitions){\n\n\t\t\t// this is place where you can see\n\t\t\t// how xml will looks like\n\t\t//\techo \"ja pier...\".$allPages['type'];\n\t\t\t$xml = \"<Piecemaker>\\n\"\n\t\t\t\t.\" <Contents> \\n\";\n\t\t\t\tif($allPages !== \"\"){\n\t\t\t\t\t//\techo \"aaaaa\";\n\t\t\t\t//\techo $allPages['type']['0'].\"\\n\";\n\t\t\t \t\tfor($i = 0; $i < count($allPages['type']); $i++) {\n\t\t\t\t\t\t//echo \" \".$allPages['type'][$i].\"\\n\";\n\t\t\t\t\t\t\tif($allPages['type'][$i] == \"image\"){\n\t\t\t\t\t\t\t\t\t$xml .= \"\t\t<Image Source=\\\"\".$allPages['src'][$i].\"\\\" Title=\\\"\".stripslashes($allPages['slideTitle'][$i]).\"\\\" TypeOur=\\\"\".$allPages['type'][$i].\"\\\">\\n\"\n\t\t\t\t\t\t\t\t\t\t .\"\t\t\t<Text>\\n\"\n\t\t\t\t\t\t\t\t\t\t .\"\t\t\t\t\".\"<![CDATA[\".stripslashes($allPages['slideText'][$i]).\"]]>\\n\"\n\t\t\t\t\t\t\t\t\t\t .\"\t\t\t</Text>\\n\"\n\t\t\t\t\t\t\t\t\t\t .\"\t\t\t<Hyperlink URL=\\\"\".$allPages['hyperlinkURL'][$i].\"\\\" Target=\\\"\".$allPages['hyperlinkTarget'][$i].\"\\\"/>\\n\"\n\t\t\t\t\t\t \t\t\t\t .\"\t\t</Image>\\n\";\n\t\t\t\t\t\t\t} elseif($allPages['type'][$i] == \"flash\"){\n\t\t\t\t\t\t\t\t\t\t$xml .= \"\t\t<Flash Source=\\\"\".$allPages['src'][$i].\"\\\" Title=\\\"\".stripslashes($allPages['slideTitle'][$i]).\"\\\" TypeOur=\\\"\".$allPages['type'][$i].\"\\\">\\n\"\n\t\t\t\t\t\t\t\t.\"\t\t\t<Image Source=\\\"\".$allPages['large'][$i].\"\\\"/>\\n\"\n\t\t\t\t\t\t\t\t.\"\t\t</Flash>\\n\";\n\t\t\t\t\t\t\t} elseif($allPages['type'][$i] == \"video\"){\n\t\t\t\t\t\t\t\t\t\t$xml .= \"\t\t<Video Source=\\\"\".$allPages['src'][$i].\"\\\" Title=\\\"\".stripslashes($allPages['slideTitle'][$i]).\"\\\" Width=\\\"\".$allPages['videoWidth'][$i].\"\\\" Height=\\\"\".$allPages['videoHeight'][$i].\"\\\" Autoplay=\\\"\".$allPages['autoplay'][$i].\"\\\" TypeOur=\\\"\".$allPages['type'][$i].\"\\\">\\n\"\n\t\t\t\t\t\t\t\t.\"\t\t\t<Image Source=\\\"\".$allPages['large'][$i].\"\\\"/>\\n\"\n\t\t\t\t\t\t\t\t.\"\t\t</Video>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$xml .= \" </Contents> \\n\" \n\t\t\t\t.\" \\n\"\n\t\t\t\t.\" <Settings \\n\"\n\t\t\t\t.\" \t\tImageWidth=\\\"\".$pmWidth.\"\\\" \\n\"\n\t\t\t\t.\" \t\tImageHeight=\\\"\".$pmHeight.\"\\\" \\n\"\n\t\t\t\t.\" \t\tLoaderColor=\\\"\".$loaderColor.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInnerSideColor=\\\"\".$innerSideColor.\"\\\" \\n\"\n\t\t\t\t.\" \t\tAutoplay=\\\"\".$autoplay.\"\\\" \\n\"\n\t\t\t\t.\" \t\tFieldOfView=\\\"\".$fieldOfView.\"\\\" \\n\"\n\t\t\t\t.\" \t\tSideShadowAlpha=\\\"\".$sideShadowAlpha.\"\\\" \\n\"\n\t\t\t\t.\" \t\tDropShadowAlpha=\\\"\".$dropShadowAlpha.\"\\\" \\n\"\n\t\t\t\t.\" \t\tDropShadowDistance=\\\"\".$dropShadowDistance.\"\\\" \\n\"\n\t\t\t\t.\" \t\tDropShadowScale=\\\"\".$dropShadowScale.\"\\\" \\n\"\n\t\t\t\t.\" \t\tDropShadowBlurX=\\\"\".$dropShadowBlurX.\"\\\" \\n\"\n\t\t\t\t.\" \t\tDropShadowBlurY=\\\"\".$dropShadowBlurY.\"\\\" \\n\"\n\t\t\t\t.\" \t\tMenuDistanceX=\\\"\".$menuDistanceX.\"\\\" \\n\"\n\t\t\t\t.\" \t\tMenuDistanceY=\\\"\".$menuDistanceY.\"\\\" \\n\"\n\t\t\t\t.\" \t\tMenuColor1=\\\"\".$menuColor1.\"\\\" \\n\"\n\t\t\t\t.\" \t\tMenuColor2=\\\"\".$menuColor2.\"\\\" \\n\"\n\t\t\t\t.\" \t\tMenuColor3=\\\"\".$menuColor3.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlSize=\\\"\".$controlSize.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlDistance=\\\"\".$controlDistance.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlColor1=\\\"\".$controlColor1.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlColor2=\\\"\".$controlColor2.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlAlpha=\\\"\".$controlAlpha.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlAlphaOver=\\\"\".$controlAlphaOver.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlsX=\\\"\".$controlsX.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlsY=\\\"\".$controlsY.\"\\\" \\n\"\n\t\t\t\t.\" \t\tControlsAlign=\\\"\".$controlsAlign.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipHeight=\\\"\".$tooltipHeight.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipColor=\\\"\".$tooltipColor.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipTextY=\\\"\".$tooltipTextY.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipTextStyle=\\\"\".$tooltipTextStyle.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipTextColor=\\\"\".$tooltipTextColor.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipMarginLeft=\\\"\".$tooltipMarginLeft.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipMarginRight=\\\"\".$tooltipMarginRight.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipTextSharpness=\\\"\".$tooltipTextSharpness.\"\\\" \\n\"\n\t\t\t\t.\" \t\tTooltipTextThickness=\\\"\".$tooltipTextThickness.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoWidth=\\\"\".$infoWidth.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoBackground=\\\"\".$infoBackground.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoBackgroundAlpha=\\\"\".$infoBackgroundAlpha.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoMargin=\\\"\".$infoMargin.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoSharpness=\\\"\".$infoSharpness.\"\\\" \\n\"\n\t\t\t\t.\" \t\tInfoThickness=\\\"\".$infoThickness.\"\\\"/> \\n\"\n\t\t\t\t.\"\\n\"\n\t\t\t\t.\" <Transitions> \\n\";\n\t\t\t\t\n\t\t\tif(trim($allTransitions) !== \"\"){\n\t\t\t\tfor($i = 0; $i < count($allTransitions['pieces']); $i++) {\n\t\t\t\t\t$xml .= \"\t\t<Transition Pieces=\\\"\".$allTransitions['pieces'][$i].\"\\\" Time=\\\"\".$allTransitions['time'][$i].\"\\\" Transition=\\\"\".$allTransitions['type'][$i].\"\\\" Delay=\\\"\".$allTransitions['delay'][$i].\"\\\" DepthOffset=\\\"\".$allTransitions['depth'][$i].\"\\\" CubeDistance=\\\"\".$allTransitions['distance'][$i].\"\\\"/>\\n\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t$xml .= \"\\n\"\n\n\t\t\t\t.\" </Transitions>\\n\"\n\n\t\t\t\t.\"</Piecemaker>\";\n\n return $xml;\n\t}",
"function getSlideTitles() {\n global $slides;\n\n foreach ($slides[\"slides\"] as $slide) {\n $id = $slide[\"id\"];\n $title = $slide[\"title\"];\n echo \"<p class='sliderTitle' id='title$id'>$title</p>\";\n }\n }",
"function _static11($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content default-style with-login\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span7\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif (!empty($options['ww_slide_title'])) {\n\t\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( $options['ww_slide_title'] ).'</h2>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['ww_slide_subtitle'] )) {\n\t\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['ww_slide_subtitle'] ).'</h3>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !empty( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_l_text'] ) && !empty($options['ww_slide_link']['url']) ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn left\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['url'].'\" class=\"buyit\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span5\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t// Text\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vid_desc'] ) && !empty ( $options['sc_ec_vid_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h5 style=\"text-align:right;\">'.$options['sc_ec_vid_desc'].'</h5>';\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\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vime'] ) && !empty ( $options['sc_ec_vime'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo get_video_from_link ( $options['sc_ec_vime'] ,'black_border full_width' ,'520px','270px');\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</div>\n\t\t\t\t\t\t</div><!-- end row -->\n \n </div><!-- end static content -->\n </div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"function _static11($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content default-style with-login\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span7\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif (!empty($options['ww_slide_title'])) {\n\t\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( $options['ww_slide_title'] ).'</h2>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['ww_slide_subtitle'] )) {\n\t\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['ww_slide_subtitle'] ).'</h3>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !empty( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_l_text'] ) && !empty($options['ww_slide_link']['url']) ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn left\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['url'].'\" class=\"buyit\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span5\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t// Text\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vid_desc'] ) && !empty ( $options['sc_ec_vid_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h5 style=\"text-align:right;\">'.$options['sc_ec_vid_desc'].'</h5>';\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\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vime'] ) && !empty ( $options['sc_ec_vime'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo get_video_from_link ( $options['sc_ec_vime'] ,'black_border full_width' ,'520px','270px');\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</div>\n\t\t\t\t\t\t</div><!-- end row -->\n \n </div><!-- end static content -->\n </div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"function _static1($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content default-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h2 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h2>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// SUBTITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_subtitle'] ) && !empty ( $options['ww_slide_subtitle'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_subtitle']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\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\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\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\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\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\t\n \n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"private function get_flex_slider_markup( $slide ) {\n\n $image_attributes = array(\n 'src' => $slide['src'],\n 'height' => $slide['height'],\n 'width' => $slide['width'],\n 'alt' => $slide['alt'],\n 'rel' => $slide['rel'],\n 'class' => $slide['class'],\n 'title' => $slide['title']\n );\n\n if ( $this->settings['smartCrop'] == 'disabled_pad') {\n\n $image_attributes['style'] = $this->flex_smart_pad( $image_attributes, $slide );\n\n }\n\n $attributes = apply_filters( 'metaslider_flex_slider_image_attributes', $image_attributes, $slide, $this->slider->ID );\n\n $html = $this->build_image_tag( $attributes );\n\n $anchor_attributes = apply_filters( 'metaslider_flex_slider_anchor_attributes', array(\n 'href' => $slide['url'],\n 'target' => $slide['target']\n ), $slide, $this->slider->ID );\n\n if ( strlen( $anchor_attributes['href'] ) ) {\n $html = $this->build_anchor_tag( $anchor_attributes, $html );\n }\n\n // add caption\n if ( strlen( $slide['caption'] ) ) {\n $html .= '<div class=\"caption-wrap\"><div class=\"caption\">' . $slide['caption'] . '</div></div>';\n }\n\n $attributes = apply_filters( 'metaslider_flex_slider_list_item_attributes', array(\n 'data-thumb' => isset($slide['data-thumb']) ? $slide['data-thumb'] : \"\",\n 'style' => \"display: none; width: 100%;\",\n 'class' => \"slide-{$this->slide->ID} ms-image\"\n ), $slide, $this->slider->ID );\n\n $li = \"<li\";\n\n foreach ( $attributes as $att => $val ) {\n if ( strlen( $val ) ) {\n $li .= \" \" . $att . '=\"' . esc_attr( $val ) . '\"';\n }\n }\n\n $li .= \">\" . $html . \"</li>\";\n\n $html = $li;\n\n\n return apply_filters( 'metaslider_image_flex_slider_markup', $html, $slide, $this->settings );\n\n }",
"function slidedeck_create_custom_slidedeck_block( $html ) {\n ob_start();\n include( SLIDEDECK2_DEVELOPER_DIRNAME . '/views/_create-custom-slidedeck-block.php' );\n $html = ob_get_contents();\n ob_end_clean();\n\n return $html;\n }",
"function createCarousel($data) {\n\n\t\tif (is_array($data)) {\n\t\t\t$unq = uniqid();\n\t\t\t$this->id = $unq;\n\t\t\t\n\t\t\t$output = \"<div class='carousel' id='carousel\".$unq.\"'\";\n\t\t\t$output .= (!MOBILE) ? \" style='width:\".$this->width.\"px'>\" : \">\";\n\t\t\t\t$output .= \"<div class='carousel_left' onclick=\\\"carousel('\".$unq.\"', 'left')\\\">\";\n\t\t\t\t$output .= \"</div>\"; //<p><a onclick=\\\"carousel('\".$unq.\"', 'first')\\\">Start</a></p>\";\n\t\t\t\t$output .= \"<div class='carousel_inner'\";\n\t\t\t\t$output .= (!MOBILE) ? \" style='width:\".($this->width).\"px'>\" : \">\";\n\t\t\t\t\t$output .= \"<div class='carousel_slider'\";\n\t\t\t\t\t$output .= (!MOBILE) ? \" style='width:\".(($this->elm_width+25)*count($data)).\"px'>\" : \">\";\n\t\t\t\t\tforeach ($data as $key=>$elm) {\n\t\t\t\t\t\t$output .= \"<div class='carousel_element' style='max-width:\".$this->elm_width.\"px'>\";\n\t\t\t\t\t\t$output .= $elm;\n\t\t\t\t\t\t$output .= \"</div>\";\n\t\t\t\t\t}\n\t\t\t\t\t$output .= \"</div>\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t\t$output .= \"<div class='carousel_right' onclick=\\\"carousel('\".$unq.\"', 'right')\\\">\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t//$output .= \"</div><p style='float:right; font-size:11px;'><a onclick=\\\"carousel('\".$unq.\"', 'last')\\\">Skip to end</a></p>\";\n\t\t\t$output .= \"<script type='text/javascript'>$(document).ready(function(){carousel_skip=\".($this->elm_width+20).\"});</script>\";\n\t\t\t\n\t\t} else {\n\t\t\t$output = \"<p><em>please supply at least one element to create carousel</em></p>\";\n\t\t}\n\t\t\n\t\treturn $output;\n\t}",
"function code_generate($extracted)\n{\n $result = fill_zeroes_dots();\n\n put_front($extracted[0], $result, 0);\n\n if (isset($extracted[1])) {\n put_end($extracted[1], $result, 0);\n }\n\n if (isset($extracted[2])) {\n put_front($extracted[2], $result, 1);\n }\n\n if (isset($extracted[3]) && isset($extracted[4])) {\n put_front($extracted[3] . $extracted[4], $result, 2);\n } elseif (isset($extracted[3])) {\n put_front($extracted[3], $result, 2);\n }\n\n if (isset($extracted[5]) && isset($extracted[6])) {\n put_front($extracted[5] . $extracted[6], $result, 3);\n } elseif (isset($extracted[5])) {\n put_front($extracted[5], $result, 3);\n }\n\n return $result;\n}",
"public function run()\n {\n $this->generateWiadomosci(1, [1, 2]);\n $this->generateWiadomosci(2, [3, 4]);\n $this->generateWiadomosci(3, [5, 6]);\n $this->generateWiadomosci(5, [9, 10]);\n $this->generateWiadomosci(7, [7, 2]);\n }",
"public function run()\n {\n $data = [\n [1,1,1,0,30],\n [2,1,1,1,34],\n [3,1,1,2,38],\n [4,1,1,3,42],\n [5,1,1,4,45],\n [6,1,1,5,49],\n [7,1,1,6,53],\n [8,1,1,7,57],\n [9,1,1,8,61],\n [10,1,1,9,65],\n [11,1,1,10,68],\n [12,1,1,11,72],\n [13,1,1,12,76],\n [14,1,1,13,80],\n [15,1,1,14,84],\n [16,1,1,15,88],\n [17,1,2,0,33],\n [18,1,2,1,36],\n [19,1,2,2,39],\n [20,1,2,3,42],\n [21,1,2,4,45],\n [22,1,2,5,48],\n [23,1,2,6,51],\n [24,1,2,7,54],\n [25,1,2,8,57],\n [26,1,2,9,60],\n [27,1,2,10,63],\n [28,1,2,11,66],\n [29,1,2,12,69],\n [30,1,2,13,71],\n [31,1,2,14,74],\n [32,1,2,15,77],\n [33,1,2,16,80],\n [34,1,2,17,83],\n [35,1,2,18,86],\n [36,1,2,19,89],\n [37,1,2,20,92],\n [38,1,2,21,95],\n [39,1,2,22,98],\n [40,1,2,23,101],\n [41,1,2,24,104],\n [42,1,2,25,107],\n [43,1,2,26,110],\n [44,1,2,27,113],\n [45,1,2,28,116],\n [46,1,2,29,119],\n [47,1,2,30,121],\n [48,1,2,31,124],\n [49,1,2,32,127],\n [50,1,2,33,130],\n [51,1,2,34,133],\n [52,1,2,35,136],\n [53,1,2,36,139],\n [54,1,2,37,142],\n [55,1,2,38,145],\n [56,1,2,39,148],\n [57,1,2,40,151],\n [58,1,2,41,154],\n [59,1,2,42,157],\n [60,1,2,43,160],\n [61,1,2,44,163],\n [62,1,2,45,166],\n [63,1,2,46,169],\n [64,1,2,47,171],\n [65,1,2,48,174],\n [66,1,2,49,177],\n [67,1,2,50,180],\n [68,1,2,51,183],\n [69,1,2,52,186],\n [70,1,2,53,189],\n [71,1,2,54,192],\n [72,1,2,55,195],\n [73,1,2,56,198],\n [74,1,2,57,201],\n [75,1,2,58,204],\n [76,1,2,59,207],\n [77,1,2,60,210],\n [78,1,3,7,30],\n [79,1,3,8,32],\n [80,1,3,9,34],\n [81,1,3,10,36],\n [82,1,3,11,39],\n [83,1,3,12,41],\n [84,1,3,13,43],\n [85,1,3,14,45],\n [86,1,3,15,48],\n [87,1,3,16,50],\n [88,1,3,17,52],\n [89,1,3,18,55],\n [90,1,3,19,57],\n [91,1,3,20,59],\n [92,1,3,21,61],\n [93,1,3,22,64],\n [94,1,3,23,66],\n [95,1,3,24,68],\n [96,1,3,25,70],\n [97,1,3,26,73],\n [98,1,3,27,75],\n [99,1,3,28,77],\n [100,1,3,29,80],\n [101,1,3,30,82],\n [102,1,4,7,31],\n [103,1,4,8,34],\n [104,1,4,9,37],\n [105,1,4,10,39],\n [106,1,4,11,42],\n [107,1,4,12,44],\n [108,1,4,13,47],\n [109,1,4,14,50],\n [110,1,4,15,52],\n [111,1,4,16,55],\n [112,1,4,17,58],\n [113,1,4,18,60],\n [114,1,4,19,63],\n [115,1,4,20,66],\n [116,1,4,21,68],\n [117,1,4,22,71],\n [118,1,4,23,73],\n [119,1,4,24,76],\n [120,1,4,25,79],\n [121,1,4,26,81],\n [122,1,4,27,84],\n [123,1,4,28,87],\n [124,1,4,29,89],\n [125,1,4,30,92],\n [126,1,4,31,94],\n [127,1,4,32,97],\n [128,1,5,11,31],\n [129,1,5,12,33],\n [130,1,5,13,35],\n [131,1,5,14,37],\n [132,1,5,15,39],\n [133,1,5,16,41],\n [134,1,5,17,43],\n [135,1,5,18,46],\n [136,1,5,19,48],\n [137,1,5,20,50],\n [138,1,5,21,52],\n [139,1,5,22,54],\n [140,1,5,23,56],\n [141,1,5,24,58],\n [142,1,5,25,60],\n [143,1,5,26,63],\n [144,1,5,27,65],\n [145,1,5,28,67],\n [146,1,5,29,69],\n [147,1,5,30,71],\n [148,1,5,31,73],\n [149,1,5,32,75],\n [150,1,5,33,77],\n [151,1,5,34,80],\n [152,1,5,35,82],\n [153,1,5,36,84],\n [154,1,5,37,86],\n [155,1,5,38,88],\n [156,1,5,39,90],\n [157,1,5,40,92],\n [158,1,5,41,94],\n [159,1,5,42,97],\n [160,1,5,43,99],\n [161,1,5,44,101],\n [162,1,5,45,103],\n [163,1,5,46,105],\n [164,1,5,47,107],\n [165,1,5,48,109],\n [166,1,5,49,111],\n [167,1,5,50,114],\n [168,1,5,51,116],\n [169,1,5,52,118],\n [170,1,5,53,120],\n [171,1,5,54,122],\n [172,1,5,55,124],\n [173,1,5,56,126],\n [174,1,5,57,129],\n [175,1,6,12,31],\n [176,1,6,13,33],\n [177,1,6,14,36],\n [178,1,6,15,38],\n [179,1,6,16,40],\n [180,1,6,17,42],\n [181,1,6,18,44],\n [182,1,6,19,46],\n [183,1,6,20,48],\n [184,1,6,21,50],\n [185,1,6,22,52],\n [186,1,6,23,54],\n [187,1,6,24,56],\n [188,1,6,25,58],\n [189,1,6,26,60],\n [190,1,6,27,62],\n [191,1,6,28,64],\n [192,1,6,29,66],\n [193,1,6,30,68],\n [194,1,6,31,70],\n [195,1,6,32,72],\n [196,1,6,33,74],\n [197,1,6,34,76],\n [198,1,6,35,78],\n [199,1,6,36,80],\n [200,1,6,37,82],\n [201,1,6,38,84],\n [202,1,6,39,88],\n [203,1,6,40,89],\n [204,1,6,41,91],\n [205,1,6,42,93],\n [206,1,6,43,95],\n [207,1,6,44,97],\n [208,1,6,45,99],\n [209,1,6,46,101],\n [210,1,6,47,103],\n [211,1,6,48,105],\n [212,1,6,49,107],\n [213,1,6,50,109],\n [214,1,6,51,111],\n [215,1,6,52,113],\n [216,1,6,53,115],\n [217,1,6,54,117],\n [218,1,6,55,119],\n [219,1,6,56,121],\n [220,1,6,57,123],\n [221,1,6,58,125],\n [222,1,6,59,127],\n [223,1,6,60,129],\n [224,1,7,15,30],\n [225,1,7,16,33],\n [226,1,7,17,35],\n [227,1,7,18,37],\n [228,1,7,19,40],\n [229,1,7,20,42],\n [230,1,7,21,44],\n [231,1,7,22,47],\n [232,1,7,23,49],\n [233,1,7,24,51],\n [234,1,7,25,54],\n [235,1,7,26,56],\n [236,1,7,27,58],\n [237,1,7,28,61],\n [238,1,7,29,63],\n [239,1,7,30,65],\n [240,1,7,31,68],\n [241,1,7,32,70],\n [242,1,7,33,72],\n [243,1,7,34,75],\n [244,1,7,35,77],\n [245,1,7,36,79],\n [246,1,7,37,82],\n [247,1,7,38,84],\n [248,1,7,39,86],\n [249,1,7,40,89],\n [250,1,7,41,91],\n [251,1,7,42,93],\n [252,1,7,43,96],\n [253,1,7,44,98],\n [254,1,7,45,100],\n [255,1,7,46,103],\n [256,1,7,47,105],\n [257,1,7,48,107],\n [258,1,7,49,110],\n [259,1,7,50,112],\n [260,1,8,16,30],\n [261,1,8,17,33],\n [262,1,8,18,35],\n [263,1,8,19,38],\n [264,1,8,20,40],\n [265,1,8,21,42],\n [266,1,8,22,45],\n [267,1,8,23,47],\n [268,1,8,24,50],\n [269,1,8,25,52],\n [270,1,8,26,55],\n [271,1,8,27,57],\n [272,1,8,28,60],\n [273,1,8,29,62],\n [274,1,8,30,64],\n [275,1,8,31,67],\n [276,1,8,32,69],\n [277,1,8,33,72],\n [278,1,8,34,74],\n [279,1,8,35,77],\n [280,1,8,36,79],\n [281,1,8,37,81],\n [282,1,8,38,84],\n [283,1,8,39,86],\n [284,1,8,40,89],\n [285,1,8,41,91],\n [286,1,8,42,94],\n [287,1,8,43,96],\n [288,1,8,44,99],\n [289,1,8,45,101],\n [290,1,8,46,103],\n [291,1,8,47,106],\n [292,1,8,48,108],\n [293,1,8,49,111],\n [294,1,8,50,113],\n [295,1,8,51,116],\n [296,1,8,52,118],\n [297,1,8,53,120],\n [298,1,8,54,123],\n [299,1,8,55,125],\n [300,1,8,56,128],\n [301,1,9,4,33],\n [302,1,9,5,36],\n [303,1,9,6,39],\n [304,1,9,7,43],\n [305,1,9,8,46],\n [306,1,9,9,49],\n [307,1,9,10,53],\n [308,1,9,11,56],\n [309,1,9,12,59],\n [310,1,9,13,63],\n [311,1,9,14,66],\n [312,1,9,15,69],\n [313,1,9,16,73],\n [314,1,9,17,76],\n [315,1,9,18,79],\n [316,1,9,19,83],\n [317,1,9,20,86],\n [318,1,9,21,89],\n [319,1,9,22,93],\n [320,1,9,23,96],\n [321,1,9,24,99],\n [322,1,9,25,103],\n [323,1,9,26,106],\n [324,1,9,27,109],\n [325,1,9,28,113],\n [326,1,9,29,116],\n [327,1,9,30,119],\n [328,1,9,31,123],\n [329,1,9,32,126],\n [330,1,9,33,129],\n [331,1,9,34,133],\n [332,1,9,35,136],\n [333,1,9,36,139],\n [334,1,9,37,143],\n [335,1,9,38,146],\n [336,1,9,39,149],\n [337,1,9,40,153],\n [338,1,10,18,30],\n [339,1,10,19,32],\n [340,1,10,20,34],\n [341,1,10,21,36],\n [342,1,10,22,38],\n [343,1,10,23,40],\n [344,1,10,24,42],\n [345,1,10,25,44],\n [346,1,10,26,46],\n [347,1,10,27,48],\n [348,1,10,28,50],\n [349,1,10,29,52],\n [350,1,10,30,54],\n [351,1,10,31,56],\n [352,1,10,32,58],\n [353,1,10,33,60],\n [354,1,10,34,62],\n [355,1,10,35,64],\n [356,1,10,36,66],\n [357,1,10,37,68],\n [358,1,10,38,70],\n [359,1,10,39,72],\n [360,1,10,40,74],\n [361,1,10,41,76],\n [362,1,10,42,78],\n [363,1,10,43,80],\n [364,1,10,44,82],\n [365,1,10,45,84],\n [366,1,10,46,86],\n [367,1,10,47,88],\n [368,1,10,48,90],\n [369,1,11,18,31],\n [370,1,11,19,32],\n [371,1,11,20,34],\n [372,1,11,21,36],\n [373,1,11,22,37],\n [374,1,11,23,39],\n [375,1,11,24,41],\n [376,1,11,25,42],\n [377,1,11,26,44],\n [378,1,11,27,46],\n [379,1,11,28,47],\n [380,1,11,29,49],\n [381,1,11,30,51],\n [382,1,11,31,53],\n [383,1,11,32,54],\n [384,1,11,33,56],\n [385,1,11,34,58],\n [386,1,11,35,59],\n [387,1,11,36,61],\n [388,1,11,37,63],\n [389,1,11,38,64],\n [390,1,11,39,66],\n [391,1,11,40,68],\n [392,1,11,41,69],\n [393,1,11,42,71],\n [394,1,11,43,73],\n [395,1,11,44,75],\n [396,1,11,45,76],\n [397,1,11,46,78],\n [398,1,11,47,80],\n [399,1,11,48,81],\n [400,1,11,49,83],\n [401,1,11,50,85],\n [402,1,11,51,86],\n [403,1,11,52,88],\n [404,1,11,53,90],\n [405,1,11,54,92],\n [406,1,11,55,93],\n [407,1,11,56,95],\n [408,1,11,57,97],\n [409,1,11,58,98],\n [410,1,11,59,100],\n [411,1,11,60,102],\n [412,1,11,61,103],\n [413,1,11,62,105],\n [414,1,11,63,107],\n [415,1,11,64,108],\n [416,1,11,65,110],\n [417,1,11,66,112],\n [418,1,11,67,114],\n [419,1,11,68,115],\n [420,1,11,69,117],\n [421,1,11,70,119],\n [422,1,11,71,120],\n [423,1,12,14,31],\n [424,1,12,15,33],\n [425,1,12,16,36],\n [426,1,12,17,38],\n [427,1,12,18,41],\n [428,1,12,19,43],\n [429,1,12,20,46],\n [430,1,12,21,48],\n [431,1,12,22,51],\n [432,1,12,23,53],\n [433,1,12,24,56],\n [434,1,12,25,58],\n [435,1,12,26,61],\n [436,1,12,27,63],\n [437,1,12,28,66],\n [438,1,12,29,68],\n [439,1,12,30,71],\n [440,1,12,31,73],\n [441,1,12,32,76],\n [442,1,12,33,78],\n [443,1,12,34,81],\n [444,1,12,35,83],\n [445,1,12,36,86],\n [446,1,12,37,88],\n [447,1,12,38,91],\n [448,1,12,39,93],\n [449,1,12,40,96],\n [450,1,12,41,98],\n [451,1,12,42,101],\n [452,1,12,43,103],\n [453,1,12,44,106],\n [454,1,12,45,108],\n [455,1,12,46,111],\n [456,1,13,11,31],\n [457,1,13,12,32],\n [458,1,13,13,33],\n [459,1,13,14,35],\n [460,1,13,15,36],\n [461,1,13,16,37],\n [462,1,13,17,39],\n [463,1,13,18,40],\n [464,1,13,19,41],\n [465,1,13,20,43],\n [466,1,13,21,44],\n [467,1,13,22,45],\n [468,1,13,23,47],\n [469,1,13,24,48],\n [470,1,13,25,49],\n [471,1,13,26,51],\n [472,1,13,27,52],\n [473,1,13,28,53],\n [474,1,13,29,54],\n [475,1,13,30,56],\n [476,1,13,31,57],\n [477,1,13,32,58],\n [478,1,13,33,60],\n [479,1,13,34,61],\n [480,1,13,35,62],\n [481,1,13,36,64],\n [482,1,13,37,65],\n [483,1,13,38,66],\n [484,1,13,39,68],\n [485,1,13,40,69],\n [486,1,13,41,70],\n [487,1,13,42,72],\n [488,1,13,43,73],\n [489,1,13,44,74],\n [490,1,13,45,76],\n [491,1,13,46,77],\n [492,1,13,47,78],\n [493,1,13,48,79],\n [494,1,13,49,81],\n [495,1,13,50,82],\n [496,1,13,51,83],\n [497,1,13,52,85],\n [498,1,13,53,86],\n [499,1,13,54,87],\n [500,1,13,55,89],\n [501,1,13,56,90],\n [502,1,13,57,91],\n [503,1,13,58,93],\n [504,1,13,59,94],\n [505,1,13,60,95],\n [506,1,13,61,97],\n [507,1,13,62,98],\n [508,1,13,63,99],\n [509,1,13,64,101],\n [510,1,13,65,102],\n [511,1,13,66,103],\n [512,1,13,67,104],\n [513,1,13,68,106],\n [514,1,13,69,107],\n [515,2,1,0,30],\n [516,2,1,1,31],\n [517,2,1,2,36],\n [518,2,1,3,40],\n [519,2,1,4,45],\n [520,2,1,5,50],\n [521,2,1,6,54],\n [522,2,1,7,59],\n [523,2,1,8,63],\n [524,2,1,9,68],\n [525,2,1,10,72],\n [526,2,1,11,77],\n [527,2,1,12,81],\n [528,2,1,13,86],\n [529,2,1,14,90],\n [530,2,1,15,95],\n [531,2,2,0,34],\n [532,2,2,1,37],\n [533,2,2,2,41],\n [534,2,2,3,44],\n [535,2,2,4,47],\n [536,2,2,5,50],\n [537,2,2,6,54],\n [538,2,2,7,57],\n [539,2,2,8,60],\n [540,2,2,9,63],\n [541,2,2,10,66],\n [542,2,2,11,70],\n [543,2,2,12,73],\n [544,2,2,13,76],\n [545,2,2,14,79],\n [546,2,2,15,83],\n [547,2,2,16,86],\n [548,2,2,17,89],\n [549,2,2,18,92],\n [550,2,2,19,95],\n [551,2,2,20,99],\n [552,2,2,21,102],\n [553,2,2,22,105],\n [554,2,2,23,108],\n [555,2,2,24,112],\n [556,2,2,25,115],\n [557,2,2,26,118],\n [558,2,2,27,121],\n [559,2,2,28,125],\n [560,2,2,29,128],\n [561,2,2,30,131],\n [562,2,2,31,134],\n [563,2,2,32,137],\n [564,2,2,33,141],\n [565,2,2,34,144],\n [566,2,2,35,147],\n [567,2,2,36,150],\n [568,2,2,37,154],\n [569,2,2,38,157],\n [570,2,2,39,160],\n [571,2,2,40,163],\n [572,2,2,41,166],\n [573,2,2,42,170],\n [574,2,2,43,173],\n [575,2,2,44,176],\n [576,2,2,45,179],\n [577,2,2,46,183],\n [578,2,2,47,186],\n [579,2,2,48,189],\n [580,2,2,49,192],\n [581,2,2,50,195],\n [582,2,2,51,199],\n [583,2,2,52,202],\n [584,2,2,53,205],\n [585,2,2,54,208],\n [586,2,2,55,212],\n [587,2,2,56,215],\n [588,2,2,57,218],\n [589,2,2,58,221],\n [590,2,2,59,225],\n [591,2,2,60,228],\n [592,2,3,7,30],\n [593,2,3,8,33],\n [594,2,3,9,35],\n [595,2,3,10,37],\n [596,2,3,11,40],\n [597,2,3,12,42],\n [598,2,3,13,44],\n [599,2,3,14,47],\n [600,2,3,15,49],\n [601,2,3,16,51],\n [602,2,3,17,53],\n [603,2,3,18,56],\n [604,2,3,19,58],\n [605,2,3,20,60],\n [606,2,3,21,63],\n [607,2,3,22,65],\n [608,2,3,23,67],\n [609,2,3,24,70],\n [610,2,3,25,72],\n [611,2,3,26,74],\n [612,2,3,27,77],\n [613,2,3,28,79],\n [614,2,3,29,81],\n [615,2,3,30,84],\n [616,2,4,7,30],\n [617,2,4,8,32],\n [618,2,4,9,35],\n [619,2,4,10,37],\n [620,2,4,11,40],\n [621,2,4,12,42],\n [622,2,4,13,45],\n [623,2,4,14,47],\n [624,2,4,15,50],\n [625,2,4,16,52],\n [626,2,4,17,54],\n [627,2,4,18,57],\n [628,2,4,19,59],\n [629,2,4,20,62],\n [630,2,4,21,64],\n [631,2,4,22,67],\n [632,2,4,23,69],\n [633,2,4,24,71],\n [634,2,4,25,74],\n [635,2,4,26,76],\n [636,2,4,27,79],\n [637,2,4,28,81],\n [638,2,4,29,84],\n [639,2,4,30,86],\n [640,2,4,31,89],\n [641,2,4,32,91],\n [642,2,5,13,31],\n [643,2,5,14,33],\n [644,2,5,15,35],\n [645,2,5,16,37],\n [646,2,5,17,39],\n [647,2,5,18,41],\n [648,2,5,19,43],\n [649,2,5,20,45],\n [650,2,5,21,47],\n [651,2,5,22,49],\n [652,2,5,23,51],\n [653,2,5,24,53],\n [654,2,5,25,55],\n [655,2,5,26,57],\n [656,2,5,27,59],\n [657,2,5,28,61],\n [658,2,5,29,63],\n [659,2,5,30,66],\n [660,2,5,31,68],\n [661,2,5,32,70],\n [662,2,5,33,72],\n [663,2,5,34,74],\n [664,2,5,35,76],\n [665,2,5,36,78],\n [666,2,5,37,80],\n [667,2,5,38,82],\n [668,2,5,39,84],\n [669,2,5,40,86],\n [670,2,5,41,88],\n [671,2,5,42,90],\n [672,2,5,43,92],\n [673,2,5,44,94],\n [674,2,5,45,96],\n [675,2,5,46,98],\n [676,2,5,47,100],\n [677,2,5,48,102],\n [678,2,5,49,104],\n [679,2,5,50,106],\n [680,2,5,51,108],\n [681,2,5,52,110],\n [682,2,5,53,112],\n [683,2,5,54,114],\n [684,2,5,55,117],\n [685,2,5,56,119],\n [686,2,5,57,121],\n [687,2,6,12,30],\n [688,2,6,13,32],\n [689,2,6,14,34],\n [690,2,6,15,36],\n [691,2,6,16,38],\n [692,2,6,17,40],\n [693,2,6,18,42],\n [694,2,6,19,44],\n [695,2,6,20,46],\n [696,2,6,21,48],\n [697,2,6,22,50],\n [698,2,6,23,52],\n [699,2,6,24,54],\n [700,2,6,25,56],\n [701,2,6,26,58],\n [702,2,6,27,60],\n [703,2,6,28,62],\n [704,2,6,29,64],\n [705,2,6,30,67],\n [706,2,6,31,69],\n [707,2,6,32,71],\n [708,2,6,33,73],\n [709,2,6,34,75],\n [710,2,6,35,77],\n [711,2,6,36,79],\n [712,2,6,37,81],\n [713,2,6,38,83],\n [714,2,6,39,85],\n [715,2,6,40,87],\n [716,2,6,41,89],\n [717,2,6,42,91],\n [718,2,6,43,93],\n [719,2,6,44,95],\n [720,2,6,45,97],\n [721,2,6,46,99],\n [722,2,6,47,101],\n [723,2,6,48,103],\n [724,2,6,49,105],\n [725,2,6,50,107],\n [726,2,6,51,109],\n [727,2,6,52,111],\n [728,2,6,53,113],\n [729,2,6,54,116],\n [730,2,6,55,118],\n [731,2,6,56,120],\n [732,2,6,57,122],\n [733,2,6,58,124],\n [734,2,6,59,126],\n [735,2,6,60,128],\n [736,2,7,14,30],\n [737,2,7,15,32],\n [738,2,7,16,35],\n [739,2,7,17,37],\n [740,2,7,18,39],\n [741,2,7,19,42],\n [742,2,7,20,44],\n [743,2,7,21,46],\n [744,2,7,22,49],\n [745,2,7,23,51],\n [746,2,7,24,54],\n [747,2,7,25,56],\n [748,2,7,26,58],\n [749,2,7,27,61],\n [750,2,7,28,63],\n [751,2,7,29,65],\n [752,2,7,30,68],\n [753,2,7,31,70],\n [754,2,7,32,73],\n [755,2,7,33,75],\n [756,2,7,34,77],\n [757,2,7,35,80],\n [758,2,7,36,82],\n [759,2,7,37,85],\n [760,2,7,38,87],\n [761,2,7,39,89],\n [762,2,7,40,92],\n [763,2,7,41,94],\n [764,2,7,42,96],\n [765,2,7,43,99],\n [766,2,7,44,101],\n [767,2,7,45,104],\n [768,2,7,46,106],\n [769,2,7,47,108],\n [770,2,7,48,111],\n [771,2,7,49,113],\n [772,2,7,50,115],\n [773,2,8,0,132],\n [774,2,8,1,129],\n [775,2,8,2,126],\n [776,2,8,3,124],\n [777,2,8,4,121],\n [778,2,8,5,118],\n [779,2,8,6,116],\n [780,2,8,7,113],\n [781,2,8,8,110],\n [782,2,8,9,108],\n [783,2,8,10,105],\n [784,2,8,11,102],\n [785,2,8,12,99],\n [786,2,8,13,97],\n [787,2,8,14,94],\n [788,2,8,15,91],\n [789,2,8,16,89],\n [790,2,8,17,86],\n [791,2,8,18,83],\n [792,2,8,19,81],\n [793,2,8,20,78],\n [794,2,8,21,75],\n [795,2,8,22,72],\n [796,2,8,23,70],\n [797,2,8,24,67],\n [798,2,8,25,64],\n [799,2,8,26,62],\n [800,2,8,27,59],\n [801,2,8,28,56],\n [802,2,8,29,54],\n [803,2,8,30,51],\n [804,2,8,31,48],\n [805,2,8,32,45],\n [806,2,8,33,43],\n [807,2,8,34,40],\n [808,2,8,35,37],\n [809,2,8,36,35],\n [810,2,8,37,32],\n [811,2,9,4,32],\n [812,2,9,5,35],\n [813,2,9,6,38],\n [814,2,9,7,42],\n [815,2,9,8,45],\n [816,2,9,9,48],\n [817,2,9,10,51],\n [818,2,9,11,55],\n [819,2,9,12,58],\n [820,2,9,13,61],\n [821,2,9,14,64],\n [822,2,9,15,67],\n [823,2,9,16,71],\n [824,2,9,17,74],\n [825,2,9,18,77],\n [826,2,9,19,80],\n [827,2,9,20,84],\n [828,2,9,21,87],\n [829,2,9,22,90],\n [830,2,9,23,93],\n [831,2,9,24,96],\n [832,2,9,25,100],\n [833,2,9,26,103],\n [834,2,9,27,106],\n [835,2,9,28,109],\n [836,2,9,29,113],\n [837,2,9,30,116],\n [838,2,9,31,119],\n [839,2,9,32,122],\n [840,2,9,33,125],\n [841,2,9,34,129],\n [842,2,9,35,132],\n [843,2,9,36,135],\n [844,2,9,37,138],\n [845,2,9,38,142],\n [846,2,9,39,145],\n [847,2,9,40,148],\n [848,2,10,19,31],\n [849,2,10,20,33],\n [850,2,10,21,35],\n [851,2,10,22,37],\n [852,2,10,23,39],\n [853,2,10,24,41],\n [854,2,10,25,43],\n [855,2,10,26,45],\n [856,2,10,27,47],\n [857,2,10,28,49],\n [858,2,10,29,51],\n [859,2,10,30,53],\n [860,2,10,31,55],\n [861,2,10,32,57],\n [862,2,10,33,59],\n [863,2,10,34,61],\n [864,2,10,35,63],\n [865,2,10,36,65],\n [866,2,10,37,67],\n [867,2,10,38,69],\n [868,2,10,39,71],\n [869,2,10,40,73],\n [870,2,10,41,75],\n [871,2,10,42,77],\n [872,2,10,43,79],\n [873,2,10,44,81],\n [874,2,10,45,83],\n [875,2,10,46,85],\n [876,2,10,47,87],\n [877,2,11,17,30],\n [878,2,11,18,32],\n [879,2,11,19,34],\n [880,2,11,20,35],\n [881,2,11,21,37],\n [882,2,11,22,39],\n [883,2,11,23,41],\n [884,2,11,24,42],\n [885,2,11,25,44],\n [886,2,11,26,46],\n [887,2,11,27,47],\n [888,2,11,28,49],\n [889,2,11,29,51],\n [890,2,11,30,52],\n [891,2,11,31,54],\n [892,2,11,32,56],\n [893,2,11,33,57],\n [894,2,11,34,59],\n [895,2,11,35,61],\n [896,2,11,36,63],\n [897,2,11,37,64],\n [898,2,11,38,66],\n [899,2,11,39,68],\n [900,2,11,40,69],\n [901,2,11,41,71],\n [902,2,11,42,73],\n [903,2,11,43,74],\n [904,2,11,44,76],\n [905,2,11,45,78],\n [906,2,11,46,79],\n [907,2,11,47,81],\n [908,2,11,48,83],\n [909,2,11,49,85],\n [910,2,11,50,86],\n [911,2,11,51,88],\n [912,2,11,52,90],\n [913,2,11,53,91],\n [914,2,11,54,93],\n [915,2,11,55,95],\n [916,2,11,56,96],\n [917,2,11,57,98],\n [918,2,11,58,100],\n [919,2,11,59,102],\n [920,2,11,60,103],\n [921,2,11,61,105],\n [922,2,11,62,107],\n [923,2,11,63,108],\n [924,2,11,64,110],\n [925,2,11,65,112],\n [926,2,11,66,113],\n [927,2,11,67,115],\n [928,2,11,68,117],\n [929,2,11,69,118],\n [930,2,11,70,120],\n [931,2,12,14,31],\n [932,2,12,15,34],\n [933,2,12,16,36],\n [934,2,12,17,39],\n [935,2,12,18,42],\n [936,2,12,19,44],\n [937,2,12,20,47],\n [938,2,12,21,50],\n [939,2,12,22,52],\n [940,2,12,23,55],\n [941,2,12,24,58],\n [942,2,12,25,61],\n [943,2,12,26,63],\n [944,2,12,27,66],\n [945,2,12,28,69],\n [946,2,12,29,71],\n [947,2,12,30,74],\n [948,2,12,31,77],\n [949,2,12,32,79],\n [950,2,12,33,82],\n [951,2,12,34,85],\n [952,2,12,35,88],\n [953,2,12,36,90],\n [954,2,12,37,93],\n [955,2,12,38,96],\n [956,2,12,39,98],\n [957,2,12,40,101],\n [958,2,12,41,104],\n [959,2,12,42,106],\n [960,2,12,43,109],\n [961,2,12,44,112],\n [962,2,12,45,115],\n [963,2,12,46,117],\n [964,2,13,11,30],\n [965,2,13,12,31],\n [966,2,13,13,32],\n [967,2,13,14,33],\n [968,2,13,15,35],\n [969,2,13,16,36],\n [970,2,13,17,37],\n [971,2,13,18,38],\n [972,2,13,19,40],\n [973,2,13,20,41],\n [974,2,13,21,42],\n [975,2,13,22,43],\n [976,2,13,23,45],\n [977,2,13,24,46],\n [978,2,13,25,47],\n [979,2,13,26,48],\n [980,2,13,27,50],\n [981,2,13,28,51],\n [982,2,13,29,52],\n [983,2,13,30,53],\n [984,2,13,31,54],\n [985,2,13,32,56],\n [986,2,13,33,57],\n [987,2,13,34,58],\n [988,2,13,35,59],\n [989,2,13,36,61],\n [990,2,13,37,62],\n [991,2,13,38,63],\n [992,2,13,39,64],\n [993,2,13,40,66],\n [994,2,13,41,67],\n [995,2,13,42,68],\n [996,2,13,43,69],\n [997,2,13,44,70],\n [998,2,13,45,72],\n [999,2,13,46,73],\n [1000,2,13,47,74],\n [1001,2,13,48,75],\n [1002,2,13,49,77],\n [1003,2,13,50,78],\n [1004,2,13,51,79],\n [1005,2,13,52,80],\n [1006,2,13,53,82],\n [1007,2,13,54,83],\n [1008,2,13,55,84],\n [1009,2,13,56,85],\n [1010,2,13,57,87],\n [1011,2,13,58,88],\n [1012,2,13,59,89],\n [1013,2,13,60,90],\n [1014,2,13,61,91],\n [1015,2,13,62,93],\n [1016,2,13,63,94],\n [1017,2,13,64,95],\n [1018,2,13,65,96],\n [1019,2,13,66,98],\n [1020,2,13,67,99],\n [1021,2,13,68,100],\n [1022,2,13,69,101],\n [1023,1,14,0,36],\n [1024,1,14,1,37],\n [1025,1,14,2,38],\n [1026,1,14,3,40],\n [1027,1,14,4,41],\n [1028,1,14,5,43],\n [1029,1,14,6,44],\n [1030,1,14,7,45],\n [1031,1,14,8,47],\n [1032,1,14,9,48],\n [1033,1,14,10,49],\n [1034,1,14,11,51],\n [1035,1,14,12,52],\n [1036,1,14,13,54],\n [1037,1,14,14,55],\n [1038,1,14,15,56],\n [1039,1,14,16,58],\n [1040,1,14,17,59],\n [1041,1,14,18,60],\n [1042,1,14,19,62],\n [1043,1,14,20,63],\n [1044,1,14,21,65],\n [1045,1,14,22,66],\n [1046,1,14,23,67],\n [1047,1,14,24,69],\n [1048,1,14,25,70],\n [1049,1,14,26,71],\n [1050,1,14,27,73],\n [1051,1,14,28,74],\n [1052,1,14,29,75],\n [1053,1,14,30,77],\n [1054,1,14,31,78],\n [1055,1,14,32,80],\n [1056,1,14,33,81],\n [1057,1,14,34,82],\n [1058,1,14,35,84],\n [1059,1,14,36,85],\n [1060,1,14,37,86],\n [1061,1,14,38,88],\n [1062,1,14,39,89],\n [1063,1,15,9,31],\n [1064,1,15,10,34],\n [1065,1,15,11,36],\n [1066,1,15,12,38],\n [1067,1,15,13,40],\n [1068,1,15,14,43],\n [1069,1,15,15,45],\n [1070,1,15,16,47],\n [1071,1,15,17,50],\n [1072,1,15,18,52],\n [1073,1,15,19,54],\n [1074,1,15,20,56],\n [1075,1,15,21,59],\n [1076,1,15,22,61],\n [1077,1,15,23,63],\n [1078,1,15,24,65],\n [1079,1,15,25,68],\n [1080,1,15,26,70],\n [1081,1,15,27,72],\n [1082,1,15,28,75],\n [1083,1,15,29,77],\n [1084,1,15,30,79],\n [1085,1,15,31,81],\n [1086,1,15,32,84],\n [1087,1,15,33,86],\n [1088,1,15,34,88],\n [1089,1,15,35,90],\n [1090,1,15,36,93],\n [1091,1,15,37,95],\n [1092,1,16,29,31],\n [1093,1,16,30,34],\n [1094,1,16,31,36],\n [1095,1,16,32,38],\n [1096,1,16,33,40],\n [1097,1,16,34,43],\n [1098,1,16,35,45],\n [1099,1,16,36,47],\n [1100,1,16,37,50],\n [1101,1,16,38,52],\n [1102,1,16,39,54],\n [1103,1,16,40,56],\n [1104,1,16,41,59],\n [1105,1,16,42,61],\n [1106,1,16,43,63],\n [1107,1,16,44,65],\n [1108,1,16,45,68],\n [1109,1,16,46,70],\n [1110,1,16,47,72],\n [1111,1,16,48,75],\n [1112,1,16,49,77],\n [1113,1,16,50,79],\n [1114,1,16,51,81],\n [1115,1,16,52,84],\n [1116,1,17,14,30],\n [1117,1,17,15,33],\n [1118,1,17,16,36],\n [1119,1,17,17,39],\n [1120,1,17,18,41],\n [1121,1,17,19,44],\n [1122,1,17,20,47],\n [1123,1,17,21,50],\n [1124,1,17,22,53],\n [1125,1,17,23,56],\n [1126,1,17,24,59],\n [1127,1,17,25,61],\n [1128,1,17,26,64],\n [1129,1,17,27,67],\n [1130,1,17,28,70],\n [1131,1,17,29,73],\n [1132,1,17,30,76],\n [1133,1,17,31,79],\n [1134,1,17,32,81],\n [1135,1,17,33,84],\n [1136,1,17,34,87],\n [1137,1,17,35,90],\n [1138,1,17,36,93],\n [1139,1,17,37,96],\n [1140,1,17,38,99],\n [1141,1,17,39,101],\n [1142,1,17,40,104],\n [1143,1,17,41,107],\n [1144,1,17,42,110],\n [1145,1,17,43,113],\n [1146,1,17,44,116],\n [1147,1,17,45,119],\n [1148,1,17,46,121],\n [1149,1,17,47,124],\n [1150,1,17,48,127],\n [1151,1,17,49,130],\n [1152,1,18,0,40],\n [1153,1,18,1,44],\n [1154,1,18,2,48],\n [1155,1,18,3,52],\n [1156,1,18,4,56],\n [1157,1,18,5,60],\n [1158,1,18,6,64],\n [1159,1,18,7,68],\n [1160,1,18,8,72],\n [1161,1,18,9,76],\n [1162,1,18,10,80],\n [1163,1,18,11,84],\n [1164,1,18,12,88],\n [1165,1,18,13,92],\n [1166,1,18,14,96],\n [1167,1,18,15,100],\n [1168,1,18,16,104],\n [1169,1,18,17,108],\n [1170,1,18,18,112],\n [1171,1,18,19,116],\n [1172,1,18,20,120],\n [1173,1,18,21,124],\n [1174,1,18,22,128],\n [1175,1,18,23,132],\n [1176,1,18,24,136],\n [1177,1,18,25,140],\n [1178,1,18,26,144],\n [1179,1,18,27,148],\n [1180,1,18,28,152],\n [1181,1,18,29,156],\n [1182,1,18,30,160],\n [1183,1,18,31,164],\n [1184,1,18,32,168],\n [1185,1,18,33,172],\n [1186,1,18,34,176],\n [1187,1,18,35,180],\n [1188,1,18,36,184],\n [1189,1,18,37,188],\n [1190,1,18,38,192],\n [1191,1,18,39,196],\n [1192,1,18,40,200],\n [1193,1,19,9,33],\n [1194,1,19,10,36],\n [1195,1,19,11,39],\n [1196,1,19,12,43],\n [1197,1,19,13,46],\n [1198,1,19,14,49],\n [1199,1,19,15,53],\n [1200,1,19,16,56],\n [1201,1,19,17,59],\n [1202,1,19,18,63],\n [1203,1,19,19,66],\n [1204,1,19,20,69],\n [1205,1,19,21,73],\n [1206,1,19,22,76],\n [1207,1,19,23,79],\n [1208,1,19,24,83],\n [1209,1,19,25,86],\n [1210,1,19,26,89],\n [1211,1,19,27,93],\n [1212,1,19,28,96],\n [1213,1,20,11,30],\n [1214,1,20,12,33],\n [1215,1,20,13,37],\n [1216,1,20,14,41],\n [1217,1,20,15,44],\n [1218,1,20,16,48],\n [1219,1,20,17,52],\n [1220,1,20,18,56],\n [1221,1,20,19,59],\n [1222,1,20,20,63],\n [1223,1,20,21,67],\n [1224,1,20,22,70],\n [1225,1,20,23,74],\n [1226,1,20,24,78],\n [1227,1,20,25,81],\n [1228,1,21,13,31],\n [1229,1,21,14,33],\n [1230,1,21,15,36],\n [1231,1,21,16,39],\n [1232,1,21,17,42],\n [1233,1,21,18,44],\n [1234,1,21,19,47],\n [1235,1,21,20,50],\n [1236,1,21,21,53],\n [1237,1,21,22,56],\n [1238,1,21,23,58],\n [1239,1,21,24,61],\n [1240,1,21,25,64],\n [1241,1,21,26,67],\n [1242,1,21,27,69],\n [1243,1,21,28,72],\n [1244,1,21,29,75],\n [1245,1,21,30,78],\n [1246,1,22,1,30],\n [1247,1,22,2,32],\n [1248,1,22,3,33],\n [1249,1,22,4,35],\n [1250,1,22,5,36],\n [1251,1,22,6,38],\n [1252,1,22,7,40],\n [1253,1,22,8,41],\n [1254,1,22,9,43],\n [1255,1,22,10,45],\n [1256,1,22,11,46],\n [1257,1,22,12,48],\n [1258,1,22,13,49],\n [1259,1,22,14,51],\n [1260,1,22,15,53],\n [1261,1,22,16,54],\n [1262,1,22,17,56],\n [1263,1,22,18,57],\n [1264,1,22,19,59],\n [1265,1,22,20,61],\n [1266,1,22,21,62],\n [1267,1,22,22,64],\n [1268,1,22,23,65],\n [1269,1,22,24,67],\n [1270,1,22,25,69],\n [1271,1,22,26,70],\n [1272,1,22,27,72],\n [1273,1,22,28,74],\n [1274,1,22,29,75],\n [1275,1,22,30,77],\n [1276,1,22,31,78],\n [1277,1,22,32,80],\n [1278,1,22,33,82],\n [1279,1,22,34,83],\n [1280,1,22,35,85],\n [1281,1,22,36,86],\n [1282,1,22,37,88],\n [1283,1,22,38,90],\n [1284,1,22,39,91],\n [1285,1,22,40,93],\n [1286,1,22,41,95],\n [1287,1,23,28,31],\n [1288,1,23,29,33],\n [1289,1,23,30,35],\n [1290,1,23,31,37],\n [1291,1,23,32,40],\n [1292,1,23,33,42],\n [1293,1,23,34,44],\n [1294,1,23,35,46],\n [1295,1,23,36,48],\n [1296,1,23,37,51],\n [1297,1,23,38,53],\n [1298,1,23,39,55],\n [1299,1,23,40,57],\n [1300,1,23,41,60],\n [1301,1,23,42,62],\n [1302,1,23,43,64],\n [1303,1,23,44,66],\n [1304,1,23,45,68],\n [1305,1,23,46,71],\n [1306,1,23,47,73],\n [1307,1,24,19,30],\n [1308,1,24,20,32],\n [1309,1,24,21,35],\n [1310,1,24,22,37],\n [1311,1,24,23,40],\n [1312,1,24,24,42],\n [1313,1,24,25,44],\n [1314,1,24,26,47],\n [1315,1,24,27,49],\n [1316,1,24,28,52],\n [1317,1,24,29,54],\n [1318,1,24,30,57],\n [1319,1,24,31,59],\n [1320,1,24,32,61],\n [1321,1,24,33,64],\n [1322,1,24,34,66],\n [1323,1,24,35,69],\n [1324,1,24,36,71],\n [1325,1,24,37,74],\n [1326,1,24,38,76],\n [1327,1,24,39,79],\n [1328,1,24,40,81],\n [1329,1,24,41,83],\n [1330,1,24,42,86],\n [1331,1,24,43,88],\n [1332,1,24,44,91],\n [1333,1,24,45,93],\n [1334,1,24,46,96],\n [1335,1,25,0,36],\n [1336,1,25,1,37],\n [1337,1,25,2,39],\n [1338,1,25,3,41],\n [1339,1,25,4,42],\n [1340,1,25,5,44],\n [1341,1,25,6,45],\n [1342,1,25,7,47],\n [1343,1,25,8,49],\n [1344,1,25,9,50],\n [1345,1,25,10,52],\n [1346,1,25,11,54],\n [1347,1,25,12,55],\n [1348,1,25,13,57],\n [1349,1,25,14,58],\n [1350,1,25,15,60],\n [1351,1,25,16,62],\n [1352,1,25,17,63],\n [1353,1,25,18,65],\n [1354,1,25,19,66],\n [1355,1,25,20,68],\n [1356,1,25,21,70],\n [1357,1,25,22,71],\n [1358,1,25,23,73],\n [1359,1,25,24,75],\n [1360,1,25,25,76],\n [1361,1,25,26,78],\n [1362,1,25,27,79],\n [1363,1,25,28,81],\n [1364,1,25,29,83],\n [1365,1,25,30,84],\n [1366,1,25,31,86],\n [1367,1,25,32,87],\n [1368,1,25,33,89],\n [1369,1,25,34,91],\n [1370,1,25,35,92],\n [1371,1,25,36,94],\n [1372,1,25,37,95],\n [1373,1,25,38,97],\n [1374,1,25,39,99],\n [1375,1,25,40,100],\n [1376,1,25,41,102],\n [1377,1,25,42,104],\n [1378,1,25,43,105],\n [1379,1,25,44,107],\n [1380,1,25,45,108],\n [1381,1,25,46,110],\n [1382,1,26,0,36],\n [1383,1,26,1,37],\n [1384,1,26,2,38],\n [1385,1,26,3,39],\n [1386,1,26,4,40],\n [1387,1,26,5,42],\n [1388,1,26,6,43],\n [1389,1,26,7,44],\n [1390,1,26,8,45],\n [1391,1,26,9,46],\n [1392,1,26,10,48],\n [1393,1,26,11,49],\n [1394,1,26,12,50],\n [1395,1,26,13,51],\n [1396,1,26,14,52],\n [1397,1,26,15,53],\n [1398,1,26,16,55],\n [1399,1,26,17,56],\n [1400,1,26,18,57],\n [1401,1,26,19,58],\n [1402,1,26,20,59],\n [1403,1,26,21,61],\n [1404,1,26,22,62],\n [1405,1,26,23,63],\n [1406,1,26,24,64],\n [1407,1,26,25,65],\n [1408,1,26,26,67],\n [1409,1,26,27,68],\n [1410,1,26,28,69],\n [1411,1,26,29,70],\n [1412,1,26,30,71],\n [1413,1,26,31,73],\n [1414,1,26,32,74],\n [1415,1,26,33,75],\n [1416,1,26,34,76],\n [1417,1,26,35,77],\n [1418,1,26,36,78],\n [1419,1,26,37,80],\n [1420,1,26,38,81],\n [1421,1,26,39,82],\n [1422,1,26,40,83],\n [1423,1,26,41,84],\n [1424,1,26,42,86],\n [1425,1,26,43,87],\n [1426,1,26,44,88],\n [1427,1,26,45,89],\n [1428,1,26,46,90],\n [1429,1,26,47,92],\n [1430,1,26,48,93],\n [1431,1,26,49,94],\n [1432,1,26,50,95],\n [1433,1,26,51,96],\n [1434,1,26,52,98],\n [1435,1,26,53,99],\n [1436,1,26,54,100],\n [1437,1,26,55,101],\n [1438,1,26,56,102],\n [1439,1,26,57,103],\n [1440,1,26,58,105],\n [1441,1,26,59,106],\n [1442,1,26,60,107],\n [1443,1,27,0,36],\n [1444,1,27,1,39],\n [1445,1,27,2,42],\n [1446,1,27,3,45],\n [1447,1,27,4,48],\n [1448,1,27,5,51],\n [1449,1,27,6,53],\n [1450,1,27,7,56],\n [1451,1,27,8,59],\n [1452,1,27,9,62],\n [1453,1,27,10,65],\n [1454,1,27,11,68],\n [1455,1,27,12,71],\n [1456,1,27,13,74],\n [1457,1,27,14,77],\n [1458,1,28,0,37],\n [1459,1,28,1,41],\n [1460,1,28,2,45],\n [1461,1,28,3,49],\n [1462,1,28,4,54],\n [1463,1,28,5,58],\n [1464,1,28,6,62],\n [1465,1,28,7,67],\n [1466,1,28,8,71],\n [1467,1,29,1,38],\n [1468,1,29,2,41],\n [1469,1,29,3,44],\n [1470,1,29,4,47],\n [1471,1,29,5,50],\n [1472,1,29,6,53],\n [1473,1,29,7,56],\n [1474,1,29,8,59],\n [1475,1,29,9,62],\n [1476,1,29,10,65],\n [1477,1,29,11,68],\n [1478,1,29,12,71],\n [1479,1,29,13,74],\n [1480,1,29,14,77],\n [1481,1,29,15,80],\n [1482,1,29,16,83],\n [1483,1,29,17,86],\n [1484,2,14,0,33],\n [1485,2,14,1,35],\n [1486,2,14,2,36],\n [1487,2,14,3,37],\n [1488,2,14,4,39],\n [1489,2,14,5,40],\n [1490,2,14,6,41],\n [1491,2,14,7,43],\n [1492,2,14,8,44],\n [1493,2,14,9,46],\n [1494,2,14,10,47],\n [1495,2,14,11,48],\n [1496,2,14,12,50],\n [1497,2,14,13,51],\n [1498,2,14,14,52],\n [1499,2,14,15,54],\n [1500,2,14,16,55],\n [1501,2,14,17,56],\n [1502,2,14,18,58],\n [1503,2,14,19,59],\n [1504,2,14,20,60],\n [1505,2,14,21,62],\n [1506,2,14,22,63],\n [1507,2,14,23,64],\n [1508,2,14,24,66],\n [1509,2,14,25,67],\n [1510,2,14,26,69],\n [1511,2,14,27,70],\n [1512,2,14,28,71],\n [1513,2,14,29,73],\n [1514,2,14,30,74],\n [1515,2,14,31,75],\n [1516,2,14,32,77],\n [1517,2,14,33,78],\n [1518,2,14,34,79],\n [1519,2,14,35,81],\n [1520,2,14,36,82],\n [1521,2,14,37,83],\n [1522,2,14,38,85],\n [1523,2,14,39,86],\n [1524,2,15,11,32],\n [1525,2,15,12,34],\n [1526,2,15,13,37],\n [1527,2,15,14,40],\n [1528,2,15,15,42],\n [1529,2,15,16,45],\n [1530,2,15,17,48],\n [1531,2,15,18,50],\n [1532,2,15,19,53],\n [1533,2,15,20,56],\n [1534,2,15,21,58],\n [1535,2,15,22,61],\n [1536,2,15,23,63],\n [1537,2,15,24,66],\n [1538,2,15,25,69],\n [1539,2,15,26,71],\n [1540,2,15,27,74],\n [1541,2,15,28,77],\n [1542,2,15,29,79],\n [1543,2,15,30,82],\n [1544,2,15,31,84],\n [1545,2,15,32,87],\n [1546,2,15,33,90],\n [1547,2,15,34,92],\n [1548,2,15,35,95],\n [1549,2,15,36,98],\n [1550,2,15,37,100],\n [1551,2,16,26,30],\n [1552,2,16,27,32],\n [1553,2,16,28,34],\n [1554,2,16,29,36],\n [1555,2,16,30,38],\n [1556,2,16,31,41],\n [1557,2,16,32,43],\n [1558,2,16,33,45],\n [1559,2,16,34,47],\n [1560,2,16,35,50],\n [1561,2,16,36,52],\n [1562,2,16,37,54],\n [1563,2,16,38,56],\n [1564,2,16,39,58],\n [1565,2,16,40,61],\n [1566,2,16,41,63],\n [1567,2,16,42,65],\n [1568,2,16,43,67],\n [1569,2,16,44,70],\n [1570,2,16,45,72],\n [1571,2,16,46,74],\n [1572,2,16,47,76],\n [1573,2,16,48,78],\n [1574,2,16,49,81],\n [1575,2,16,50,83],\n [1576,2,16,51,85],\n [1577,2,16,52,87],\n [1578,2,17,13,31],\n [1579,2,17,14,34],\n [1580,2,17,15,37],\n [1581,2,17,16,40],\n [1582,2,17,17,43],\n [1583,2,17,18,46],\n [1584,2,17,19,49],\n [1585,2,17,20,52],\n [1586,2,17,21,55],\n [1587,2,17,22,58],\n [1588,2,17,23,61],\n [1589,2,17,24,64],\n [1590,2,17,25,67],\n [1591,2,17,26,70],\n [1592,2,17,27,73],\n [1593,2,17,28,76],\n [1594,2,17,29,79],\n [1595,2,17,30,82],\n [1596,2,17,31,85],\n [1597,2,17,32,88],\n [1598,2,17,33,91],\n [1599,2,17,34,94],\n [1600,2,17,35,97],\n [1601,2,17,36,100],\n [1602,2,17,37,103],\n [1603,2,17,38,106],\n [1604,2,17,39,109],\n [1605,2,17,40,112],\n [1606,2,17,41,115],\n [1607,2,17,42,118],\n [1608,2,17,43,122],\n [1609,2,17,44,125],\n [1610,2,17,45,128],\n [1611,2,17,46,131],\n [1612,2,17,47,134],\n [1613,2,17,48,137],\n [1614,2,17,49,140],\n [1615,2,18,0,38],\n [1616,2,18,1,42],\n [1617,2,18,2,47],\n [1618,2,18,3,51],\n [1619,2,18,4,55],\n [1620,2,18,5,60],\n [1621,2,18,6,64],\n [1622,2,18,7,68],\n [1623,2,18,8,73],\n [1624,2,18,9,77],\n [1625,2,18,10,81],\n [1626,2,18,11,86],\n [1627,2,18,12,90],\n [1628,2,18,13,94],\n [1629,2,18,14,99],\n [1630,2,18,15,103],\n [1631,2,18,16,107],\n [1632,2,18,17,112],\n [1633,2,18,18,116],\n [1634,2,18,19,120],\n [1635,2,18,20,125],\n [1636,2,18,21,129],\n [1637,2,18,22,133],\n [1638,2,18,23,138],\n [1639,2,18,24,142],\n [1640,2,18,25,147],\n [1641,2,18,26,151],\n [1642,2,18,27,155],\n [1643,2,18,28,160],\n [1644,2,18,29,164],\n [1645,2,18,30,168],\n [1646,2,18,31,173],\n [1647,2,18,32,177],\n [1648,2,18,33,181],\n [1649,2,18,34,186],\n [1650,2,18,35,190],\n [1651,2,18,36,194],\n [1652,2,18,37,199],\n [1653,2,18,38,203],\n [1654,2,18,39,207],\n [1655,2,18,40,212],\n [1656,2,19,10,33],\n [1657,2,19,11,37],\n [1658,2,19,12,41],\n [1659,2,19,13,45],\n [1660,2,19,14,49],\n [1661,2,19,15,53],\n [1662,2,19,16,57],\n [1663,2,19,17,61],\n [1664,2,19,18,65],\n [1665,2,19,19,69],\n [1666,2,19,20,73],\n [1667,2,19,21,77],\n [1668,2,19,22,81],\n [1669,2,19,23,85],\n [1670,2,19,24,89],\n [1671,2,19,25,93],\n [1672,2,19,26,97],\n [1673,2,19,27,101],\n [1674,2,19,28,105],\n [1675,2,20,11,30],\n [1676,2,20,12,34],\n [1677,2,20,13,38],\n [1678,2,20,14,41],\n [1679,2,20,15,45],\n [1680,2,20,16,49],\n [1681,2,20,17,53],\n [1682,2,20,18,56],\n [1683,2,20,19,60],\n [1684,2,20,20,64],\n [1685,2,20,21,67],\n [1686,2,20,22,71],\n [1687,2,20,23,75],\n [1688,2,20,24,79],\n [1689,2,20,25,82],\n [1690,2,21,0,126],\n [1691,2,21,1,122],\n [1692,2,21,2,119],\n [1693,2,21,3,115],\n [1694,2,21,4,111],\n [1695,2,21,5,108],\n [1696,2,21,6,104],\n [1697,2,21,7,101],\n [1698,2,21,8,97],\n [1699,2,21,9,94],\n [1700,2,21,10,90],\n [1701,2,21,11,86],\n [1702,2,21,12,83],\n [1703,2,21,13,79],\n [1704,2,21,14,76],\n [1705,2,21,15,72],\n [1706,2,21,16,69],\n [1707,2,21,17,65],\n [1708,2,21,18,61],\n [1709,2,21,19,58],\n [1710,2,21,20,54],\n [1711,2,21,21,51],\n [1712,2,21,22,47],\n [1713,2,21,23,44],\n [1714,2,21,24,40],\n [1715,2,21,25,36],\n [1716,2,21,26,33],\n [1717,2,22,2,30],\n [1718,2,22,3,31],\n [1719,2,22,4,33],\n [1720,2,22,5,34],\n [1721,2,22,6,36],\n [1722,2,22,7,38],\n [1723,2,22,8,39],\n [1724,2,22,9,41],\n [1725,2,22,10,42],\n [1726,2,22,11,44],\n [1727,2,22,12,46],\n [1728,2,22,13,47],\n [1729,2,22,14,49],\n [1730,2,22,15,50],\n [1731,2,22,16,52],\n [1732,2,22,17,54],\n [1733,2,22,18,55],\n [1734,2,22,19,57],\n [1735,2,22,20,59],\n [1736,2,22,21,60],\n [1737,2,22,22,62],\n [1738,2,22,23,63],\n [1739,2,22,24,65],\n [1740,2,22,25,67],\n [1741,2,22,26,68],\n [1742,2,22,27,70],\n [1743,2,22,28,71],\n [1744,2,22,29,73],\n [1745,2,22,30,75],\n [1746,2,22,31,76],\n [1747,2,22,32,78],\n [1748,2,22,33,80],\n [1749,2,22,34,81],\n [1750,2,22,35,83],\n [1751,2,22,36,84],\n [1752,2,22,37,86],\n [1753,2,22,38,88],\n [1754,2,22,39,89],\n [1755,2,22,40,91],\n [1756,2,22,41,92],\n [1757,2,23,20,31],\n [1758,2,23,21,32],\n [1759,2,23,22,34],\n [1760,2,23,23,36],\n [1761,2,23,24,38],\n [1762,2,23,25,40],\n [1763,2,23,26,42],\n [1764,2,23,27,44],\n [1765,2,23,28,45],\n [1766,2,23,29,47],\n [1767,2,23,30,49],\n [1768,2,23,31,51],\n [1769,2,23,32,53],\n [1770,2,23,33,55],\n [1771,2,23,34,56],\n [1772,2,23,35,58],\n [1773,2,23,36,60],\n [1774,2,23,37,62],\n [1775,2,23,38,64],\n [1776,2,23,39,66],\n [1777,2,23,40,68],\n [1778,2,23,41,69],\n [1779,2,23,42,71],\n [1780,2,23,43,73],\n [1781,2,23,44,75],\n [1782,2,23,45,77],\n [1783,2,23,46,79],\n [1784,2,23,47,81],\n [1785,2,24,28,30],\n [1786,2,24,29,33],\n [1787,2,24,30,36],\n [1788,2,24,31,39],\n [1789,2,24,32,41],\n [1790,2,24,33,44],\n [1791,2,24,34,47],\n [1792,2,24,35,50],\n [1793,2,24,36,53],\n [1794,2,24,37,56],\n [1795,2,24,38,59],\n [1796,2,24,39,62],\n [1797,2,24,40,65],\n [1798,2,24,41,68],\n [1799,2,24,42,71],\n [1800,2,24,43,74],\n [1801,2,24,44,77],\n [1802,2,24,45,80],\n [1803,2,24,46,83],\n [1804,2,25,0,38],\n [1805,2,25,1,37],\n [1806,2,25,2,39],\n [1807,2,25,3,40],\n [1808,2,25,4,42],\n [1809,2,25,5,44],\n [1810,2,25,6,45],\n [1811,2,25,7,47],\n [1812,2,25,8,49],\n [1813,2,25,9,50],\n [1814,2,25,10,52],\n [1815,2,25,11,54],\n [1816,2,25,12,55],\n [1817,2,25,13,57],\n [1818,2,25,14,59],\n [1819,2,25,15,60],\n [1820,2,25,16,62],\n [1821,2,25,17,63],\n [1822,2,25,18,65],\n [1823,2,25,19,67],\n [1824,2,25,20,68],\n [1825,2,25,21,70],\n [1826,2,25,22,72],\n [1827,2,25,23,73],\n [1828,2,25,24,75],\n [1829,2,25,25,77],\n [1830,2,25,26,78],\n [1831,2,25,27,80],\n [1832,2,25,28,81],\n [1833,2,25,29,83],\n [1834,2,25,30,85],\n [1835,2,25,31,86],\n [1836,2,25,32,88],\n [1837,2,25,33,90],\n [1838,2,25,34,91],\n [1839,2,25,35,93],\n [1840,2,25,36,95],\n [1841,2,25,37,96],\n [1842,2,25,38,98],\n [1843,2,25,39,100],\n [1844,2,25,40,101],\n [1845,2,25,41,103],\n [1846,2,25,42,104],\n [1847,2,25,43,106],\n [1848,2,25,44,108],\n [1849,2,25,45,109],\n [1850,2,25,46,111],\n [1851,2,26,0,34],\n [1852,2,26,1,36],\n [1853,2,26,2,37],\n [1854,2,26,3,38],\n [1855,2,26,4,39],\n [1856,2,26,5,40],\n [1857,2,26,6,42],\n [1858,2,26,7,43],\n [1859,2,26,8,44],\n [1860,2,26,9,45],\n [1861,2,26,10,46],\n [1862,2,26,11,48],\n [1863,2,26,12,49],\n [1864,2,26,13,50],\n [1865,2,26,14,51],\n [1866,2,26,15,52],\n [1867,2,26,16,53],\n [1868,2,26,17,55],\n [1869,2,26,18,56],\n [1870,2,26,19,57],\n [1871,2,26,20,58],\n [1872,2,26,21,59],\n [1873,2,26,22,61],\n [1874,2,26,23,62],\n [1875,2,26,24,63],\n [1876,2,26,25,64],\n [1877,2,26,26,65],\n [1878,2,26,27,67],\n [1879,2,26,28,68],\n [1880,2,26,29,69],\n [1881,2,26,30,70],\n [1882,2,26,31,71],\n [1883,2,26,32,73],\n [1884,2,26,33,74],\n [1885,2,26,34,75],\n [1886,2,26,35,76],\n [1887,2,26,36,77],\n [1888,2,26,37,78],\n [1889,2,26,38,80],\n [1890,2,26,39,81],\n [1891,2,26,40,82],\n [1892,2,26,41,83],\n [1893,2,26,42,84],\n [1894,2,26,43,86],\n [1895,2,26,44,87],\n [1896,2,26,45,88],\n [1897,2,26,46,89],\n [1898,2,26,47,90],\n [1899,2,26,48,92],\n [1900,2,26,49,93],\n [1901,2,26,50,94],\n [1902,2,26,51,95],\n [1903,2,26,52,96],\n [1904,2,26,53,98],\n [1905,2,26,54,99],\n [1906,2,26,55,100],\n [1907,2,26,56,101],\n [1908,2,26,57,102],\n [1909,2,26,58,103],\n [1910,2,26,59,105],\n [1911,2,26,60,106],\n [1912,2,27,0,36],\n [1913,2,27,1,38],\n [1914,2,27,2,41],\n [1915,2,27,3,44],\n [1916,2,27,4,46],\n [1917,2,27,5,49],\n [1918,2,27,6,52],\n [1919,2,27,7,55],\n [1920,2,27,8,57],\n [1921,2,27,9,60],\n [1922,2,27,10,63],\n [1923,2,27,11,65],\n [1924,2,27,12,68],\n [1925,2,27,13,71],\n [1926,2,27,14,73],\n [1927,2,28,0,37],\n [1928,2,28,1,42],\n [1929,2,28,2,47],\n [1930,2,28,3,51],\n [1931,2,28,4,56],\n [1932,2,28,5,60],\n [1933,2,28,6,65],\n [1934,2,28,7,69],\n [1935,2,28,8,74],\n [1936,2,29,1,38],\n [1937,2,29,2,41],\n [1938,2,29,3,44],\n [1939,2,29,4,47],\n [1940,2,29,5,49],\n [1941,2,29,6,52],\n [1942,2,29,7,55],\n [1943,2,29,8,58],\n [1944,2,29,9,60],\n [1945,2,29,10,63],\n [1946,2,29,11,66],\n [1947,2,29,12,69],\n [1948,2,29,13,72],\n [1949,2,29,14,74],\n [1950,2,29,15,77],\n [1951,2,29,16,80],\n [1952,2,29,17,83],\n [1953,2,27,0,36],\n [1954,2,27,1,38],\n [1955,2,27,2,41],\n [1956,2,27,3,44],\n [1957,2,27,4,46],\n [1958,2,27,5,49],\n [1959,2,27,6,52],\n [1960,2,27,7,55],\n [1961,2,27,8,57],\n [1962,2,27,9,60],\n [1963,2,27,10,63],\n [1964,2,27,11,65],\n [1965,2,27,12,68],\n [1966,2,27,13,71],\n [1967,2,27,14,73],\n [1968,2,28,0,37],\n [1969,2,28,1,42],\n [1970,2,28,2,47],\n [1971,2,28,3,51],\n [1972,2,28,4,56],\n [1973,2,28,5,60],\n [1974,2,28,6,65],\n [1975,2,28,7,69],\n [1976,2,28,8,74],\n [1977,2,29,1,38],\n [1978,2,29,2,41],\n [1979,2,29,3,44],\n [1980,2,29,4,47],\n [1981,2,29,5,49],\n [1982,2,29,6,52],\n [1983,2,29,7,55],\n [1984,2,29,8,58],\n [1985,2,29,9,60],\n [1986,2,29,10,63],\n [1987,2,29,11,66],\n [1988,2,29,12,69],\n [1989,2,29,13,72],\n [1990,2,29,14,74],\n [1991,2,29,15,77],\n [1992,2,29,16,80],\n [1993,2,29,17,83],\n [1994,1,30,0,35],\n [1995,1,30,1,37],\n [1996,1,30,2,40],\n [1997,1,30,3,42],\n [1998,1,30,4,45],\n [1999,1,30,5,47],\n [2000,1,30,6,49],\n [2001,1,30,7,52],\n [2002,1,30,8,54],\n [2003,1,30,9,56],\n [2004,1,30,10,59],\n [2005,1,30,11,61],\n [2006,1,30,12,64],\n [2007,1,30,13,66],\n [2008,1,30,14,68],\n [2009,1,30,15,71],\n [2010,1,30,16,73],\n [2011,1,30,17,75],\n [2012,1,30,18,78],\n [2013,1,30,19,80],\n [2014,1,30,20,83],\n [2015,1,30,21,85],\n [2016,1,31,0,35],\n [2017,1,31,1,38],\n [2018,1,31,2,41],\n [2019,1,31,3,44],\n [2020,1,31,4,47],\n [2021,1,31,5,50],\n [2022,1,31,6,53],\n [2023,1,31,7,56],\n [2024,1,31,8,59],\n [2025,1,31,9,62],\n [2026,1,31,10,65],\n [2027,1,31,11,68],\n [2028,1,31,12,72],\n [2029,1,31,13,75],\n [2030,1,31,14,78],\n [2031,1,31,15,81],\n [2032,1,31,16,84],\n [2033,1,31,17,87],\n [2034,1,31,18,90],\n [2035,1,31,19,93],\n [2036,1,31,20,96],\n [2037,1,32,0,34],\n [2038,1,32,1,37],\n [2039,1,32,2,41],\n [2040,1,32,3,44],\n [2041,1,32,4,47],\n [2042,1,32,5,51],\n [2043,1,32,6,54],\n [2044,1,32,7,57],\n [2045,1,32,8,61],\n [2046,1,32,9,64],\n [2047,1,32,10,67],\n [2048,1,32,11,71],\n [2049,1,32,12,74],\n [2050,1,32,13,77],\n [2051,1,32,14,81],\n [2052,1,33,0,36],\n [2053,1,33,1,39],\n [2054,1,33,2,41],\n [2055,1,33,3,43],\n [2056,1,33,4,46],\n [2057,1,33,5,48],\n [2058,1,33,6,50],\n [2059,1,33,7,53],\n [2060,1,33,8,55],\n [2061,1,33,9,58],\n [2062,1,33,10,60],\n [2063,1,33,11,62],\n [2064,1,33,12,65],\n [2065,1,33,13,67],\n [2066,1,33,14,70],\n [2067,1,33,15,72],\n [2068,1,33,16,74],\n [2069,1,33,17,77],\n [2070,1,33,18,79],\n [2071,1,33,19,81],\n [2072,1,33,20,84],\n [2073,1,33,21,86],\n [2074,1,33,22,89],\n [2075,1,33,23,91],\n [2076,1,33,24,93],\n [2077,1,33,25,96],\n [2078,1,33,26,98],\n [2079,1,34,0,34],\n [2080,1,34,1,37],\n [2081,1,34,2,40],\n [2082,1,34,3,42],\n [2083,1,34,4,45],\n [2084,1,34,5,48],\n [2085,1,34,6,50],\n [2086,1,34,7,53],\n [2087,1,34,8,56],\n [2088,1,34,9,58],\n [2089,1,34,10,61],\n [2090,1,34,11,63],\n [2091,1,34,12,66],\n [2092,1,34,13,69],\n [2093,1,34,14,71],\n [2094,1,34,15,74],\n [2095,1,34,16,77],\n [2096,1,34,17,79],\n [2097,1,34,18,82],\n [2098,1,34,19,84],\n [2099,1,34,20,87],\n [2100,1,34,21,90],\n [2101,1,34,22,92],\n [2102,1,34,23,95],\n [2103,1,34,24,98],\n [2104,1,35,0,39],\n [2105,1,35,1,43],\n [2106,1,35,2,47],\n [2107,1,35,3,52],\n [2108,1,35,4,56],\n [2109,1,35,5,60],\n [2110,1,35,6,65],\n [2111,1,35,7,69],\n [2112,1,35,8,73],\n [2113,1,35,9,78],\n [2114,1,35,10,82],\n [2115,1,35,11,87],\n [2116,1,35,12,91],\n [2117,1,35,13,95],\n [2118,1,36,0,32],\n [2119,1,36,1,35],\n [2120,1,36,2,39],\n [2121,1,36,3,42],\n [2122,1,36,4,45],\n [2123,1,36,5,48],\n [2124,1,36,6,52],\n [2125,1,36,7,55],\n [2126,1,36,8,58],\n [2127,1,36,9,61],\n [2128,1,36,10,65],\n [2129,1,36,11,68],\n [2130,1,36,12,71],\n [2131,1,36,13,74],\n [2132,1,36,14,77],\n [2133,1,36,15,81],\n [2134,1,36,16,84],\n [2135,1,37,2,31],\n [2136,1,37,3,33],\n [2137,1,37,4,35],\n [2138,1,37,5,37],\n [2139,1,37,6,39],\n [2140,1,37,7,41],\n [2141,1,37,8,43],\n [2142,1,37,9,45],\n [2143,1,37,10,47],\n [2144,1,37,11,49],\n [2145,1,37,12,51],\n [2146,1,37,13,54],\n [2147,1,37,14,56],\n [2148,1,37,15,58],\n [2149,1,37,16,60],\n [2150,1,37,17,62],\n [2151,1,37,18,64],\n [2152,1,37,19,66],\n [2153,1,37,20,68],\n [2154,1,37,21,70],\n [2155,1,37,22,72],\n [2156,1,37,23,74],\n [2157,1,38,3,31],\n [2158,1,38,4,33],\n [2159,1,38,5,36],\n [2160,1,38,6,39],\n [2161,1,38,7,41],\n [2162,1,38,8,44],\n [2163,1,38,9,47],\n [2164,1,38,10,49],\n [2165,1,38,11,52],\n [2166,1,38,12,55],\n [2167,1,38,13,58],\n [2168,1,38,14,60],\n [2169,1,38,15,63],\n [2170,1,38,16,66],\n [2171,1,38,17,68],\n [2172,1,38,18,71],\n [2173,1,38,19,74],\n [2174,1,38,20,76],\n [2175,1,39,2,31],\n [2176,1,39,3,34],\n [2177,1,39,4,37],\n [2178,1,39,5,39],\n [2179,1,39,6,42],\n [2180,1,39,7,45],\n [2181,1,39,8,48],\n [2182,1,39,9,51],\n [2183,1,39,10,53],\n [2184,1,39,11,56],\n [2185,1,39,12,59],\n [2186,1,39,13,62],\n [2187,1,39,14,64],\n [2188,1,39,15,67],\n [2189,1,39,16,70],\n [2190,1,39,17,73],\n [2191,1,39,18,76],\n [2192,1,39,19,78],\n [2193,1,40,0,37],\n [2194,1,40,1,40],\n [2195,1,40,2,43],\n [2196,1,40,3,46],\n [2197,1,40,4,49],\n [2198,1,40,5,52],\n [2199,1,40,6,55],\n [2200,1,40,7,58],\n [2201,1,40,8,61],\n [2202,1,40,9,64],\n [2203,1,40,10,67],\n [2204,1,40,11,70],\n [2205,1,40,12,73],\n [2206,1,40,13,76],\n [2207,1,40,14,79],\n [2208,1,40,15,82],\n [2209,1,40,16,85],\n [2210,1,41,0,33],\n [2211,1,41,1,35],\n [2212,1,41,2,37],\n [2213,1,41,3,40],\n [2214,1,41,4,42],\n [2215,1,41,5,44],\n [2216,1,41,6,47],\n [2217,1,41,7,49],\n [2218,1,41,8,51],\n [2219,1,41,9,54],\n [2220,1,41,10,56],\n [2221,1,41,11,58],\n [2222,1,41,12,61],\n [2223,1,41,13,63],\n [2224,1,41,14,65],\n [2225,1,41,15,68],\n [2226,1,41,16,70],\n [2227,1,41,17,72],\n [2228,1,41,18,75],\n [2229,1,41,19,77],\n [2230,1,41,20,79],\n [2231,1,41,21,82],\n [2232,1,42,0,36],\n [2233,1,42,1,38],\n [2234,1,42,2,41],\n [2235,1,42,3,43],\n [2236,1,42,4,46],\n [2237,1,42,5,48],\n [2238,1,42,6,51],\n [2239,1,42,7,54],\n [2240,1,42,8,56],\n [2241,1,42,9,59],\n [2242,1,42,10,61],\n [2243,1,42,11,64],\n [2244,1,42,12,66],\n [2245,1,42,13,69],\n [2246,1,42,14,72],\n [2247,1,42,15,74],\n [2248,1,42,16,77],\n [2249,1,42,17,79],\n [2250,1,42,18,82],\n [2251,1,42,19,84],\n [2252,1,42,20,87],\n [2253,1,43,0,36],\n [2254,1,43,1,38],\n [2255,1,43,2,40],\n [2256,1,43,3,42],\n [2257,1,43,4,44],\n [2258,1,43,5,47],\n [2259,1,43,6,49],\n [2260,1,43,7,51],\n [2261,1,43,8,53],\n [2262,1,43,9,55],\n [2263,1,43,10,57],\n [2264,1,43,11,59],\n [2265,1,43,12,61],\n [2266,1,43,13,64],\n [2267,1,43,14,66],\n [2268,1,43,15,68],\n [2269,1,43,16,70],\n [2270,1,43,17,72],\n [2271,1,43,18,74],\n [2272,1,43,19,76],\n [2273,1,43,20,79],\n [2274,1,43,21,81],\n [2275,1,43,22,83],\n [2276,1,43,23,85],\n [2277,1,44,0,37],\n [2278,1,44,1,40],\n [2279,1,44,2,43],\n [2280,1,44,3,46],\n [2281,1,44,4,49],\n [2282,1,44,5,52],\n [2283,1,44,6,55],\n [2284,1,44,7,58],\n [2285,1,44,8,62],\n [2286,1,44,9,65],\n [2287,1,44,10,68],\n [2288,1,44,11,71],\n [2289,1,44,12,74],\n [2290,1,44,13,77],\n [2291,1,44,14,80],\n [2292,1,44,15,83],\n [2293,1,44,16,87],\n [2294,1,44,17,90],\n [2295,1,44,18,93],\n [2296,2,30,0,33],\n [2297,2,30,1,35],\n [2298,2,30,2,38],\n [2299,2,30,3,40],\n [2300,2,30,4,43],\n [2301,2,30,5,45],\n [2302,2,30,6,47],\n [2303,2,30,7,50],\n [2304,2,30,8,52],\n [2305,2,30,9,55],\n [2306,2,30,10,57],\n [2307,2,30,11,59],\n [2308,2,30,12,62],\n [2309,2,30,13,64],\n [2310,2,30,14,66],\n [2311,2,30,15,69],\n [2312,2,30,16,71],\n [2313,2,30,17,74],\n [2314,2,30,18,76],\n [2315,2,30,19,78],\n [2316,2,30,20,81],\n [2317,2,30,21,83],\n [2318,2,31,0,31],\n [2319,2,31,1,34],\n [2320,2,31,2,36],\n [2321,2,31,3,39],\n [2322,2,31,4,41],\n [2323,2,31,5,44],\n [2324,2,31,6,46],\n [2325,2,31,7,49],\n [2326,2,31,8,51],\n [2327,2,31,9,54],\n [2328,2,31,10,56],\n [2329,2,31,11,59],\n [2330,2,31,12,61],\n [2331,2,31,13,64],\n [2332,2,31,14,66],\n [2333,2,31,15,69],\n [2334,2,31,16,71],\n [2335,2,31,17,74],\n [2336,2,31,18,76],\n [2337,2,31,19,79],\n [2338,2,31,20,81],\n [2339,2,31,21,84],\n [2340,2,32,0,32],\n [2341,2,32,1,36],\n [2342,2,32,2,39],\n [2343,2,32,3,42],\n [2344,2,32,4,46],\n [2345,2,32,5,49],\n [2346,2,32,6,53],\n [2347,2,32,7,56],\n [2348,2,32,8,60],\n [2349,2,32,9,63],\n [2350,2,32,10,67],\n [2351,2,32,11,70],\n [2352,2,32,12,73],\n [2353,2,32,13,77],\n [2354,2,32,14,80],\n [2355,2,32,15,84],\n [2356,2,33,0,35],\n [2357,2,33,1,37],\n [2358,2,33,2,39],\n [2359,2,33,3,42],\n [2360,2,33,4,44],\n [2361,2,33,5,46],\n [2362,2,33,6,48],\n [2363,2,33,7,50],\n [2364,2,33,8,53],\n [2365,2,33,9,55],\n [2366,2,33,10,57],\n [2367,2,33,11,59],\n [2368,2,33,12,62],\n [2369,2,33,13,64],\n [2370,2,33,14,66],\n [2371,2,33,15,68],\n [2372,2,33,16,70],\n [2373,2,33,17,73],\n [2374,2,33,18,75],\n [2375,2,33,19,77],\n [2376,2,33,20,79],\n [2377,2,33,21,82],\n [2378,2,33,22,84],\n [2379,2,33,23,86],\n [2380,2,33,24,88],\n [2381,2,33,25,90],\n [2382,2,33,26,93],\n [2383,2,34,0,33],\n [2384,2,34,1,36],\n [2385,2,34,2,38],\n [2386,2,34,3,41],\n [2387,2,34,4,43],\n [2388,2,34,5,46],\n [2389,2,34,6,48],\n [2390,2,34,7,51],\n [2391,2,34,8,54],\n [2392,2,34,9,56],\n [2393,2,34,10,59],\n [2394,2,34,11,61],\n [2395,2,34,12,64],\n [2396,2,34,13,66],\n [2397,2,34,14,69],\n [2398,2,34,15,72],\n [2399,2,34,16,74],\n [2400,2,34,17,77],\n [2401,2,34,18,79],\n [2402,2,34,19,82],\n [2403,2,34,20,84],\n [2404,2,34,21,87],\n [2405,2,34,22,89],\n [2406,2,34,23,92],\n [2407,2,34,24,95],\n [2408,2,34,25,97],\n [2409,2,34,26,100],\n [2410,2,35,0,40],\n [2411,2,35,1,44],\n [2412,2,35,2,48],\n [2413,2,35,3,53],\n [2414,2,35,4,57],\n [2415,2,35,5,61],\n [2416,2,35,6,66],\n [2417,2,35,7,70],\n [2418,2,35,8,74],\n [2419,2,35,9,79],\n [2420,2,35,10,83],\n [2421,2,35,11,87],\n [2422,2,35,12,92],\n [2423,2,35,13,96],\n [2424,2,35,14,100],\n [2425,2,35,15,105],\n [2426,2,36,0,31],\n [2427,2,36,1,34],\n [2428,2,36,2,38],\n [2429,2,36,3,41],\n [2430,2,36,4,45],\n [2431,2,36,5,48],\n [2432,2,36,6,52],\n [2433,2,36,7,55],\n [2434,2,36,8,59],\n [2435,2,36,9,62],\n [2436,2,36,10,66],\n [2437,2,36,11,69],\n [2438,2,36,12,72],\n [2439,2,36,13,76],\n [2440,2,36,14,79],\n [2441,2,36,15,83],\n [2442,2,37,0,74],\n [2443,2,37,1,72],\n [2444,2,37,2,70],\n [2445,2,37,3,68],\n [2446,2,37,4,65],\n [2447,2,37,5,63],\n [2448,2,37,6,61],\n [2449,2,37,7,58],\n [2450,2,37,8,56],\n [2451,2,37,9,54],\n [2452,2,37,10,52],\n [2453,2,37,11,49],\n [2454,2,37,12,47],\n [2455,2,37,13,45],\n [2456,2,37,14,43],\n [2457,2,37,15,40],\n [2458,2,37,16,38],\n [2459,2,37,17,36],\n [2460,2,37,18,33],\n [2461,2,37,19,31],\n [2462,2,38,3,32],\n [2463,2,38,4,35],\n [2464,2,38,5,38],\n [2465,2,38,6,42],\n [2466,2,38,7,45],\n [2467,2,38,8,48],\n [2468,2,38,9,51],\n [2469,2,38,10,55],\n [2470,2,38,11,58],\n [2471,2,38,12,61],\n [2472,2,38,13,64],\n [2473,2,38,14,67],\n [2474,2,38,15,71],\n [2475,2,38,16,74],\n [2476,2,38,17,77],\n [2477,2,38,18,80],\n [2478,2,39,3,31],\n [2479,2,39,4,34],\n [2480,2,39,5,37],\n [2481,2,39,6,40],\n [2482,2,39,7,43],\n [2483,2,39,8,47],\n [2484,2,39,9,50],\n [2485,2,39,10,53],\n [2486,2,39,11,56],\n [2487,2,39,12,59],\n [2488,2,39,13,62],\n [2489,2,39,14,65],\n [2490,2,39,15,68],\n [2491,2,39,16,72],\n [2492,2,39,17,75],\n [2493,2,39,18,78],\n [2494,2,39,19,81],\n [2495,2,40,0,37],\n [2496,2,40,1,40],\n [2497,2,40,2,42],\n [2498,2,40,3,45],\n [2499,2,40,4,48],\n [2500,2,40,5,51],\n [2501,2,40,6,53],\n [2502,2,40,7,56],\n [2503,2,40,8,59],\n [2504,2,40,9,61],\n [2505,2,40,10,64],\n [2506,2,40,11,67],\n [2507,2,40,12,69],\n [2508,2,40,13,72],\n [2509,2,40,14,75],\n [2510,2,40,15,78],\n [2511,2,40,16,80],\n [2512,2,40,17,83],\n [2513,2,40,18,86],\n [2514,2,40,19,88],\n [2515,2,40,20,91],\n [2516,2,40,21,94],\n [2517,2,40,22,96],\n [2518,2,41,0,32],\n [2519,2,41,1,35],\n [2520,2,41,2,37],\n [2521,2,41,3,40],\n [2522,2,41,4,42],\n [2523,2,41,5,44],\n [2524,2,41,6,47],\n [2525,2,41,7,49],\n [2526,2,41,8,52],\n [2527,2,41,9,54],\n [2528,2,41,10,57],\n [2529,2,41,11,59],\n [2530,2,41,12,61],\n [2531,2,41,13,64],\n [2532,2,41,14,66],\n [2533,2,41,15,69],\n [2534,2,41,16,71],\n [2535,2,41,17,74],\n [2536,2,41,18,76],\n [2537,2,41,19,79],\n [2538,2,41,20,81],\n [2539,2,41,21,83],\n [2540,2,41,22,86],\n [2541,2,42,0,35],\n [2542,2,42,1,37],\n [2543,2,42,2,40],\n [2544,2,42,3,42],\n [2545,2,42,4,45],\n [2546,2,42,5,47],\n [2547,2,42,6,50],\n [2548,2,42,7,52],\n [2549,2,42,8,55],\n [2550,2,42,9,57],\n [2551,2,42,10,60],\n [2552,2,42,11,62],\n [2553,2,42,12,65],\n [2554,2,42,13,67],\n [2555,2,42,14,70],\n [2556,2,42,15,72],\n [2557,2,42,16,75],\n [2558,2,42,17,77],\n [2559,2,42,18,80],\n [2560,2,42,19,82],\n [2561,2,42,20,85],\n [2562,2,42,21,87],\n [2563,2,43,0,34],\n [2564,2,43,1,36],\n [2565,2,43,2,38],\n [2566,2,43,3,40],\n [2567,2,43,4,42],\n [2568,2,43,5,44],\n [2569,2,43,6,46],\n [2570,2,43,7,48],\n [2571,2,43,8,50],\n [2572,2,43,9,52],\n [2573,2,43,10,54],\n [2574,2,43,11,57],\n [2575,2,43,12,59],\n [2576,2,43,13,61],\n [2577,2,43,14,63],\n [2578,2,43,15,65],\n [2579,2,43,16,67],\n [2580,2,43,17,69],\n [2581,2,43,18,71],\n [2582,2,43,19,73],\n [2583,2,43,20,75],\n [2584,2,43,21,77],\n [2585,2,43,22,79],\n [2586,2,43,23,81],\n [2587,2,43,24,83],\n [2588,2,43,25,85],\n [2589,2,43,26,87],\n [2590,2,43,27,89],\n [2591,2,43,28,91],\n [2592,2,43,29,93],\n [2593,2,44,0,36],\n [2594,2,44,1,39],\n [2595,2,44,2,42],\n [2596,2,44,3,45],\n [2597,2,44,4,48],\n [2598,2,44,5,51],\n [2599,2,44,6,54],\n [2600,2,44,7,57],\n [2601,2,44,8,60],\n [2602,2,44,9,63],\n [2603,2,44,10,66],\n [2604,2,44,11,69],\n [2605,2,44,12,72],\n [2606,2,44,13,75],\n [2607,2,44,14,78],\n [2608,2,44,15,81],\n [2609,2,44,16,84],\n [2610,2,44,17,86],\n [2611,2,44,18,89],\n ];\n\n foreach ($data as $d) {\n $c = new Conversion();\n $c->sexo = $d[1];\n $c->escala = $d[2];\n $c->puntuacion_cruda = $d[3];\n $c->puntuacion_t = $d[4];\n $c->save();\n }\n }",
"public function run()\n {\n DB::table('presentation')->insert([\n \t'title_pres' => 'presentation_test_01',\n \t'description' => 'ceci est la description de la premiere presentation',\n ]);\n DB::table('slide')->insert([\n \t'title_slide' => 'Slide 01',\n \t'description' => 'ceci est la premiere slide de la premiere presentation',\n \t'type_slide' => 2,\n \t'presentation' => 1,\n ]);\n DB::table('slide')->insert([\n \t'title_slide' => 'Slide 02',\n \t'description' => 'ceci est la deuxieme slide de la premiere presentation',\n \t'type_slide' => 4,\n \t'presentation' => 1,\n ]);\n DB::table('slide')->insert([\n \t'title_slide' => 'Slide 03',\n \t'description' => 'ceci est la troisieme slide de la premiere presentation',\n \t'type_slide' => 1,\n \t'presentation' => 1,\n ]);\n DB::table('element')->insert([\n \t'title_element' => 'Element 01',\n \t'path_file' => '/resources/pictures/Element_01.jpg',\n \t'url' => '',\n \t'slide_id'=> 1,\n ]);\n DB::table('element')->insert([\n \t'title_element' => 'Element 02',\n \t'path_file' => '/resources/pictures/Element_02.jpg',\n \t'url' => '',\n \t'slide_id'=> 2,\n ]);\n DB::table('element')->insert([\n \t'title_element' => 'Element 03',\n \t'path_file' => '/resources/pictures/Element_03.jpg',\n \t'url' => '',\n \t'slide_id'=> 2,\n ]);\n DB::table('element')->insert([\n \t'title_element' => 'Element 04',\n \t'path_file' => '/resources/pictures/Element_04.jpg',\n \t'url' => '',\n \t'slide_id'=> 2,\n ]);\n }",
"public function run()\n {\n DB::table('slides')->insert([\n ['link'=>'banner1','image'=>'banner1.png'],\n ['link'=>'banner2','image'=>'banner2.png'],\n ['link'=>'banner3','image'=>'banner3.png'],\n ['link'=>'banner4','image'=>'banner4.png'],\n ['link'=>'banner5','image'=>'banner5.png'],\n ]);\n }",
"function _static6($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content productzoom-style\">\n <div class=\"row\">\n <div class=\"span5\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_title'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['sc_title'] ).'</h3>';\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\t// FEATURES LIST\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_lp_features'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<ul class=\"features\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$textAr = explode(\"\\n\", $options['sc_lp_features']);\n\t\t\t\t\t\t\t\t\t\tforeach ($textAr as $index=>$line) {\n\t\t\t\t\t\t\t\t\t\t\techo '<li><span class=\"icon-ok icon-white\"></span> '.$line.'</li>';\n\t\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\t\techo '</ul>';\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\t// First Button\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_lp_button1'] ) && isset ( $options['sc_lp_button1_link']['url'] ) && !empty ( $options['sc_lp_button1_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a target=\"'.$options['sc_lp_button1_link']['target'].'\" href=\"'.$options['sc_lp_button1_link']['url'].'\" class=\"'.$options['sc_lp_button1_style'].' btn-large\"><span class=\"'.$options['sc_lp_button1_icon'].' '.$options['sc_lp_button1_icon_style'].'\"></span> '.$options['sc_lp_button1'].'</a> ';\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\tif ( !empty ( $options['sc_lp_button1'] ) && !empty ( $options['sc_2p_button1'] ) && !empty ( $options['sc_bt_text'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<span class=\"or\">'.$options['sc_bt_text'].'</span> ';\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// Second Button\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_2p_button1'] ) && isset ( $options['sc_lp_button2_link']['url'] ) && !empty ( $options['sc_lp_button2_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a target=\"'.$options['sc_lp_button2_link']['target'].'\" href=\"'.$options['sc_lp_button2_link']['url'].'\" class=\"'.$options['sc_lp_button2_style'].' btn-large\"><span class=\"'.$options['sc_lp_button2_icon'].' '.$options['sc_lp_button2_icon_style'].'\"></span> '.$options['sc_2p_button1'].'</a> ';\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\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// IMAGE\n\t\t\t\t\t\t\t\tif ( isset ( $options['sc_lp_image'] ) && !empty ( $options['sc_lp_image'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"span7\">';\n\t\t\t\t\t\t\t\t\t\techo '<div id=\"screenshot\">';\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"image\">';\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$image = vt_resize( '',$options['sc_lp_image'] , '620','390', true );\n\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" data-full=\"'.$options['sc_lp_image'].'\" />';\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\techo '<div class=\"loupe\"></div>';\t\n\t\t\t\t\t\t\t\t\t\t\techo '</div>';\t\n\t\t\t\t\t\t\t\t\t\techo '</div>';\t\n\t\t\t\t\t\t\t\t\techo '</div>';\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\n\t\t\t\t\t\t\t?>\n\n \t\n\n </div><!-- end row -->\n </div>\n </div>\n\t\t\t\t\n\t\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"function createSelectors($num) { ?>\n\t\t<li class=\"active\" data-target=\"#carousel-photos\" data-slide-to=\"0\"></li> <?PHP\n\t\tfor ($i = 1; $i <= $num; $i++) { ?>\n\t\t\t<li data-target=\"#carousel-photos\" data-slide-to=\"<?= $i ?>\"></li> <?PHP\n\t\t}\n\t}",
"function show_slide(){\n\n\t$get_slide = \"select * from slide\";\n\t$run_slide = mysql_query($get_slide);\n\n\twhile($my_slide = mysql_fetch_array($run_slide)) {\n\t\t$slide_id = $my_slide['slide_id'];\n\t\t$slide_img = $my_slide['home_slide'];\n\n\t\t//echo \"hi: $slide_id\";\n\t\techo \"<img id=$slide_id src=$slide_img width=100% height=100% >\";\n\t}\n}",
"function create_bootstrap_carousel($string)\n{\n# Nur zum Debug:\n# return \"hier soll mal ein Slider rein\";\n# enthaelt teilweise noch Code, der aktuell nicht benötigt wird, ggf fuer Ausbau\n global $settings, $template;\n $page = isset($GLOBALS['parent_page']) && $GLOBALS['parent_page'] ? $GLOBALS['parent_page'] : PAGE;\n $template->assign('contains_thumbnails', true);\n $template->assign('page', $page);\n $string = explode('|',$string[1]);\n $bootstrap_carousel = $string[0];\n #if(isset($string[1])) $img_class = $string[1];\n $bootstrap_carousel = new Gallery($bootstrap_carousel);\n if($bootstrap_carousel->photos)\n {\n $template->assign('number_of_photos', $bootstrap_carousel->number_of_photos);\n $template->assign('photos', $bootstrap_carousel->photos);\n }\n #$template->assign('lang', Localization::$lang);\n $bootstrap_carousel = $template->fetch(BASE_PATH.'cms/templates/subtemplates/bootstrap-carousel.inc.tpl');\n return $bootstrap_carousel;\n}",
"function _static2($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content boxes-style\">\n <?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"boxes row\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) || !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box1_image'].'\" alt=\"'.$options['ww_box1_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box1_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box1_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) || !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box2_image'].'\" alt=\"'.$options['ww_box2_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box2_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box2_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) || !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box3_image'].'\" alt=\"'.$options['ww_box3_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box3_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box3_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\n <script type=\"text/javascript\">\n\t\t\t\t\t\t(function($){\n \tvar boxes = $('.static-content .boxes');\n\t\t\t\t\t\t\tboxes.children().hover(function () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':-10}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:0.4}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':0}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:1}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n </script>\n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"function _static2($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content boxes-style\">\n <?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"boxes row\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) || !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box1_image'].'\" alt=\"'.$options['ww_box1_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box1_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box1_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) || !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box2_image'].'\" alt=\"'.$options['ww_box2_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box2_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box2_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) || !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box3_image'].'\" alt=\"'.$options['ww_box3_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box3_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\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 ( !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box3_desc'].'</p>';\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\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\n <script type=\"text/javascript\">\n\t\t\t\t\t\t(function($){\n \tvar boxes = $('.static-content .boxes');\n\t\t\t\t\t\t\tboxes.children().hover(function () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':-10}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:0.4}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':0}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:1}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n </script>\n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"public function assembler() {\n }",
"function generate() ;",
"public function run()\n {\n SlideShow::create([\n 'foto' => 'public/slide-show/1.jpg'\n ]);\n SlideShow::create([\n 'foto' => 'public/slide-show/2.jpg'\n ]);\n SlideShow::create([\n 'foto' => 'public/slide-show/3.jpg'\n ]);\n }",
"function cool_carousel_activation(){}",
"function mobile_kiosk_show_add_slide() {\n\t// Get all available slides\n\t$args = array(\n\t\t'post_type' => 'kioskslide',\n\t\t'posts_per_page' => -1,\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'OR',\n\t\t\tarray(\n\t\t\t\t'key' => 'gallery_id',\n\t\t\t\t'value' => FALSE,\n\t\t\t\t'type' => 'BOOLEAN'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'gallery_id',\n\t\t\t\t'compare' => 'NOT EXISTS'\n\t\t\t),\n\t\t)\t\n\t);\n\t$query = new WP_Query($args);\n\t$slides = $query->posts;\n\t\n\t// Get our template\n\tob_start();\n\tinclude('add_slide.php');\n\t$template .= ob_get_contents();\n\tob_end_clean();\n\t\n\techo $template;\n\texit;\n}",
"public function run()\n {\n DB::table('sliders')->delete();\n for ($i = 0; $i < 3; $i ++) {\n $slider = new Slider();\n $slider->fill([\n 'title' => 'مؤسسة تربوية + حواس= قمم تربوية عالية',\n 'description' => 'معا ننهض بمؤسستكم نحو قمم المهارات, الصحية والحياتية المجتمعية اكثر من عقد من الزمان ومؤسستنا تساهم بدمج برامج ابداعية وتفاعليه للمؤسسات التربوية وجميعها من خارج الصندوق',\n 'image' => 'dummy/slider.png'\n ])->save();\n }\n }",
"public function run()\n {\n\n\n \\DB::table('slides')->delete();\n\n \\DB::table('slides')->insert(array(\n array(\n 'id' => 1,\n 'name' => 'First Slider',\n 'content' => '/media/demo/1/banner1.png',\n 'slider_id' => 1,\n 'status' => 'active',\n 'deleted_at' => NULL,\n 'created_at' => '2017-12-03 22:53:48',\n 'updated_at' => '2017-12-03 23:24:42',\n ),\n array(\n 'id' => 2,\n 'name' => 'Second Slider',\n 'content' => '/media/demo/2/banner2.png',\n 'slider_id' => 1,\n 'status' => 'active',\n 'deleted_at' => NULL,\n 'created_at' => '2017-12-03 23:24:55',\n 'updated_at' => '2017-12-03 23:24:55',\n ),\n array(\n 'id' => 4,\n 'name' => 'Q8 Smart Band Review',\n 'content' => 'https://youtu.be/4MqbwYPAHCg',\n 'slider_id' => 2,\n 'status' => 'active',\n 'deleted_at' => NULL,\n 'created_at' => '2017-12-03 23:25:09',\n 'updated_at' => '2017-12-03 23:25:09',\n ),\n array(\n 'id' => 5,\n 'name' => 'camera FPV',\n 'content' => 'https://youtu.be/L8vL19CBF-8',\n 'slider_id' => 2,\n 'status' => 'active',\n 'deleted_at' => NULL,\n 'created_at' => '2017-12-03 23:25:09',\n 'updated_at' => '2017-12-03 23:25:09',\n ),\n array(\n 'id' => 6,\n 'name' => 'iPhone, iPad, iPod l IOS 11',\n 'content' => 'https://youtu.be/8iRk-G3dVKo',\n 'slider_id' => 2,\n 'status' => 'active',\n 'deleted_at' => NULL,\n 'created_at' => '2017-12-03 23:25:09',\n 'updated_at' => '2017-12-03 23:25:09',\n ),\n ));\n }",
"function rps_activate()\n{\n $width = '460';\n $height = '470';\n $post_per_slide = '1';\n $total_posts = '8';\n $slider_content = '3';\n rps_post_img_thumb();\n}",
"function createItems($data) { ?>\n\t\t<div class=\"item active\">\n\t\t\t<img src=\"layout/gallery/default.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t<h3>Chapter House</h3>\n\t\t\t\t<p>View of the house from 47th street.</p>\n\t\t\t</div> \n\t\t</div> <?PHP\n\t\tfor ($i = 0; $i < count($data); $i++) { ?>\n\t\t\t<div class=\"item\">\n\t\t\t\t<img src=\"layout/gallery/<?= $data[$i][\"id\"] ?>.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t\t<h3><?= $data[$i][\"header\"]; ?></h3>\n\t\t\t\t\t<p><?= $data[$i][\"content\"]; ?></p>\n\t\t\t\t</div> \n\t\t\t</div> <?PHP\n\t\t}\n\t}",
"public function fromArray(array $data)\n {\n if (! isset($data['name'])) {\n $data['name'] = '__NAME__';\n }\n $markup = sprintf(\n $this->template,\n $data['index'],\n $data['interpreter_id'],\n $data['index'],\n $data['event_id'],\n //$data['index'],\n //$data['name'],\n $data['name']\n );\n return $markup;\n }",
"public function run() {\n $sliders = array(\n ['slider_image' => 'assets/images/home-banner-1.png'],\n ['slider_image' => 'assets/images/home-banner-2.png'],\n ['slider_image' => 'assets/images/home-banner-3.png'],\n ['slider_image' => 'assets/images/home-banner-4.png'],\n );\n foreach($sliders as $slider){\n \n HomeSlider::create($slider);\n }\n }",
"public function getView($arr){\n\t\tforeach($arr as $k=>$v){\n\t\t\tif($v['img'] != ''){\n\t\t\t\tif(!is_file(DIR_MEDIA.$v['img'])){\n\t\t\t\t\tunset($arr[$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t$strOutput = '';\n\t\t$arr = $arr;\n\t\tif(count($arr)){\n\t\t\t//carousel\n\t\t\t$strOutput .= '<div id=\"'.$this->wname.'\" class=\"section\">';\n\t\t\t//items\n\t\t\t$cmpt = 0;\n\t\t\tforeach($arr as $k=>$v){\n\t\t\t\t//inner carousel\n\t\t\t\t$cmpt++;\n\t\t\t\tif($cmpt < count($arr)){\n\t\t\t\t\t$strOutput .= '<div class=\"section-inner middle\">';\n\t\t\t\t}else{\n\t\t\t\t\t$strOutput .= '<div class=\"section-inner\">';\t\n\t\t\t\t\t}\n\t\t\t\tif($v['link'] != ''){\n\t\t\t\t\t$strOutput .= '<a href=\"'.$v['link'].'\">';\n\t\t\t\t\t}\n\t\t\t\tif($v['text'] != ''){\n\t\t\t\t\tif($v['img'] != ''){\n\t\t\t\t\t\t$strOutput .= '<div class=\"section-caption\">';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$strOutput .= '<div class=\"section-caption noimg\">';\n\t\t\t\t\t\t}\n\t\t\t\t\t$strOutput .= '<div class=\"section-block\">';\n\t\t\t\t\tif($v['text'] != ''){\n\t\t\t\t\t\t$strOutput .= safeReverse($v['text']);\n\t\t\t\t\t\t}\n\t\t\t\t\t$strOutput .= '</div>';\n\t\t\t\t\t$strOutput .= '</div>';\n\t\t\t\t\t}\n\t\t\t\tif($v['img'] != ''){\n\t\t\t\t\t$strOutput .= '<div class=\"section-item\">';\n\t\t\t\t\t$strOutput .= '<img class=\"section-img\" src=\"'.PATH_IMAGE.$v['img'].'\" alt=\"\">';\n\t\t\t\t\t$strOutput .= '</div>';\t\t\n\t\t\t\t\t}\n\t\t\t\tif($v['link'] != ''){\n\t\t\t\t\t$strOutput .= '</a>';\n\t\t\t\t\t}\n\t\t\t\t//close section-inner\t\t\n\t\t\t\t$strOutput .= '</div>';\n\t\t\t\t}\t\t\t\n\t\t\t//close section class\n\t\t\t$strOutput .= '</div>';\n\t\t\t}\n\t\t//return outpur of the view\n\t\treturn $strOutput;\n\t\t}",
"public function startJs(){\r\n\r\n \r\n\t\t$vs_Js = \"\r\n\t\t\r\n\t\t\tvar interaktingslider = new InteraktingSlider(); \r\n\t\t\t\r\n\t\t\tinteraktingslider.setDelay(\".$this->getModel()->getDelay().\");\r\n\t\t\tinteraktingslider.setTransition('\".$this->getModel()->getTransition().\"');\r\n\t\t\tinteraktingslider.setSpeed(\".$this->getModel()->getSpeed().\");\t\t\r\n\t\t\tinteraktingslider.setMode('\".$this->getModel()->getMode().\"');\r\n\t\t\t\r\n\t\t\";\r\n\r\n\t\t$va_Slides = $this->getSlides();\r\n\r\n\t\tif($va_Slides){\r\n\t\t\tforeach ($va_Slides as $vo_Slide){\r\n\t\t\t\t$vs_Js .= 'interaktingslider.addSlide(\"'.$vo_Slide->getFormatedContent().'\"); ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$vs_Js .= \"\r\n\t\t\tinteraktingslider.show(); \t\t\r\n\t\t\";\r\n\r\n\r\n\t\treturn $vs_Js;\r\n\r\n\t}",
"function quotes_section($array) { ?>\n\t<div class=\"quotes-container\">\n\t\t<? $i = rand(0, count($array) - 1); ?>\n\t\t<h2 class=\"slides\">\n\t\t\t\"<? echo $array[$i]['quote']; ?>\"\n\t\t</h2>\n\t\t<p class=\"attribution\">\n\t\t\t—<? echo $array[$i]['person'] . \", \" . $array[$i]['affiliation']; ?>\n\t\t</p>\n\t</div>\n<? }",
"public function create_shortcodes() {\n \n }",
"public function run()\n {\n //\n \\App\\Models\\TipAppSlider::create(\n [\n 'description'=>\"لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور\" ,\n 'image'=>\"1.png\" ,\n ]\n );\n \\App\\Models\\TipAppSlider::create(\n [\n 'description'=>\"لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور\" ,\n 'image'=>\"2.png\" ,\n ]\n );\n \\App\\Models\\TipAppSlider::create(\n [\n 'description'=>\"لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور لوريم ايبسوم دولار سيت أميت ,كونسيكتيتور أدايبا يسكينج أليايت,سيت دو أيوسمود تيمبور\" ,\n 'image'=>\"1.png\" ,\n ]\n );\n }",
"function thmplt_do_carousel_slides($id, $echo = true, $legacy = 'on' ) { \r\n\r\n\r\n\t$thmplt_carousel_options = get_option('thmplt_carousel_options');\r\n\t$thmplt_carousel_slides = get_option('thmplt_carousel_slides');\r\n\t\r\n\t$s = 0;\r\n\t$classes = \"\";\r\n\t\r\n\t// If there are no slides... return false\r\n\tif ( !is_array( $thmplt_carousel_slides ) ) { return false; }\t\r\n\t\r\n\t// If there are no options, then set it to be an empty array \t\r\n\tif ( !is_array( $thmplt_carousel_options ) ) { $thmplt_carousel_options = array(); }\r\n\t\r\n\t$options = array ( \r\n\t\t\r\n\t\t\"indicators\" => \"on\",\r\n\t\t\"controls\" => \"on\",\r\n\t\t\"imageoptions\" => \"normal\",\r\n\t\t\"interval\" => \"3\",\r\n\t\t\"pause\" => \"none\",\r\n\t\t\"transition\" => \"slide\"\r\n\t\r\n\t);\r\n\r\n\t$options = array_merge($options, $thmplt_carousel_options );\r\n\r\n\t$html = \"\";\r\n\r\n\t/**\r\n\t * Add the hover attribute\r\n\t */\t\t\r\n\tif ($options['pause'] == \"hover\" ) { \r\n\r\n\t\t$html .= \"<script type='text/javascript'> \\n\";\r\n\t\t\t$html .= \"jQuery(document).ready(function(){ \r\n\t\t\t\r\n\t\t\t\tjQuery('#\".$id.\"').mouseenter(function() {\r\n\t\t\t\t\tjQuery(this).carousel('pause');\r\n\t\t\t\t}).mouseleave(function() {\r\n\t\t\t\t\tjQuery(this).carousel('cycle');\r\n\t\t\t\t}); \r\n\t\t\t\r\n\t\t\t});\";\r\n\t\t$html .= \"</script> \\n \\n\";\r\n\r\n\t}\r\n\t\r\n\r\n\t\r\n\t\r\n\t// Appened which transition we want \r\n\t$classes .= \"carousel-\" . $options['transition'];\r\n\t\r\n\r\n\t$html .= \"<div id='\".$id.\"' class='carousel slide \".$classes.\"' \";\r\n\r\n\t\t/**\r\n\t\t * Add the interval attribute\r\n\t\t */\t\t\r\n\t\t$interval = $options['interval'] * 1000;\r\n\t\t$html .= \" data-interval='\". $interval .\"' \";\r\n\r\n\r\n\tif ($options['pause'] == \"hover\" ) {\r\n\t\t#$html .= \" data-pause='true' \";\r\n\t} else {\r\n\t\t$html .= \" data-pause='false' \";\r\n\t}\r\n\t\r\n\t\r\n\t$html .= \" data-ride='carousel' > \\n\\n\";\r\n\r\n\t/**\r\n\t * Create the indicators if they are turned on in the settings\r\n\t * they are on \r\n\t */\t\r\n\tif ( $options['indicators'] == \"on\" ) {\r\n\r\n\t\t$html .= \"<!-- Indicators --> \\n\";\r\n\t\t$html .= \"<ol class='carousel-indicators'> \\n\";\r\n\t\t\r\n\t\tforeach ($thmplt_carousel_slides as $slide ) { \r\n\r\n\t\t\tif ( $slide != \"none\" ) { \r\n\t\t\t\r\n\t\t\t\t// Build the indicators list items \t\t\t\r\n\t\t\t\t$html .= \"\\t <li data-target='#\".$id.\"' data-slide-to='\".$s.\"'\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if its the first one, give it a class of active \t\r\n\t\t\t\t\tif ($s == 0 ) { $html .= \" class='active'\"; }\r\n\t\t\t\t\r\n\t\t\t\t$html .= \" ></li> \\n\";\r\n\t\t\t\t\r\n\t\t\t\t$s = $s + 1;\r\n\t\t\t\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\t$html .= \"</ol> \\n \\n\";\r\n\t\t\r\n\t} #end if \r\n\r\n\r\n\r\n\t$s = 0;\r\n\t/**\r\n\t * Create the slides \r\n\t */\r\n\t$html .= \"<!-- Wrapper for slides --> \\n\";\r\n\t$html .= \"<div class='carousel-inner'> \\n\";\r\n\t \r\n\tforeach ($thmplt_carousel_slides as $slide ) { \r\n\t\r\n\t\tif ( $slide != \"none\" ) { \r\n\t\t\t\r\n\t\t\t$car_post = get_post($slide);\r\n\t\t\r\n\t\t\t$custom = get_post_custom($car_post->ID);\r\n\t\t\t@$slide_set = unserialize($custom['thmplt_carousel_slide_settings'][0]);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$yt = thmplt_extract_yt_video_id($slide_set['video']);\r\n\t\t\t\r\n\t\t\t$slideid = !empty($slide_set['ID'])? $slide_set['ID'] : \"slide-\".$car_post->ID;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= \" \\t <div \";\r\n\t\t\t$html .= !empty($slideid)? \"id='\".$slideid.\"' \":\"\";\r\n\t\t\t$html .= \" class='item carousel-\". $car_post->ID . \" \".$slide_set['class'].\" \";\r\n\t\t\t// if its the first one, give it a class of active \t\r\n\t\t\tif ($s == 0 ) { $html .= \" active\"; }\r\n\t\t\t$html .= \"' \";\r\n\t\t\t$html .= !empty($slide_set['interval'])? \" data-interval='\".($slide_set['interval']*1000).\"' \":\"\";\r\n\t\t\t\r\n\t\t\t//$html .= !empty($slide_set['height'])? \" style='height:\".$slide_set['height'].\"px'\":\"\";\r\n\t\t\t\r\n\t\t\t$html .= \" > \\n\";\r\n\t\t\t\r\n\r\n\t\t\t//.1666666\r\n\t\t\t//$margintop = \"52.5$\";\r\n\t\t\t\r\n\t\t\tif (!empty($yt)){\r\n\t\t\t\t\r\n\t\t\t\t// iF Responsive \r\n\t\t\t\tif(!empty($slide_set['vresponsive']) && $slide_set['vresponsive'] == \"yes\"){ \r\n\t\t\t\t\t\r\n\t\t\t\t\t$heightratio = ($slide_set['height'] / $slide_set['width']) * 100;\r\n\t\t\t\t\t$scale = empty($slide_set['scale']) ? \"100\" : str_replace(\"%\", \"\", $slide_set['scale']);\r\n\t\t\t\t\t$scaleoffset = (100 - $scale)/2;\t\t\t\t\t\r\n\t\t\t\t\t$html .= \"\r\n\t\t\t\t\t<style scoped>\r\n\t\t\t\t\t\t#\".$slideid.\" .video-container {width:100%;height:0;padding-bottom:\".$heightratio.\"%}\r\n\t\t\t\t\t\t#\".$slideid.\" .video-container iframe {height:\".$scale.\"%;top:\".$scaleoffset.\"%}\r\n\t\t\t\t\t\t#\".$slideid.\" .video-container iframe {width:\".$scale.\"%;left:\".$scaleoffset.\"%}\r\n\t\t\t\t\t</style>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$html .= \"<!-- YT ID: \".$yt.\" -->\"; //width='560' height='315'\r\n\t\t\t\t$html .= \"<div class='video-container \";\r\n\t\t\t\t$html .= ($slide_set['vresponsive'] == \"yes\") ? \" embed-responsive \": \"\";\r\n\t\t\t\t$html .= \"'><iframe id='#\".$slideid.\"-video' class='carousel-video position-center' \";\r\n\t\t\t\t\r\n\t\t\t\t$html .= (!empty($slide_set['height']))? \" height='\".$slide_set['height'].\"'\":\"\";\r\n\t\t\t\t$html .= (!empty($slide_set['width']))? \" width='\".$slide_set['width'].\"'\":\"\";\r\n\t\t\t\t\r\n\t\t\t\t//$slide_set['sound'] = \"no\";\r\n\t\t\t\t\r\n\t\t\t\t$mute = (!empty($slide_set['sound']) && $slide_set['sound'] == \"no\")? \"1\" :\"0\";\r\n\t\t\t\t\r\n\t\t\t\t$src_sets = \"?rel=0&controls=0&showinfo=0&disablekb=0&autoplay=1&loop=1&mute=\".$mute.\"&playlist=\".$yt;\r\n\t\t\t\t\r\n\t\t\t\t$html .= \" src='//www.youtube.com/embed/\".$yt.$src_sets.\"' frameborder='0' allow='autoplay; encrypted-media' volume='0' allowfullscreen> </iframe></div>\";\r\n\t\t\t\t$html .= \"<div class='tpf-videomask'></div>\";\r\n\t\t\t\t\r\n/*\t\t\t\t$html .= \"\r\n\t\t\t\t<script>\r\n\t\t\t\t\tvar myVideo = iframe.getElementById('\".$slideid.\"-video'); \r\n\t\t\t\t\tmyVideo.mute();\r\n\t\t\t\t</script>\r\n\t\t\t\t\";*/\r\n\t\t\t\t\r\n\t\t\t} else {\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t* Check if a featured image was set, if not then use the bootstrap default grascale image\r\n\t\t\t\t*/\t\t\r\n\t\t\t\t$pictures=\"\";\r\n\t\t\t\t$custom = get_post_custom($car_post->ID);\r\n\t\t\t\t@$slide_set = unserialize($custom['thmplt_carousel_slide_images'][0]);\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (has_post_thumbnail($car_post->ID) && empty($slide_set['main'])){\r\n\t\t\t\t\t$slide_set['main'] = get_the_post_thumbnail_url($car_post->ID);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (!empty($slide_set)){\r\n\t\t\t\t\t$slide_set = array_reverse($slide_set);\r\n\t\t\t\t\tforeach ($slide_set as $key => $img ){\r\n\t\t\t\t\t\tif (!empty($img)){\r\n\t\t\t\t\t\t\t$key = ($key == \"main\")? \"2560\":$key;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$sz = str_replace(\"p\",\"\", $key);\r\n\t\t\t\t\t\t\t$pictures .= \"<source media='(max-width: \".$sz.\"px)' srcset='\".$img.\"'> \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( !empty($slide_set['main'])) { \r\n\r\n\t\t\t\t\t$imgurl = $slide_set['main'];//wp_get_attachment_url ( get_post_thumbnail_id( $car_post->ID ) );\r\n\r\n\t\t\t\t\tif ( $options['imageoptions'] == \"constrained\" ) { \r\n\r\n\t\t\t\t\t\t$html .= \"<div class='imageslide constrained' style='background: url(\".$imgurl.\") center center no-repeat;'>\";\r\n\t\t\t\t\t\t\t$html .= \"<picture style='visibility:hidden'>\";\r\n\t\t\t\t\t\t\t\t$html .= $pictures;\r\n\t\t\t\t\t\t\t\t$html .= \"<img src='\".$imgurl.\"' class='imageslide fullwidthimg' >\";\r\n\t\t\t\t\t\t\t$html .= \"</picture>\";\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"</div>\";\r\n\r\n\t\t\t\t\t} elseif ( $options['imageoptions'] == \"full-width\" ) { \r\n\t\t\t\t\t\t$html .= \"<picture>\";\r\n\t\t\t\t\t\t\t$html .= $pictures;\r\n\t\t\t\t\t\t\t$html .= \"<img src='\".$imgurl.\"' class='imageslide fullwidthimg' >\";\r\n\t\t\t\t\t\t$html .= \"</picture>\";\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"<picture>\";\r\n\t\t\t\t\t\t\t$html .= $pictures;\r\n\t\t\t\t\t\t\t$html .= \"<img src='\".$imgurl.\"' class='imageslide' >\";\r\n\t\t\t\t\t\t$html .= \"</picture>\";\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$html .= get_the_post_thumbnail( $car_post->ID , 'full' ); \t\t\t\t\r\n\t\t\t\t\t} \r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t$html .= \"<img alt='Carousel Slide' src='data:image/gif;base64,R0lGODlhAQABAIAAAFVVVQAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=='>\";\t\r\n\r\n\t\t\t\t}// End if has_post_thumbnail \r\n\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tif ( !empty($car_post->post_content)){\r\n\t\t\t\r\n\t\t\t\tif ($legacy == 'on' ){\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='container'> \\n\";\t\t\t\t\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='carousel-caption'> \\n\";\r\n\t\t\t\t\t\t$html .= \"\\t \\t \\t\". wpautop($car_post->post_content) . \"\\n\";\r\n\t\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\t\r\n\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($legacy == 'off' ){\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='caption-wrapper'> \\n\";\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='container'> \\n\";\t\t\t\t\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='caption-box-wrapper container row'> \\n\";\r\n\t\t\t\t\t$html .= \" \\t \\t<div class='caption-box'> \\n\";\r\n\t\t\t\t\t\t$html .= \"\\t \\t \\t\". wpautop($car_post->post_content) . \"\\n\";\r\n\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\r\n\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\r\n\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\t\r\n\t\t\t\t\t$html .= \"\\t \\t </div> \\n\";\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} // if !empty($car_post->post_content)\r\n\r\n\t\t\t\r\n\t\t\t// Add an A TAG here \r\n\t\t\tif (!empty($slide_set['href'])){\r\n\t\t\t\t$html .= \"<a class='tpf-linkslide' href='\".$slide_set['href'].\"'> </a>\";\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= \"\\t </div> \\n\";\r\n\t\t\t\r\n\t\t\t$s = $s + 1;\r\n\t\t\r\n\t\t} \r\n\t}\r\n\t\r\n\t\r\n\t$html .= \"</div> \\n \\n\"; // end the slides div\r\n\r\n\r\n\t/**\r\n\t * Create the controls if they are turned on in the seetings\r\n\t * they are on by default\r\n\t */\t\r\n\tif ( $options['controls'] == \"on\" ) {\r\n\r\n\t\t$html .= \"<!-- Controls --> \\n\";\r\n\t\t\r\n\t\t$html .= \"\t<a class='left carousel-control' href='#\".$id.\"' role='button' data-slide='prev'>\r\n\t \t\t\t<span class='glyphicon glyphicon-chevron-left'></span>\r\n\t\t\t \t</a> \\n\r\n\t\t\t\";\r\n\t\t$html .= \"\t<a class='right carousel-control' href='#\".$id.\"' role='button' data-slide='next'>\r\n \t\t\t\t<span class='glyphicon glyphicon-chevron-right'></span>\r\n \t\t\t\t</a> \\n\r\n\t\t\t\";\t\t\t\r\n\t} #end if \r\n\r\n\r\n\t$html .= \"</div> \\n \\n\"; // End closing carousel\r\n\r\n\r\n\t// @todo check that data interval is set... if not, do not run this \r\n\t\r\n\t$html .= \"<script type='text/javascript'> \\n\";\r\n\t\t $html .= \"jQuery(document).ready(function(){ \r\n\t\t \tvar defaultInterval = jQuery('#\".$id.\"').attr('data-interval');\r\n\t\t\tvar activeInterval = jQuery('#\".$id.\"').find('.item.active').attr('data-interval');\r\n\t\t\tif ( activeInterval ){\r\n\t\t\t\tjQuery('#\".$id.\"').carousel({interval: activeInterval});\r\n\t\t\t}\r\n\r\n\t\t\tjQuery('#\".$id.\"').on('slide.bs.carousel', function (e) { \r\n\r\n\t\t\t\tvar newInterval = jQuery(e.relatedTarget).attr('data-interval'); // next slide \r\n\t\t\t\r\n\t\t\t\tif ( newInterval ) { \r\n\t\t\t\t\tc = jQuery('#\".$id.\"')\r\n\t\t\t\t\topt = c.data()['bs.carousel'].options\r\n\t\t\t\t\topt.interval= newInterval;\r\n\t\t\t\t\tc.data({options: opt})\r\n\r\n\t\t\t\t} else { \r\n\t\t\t\t\tc = jQuery('#\".$id.\"')\r\n\t\t\t\t\topt = c.data()['bs.carousel'].options\r\n\t\t\t\t\topt.interval= defaultInterval;\r\n\t\t\t\t\tc.data({options: opt})\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t});\"; \r\n\t$html .= \"</script> \\n \\n\";\t\t\r\n\t\r\n\t\r\n\tif ($echo == true ) {\r\n\t\techo $html;\r\n\t} else { \r\n\t\treturn $html;\r\n\t}\r\n\t\r\n}",
"function mySlider(){\n\t// $slider['images'] = ['glavnii' => [\n\t// ['img' => '1.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ['img' => '2.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ['img' => '3.jpg', 'title' => 'Праздник дня рождения', 'text' => 'Веселые ребята и их родители с нашими аниматорами'],\n\t// ]];\n\t// setOption('MySliders', $slider, true);\n\tinclude 'settings.php';\n}",
"public function run()\n {\n \n\n $slider= new App\\Slider();\n $slider->description = \"Imagen 1\";\n $slider->image = \"sliders/octopus_1.png\";\n $slider->save();\n\n \t\t $slider= new App\\Slider();\n $slider->description = \"Imagen 2\";\n $slider->image = \"sliders/octopus_2.png\";\n $slider->save();\n\n }",
"function carousel_slider($atts, $content = null){\n\textract(shortcode_atts(array(\n\t\t\"enable_slider\" => 'yes',\n\t\t\"hover_effect\" => 'hover-effect2',\n\t\t\"columns\" => 'col3',\n\t\t\"title_tag\" => 'h2',\n\t\t\"title\" => 'Our Team',\n\t\t\"type\" => '',\n\t\t\"auto_play\" => 'false',\n\t\t\"slide_duration\" => '',\n\t\t'animate' => '',\n\t\t'transition' => '',\n\t\t'duration' => '',\n\t\t'delay' => ''\n\t\t), $atts));\n\n\t$animate_class = \"\";\n\t$slideTransition = \"\";\n\t$animateDuration = \"\";\n\t$slideDelay = \"\";\n\n\tif($animate == \"Yes\"){\n\n\t\t$animate_class = ' pix-animate-cre';\n\n\t\t$slideTransition = isset($transition) ? ' data-trans=\"'. esc_attr($transition) .'\"' : '';\n\n\t\t$animateDuration = isset($duration) ? ' data-duration=\"'. $duration .'\"' : '';\n\n\t\t$slideDelay = isset($delay) ? ' data-delay=\"'. $delay .'\"' : '';\n\n\t}\n\n\t$sliderClassName = '';\n\t$slider = ($enable_slider == 'yes') ? 'fcsCarousel' : '';\n\n\t$autoPlay = ($auto_play == 'true') ? 'data-autoplay=\"'. esc_attr($auto_play) .'\"' : '';\n\t$slideDuration = isset($slide_duration) ? 'data-duration=\"'. esc_attr($slide_duration) .'\"' : '';\n\n\t$slider = ($enable_slider == 'yes') ? 'fcsCarousel' : '';\n\n\tif ($type == 'clients')\n\t\t$sliderClassName = 'ourClients';\n\telse if ($type == 'staffs')\n\t\t$sliderClassName = 'member';\t\n\t\n\t$output = '<section class=\"newSection container popup-gallery ' . $slider . ' '.$columns.' '. $sliderClassName .'\" '. $autoPlay .' '. $slideDuration .'>';\n $output .= '<'.$title_tag.' class=\"mainTitle'. esc_attr($animate_class) .'\"'. $slideTransition .' '. $animateDuration .' '. $slideDelay .'>'.esc_html($title).'</'.$title_tag.'>';\n $output .= '<div class=\"carousel-items-con '. $hover_effect .' featuredWorks\">';\n $output .= '<ul class=\"carousel-items\">';\n\t\n\t$output .= do_shortcode($content);\n\t\n\t$output .= '</ul>';\n\tif($enable_slider == 'yes'){\n\t\t$output .= '<div class=\"slider-nav\">';\n\t\t$output .= '<a href=\"#\" data-dir=\"prev\" class=\"slider-btn prevSlide\">‹</a>';\n\t\t$output .= '<a href=\"#\" data-dir=\"next\" class=\"slider-btn nextSlide\">›</a>';\n\t\t$output .= '</div> ';\n\t}\n\t$output .= '</div>';\n\t$output .= '</section>';\n\treturn $output;\n}",
"static function add_slides(): void {\r\n self::add_acf_field(self::slides, [\r\n 'label' => 'Slides',\r\n 'min' => 1,\r\n 'max' => 4,\r\n 'layout' => 'row',\r\n 'collapsed' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => 'These are the slides on the front page. These will only display if the slider is set to Medium Big Grid Slide. You can choose one or two slides.',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'button_label' => 'Add slide',\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }",
"function druplex_field__field_image($variables) {\n\n $output = '<div class=\"flexslider\"><ul class=\"slides\">';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul></div>';\n \n return $output;\n}",
"function add_slideshow( $slides = null, $options = null, $position = null ) {\n\n\t\t$module = new I2M_Module__slideshow( $slides, $options, $position );\n\n\t\t$this->module_list[] = $module->get_acf_layout();\n\t\t$this->modules[] = $module;\n\n\t\treturn $module;\n\n\t}",
"protected function _toHtml()\n {\n $this->assign('headline', $this->getData('slide_headline'));\n $this->assign('content', $this->getData('slide_content'));\n\n $this->assign('med_img', $this->getData('slide_image_medium'));\n $this->assign('small_img', $this->getData('slide_image_small'));\n $this->assign('large_img', $this->getData('slide_image_large'));\n\n return parent::_toHtml();\n }",
"function ci_shortcodes_slide( $atts, $content = null, $tag ) {\n\t\t//\t'attribute' => 'value',\n\t\t//), $atts, $tag );\n\n\t\t$markup = apply_filters( 'ci_shortcodes_slide_markup', '<li><div class=\"cisc-slide-content\">%s</div></li>' );\n\t\t$output = sprintf( $markup,\n\t\t\tdo_shortcode( $content )\n\t\t);\n\n\t\treturn $output;\n\t}",
"public function buildContent($pages)\n {\n $parsedown = new \\Parsedown();\n $return = '';\n foreach ($pages as $route => $page) {\n ob_start();\n $title = $page['title'];\n $slug = $page['slug'];\n $content = $page['content'];\n $content = $parsedown->text($content);\n $index = 0;\n $styleIndex = 0;\n $styles = array();\n $config = $this->config;\n if (isset($page['header']->fullpage)) {\n $config = array_merge($config, $page['header']->fullpage);\n }\n $breaks = explode(\"<hr />\", $content);\n\n if (isset($page['horizontal'])) {\n $type = 'slide';\n echo \"<div \n data-name='$title' \n data-anchor='$slug' \n class='section'\n >\";\n } else {\n $type = 'section';\n }\n foreach ($breaks as $break) {\n if ($index == 0) {\n $id = $page['slug'];\n } else {\n $id = $index;\n }\n if ($config['shortcodes']) {\n $shortcodes = $this->interpretShortcodes($break);\n $break = $shortcodes['content'];\n $shortcodeStyles = $shortcodes['styles'];\n }\n if (!empty($shortcodeStyles)) {\n $shortcodeStyles = $this->applyStyles($page['styles'][$styleIndex]);\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type' \n style='$shortcodeStyles'\n >\";\n } else {\n if (isset($page['styles']) && isset($page['styles'][$styleIndex])) {\n $styles = $this->applyStyles($page['styles'][$styleIndex]);\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type' \n style='$styles'\n >\";\n } else {\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type'\n >\";\n }\n }\n echo $break;\n if (isset($page['inject_footer'])) {\n echo $page['inject_footer'];\n }\n echo \"</div>\";\n if (isset($page['styles']) && count($page['styles']) == $styleIndex+1) {\n $styleIndex = 0;\n } else {\n $styleIndex++;\n }\n $index++;\n }\n if (isset($page['horizontal'])) {\n echo \"</div>\";\n }\n $return .= ob_get_contents();\n ob_end_clean();\n if (isset($page['children'])) {\n $return .= $this->buildContent($page['children']);\n }\n }\n return $return;\n }",
"public function run()\n {\n $data = [\n [\n \"El mito de Naylamp\",\n \"Dicen los pobladores de Lambayeque que en tiempos muy antiguos, que no saben en qué año fue, vino al Perú con una gran flota de balsas un señor de mucho valor y prestigio llamado Naylamp, y trajo consigo una gran cantidad de gente.\",\n \"/img/naylamp.png\"\n ],\n [\n \"Los peces y los hombres\",\n \"Los peces habían sido seres humanos, como descendientes de una antiquísima raza de enanos que poblaba nuestras tierras en edades pretéritas. Vivían en ciudades lacustres y reverenciaban al mar, sus tormentas, sus arenas y sus conchas.\",\n \"/img/peces.png\"\n ],\n [\n \"El dios Pachacamac y Vichama\",\n \"En el principio no había comida suficiente para un hombre y una mujer que el dios Pachacamac había creado, por lo que murió de hambre el hombre y solo quedó la mujer.\",\n \"/img/pachacamac.png\"\n ],\n [\n \"El mito del origen del mochica y el algarrobo\",\n \"Luchaban por todo el universo los dos poderes eternos: el genio del Bien y el poder maligno. Cada uno buscaba establecer la supremacía de sus propios derechos y ambos rodaban por los diferentes mundos y los espacios siderales.\",\n \"/img/mochica.png\"\n ],\n [\n \"Somos herederos y guardianes de la Tierra\",\n \"En nuestro pueblo: Las piedras son memoria, hablan de la historia antigua. Las plantas son medicina, curan los males. Los animales son compañía alimentan y enseñan.\",\n \"/img/guardianes.png\"\n ],\n [\n \"Vamos a sembrar y cosechar con nuestras familias\",\n \"La agricultura, como actividad socioproductiva y fuente de sustento de las comunidades, debe considerar los factores de crecimiento de las plantas, sus ciclos de vida y los hábitats en los que se desarrollan.\",\n \"/img/sembrar.png\"\n ],\n ];\n foreach ($data as $item) {\n DB::table('stories')->insert([\n 'name' => $item[0],\n 'slug' => Str::of($item[0])->slug('-'),\n 'intro' => $item[1],\n 'image_url' => $item[2],\n ]);\n }\n\n }",
"function cyon_carousel( $atts, $content = null ) {\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\tslidesperview => '1',\n\t\t\twidth => '92%',\n\t\t\theight => '100',\n\t\t\tloop => ''\n\t\t), $atts);\n\n\tstatic $instance = 0;\n\t$instance++;\n\t$loop = '';\n\tif($atts['loop']=='yes'){\n\t\t$loop = \"loop:true,\";\n\t}\n\t\n\t$carousel_content = array('\n\t\t<div class=\"carousel\" id=\"carousel-'.$instance.'\" style=\"width:'.$atts['width'].';\"><a class=\"swiper-button-prev swiper-button-prev-'.$instance.'\" href=\"#\"></a><a class=\"swiper-button-next swiper-button-next-'.$instance.'\" href=\"#\"></a><div class=\"swiper-container\" style=\"height:'.$atts['height'].'px\"><div class=\"swiper-wrapper\">'.do_shortcode($content).'</div></div></div>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tvar cyonCarousel'.$instance.' = jQuery(\\'#carousel-'.$instance.' .swiper-container\\').swiper({'.$loop.'\n\t\t\t\t\tslidesPerGroup: '.$atts['slidesperview'].',\n\t\t\t\t\tslidesPerView: '.$atts['slidesperview'].',\n\t\t\t nextButton: \\'.swiper-button-next-'.$instance.'\\',\n\t\t\t prevButton: \\'.swiper-button-prev-'.$instance.'\\'\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t');\n\tforeach ($carousel_content as $value){\n\t\treturn $value ;\n\t}\n}",
"function make_image_slide_data($image_id) {\n return array(\n 'type' => 'image',\n 'id' => absint($image_id)\n );\n }",
"function generate($array) {\n $result = \"\";\n ob_start();\n if(sizeof($array)) {\n $i = 0;\n foreach($array as $string) {\n $i++;\n echo \"<span style='background-color: \".$this->colors[\"seq\"].\"; border-right: 1px solid #949494;'>\".$i.\". </span> \";\n echo $string.\"<br/>\\r\\n\";\n }\n }\n $result = ob_get_contents();\n ob_end_clean();\n return $result;\n }",
"function Generate()\n \t{\n \t\t\n \t}",
"function my_slide($para, $content){\n \t$para = shortcode_atts(array(\n \t\t'color' => 'red',\n \t\t'font-size' => '30px'\n \t), $para); ob_start(); ?>\n\n \techo '<h2 style=\"color:'.$para['color']'\">'. $content .'</h2>'\n <?php return ob_get_clean(); }",
"public function run()\n {\n //\n $this->create_grease('SKF LGHP 2','SKF','SKF_LGHP_2.pdf');\n $this->create_grease('SKF LGMT 2','SKF','SKF_LGMT_2.pdf');\n $this->create_grease('SKF LGWA 2','SKF','SKF_LGWA_2.pdf');\n $this->create_grease('SKF LGHQ 2','SKF','SKF_LGHQ_2.pdf');\n $this->create_grease('MOBIL POLYREX EM','MOBIL','MOBIL_POLYREX_EM.pdf');\n $this->create_grease('CHEVRON SRI 2','CHEVRON','CHEVRON_SRI.pdf');\n \n\n }",
"function Slideshow($items, $width=500, $height=400)\n\t{\n\t\tif (!is_array($items))\n\t\t{\n\t\t\t$items = array($items);\n\t\t}\n\t\t\n\t\t$this->items = $items;\n\t\t\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\n\t\t$this->showControls = true;\n\t\t$this->showInfo = true;\n\t\t$this->showThumbnails = true;\n\t\t$this->autoPlay = false;\n\t\t$this->preload = true;\n\t}",
"public function run()\n {\n $initials = array(\n ['url' => 'winners-chapel-owerri-0-1542948878.jpg'],\n ['url' => 'winners-chapel-owerri-1-1542948878.jpg'],\n ['url' => 'winners-chapel-owerri-2-1542948878.jpg']\n );\n \n foreach($initials as $i){\n Gallery::create($i);\n }\n }",
"function etheme_create_slider($args, $title = false, $image_width = 215, $image_height = 215, $crop = false, $enable_slider_from = 4, $last_offset = 3){\n\tglobal $wpdb;\n\n\t$product_per_row = etheme_get_option('prodcuts_per_row');\n\t$box_id = rand(1000,10000);\n\t$multislides = new WP_Query( $args );\n\n\tif ( $multislides->have_posts() ) :\n\t\tif ($title) {\n\t\t\t$title_output = '<h4 class=\"slider-title\">'.$title.'</h4>';\n\t\t}\n\t\techo '<div class=\"home-product-grid slider\">';\n\t\t\techo $title_output;\n\t\t\techo '<div>';\n\n\t\t\t$_i=0;\n\n\t\t\twhile ($multislides->have_posts()) : $multislides->the_post();\n\t\t\t\t\t$_i++;\n\n\t\t\t\t\tif(class_exists('Woocommerce')) {\n\t\t\t\t\t\t\tglobal $product;\n\t\t\t\t\t\t\tif (!$product->is_visible()) continue;\n\t\t\t\t\t\t\twoocommerce_get_template_part( 'content', 'product' );\n\t\t\t\t\t}\n\t\t\tendwhile;\n\n\t\t\techo '</div><!-- carousel -->';\n\n\t\t\tif($_i > $enable_slider_from):\n\t\t\t\techo '<div class=\"prev arrow'.$box_id.'\" style=\"cursor: pointer; \"> </div>';\n\t\t\t\techo '<div class=\"next arrow'.$box_id.'\" style=\"cursor: pointer; \"> </div>';\n\t\t\tendif;\n\t\techo '</div><!-- product-slider -->';\n\tendif;\n\n\twp_reset_query();\n\n\tif ($_i>$enable_slider_from) {\n\n\t\tif(etheme_get_option('touch_carusels')) {\n\t\t\t\t$desktopClickDrag = 'true';\n\t\t} else {\n\t\t\t\t$desktopClickDrag = 'false';\n\t\t}\n\n\t\techo '\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\tjQuery(\".slider-'.$box_id.'\").iosSlider({\n\t\t\t\t\t\t\t\t\t\tdesktopClickDrag: '.$desktopClickDrag.',\n\t\t\t\t\t\t\t\t\t\tsnapToChildren: true,\n\t\t\t\t\t\t\t\t\t\tinfiniteSlider: false,\n\t\t\t\t\t\t\t\t\t\tnavNextSelector: \".arrow'.$box_id.'.next\",\n\t\t\t\t\t\t\t\t\t\tnavPrevSelector: \".arrow'.$box_id.'.prev\",\n\t\t\t\t\t\t\t\t\t\tlastSlideOffset: '.$last_offset.',\n\t\t\t\t\t\t\t\t\t\tonFirstSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonLastSlideComplete: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").addClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonSlideChange: function(){\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.next\").removeClass(\"disabled\");\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\".arrow'.$box_id.'.prev\").removeClass(\"disabled\");\n\t\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});\n\t\t\t\t</script>\n\t\t';\n\t}\n}",
"public function printSourceArray()\n {\n $this->show($this->SourceCodeArray);\n }",
"function createstring_MapDisplaySlider() {\n\n $content = '';\n if ( $this->slplus->is_CheckTrue( $this->addon->options['show_maptoggle'] ) ) {\n $content =\n $this->CreateSliderButton(\n 'maptoggle',\n ! $this->slplus->is_CheckTrue( $this->addon->options['hide_map'] ),\n \"jQuery('#map').toggle();jQuery('#slp_tagline').toggle();\"\n );\n }\n\n return $content;\n }",
"public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Do shortcode\r\n\t\tforeach($data['accordion'] as $index=>$accordion) {\r\n\t\t\t$accordion['content'] = $this->_do_shortcode($accordion['content']);\r\n\t\t\t$data['accordion'][$index] = $accordion;\r\n\t\t}\r\n\r\n\t\t$data['preset'] = isset($data['preset']) ? $data['preset'] : 'default';\r\n\r\n\t\t$data['wrapper_id'] = str_replace('uaccordion-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('uaccordion', $data, dirname(dirname(__FILE__)) . '/tpl/uaccordion.html');\r\n\r\n\t\t// upfront_add_element_style('uaccordion_style', array('css/uaccordion.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('uaccordion_script', array('js/uaccordion-front.js', dirname(__FILE__)));\r\n\t\treturn $markup;\r\n\t}",
"public function create() {\n\n\t\t$steps = $this->getRenderingSteps();\n\n\t\t$result = '';\n\t\twhile ($step = array_shift($steps)) {\n\t\t\t$result = $this->$step($result);\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }",
"function custom_active_slide($atts){\n $para = shortcode_atts(\n array(\n 'id' => '1'\n ), $atts );\n ob_start(); ?>\n\n\n\n <!-- Begin #carousel-section --> \n <section id=\"carousel-section\" class=\"section-global-wrapper\"> \n <div class=\"container-fluid-kamn\">\n <div class=\"row\">\n <div id=\"carousel-<?php echo $para['id']; ?>\" class=\"carousel slide\">\n\n <!-- Wrapper for slides -->\n <div class=\"carousel-inner\">\n \n\n <?php\n\n $slider_query = null;\n $slider_query = new WP_Query( array(\n 'post_type' => 'slider',\n 'posts_per_page' => -1,\n ) );\n\n $pre = '_office_master_';\n $x = 0;\n while ( $slider_query->have_posts() ) {\n $slider_query->the_post(); \n $x++;\n \n $slider_caption = get_post_meta( get_the_ID(), $pre.'slider_caption', true );\n ?> \n\n <!-- Begin Slide 1 -->\n <div class=\"item <?php if ( $x == 1 ) {\n echo 'active';\n } ?>\">\n <?php the_post_thumbnail('slider-pic'); ?>\n <div class=\"carousel-caption\">\n <h3 class=\"carousel-title hidden-xs\"> <?php the_title(); ?> </h3>\n <p class=\"carousel-body\"> <?php echo $slider_caption; ?> </p>\n </div>\n </div>\n <!-- End Slide 1 -->\n\n <?php } ?>\n\n\n \n\n\n </div>\n \n\n\n <!-- Indicators -->\n <ol class=\"carousel-indicators visible-lg\">\n\n <?php for ($i=0; $i < $x ; $i++) { ?>\n \n <li data-target=\"#carousel-<?php echo $para['id']; ?>\" data-slide-to=\"<?php echo $i; ?>\" class=\"<?php if ($i==0) { echo 'active'; } ?>\"> </li>\n \n <?php } ?>\n </ol>\n\n <!-- Controls -->\n <a class=\"left carousel-control\" href=\"#carousel-<?php echo $para['id']; ?>\" data-slide=\"prev\">\n <span class=\"glyphicon glyphicon-chevron-left\"></span>\n </a>\n <a class=\"right carousel-control\" href=\"#carousel-<?php echo $para['id']; ?>\" data-slide=\"next\">\n <span class=\"glyphicon glyphicon-chevron-right\"></span>\n </a>\n </div>\n </div>\n </div>\n </section>\n <!-- End #carousel-section -->\n\n\n\n\n\n <?php \n return ob_get_clean();\n }",
"function kulam_acf_slideshow_generate_shortcode( $post_id ) {\n\n\tif ( 'pojo_slideshow' != get_post_type() )\n\t\treturn;\n\n\t/**\n\t * Variables\n\t */\n\t$shortcode\t= 'field_5e982fa13ae7d';\n\n\t// set shortcode\n\t$_POST[ 'acf' ][ $shortcode ] = '[kulam_slideshow id=\"' . $post_id . '\"]';\n\n}",
"public static function map() {\n return array(\n 'name' => esc_html__( 'Header Slider', 'webzp_r_hs' ),\n 'description' => esc_html__( 'Outputs header slider.', 'webzp_r_hs' ),\n 'category' => esc_html__( 'Content', 'webzp_r_hs' ),\n 'base' => 'webzp_r_header_slider',\n 'params' => array(\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'First slide title', 'webzp_r_hs' ),\n 'param_name' => 'first_title',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'Second slide title', 'webzp_r_hs' ),\n 'param_name' => 'second_title',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'First slide description', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => esc_html__( 'Second slide description', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'textarea',\n 'heading' => esc_html__( 'Slider bottom description', 'webzp_r_hs' ),\n 'param_name' => 'slider_desc',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'First slide background', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_bg',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'Second slide background', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_bg',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'First slide icon', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_icon',\n 'value' => '',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => esc_html__( 'Second slide icon', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_icon',\n 'value' => '',\n ),\n\n array(\n 'type' => 'vc_link',\n 'heading' => esc_html__( 'First slide link', 'webzp_r_hs' ),\n 'param_name' => 'first_slide_link',\n 'value' => '',\n ),\n\n array(\n 'type' => 'vc_link',\n 'heading' => esc_html__( 'Second slide link', 'webzp_r_hs' ),\n 'param_name' => 'second_slide_link',\n 'value' => '',\n ),\n ),\n );\n }",
"public function run()\n {\n $sides = [\n ['name' => 'turkey', 'display_name' => 'Turkey Chili', 'type' => 'soup', 'description' => '', 'image' => ''],\n ['name' => 'french', 'display_name' => 'French Onion', 'type' => 'soup', 'description' => '', 'image' => ''],\n ['name' => 'broccoli', 'display_name' => 'Broccoli Cheddar', 'type' => 'soup', 'description' => '', 'image' => ''],\n ['name' => 'tomato', 'display_name' => 'Tomato', 'type' => 'soup', 'description' => '', 'image' => ''],\n ['name' => 'chicken', 'display_name' => 'Chicken Noodle', 'type' => 'soup', 'description' => '', 'image' => ''],\n\n ['name' => 'cheetos', 'display_name' => 'Cheetos', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'fritos', 'display_name' => 'Fritos', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'lays_reg', 'display_name' => 'Lays Regular', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'lays_sour', 'display_name' => 'Lays Sour Cream & Onion', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'lays_bbq', 'display_name' => 'Lays BBQ', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'ruffles_sour', 'display_name' => 'Ruffles Sour Cream and Cheddar', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'cookie_choc', 'display_name' => 'Chocolate Chip', 'type' => 'chip_cookie', 'description' => '', 'image' => ''],\n ['name' => 'cookie_raisin', 'display_name' => 'Raisin', 'type' => 'chip_cookie', 'description' => 'Best choice hands down', 'image' => ''],\n\n ['name' => 'coke', 'display_name' => 'Coca Cola', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'coke_diet', 'display_name' => 'Coca Cola Diet', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'coke_zero', 'display_name' => 'Coca Cola Zero', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'sweet', 'display_name' => 'Sweet Tea', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'unsweet', 'display_name' => 'Unsweetened Tea', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'mountain', 'display_name' => 'Mountain Dew', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'lemonade', 'display_name' => 'Lemonade', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'water', 'display_name' => 'Water', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'red', 'display_name' => 'Red Bull', 'type' => 'drink', 'description' => '', 'image' => ''],\n ['name' => 'free_red', 'display_name' => 'Sugar Free Red Bull', 'type' => 'drink', 'description' => '', 'image' => '']\n ];\n\n foreach($sides as $side){\n DB::table('sides')->insert([\n 'name' => $side['name'],\n 'display_name' => $side['display_name'],\n 'type' => $side['type'],\n 'description' => $side['description'],\n 'image' => $side['image']\n ]);\n }\n }",
"function ihacklog_pkg_highslide_add_js()\n{\n\tif(is_single()||is_page() )\n\t{\t\n\t$tpl_dir=plugin_dir_url(HACKLOG_PACKAGE_LOADER );\n\techo <<<EOT\n\t<!-- Added By Highslide Plugin. Version 2.0 (C) 2009 荒野无灯 -->\n\t<script type='text/javascript'>\n//\talert('ok');\n\ths.showCredits = true;\n\ths.creditsHref = 'http://ihacklog.com/';\n hs.creditsTarget = '_self';\n\ths.graphicsDir = '{$tpl_dir}js/highslide/graphics/';\n\ths.align = 'center';\n\n hs.transitions = ['expand', 'crossfade'];\n hs.outlineType = 'glossy-dark';\n hs.wrapperClassName = 'glossy-dark';\n hs.fadeInOut = true;\n hs.dimmingOpacity = 0.3;\n //hs.padToMinWidth = true;\n\n if (hs.addSlideshow) hs.addSlideshow({\n interval: 5000,\n repeat: false,\n useControls: true,\n fixedControls: 'fit',\n overlayOptions: {\n opacity: .6,\n position: 'bottom center',\n hideOnMouseOut: true\n }\n });\n\n// Add the slideshow providing the controlbar and the thumbstrip\n/*\nhs.addSlideshow({\n\t//slideshowGroup: 'group1',\n\tinterval: 5000,\n\trepeat: false,\n\tuseControls: true,\n\toverlayOptions: {\n\t\tclassName: 'text-controls',\n\t\tposition: 'bottom center',\n\t\trelativeTo: 'viewport',\n\t\toffsetY: -60\n\t},\n\tthumbstrip: {\n\t\tposition: 'bottom center',\n\t\tmode: 'horizontal',\n\t\trelativeTo: 'viewport'\n\t}\n}); \n*/ \n \nhs.lang={\n loadingText : '图片加载中...',\n loadingTitle : '正在加载图片',\n closeText : '关闭',\n closeTitle : '关闭 (Esc)',\n creditsText : 'Powered by <i>荒野无灯</i>',\n creditsTitle : 'http://ihacklog.com',\n moveTitle : '移动图片',\n moveText : '移动',\n previousText : '后退',\n previousTitle : '上一张图片 (左方向键)',\n nextText : '前进',\n nextTitle : '下一张图片 (右方向键)',\n restoreTitle : '小提示:点击可关闭或拖动. 用左右方向键可查看上一张和下一张-_-',\n fullExpandTitle : '点击查看原图',\n fullExpandText : '查看原图'\n };\n \n</script>\n<!-- Added By Highslide Plugin. Version 2.0 (C) 2009 荒野无灯 -->\nEOT;\n\t} //end if\n }",
"public function run()\n {\n \\App\\TexBlob::create([\n \t'id' => 1,\n\t\t\t'tex' => 'Soit $x \\\\in \\\\mathbb{R}$'\n ]);\n\t\t\t\n \\App\\TexBlob::create([\n \t'id' => 2,\n\t\t\t'tex' => 'Soit $n \\\\in \\\\mathbb{N}$'\n ]);\n\t\t\t\n \\App\\TexBlob::create([\n \t'id' => 3,\n\t\t\t'tex' => 'Supposons que $f$ est une fonction complexe'\n ]);\n\t\t\n }",
"function genLauncher($imgsrc, $slidenum, $alt) {\n print '<img src=\"' . $imgsrc . '\" onclick=\"openModal();currentSlide(' . $slidenum . ')\" class=\"hover-shadow launcher\" alt=\"' . $alt . '\">';\n}",
"function vulcan_slideshow_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"slideshow_image\" => array(\r\r\n \"name\" => \"slideshow_image\",\r\r\n \"title\" => \"Slideshow Image\",\r\r\n \"description\" => \"Add image url for your slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_url\" => array(\r\r\n \"name\" => \"slideshow_url\",\r\r\n \"title\" => \"Slideshow Url\",\r\r\n \"description\" => \"Link url for slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_readmore\" => array(\r\r\n \"name\" => \"slideshow_readmore\",\r\r\n \"title\" => \"Slideshow Read More Text\",\r\r\n \"description\" => \"Please enter the read more text for slideshow, eg : Continue Reading, Read More.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_style\" => array(\r\r\n \"name\" => \"slideshow_style\",\r\r\n \"title\" => \"Slideshow Stage Style\",\r\r\n \"description\" => \"Please one style of them for each image slideshow.\",\r\r\n \"type\" => \"select\",\r\r\n \"options\" => array(\"full image\",\"with right description\",\"with left description\",\"with bottom description\")\r\r\n ), \r\r\n \"num_excerpt\" => array(\r\r\n \"name\" => \"num_excerpt\",\r\r\n \"title\" => \"Number of Words for Slideshow Excerpt\",\r\r\n \"description\" => \"Add number of words excerpt to display in slideshow description, eg. 20\",\r\r\n \"type\" => \"text\"\r\r\n ) \r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}",
"public function create() {\n\t\t$steps = $this->getRenderingSteps();\n\n\t\t$result = '';\n\t\twhile ($step = array_shift($steps)) {\n\t\t\t$result = $this->$step($result);\n\t\t}\n\n\t\treturn $result;\n\t}",
"function wpsp_tour_slideshow() {\n\tglobal $post;\n\n\t$photos = explode( ',', get_post_meta( $post->ID, 'wpsp_tour_slideshow', true ) );\n\n\tif ( $photos[0] != '' ) { ?>\n\t\t<script type=\"text/javascript\">\n jQuery(document).ready(function($){\n $('#slides').superslides({\n \tplay: 5000,\n\t\t\t\t animation_speed: 600,\n\t\t\t\t animation_easing: 'swing',\n\t\t\t\t animation: 'slide',\n\t\t\t inherit_width_from: '.site-slider',\n\t\t\t inherit_height_from: '.site-slider'\n\t\t\t });\n }); \n </script>\n\t<?php\n\t\techo '<div class=\"site-slider\">';\n\t\techo '<div id=\"slides\">';\n echo '<ul class=\"slides-container\">';\n foreach ( $photos as $photo ) : \n echo '<li>' . wp_get_attachment_image( $photo, 'post-slide' ) . '</li>';\n \tendforeach;\n echo '</ul>';\n echo '<nav class=\"slides-navigation\">';\n\t echo '<a href=\"#\" class=\"next\"><i class=\"fa fa-chevron-right\"></i></a>';\n\t echo '<a href=\"#\" class=\"prev\"><i class=\"fa fa-chevron-left\"></i></a>';\n\t echo '</nav>';\n\t\techo ' </div> <!-- #slides -->';\n echo '</div> <!-- .site-slider -->';\n\t}\n}",
"public function run()\n {\n Slider::create([\n 'title' => 'No Title',\n 'text' => Lorem::words(20, true)\n ]);\n }",
"public function run()\n {\n \\App\\Pic::create(array(\n 'filename' => '17993.png',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '68496.jpg',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '38592.jpg',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '14154.jpg',\n ));\n }",
"function nirvana_frontpage_generator() {\n\t$nirvanas = nirvana_get_theme_options();\n\textract($nirvanas); ?>\n\t<div id=\"frontpage\">\n\t\t<?php\n\t\t// Slider\n\t\tif ($nirvana_slideType==\"Slider Shortcode\") { ?>\n\t\t\t<div class=\"slider-wrapper\">\n\t\t\t<?php echo do_shortcode( $nirvana_slideShortcode ); ?>\n\t\t\t</div> \n <?php if( is_active_sidebar( 'below-slider' ) ) : ?>\n <div class=\"slider-mobile-text\">\n <?php dynamic_sidebar( 'below-slider' ); ?>\n </div>\n <?php endif; ?>\n <?php\n\t\t} else {\n\t\t\tnirvana_ppslider();\n\t\t} ?>\n\n\t\t<div id=\"pp-afterslider\" class=\"entry-content\">\n\t\t<?php\n\t\t// First FrontPage Title\n\t\tnirvana_pptext_output( $nirvana_fronttext1, $nirvana_fronttext3, 'pp-texttop', 1, 3 );\n\n\t\t// FrontPage Columns\n\t\tnirvana_ppcolumns();\n\n\t\t// Second FrontPage title\n\t\tnirvana_pptext_output( $nirvana_fronttext2, $nirvana_fronttext4, 'pp-textmiddle', 2, 4 );\n\n\t\t// restore excerpt filters\n\t\tif ($nirvanas['nirvana_excerpttype']=='Characters') {\n\t\t\tadd_filter( 'get_the_excerpt', 'nirvana_excerpt_trim_chars' );\n\t\t} else {\n\t\t\tadd_filter( 'excerpt_length', 'nirvana_excerpt_trim_words' );\n\t\t\tadd_filter( 'get_the_excerpt', 'nirvana_excerpt_morelink', 20 );\n\t\t}\n\t\tif ($nirvana_frontposts==\"Enable\"): get_template_part('content/content', 'frontpage'); endif;\n\n\t\t// Third FrontPage Title/Text\n\t\tnirvana_pptext_output( $nirvana_fronttext5, $nirvana_fronttext6, 'pp-textbottom', 5, 6 );\n\t\t?>\n\n\t\t</div> <!-- #pp-afterslider -->\n\t</div> <!-- #frontpage -->\n\t<?php\n}",
"private function get_responsive_slides_markup( $slide ) {\n\n $attributes = apply_filters( 'metaslider_responsive_slider_image_attributes', array(\n 'src' => $slide['src'],\n 'height' => $slide['height'],\n 'width' => $slide['width'],\n 'alt' => $slide['alt'],\n 'rel' => $slide['rel'],\n 'class' => $slide['class'],\n 'title' => $slide['title']\n ), $slide, $this->slider->ID );\n\n $html = $this->build_image_tag( $attributes );\n\n if ( strlen( $slide['caption'] ) ) {\n $html .= '<div class=\"caption-wrap\"><div class=\"caption\">' . $slide['caption'] . '</div></div>';\n }\n\n $anchor_attributes = apply_filters( 'metaslider_responsive_slider_anchor_attributes', array(\n 'href' => $slide['url'],\n 'target' => $slide['target']\n ), $slide, $this->slider->ID );\n\n if ( strlen( $anchor_attributes['href'] ) ) {\n $html = $this->build_anchor_tag( $anchor_attributes, $html );\n }\n\n return apply_filters( 'metaslider_image_responsive_slider_markup', $html, $slide, $this->settings );\n\n }",
"function lumo_slider(){\n\t\t$slides = new Lumo_Slider_Query();\n\n\t\tif( $slides->have_posts() ) :\n\t\t\t$display = \"\";\n\t\t\techo '<ul id=\"lumo-slider\">';\n\t\t\twhile( $slides->have_posts() ) : $slides->the_post();\n\t\t\t\t$slide_image = get_the_post_thumbnail(get_the_ID(), 'home-slider-image-lowrez');\n\t\t\t\t$slide_image_url = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID(), 'home-slider-image') );\n\n\t\t\t\t$set_width_fullrez = sprintf('width=\"100%%\" data-fullrez=\"%s\"', esc_url($slide_image_url) );\n\n\t\t\t\t$slide_image = preg_replace('/width=\"\\d+\" +height=\"\\d+\"/', $set_width_fullrez, $slide_image);\n\n\t\t\t\techo '<li class=\"lumo-slide\" style=\"'.$display.'\">';\n\t\t\t\t\techo $slide_image;\n\t\t\t\t\techo '<div class=\"hero-placeholder\"></div>';\n\t\t\t\t\techo '<div class=\"hero\">';\n\t\t\t\t\t\t\techo '<h4 class=\"hero\">'.get_the_title().'</h4>';\n\t\t\t\t\t\t\tthe_content();\n\t\t\t\t\techo '</div>';\n\t\t\t\techo '</li>';\n\t\t\t\t$display = \" display:none; \";\n\t\t\tendwhile;\n\t\t\twp_reset_postdata();\n\t\t\techo '</ul>';\n\t\tendif;\n\t}",
"function pprint($array, $file_name='array'){\n /**\n * Pretty print Arrays - in collapsible and scrollable boxes\n *\n * @param Array to be printed\n * @param String as name of the printed box\n *\n * @return HTML non semantic...\n */\n $id = random_int(0, 999);\n echo '<style type=\"text/css\">input#'.$id.':checked ~ div.ijwe {display: none;}</style>';\n echo '<br><div style=\"background-color:#b1b1b1; border: 1px solid #949494; width:96%; margin: auto;\">';\n echo '<input type=\"checkbox\" id=\"toggle-'.$id.'\" style=\"display:inline; width:15px; background-color:transparent;\"><label style=\" white-space:nowrap; clear: both; width:0px;\" for=\"toggle-'.$id.'\"><h3 style=\"display:inline; line-height: 2px; margin: 1em;\">'.$file_name.':</h3></label>';\n echo '<div class=\"ijwe\" style=\"background-color:#c4c4c4; overflow-y: scroll; padding: 0.3em; max-height:400px;\"><pre><xmp>';\n print_r($array);\n echo '</xmp></pre></div>';\n echo '</div>';\n}"
] | [
"0.63714504",
"0.5906517",
"0.5895319",
"0.58403003",
"0.57721364",
"0.57005954",
"0.5700309",
"0.56345993",
"0.5560075",
"0.55486447",
"0.5540491",
"0.5508459",
"0.54328257",
"0.54278815",
"0.5393459",
"0.53758585",
"0.53611267",
"0.53483534",
"0.5329583",
"0.53157586",
"0.5311936",
"0.528274",
"0.5281442",
"0.52698886",
"0.5249042",
"0.52443486",
"0.52372086",
"0.52372086",
"0.5232473",
"0.5201561",
"0.5196656",
"0.51808685",
"0.51733476",
"0.5159389",
"0.5125388",
"0.51210654",
"0.5115727",
"0.51143175",
"0.5102255",
"0.509915",
"0.50914526",
"0.50905275",
"0.50905275",
"0.50792295",
"0.5077738",
"0.50767714",
"0.50753534",
"0.50600195",
"0.5058939",
"0.5054382",
"0.505407",
"0.5038617",
"0.5027049",
"0.5020581",
"0.5009645",
"0.50094247",
"0.50086117",
"0.49941197",
"0.4992133",
"0.49850443",
"0.49783224",
"0.496772",
"0.49633697",
"0.49509278",
"0.4945774",
"0.4942634",
"0.493766",
"0.49348065",
"0.49344897",
"0.49339646",
"0.49142566",
"0.49100056",
"0.49084944",
"0.48988757",
"0.4897283",
"0.4895714",
"0.4895577",
"0.4889245",
"0.48879075",
"0.4873921",
"0.48678094",
"0.48555166",
"0.48508078",
"0.4844461",
"0.4843473",
"0.4840507",
"0.48399284",
"0.48381984",
"0.48276287",
"0.48252738",
"0.48181286",
"0.48122066",
"0.48106632",
"0.48072946",
"0.4804447",
"0.48035285",
"0.48032182",
"0.4800357",
"0.47953403",
"0.4794039"
] | 0.6434293 | 0 |
just generate the code | function OBJM_getPageShowInfo(&$codestr, $pagenameArr, $currentPageIndex)
{
$tempstr = "";
$codestr = "";
// write the code into the script node
$pagecount = count($pagenameArr);
$tempstr = "var gpagearr = [];";
$tempstr = $tempstr . "var gcurrpageIndex = " .$currentPageIndex . ";";
$tempstr = $tempstr . "var gnumpages = " . $pagecount . ";";
$codestr = $codestr . $tempstr;
for($j =0; $j < $pagecount; $j++)
{
$pageName = $pagenameArr[$j] . ".html";
$tempstr = "gpagearr[" . $j . "] = ['" . $pageName . "']; ";
$codestr = $codestr . $tempstr;
}
//write the final code string into the script node that's it
$tempstr = "function showNextPageData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) {return;} pageIndex = gcurrpageIndex + 1; var pagename = gpagearr[pageIndex]; var JQSel; myWindow = window.open(pagename, '_self', ''); myWindow.resizeTo(screen.width, screen.height); myWindow.moveTo(50, 50); myWindow.focus(); }";
$codestr = $codestr . $tempstr;
$tempstr = "function showPrevPageData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) {return;} pageIndex = gcurrpageIndex - 1; var pagename = gpagearr[pageIndex]; var JQSel; myWindow = window.open(pagename, '_self', ''); myWindow.resizeTo(screen.width, screen.height); myWindow.moveTo(50, 50); myWindow.focus(); }";
$codestr = $codestr . $tempstr;
$tempstr = "function SetButtonStates() { var pageIndex = gcurrpageIndex; if (pageIndex + 1 >= gnumpages) { DisableButton('NEXTPAGEBTN', true); } else { DisableButton('NEXTPAGEBTN', false); } if (pageIndex - 1 < 0) { DisableButton('PREVPAGEBTN', true); } else { DisableButton('PREVPAGEBTN', false); } }";
$codestr = $codestr . $tempstr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generate() ;",
"function Generate()\n \t{\n \t\t\n \t}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate();",
"public function generate();",
"public function generate();",
"public function generate();",
"public function generate();",
"abstract public function generate();",
"function Generate($noprint=false) {\n\t\t\n\t if ($noprint) {\n\t \t return $this->getOutputCode();\n\t } else {\n\t \t echo $this->getOutputCode();\n\t }\n\t \n\t}",
"public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }",
"public function generateInitCode();",
"public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}",
"public function generate()\n\t{\n\t\treturn parent::generate();\n\t}",
"public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}",
"public function generateSampleCode() {\n\t\t$sampleCode = new SampleCode();\n\t\treturn array($sampleCode);\n\t}",
"private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }",
"public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }",
"private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}",
"public function generate()\n {\n return parent::generate();\n }",
"private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}",
"public function generate() {\n\n /** @var $code String generate code */\n\n $code = (new Users())->phoneNumber_GenerateCode();\n\n /** @var $user Array get the details of a current user */\n\n $user = (new Users())->current_user();\n\n /**\n * @var $phone_format String format mobile phone number\n * to non space and non special character format\n */\n\n $phone_format = preg_replace(\"/[\\W\\s]/m\",\"\",$user['CP']);\n\n /** @var $template String a message to send **/\n\n $template = \"From SCOA, use this code to verify your account '{$code}' \";\n\n /** @void send sms and notify the current user */\n\n sms::send($phone_format,$template);\n\n }",
"public function generate()\n {\n return 'discard;';\n }",
"protected function generateJavascript() {}",
"protected function generateJavascript() {}",
"abstract public function generate() : string;",
"public function generateAndSave()\n\t{\n\t\t$this->ensureInitials();\n\n\t\tfor($i = 0; $i < $this->config['amount']; $i ++)\n\t\t{\n\t\t\t$codes[] = $this->generateCode();\n\t\t}\n\n\t\tfile_put_contents($this->config['file'], implode($this->newline, $codes) . $this->newline, FILE_APPEND);\n\t}",
"private function generate_code() {\n\t\t$secret = $this->code_generator->createSecret();\n\t\t$code = $this->code_generator->getCode($secret);\n\t\treturn array('secret'=>$secret, 'code'=>$code);\n\t}",
"public function generateStandalone();",
"protected function generateCode(): string {\n return (string)rand(100000, 999999);\n }",
"public function Generar( ){\r\n\t\t$this->Output();\r\n\t}",
"protected function generateJavascript()\n\t{\n\t}",
"public function generateEntityCode()\n {\n $tables = $this->getTables();\n \n $code = \" require_once 'grandprix.data.php';\";\n foreach ($tables as $table)\n {\n $columns = $this->getColumns($table['tableName']);\n $children = $this->getChildren($table['tableName']);\n \n $code .=\n\"\n /**\n * \" . ucfirst($table['tableName']) . \" Data Entity class.\n * \n * @package Grandprix\n * @subpackage Data\n */\n class \" . ucfirst($table['tableName']) . \" extends DataEntity\n { \n\";\n \n foreach ($columns as $column)\n {\n $code .=\n\"\n /**\n * @var \" . self::getPhpType($column['dataType']) . \"\n */\n public \\$\" . ucfirst($column['columnName']) . \";\n\";\n }\n\n $code .=\n\"\n /**\n * Creates an empty instance of this class.\n * \n * @return \" . ucfirst($table['tableName']) . \"\n */\n public static function createInstance()\n {\n \\$className = __CLASS__; return new \\$className();\n }\n \n /**\n * Creates an instance of this class based on the provided data array.\n *\n * @param array \\$data The keyed array containing the data\n * @return \" . ucfirst($table['tableName']) . \"\n */\n public static function fromData(&\\$data)\n {\n \\$entity = self::createInstance();\n \\$entity->setObjectData(\\$data);\n return \\$entity;\n }\n }\n\";\n \n }\n \n return $code;\n }",
"public static function generateCode()\n {\n return Str::random(10);\n }",
"function createCode() {\n\t\t/* New code. */\n\t\t$code = \"\";\n\t\t$codeAlphabet = \"1234567890\";\n\n\t\t$count = strlen($codeAlphabet) - 1;\n\t\t\n\t\tfor($i=0;$i<5;$i++){\n\t\t\t$code .= $codeAlphabet[rand(0,$count)];\n\t\t}\n\t\t/* First check if it exists or not. */\n\t\t$commentCheck = $this->getCode($code);\n\t\t\n\t\tif($commentCheck) {\n\t\t\t/* It exists. check again. */\n\t\t\t$this->createCode();\n\t\t} else {\n\t\t\treturn $code;\n\t\t}\n\t}",
"function base_no_generator() { return ''; }",
"function _generate_code_string() {\n\n $str = strval(microtime());\n return substr(md5($str),rand(0, 15) , 10);\n}",
"public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }",
"public function generate(): string;",
"public function generate(): string;",
"function no_generator() { return ''; }",
"function no_generator() { return ''; }",
"public function generate()\n {\n $placeHolders = [\n '<nameSpace>',\n '<useSpace>',\n '<annotation>',\n '<className>',\n '<body>',\n ];\n\n $replacements = [\n $this->generateNameSpace(),\n $this->generateUseStatements(),\n $this->generateAnnotation(),\n $this->generateClassName(),\n $this->generateBody(),\n ];\n\n $code = str_replace($placeHolders, $replacements, self::$classTemplate);\n\n return str_replace('<spaces>', $this->baseClass->getSpaces(), $code);\n }",
"public function generate() {\n try {\n /* syntax check */\n chkRequredKey($this->prm->getConf());\n chkRotDest($this->prm->getConf());\n \n /* generate routing file */\n genFunc($this->prm->getOutput());\n genRoute(\n $this->prm->getOutput(),\n $this->prm->getConf()\n );\n \n } catch (\\Exception $e) {\n throw $e;\n }\n }",
"function genClass()\r\n {\r\n $this->_file->file_name = GEN_DIR.\"/\".$this->db_name.\"/\".$this->table_name.\"/\".$this->table_name.\".php\";\r\n $this->_file->open(\"w\");\r\n\r\n $string = $this->_genClassHead();\r\n $string .= $this->_genConstructor();\r\n $string .= $this->_genInsert();\r\n $string .= $this->_genUpdate(); \r\n $string .= $this->_genDelete();\r\n $string .= $this->_genSelect();\r\n $string .= $this->_genSelectAll();\r\n $string .= $this->_genClassFoot();\r\n $this->_file->write($string);\r\n }",
"public function generateV4();",
"protected function generateHtml()\n\t{\n\t}",
"public function compile ();",
"public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }",
"public function generateCode()\n {\n $date = Carbon::now()->format('m-y');\n $count = (new self)->onCurrentMonth()->count() + 1;\n\n return Code::make([\n $date, \n $count,\n ]);\n }",
"public static function generateCode() {\n $long_code = strtr(md5(uniqid(rand())), '0123456789abcdefghij', '234679QWERTYUPADFGHX');\n return substr($long_code, 0, 12);\n }",
"public function generator() {}",
"private function generate_code(){\n $bytes = random_bytes(2);\n // var_dump(bin2hex($bytes));\n return bin2hex($bytes);\n }",
"protected function generateArticleCode() {\r\n\t\ttx_pttools_assert::isInRange($this->rowUid, 1, 99999);\r\n\t\t\r\n\t\tlist($usec, $sec) = explode(' ', microtime());\r\n \t\t$seed = (float) $sec + ((float) $usec * 100000);\r\n \t\tsrand($seed);\r\n\t\t$rand = rand(1, 9999);\r\n\t\t\r\n\t\tif($rand < 1000) $rand += 1000;\r\n\t\t\r\n\t\treturn sprintf(\"%s%05s\", $rand, $this->rowUid);\r\n\t}",
"public function generate($minify = false);",
"public static function generate()\n\t{\n\t\t//get the Name of the SourceFolder\n\t\t\techo \"First you need to give the name of the SourceFolder you want to generate.\\n\";\n\t\t\techo \"The SourceFolder name: \";\n\t\t\t$line = trim(fgets(STDIN));\n\t\t\t$dir = 'src/'.$line;\n\t\t//controll when the Folder already exist\n\t\t\twhile(is_dir($dir)){\n\t\t\t\techo \"This SourceFolder already exist! Do you want to overwrite this File?\\npress y for yes and another for no:\";\n\t\t\t\t$answer = trim(fgets(STDIN));\n\t\t\t\tif($answer === 'y'){\n\t\t\t\t\tFolder::delete($dir);\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\techo \"The SourceFolder name: \";\n\t\t\t\t\t$line = trim(fgets(STDIN));\n\t\t\t\t\t$dir = 'src/'.$line;\n\t\t\t\t}\n\t\t\t}\t\n\t\t//create dirs\n\t\t\tmkdir($dir);\n\t\t\tmkdir($dir.'/Controller');\n\t\t\tmkdir($dir.'/Entity');\n\t\t\tmkdir($dir.'/Resources');\n\t\t\tmkdir($dir.'/Resources/views');\n\t\t//set controllerValue\n\t\t\t$controllerValue = \"<?php \\n\\n\";\n\t\t\t$controllerValue .='namespace '.$line.\"\\\\Controller;\\n\\n\";\n\t\t\t$controllerValue .='use Kernel\\Controller;'.\"\\n\\n\";\t\t\t\t\t\t\n\t\t\t$controllerValue .='class '.$line.\"Controller extends Controller\\n{\\n\";\n\t\t\t$controllerValue .='\tpublic function '.$line.'()'.\"\\n\";\n\t\t\t$controllerValue .=\"\t{\\n\";\n\t\t\t$controllerValue .='\t\treturn $this->render(\"'.$line.':default.html\");'.\"\\n\";\n\t\t\t$controllerValue .=\"\t}\\n\";\n\t\t\t$controllerValue .=\"}\\n\";\n\t\t//generate Controller\n\t\t\t$controller = fopen($dir.'/Controller/'.$line.'Controller.php', \"w\") or die(\"Unable to open file!\\n\");\n\t\t\tfwrite($controller, '');\n\t\t\tfwrite($controller, trim($controllerValue));\n\t\t\tfclose($controller);\n\t\t//generate template\n\t\t\t$templateValue = \"<div>hello</div>\";\n\t\t\t$template = fopen($dir.'/Resources/views/default.html', \"w\") or die(\"Unable to open file!\\n\");\n\t\t\tfwrite($template, '');\n\t\t\tfwrite($template, trim($templateValue));\n\t\t\tfclose($template);\n\t\t//amend srcInit\n\t\t\tif(!array_key_exists($line, Config::srcInit())){\n\t\t\t\t$content = $line.': '.$line;\n\t\t\t\tfile_put_contents('Config/SrcInit.yml', \"\\n\".$content, FILE_APPEND);\n\t\t\t}\n\t}",
"protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }",
"public function getCodeSample()\n {\n $code = <<< 'CODE'\n namespace KEINOS\\AutoMailReply;\n require_once('./src/constants.php');\n require_once('./src/functions.php');\n echo (isModeDebug() === true) ? 'true' : 'false';\nCODE;\n $code = \\str_replace(PHP_EOL, '', $code);\n\n return $code;\n }",
"function generate( $name ) \n {\n $this->render( 'xhprof.php' , $name . '.php' , array( \n 'name' => $name,\n ));\n }",
"function generateCode($code='') {\n\t\t\n\t\tif(empty($code)) {\n\t\t\t$code = $this->randomString();\n\t\t}\n\t\t\n\t\twhile(true) {\t\n\t\t\t\n\t\t\t$shortUrl = $this->findByCode($code);\n\t\t\tif(empty($shortUrl)) break;\n\t\t\t$code = $this->randomString();\n\t\t}\n\t\t\n\t\treturn $code;\n\t}",
"public function init() {\n $this->generate();\n }",
"public function generate()\n {\n $soapClientOptions = $this->getSoapClientOptions();\n $config = $this->getGeneratorConfig($soapClientOptions);\n $generator = $this->getGenerator();\n $generator->generate($config);\n }",
"public function generator();",
"public function __construct()\n\t{\n// \t\t$this->code = substr(md5(uniqid(rand(), true)), 0, 6);\n\t}",
"private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}",
"function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }",
"public function codeGen()\n {\n $max_query = Generation::max('code');\n // $kodeB = Inventaris::all();\n $date = date(\"ymdh\");\n\n if ($max_query != null) {\n $nilai = substr($max_query, 9, 9);\n $kode = (int) $nilai;\n // tambah 1\n $kode = $kode + 1;\n $auto_kode = \"P\". $date . str_pad($kode, 4, \"0\", STR_PAD_LEFT);\n } else {\n $auto_kode = \"P\". $date . \"0001\";\n }\n\n return $auto_kode;\n }",
"public static function getCodeGenerator() {\n return new Q\\Codegen\\Generator\\Label(__CLASS__);\n }",
"public function actionGenerateBarcode() \n {\n\t\t$inputCode = Yii::app()->request->getParam(\"code\", \"\");\n\t\t$bc = new BarcodeGenerator;\n\t\t$bc->init('png');\n\t\t$bc->build($inputCode);\n }",
"protected function generate()\n {\n\t\t$this->value = md5(uniqid(rand(), true));\n }",
"protected function _generate() {\n\t\t\n\t\t// recuperation de l'executable\n\t\t$cmd = $this->getExecutable();\n\t\t\n\t\t// gestion des paramètres\n\t\tforeach ($this->getParam() as $param => $value) {$cmd .= ' --' . (!is_numeric($param) ? $param . '=' : '') . $value;}\n\t\t\n\t\t// connexion\n\t\tforeach (array('u ' => 'username', 'p' => 'password', 'dbname') as $prefix => $key) {\n\t\t\tif ($value = array_find($key, $this->getConfig())) {$cmd .= ' ' . (!is_numeric($prefix) ? '-' . $prefix : '') . $value;}\n\t\t\telse { \n\t\t\t\trequire_once 'Zend/Exception.php';\n\t\t\t\tthrow new Zend_Exception('Erreur paramètre de connexion : ' . $key);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//construction de l'url du fichier\n\t\tif (!strlen($this->getFile())) { $this->setFile($this->getDirectory() . '/mysqldump_' . array_find('dbname', $this->getConfig()) . '_' . time() .'.sql' . ($this->getCompress() ? '.bz2' : '')); }\n\t\t\n\t\t// ajoute la fonction pour la compression\n\t\t$cmd .= $this->getCompress() ? ' | bzip2 --stdout --quiet --best ' : '';\n\t\t\n\t\t// inscirption de l'url\n\t\t$cmd .= ' > ' . $this->getFile();\n\n\t\treturn $cmd;\n\t}",
"public function generate()\n {\n \treturn new Output($this->style->draw());\n }",
"public function make($code);",
"private function generateAjapCore() {\n\t\t$isForCache = $this->options[\"isForCache\"];\n\t\tif (!$isForCache && !AjapEngine::isFirstLoad()) return \"\";\n\t\t\n\t\t$newline = $this->options[\"nl\"];\n\t\t\n\t\t$code = $newline.\"if(!window.Ajap){\".$newline;\n\t\t\n\t\t$dir = realpath(dirname(__FILE__).\"/../js\");\n\t\t\n\t\t$this->ajapCoreFiles = array(\n\t\t\t\"$dir/Ajap.js\",\n\t\t\t\"$dir/engines/$this->js_engine.js\",\n\t\t\t\"$dir/Ajap.Loader.js\",\n\t\t\t\"$dir/Ajap.Net.js\",\n\t\t\t\"$dir/Ajap.Style.js\",\n\t\t);\n\t\tforeach ($this->ajapCoreFiles as &$file)\n \t\t$code .= file_get_contents($file).$newline;\n\n \t$code .= $newline.\"Ajap.URI=\".json_encode($this->ajap_uri).\";\";\n\t \n \t$code .= \"$newline}$newline$newline\";\n\t \n\t if ($this->options[\"js_packer\"]!==FALSE) {\n\t\t\t$code = call_user_func($this->options[\"js_packer\"],$code);\n\t }\n\t\t\n\t if ($isForCache) {\n\t\t\treturn '<?php if (AjapEngine::isFirstLoad()) { ?>'\n\t\t\t\t\t.$code\n\t\t\t\t\t.'<?php } ?>';\n\t\t}\n\t\t\n\t\treturn $code;\n\t}",
"public function autoCode(){\n $length=8;\n $randstr = \"\";\n srand((double)microtime() * 1000000);\n //our array add all letters and numbers if you wish\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n for ($rand = 1; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n return ($randstr.'/'.date('y'));\n }",
"public function generate(ProgramInterface $program);",
"function generateCode(){\n $base=\"abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\";\n $i=0;\n $c=\"\";\n while ($i<6){\n $c.=$base[rand(0,strlen($base)-1)];\n $i++;\n }\n if (validate::existCode($c))\n return generateCode();\n return $c;\n}",
"public function generate()\n {\n AnnotationRegistry::registerFile(\n __DIR__ . '/../vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'\n );\n\n $driver = new AnnotationDriver(\n new CachedReader(new AnnotationReader(), new ArrayCache()),\n array(\n __DIR__ . '/../library/Xi/Filelib/Backend/Adapter/DoctrineOrm/Entity',\n )\n );\n\n $config = new Configuration();\n $config->setMetadataDriverImpl($driver);\n $config->setProxyDir(ROOT_TESTS . '/data/temp');\n $config->setProxyNamespace('Proxies');\n\n $em = EntityManager::create($this->connectionOptions, $config);\n\n $st = new SchemaTool($em);\n $metadata = $st->getCreateSchemaSql($em->getMetadataFactory()->getAllMetadata());\n\n return join(\";\\n\", $metadata) . \";\\n\";\n }",
"public function run()\n {\n\n $this->repo->generate(3);\n\n }",
"function _generate($instance) {\n $output = $this->CI->ciwy->datasource->_generate($this->CI->ciwy->component_config[$instance]['dataSourceInstance']); // Because datasource code is generated here we need to avoid dual code generation (see below)\n\n $output .= ' var ' . $instance . ' = new YAHOO.widget.AutoComplete(\"' . $this->CI->ciwy->component_config[$instance]['inputAttributes']['name'] . '\", \"';\n $output .= $this->CI->ciwy->component_config[$instance]['containerId'] . '\", ';\n $output .= $this->CI->ciwy->component_config[$instance]['dataSourceInstance'];\n $output .= ');' . $this->new_line;\n if (count($this->CI->ciwy->component_config[$instance]['Config']) > 0) {\n foreach ($this->CI->ciwy->component_config[$instance]['Config'] as $key => $val) {\n $output .= ' ' . $instance . '.' . $key . str_repeat(' ', 24 - strlen($key)) . ' = ' . $this->CI->ciwy->_property_wrapper($val, $this->component_property[$key]) . ';' . $this->new_line;\n }\n }\n unset ($this->CI->ciwy->component_instances[$this->CI->ciwy->component_config[$instance]['dataSourceInstance']]); // Avoid dual code generation for data source\n return $output;\n }",
"public function assembler() {\n }",
"public function generate()\n {\n $start_year = $this->_vars['start_year'];\n $start_month = $this->_vars['start_month'];\n $start_day = $this->_vars['start_day'];\n\n $end_year = $this->_vars['end_year'];\n $end_month = $this->_vars['end_month'];\n $end_day = $this->_vars['end_day'];\n\n $code = '';\n\n if (empty($this->_vars['start']) || empty($this->_vars['end'])) {\n return $this->_vacationCode();\n } elseif ($end_year > $start_year + 1) {\n $code .= $this->_yearCheck($start_year + 1, $end_year - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\"\n . $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year + 1) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($start_month < 12) {\n $code .= $this->_monthCheck($start_month + 1, 12)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\\n\"\n . $this->_yearCheck($end_year, $end_year);\n if ($end_month > 1) {\n $code .= $this->_monthCheck(1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n}\";\n } elseif ($end_year == $start_year) {\n $code .= $this->_yearCheck($start_year, $start_year);\n if ($end_month > $start_month) {\n if ($end_month > $start_month + 1) {\n $code .= $this->_monthCheck($start_month + 1, $end_month - 1)\n . $this->_vacationCode()\n . \"\\n}\\n\";\n }\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, 31)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\"\n . $this->_monthCheck($end_month, $end_month)\n . $this->_dayCheck(1, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n } elseif ($end_month == $start_month) {\n $code .= $this->_monthCheck($start_month, $start_month)\n . $this->_dayCheck($start_day, $end_day)\n . $this->_vacationCode()\n . \"\\n}\\n}\\n\";\n }\n $code .= \"}\";\n }\n\n return $code;\n }",
"public function generate() \r\n\t{\t\r\n\t\tparent::generate();\r\n\t\r\n\t\t$this->schemaXml = new SimpleXMLElement(file_get_contents( $this->_xmlFile ));\r\n\t\t\r\n\t\t//parse object types\r\n\t\tforeach ($this->schemaXml->children() as $reflectionType) \r\n\t\t{\r\n\t\t\tswitch($reflectionType->getName())\r\n\t\t\t{\r\n\t\t\t\tcase \"enums\":\r\n\t\t\t\t\t//create enum classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $enums_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeEnum($enums_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"classes\":\r\n\t\t\t\t\t//create object classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $classes_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeObjectClass($classes_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"services\":\r\n\t\t\t\t\t//implement services (api actions)\r\n\t\t\t\t\tforeach($reflectionType->children() as $services_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeService($services_node);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//write main class (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t\t\t\t$this->writeMainClass($reflectionType->children());\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->addFile('KalturaTypes.js', $this->enumTypes);\r\n\t\t$this->addFile('KalturaVO.js', $this->voClasses);\r\n\t\t$this->addFile('KalturaServices.js', $this->serviceClasses);\r\n\t\t$this->addFile('KalturaClient.js', $this->mainClass);\r\n\t\t//write project file (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t$this->writeProjectFile();\r\n\t}",
"public function run()\n {\n \\App\\TexBlob::create([\n \t'id' => 1,\n\t\t\t'tex' => 'Soit $x \\\\in \\\\mathbb{R}$'\n ]);\n\t\t\t\n \\App\\TexBlob::create([\n \t'id' => 2,\n\t\t\t'tex' => 'Soit $n \\\\in \\\\mathbb{N}$'\n ]);\n\t\t\t\n \\App\\TexBlob::create([\n \t'id' => 3,\n\t\t\t'tex' => 'Supposons que $f$ est une fonction complexe'\n ]);\n\t\t\n }",
"protected function generate()\n {\n $oServer = Input::singleton('server');\n $this->hData['method'] = isset($oServer['http_x_http_method_override']) ? strtolower($oServer['http_x_http_method_override']) : strtolower($oServer['request_method']);\n\n $oGet = Input::singleton('get');\n $this->processGet($oGet->getRaw());\n\n $this->hData['baseurl'] = rtrim(dirname($oServer['php_self']), '/') . '/';\n $this->hData['rawpath'] = rtrim(preg_replace(\"#\\?.*#\", '', preg_replace(\"#^\" . $this->hData['baseurl'] . \"#\", '', $oServer['request_uri'])), '/');\n $this->processRawPath();\n }",
"protected function _getNextCode() {}",
"function i_want_no_generators()\r\n{\r\n \t\treturn '';\r\n\t}",
"protected function generateMisc()\n {\n //We need to generate both a forward and reverse bank, followed by proper wrappers.\n\n $php = \"<?php\\n\";\n $php .= \"namespace GCWorld\\\\Routing\\\\Generated\\\\{$this->name};\\n\";\n $php .= \"\\n\";\n $php .= \"class MasterRoute_MISC Implements \\\\GCWorld\\\\Routing\\\\Interfaces\\\\RoutesInterface\\n\";\n $php .= \"{\\n\";\n\n //Get File Time Function\n $php .= \" public function getFileTime()\\n\";\n $php .= \" {\\n\";\n $php .= \" return filemtime(__FILE__);\\n\";\n $php .= \" }\\n\\n\";\n\n //Get Forward Routes Function\n $php .= \" public function getForwardRoutes()\\n\";\n $php .= \" {\\n\";\n $php .= \" return [\\n\";\n foreach ($this->routes_straight as $k => $v) {\n $temp = explode('/', $k);\n if (in_array($temp[1], $this->routes_master)) {\n continue;\n }\n $cEncoder = new PHPEncoder();\n $encoded = $cEncoder->encode($v, [\n 'array.base' => 12,\n 'array.inline' => false,\n 'array.omit' => false,\n 'array.align' => true,\n 'array.indent' => 4,\n 'boolean.capitalize' => true,\n 'null.capitalize' => true,\n ]);\n $php .= \" '$k' => \".$encoded.\",\\n\";\n }\n $php .= \" ];\\n\";\n $php .= \" }\\n\\n\";\n\n\n //Get Reverse Routes Function\n $php .= \" public function getReverseRoutes()\\n\";\n $php .= \" {\\n\";\n $php .= \" return [\\n\";\n foreach ($this->routes_reverse as $k => $v) {\n $temp = explode('_', $k);\n if (in_array($temp[0], $this->routes_master)) {\n continue;\n }\n $cEncoder = new PHPEncoder();\n $encoded = $cEncoder->encode($v, [\n 'array.base' => 12,\n 'array.inline' => false,\n 'array.omit' => false,\n 'array.align' => true,\n 'array.indent' => 4,\n 'boolean.capitalize' => true,\n 'null.capitalize' => true,\n ]);\n $php .= \" '$k' => \".$encoded.\",\\n\";\n }\n $php .= \" ];\\n\";\n $php .= \" }\\n\\n\";\n\n //End of file\n $php .= \"}\\n\";\n\n file_put_contents($this->storage.'MasterRoute_MISC.php', $php);\n }",
"private function generate()\n\t{\n\t\t$printer = require_once __DIR__ . '/Printer.php';\n\t\t$orders = $this->get_waiting_orders();\n\t\t\n\t\t$printer->setup($this);\n\n\t\t/*foreach ($orders as $order) {\n\t\t\t$printer->add($order);\n\t\t}*/\n\n\t\t$printer->output();\n\t}",
"public function run()\n {\n $array_code = [\n 'M', 'N', 'O', 'P'\n ];\n\n $product_ids = \\App\\Product::all()->pluck('id')->toArray();\n foreach ($product_ids as $key => $product_id) {\n foreach ($array_code as $code) {\n \\App\\ProductCode::create([\n 'code' => $this->generateCode(\\App\\ProductCode::class, 'PRODUCTCODE'),\n 'name' => $code,\n 'description' => '',\n 'active' => true,\n 'product_id' => $product_id\n ]);\n }\n }\n }",
"public function run()\n {\n $this->generateWiadomosci(1, [1, 2]);\n $this->generateWiadomosci(2, [3, 4]);\n $this->generateWiadomosci(3, [5, 6]);\n $this->generateWiadomosci(5, [9, 10]);\n $this->generateWiadomosci(7, [7, 2]);\n }",
"public function actionGenerate()\n {\n \\bariew\\yii2Tools\\tests\\FixtureManager::init();\n }",
"function roots_no_generator() { return ''; }",
"public function generate()\n\t{\n\t\t$entityName = mb_strtolower($this->getEntityName());\n\n\t\t$entityDir = Yii::getAlias(self::PATH_TO_MODULE . '/' . $entityName);\n\n\t\tif (!is_dir($entityDir) && !mkdir($entityDir) && !is_dir($entityDir)) {\n\t\t\tthrow new InternalException(InternalException::ERROR_DENIED, \"Не удалось создать папку: {$entityDir}\");\n\t\t}\n\n\t\t$entityTableFilePath = \"{$entityDir}/{$entityName}.php\";\n\n\t\t$files = [\n\t\t\tnew CodeFile($entityTableFilePath, $this->render('table.php')),\n\t\t];\n\n\t\t$helpersDir = __DIR__ . '/default/admininterface';\n\n\t\tif (!is_dir($helpersDir) && !mkdir($helpersDir) && !is_dir($helpersDir)) {\n\t\t\tthrow new InternalException(InternalException::ERROR_DENIED, \"Не удалось создать папку: {$helpersDir}\");\n\t\t}\n\n\t\tforeach ($dirs = scandir($helpersDir, null) as $file) {\n\t\t\tif ($file === '.' || $file === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$templateFilePath = $helpersDir . '/' . $file;\n\t\t\t$codeFilePath = $entityDir . '/admininterface/' . $entityName . $file;\n\t\t\tif (is_file($templateFilePath) && pathinfo($templateFilePath, PATHINFO_EXTENSION) === 'php') {\n\t\t\t\t$files[] = new CodeFile($codeFilePath, $this->render(\"admininterface/$file\"));\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}",
"protected function generate_instruction()\n {\n $this->xml->startElement(\"instruction\");\n $this->xml->writeAttribute(\"order\", $this->instrCount);\n $this->xml->writeAttribute(\"opcode\", $this->token);\n }"
] | [
"0.7674509",
"0.76112866",
"0.75846803",
"0.75846803",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75846267",
"0.75112146",
"0.75112146",
"0.75112146",
"0.75112146",
"0.75112146",
"0.7467985",
"0.73182106",
"0.7196925",
"0.71296734",
"0.699222",
"0.6953588",
"0.6899684",
"0.6844567",
"0.6838717",
"0.67872447",
"0.6786341",
"0.67757434",
"0.675479",
"0.66722614",
"0.6615495",
"0.6611233",
"0.66087",
"0.65837485",
"0.6581642",
"0.65797824",
"0.6558227",
"0.653303",
"0.6505085",
"0.64927655",
"0.64805907",
"0.6476189",
"0.64570063",
"0.641122",
"0.6395226",
"0.6370628",
"0.6368936",
"0.6368936",
"0.6367581",
"0.6367581",
"0.6309808",
"0.6309364",
"0.6286768",
"0.6273107",
"0.6258165",
"0.6249772",
"0.62235624",
"0.621535",
"0.6194414",
"0.6190769",
"0.6186484",
"0.6183805",
"0.6174545",
"0.6170274",
"0.6168912",
"0.6163795",
"0.6157443",
"0.61571485",
"0.61448896",
"0.6144053",
"0.6104025",
"0.61031675",
"0.60987484",
"0.60786027",
"0.6073709",
"0.6066396",
"0.60417736",
"0.60366505",
"0.60344666",
"0.6026838",
"0.6021535",
"0.6008382",
"0.60072917",
"0.6006284",
"0.5996277",
"0.5969062",
"0.5964925",
"0.5952814",
"0.5952594",
"0.59413284",
"0.5931059",
"0.59264183",
"0.59231734",
"0.5920281",
"0.59140825",
"0.5909799",
"0.59090656",
"0.5908916",
"0.5907548",
"0.5902723",
"0.5884154",
"0.5880223",
"0.5877951"
] | 0.0 | -1 |
first get the array of slide IDs | function OBJM_getAutoSlideShowInfoCode(&$codestr)
{
$tempstr = "";
$codestr = "";
if(!isset($_SESSION['sceneCompXMLDOM']) )
return false;
if(!isset($_SESSION['sceneCompXMLFilePath']))
return false;
$sceneArr;
$retval = $_SESSION['sceneCompXMLDOM']->load($_SESSION['sceneCompXMLFilePath']);
if($retval != true)
return false ;
$parentNode = $_SESSION['sceneCompXMLDOM']->documentElement;
$parentNode = $parentNode->firstChild;
$parentNode = $parentNode->firstChild;
$type = $parentNode->getAttribute('type');
if($type != 'PAGE')
return false;
$pageID = $parentNode->getAttribute('id');
$retval = CDOC_COMMON_getChildrenList($_SESSION['sceneCompXMLDOM'],$_SESSION['sceneCompXMLFilePath'],$pageID, 'data-type', 'SCENE', 'id', $sceneArr);
if($retval != true)return false;
$scenearrlen = count($sceneArr);
if($scenearrlen <= 0 )
return false;
//then formualate the initial code
$tempstr = "var gSlideDuration = 0; var gAutoSlideTimer = 0; var gTimeOut = 100; var gAVPlayerObject =0; var gCurrentSlideIndex = 0; var gAVPlayerInitOffsetTime = 0; var gEndIndex = 0;";
$codestr = $codestr . $tempstr;
$tempstr = "sSlideInfo.prototype.id = 0; sSlideInfo.prototype.AVObjectID = 0; sSlideInfo.prototype.duration = 0; sSlideInfo.prototype.startTime = -1; function sSlideInfo() {sSlideInfo.prototype.id = 0;sSlideInfo.prototype.AVObjectID = 0;sSlideInfo.prototype.duration = 0; sSlideInfo.prototype.startTime = -1;}";
$codestr = $codestr . $tempstr;
$tempstr = "var gSlideNum =" . $scenearrlen .";";
$codestr = $codestr . $tempstr;
$tempstr = "var gSlideInfoList = new Array(gSlideNum); for(var i=0; i < gSlideNum; i++) {gSlideInfoList[i] = new sSlideInfo(); }";
$codestr = $codestr . $tempstr;
//now iterate over each Scene node , get the timing params
for($i=0; $i < $scenearrlen; $i++)
{
$sceneID = $sceneArr[$i];
$node = $_SESSION['sceneCompXMLDOM']->getElementById($sceneID);
$AVObjID = $node->getAttribute('data-AVObjID');
$startTime = $node->getAttribute('data-startTime');
$duration = $node->getAttribute('data-duration');
$tempstr = " gSlideInfoList[" . $i . "].AVObjectID='" . $AVObjID. "';";
$codestr =$codestr . $tempstr;
$tempstr = " gSlideInfoList[" . $i . "].duration=Number(" . $duration. ");";
$codestr =$codestr . $tempstr;
$tempstr = " gSlideInfoList[" . $i . "].startTime=Number(". $startTime . ");";
$codestr =$codestr . $tempstr;
}
//$tempstr = "function InitializeAutoShow() {if(gSlideInfoList.length < 1) return ; gEndIndex = gSlideInfoList.length-1; if( (!gAVPlayerObject) && (gSlideInfoList[0].AVObjectID != 0) ) gAVPlayerObject = document.getElementById(gSlideInfoList[0].AVObjectID); else gAVPlayerObject = 0; if(gAVPlayerObject){gAVPlayerObject.pause();gAVPlayerObject.currentTime = gSlideInfoList[gCurrentSlideIndex].startTime;gAVPlayerInitOffsetTime = gAVPlayerObject.currentTime; } if(!gAutoSlideTimer){gAutoSlideTimer = setInterval(function() {AutoShowTimerHandle(); }, gTimeOut); gSlideDuration = 0; if(gAVPlayerObject) gAVPlayerObject.play(); showSlideData(gCurrentSlideIndex); } }";
$tempstr = " function InitializeAutoShow() {if(gSlideInfoList.length < 1) return ; gEndIndex = gSlideInfoList.length-1; if(gSlideInfoList[gslideIndex].AVObjectID != 0) {if(!gAVPlayerObject) gAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID); if(gAVPlayerObject){ gAVPlayerObject.pause(); gAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime; gAVPlayerInitOffsetTime = gAVPlayerObject.currentTime; }} else { if(gAVPlayerObject) gAVPlayerObject.pause(); gAVPlayerObject = 0; } if(gAutoSlideTimer){ clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; } if(!gAutoSlideTimer){ gAutoSlideTimer = setInterval(function() {AutoShowTimerHandle(); }, gTimeOut); gSlideDuration = 0; if(gAVPlayerObject) gAVPlayerObject.play(); showSlideData(gslideIndex); }}";
$codestr = $codestr .$tempstr;
$tempstr = "function OnLoadMetadata(){ InitializeAutoShow();}";
$codestr = $codestr .$tempstr;
//$tempstr = "function AutoShowTimerHandle(){if(gAVPlayerObject) gSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime); else gSlideDuration += (gTimeOut/1000); if(gSlideDuration >= gSlideInfoList[gCurrentSlideIndex].duration) { gCurrentSlideIndex++; if(gCurrentSlideIndex == gEndIndex+1) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) { gAVPlayerObject.pause(); gAVPlayerObject = 0; } } else { if(gAVPlayerObject) { gAVPlayerInitOffsetTime = gSlideInfoList[gCurrentSlideIndex].startTime; } gSlideDuration = 0; } showSlideData(gCurrentSlideIndex); } }";
//$tempstr = "function AutoShowTimerHandle(){if(gAVPlayerObject) gSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime); else gSlideDuration += (gTimeOut/1000); if( (gSlideDuration >= gSlideInfoList[gslideIndex].duration) && (gslideIndex < gSlideInfoList.length-1) ) { if(gslideIndex == gEndIndex) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) gAVPlayerObject.pause(); } else { gslideIndex++; if(!gSlideInfoList[gslideIndex].AVObjectID) { if( (gAVPlayerObject) && (gAVPlayerObject.paused != true)) { gAVPlayerObject.pause(); gAVPlayerObject = 0; } } else { if(!gAVPlayerObject) { gAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID); } if( (gAVPlayerObject) && (gAVPlayerObject.paused == true)) { gAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime; gAVPlayerObject.play(); } if(gAVPlayerObject) { gAVPlayerInitOffsetTime = gSlideInfoList[gslideIndex].startTime; } } gSlideDuration = 0; } showSlideData(gslideIndex); } else if(gslideIndex >= gSlideInfoList.length-1) { var endTime = gSlideInfoList[gslideIndex].startTime + gSlideInfoList[gslideIndex].duration; if( (gAVPlayerObject) && (gAVPlayerObject.currentTime >= endTime) ) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; if(gAVPlayerObject) gAVPlayerObject.pause(); } else if( (!gAVPlayerObject) && (gSlideDuration >= gSlideInfoList[gslideIndex].duration) ) { clearInterval(gAutoSlideTimer); gAutoSlideTimer = 0; }}}" ;
$tempstr = "function AutoShowTimerHandle(){
if(gAVPlayerObject)
gSlideDuration = (gAVPlayerObject.currentTime - gAVPlayerInitOffsetTime);
else
gSlideDuration += (gTimeOut/1000);
if( (gSlideDuration >= gSlideInfoList[gslideIndex].duration) && (gslideIndex < gSlideInfoList.length-1) ) {
if(gslideIndex == gEndIndex) {
clearInterval(gAutoSlideTimer);
gAutoSlideTimer = 0;
if(gAVPlayerObject)
gAVPlayerObject.pause();
}
else {
gslideIndex++;
if(!gSlideInfoList[gslideIndex].AVObjectID) {
if( (gAVPlayerObject) && (gAVPlayerObject.paused != true)) {
gAVPlayerObject.pause();
gAVPlayerObject = 0;
}
}
else {
if((gAVPlayerObject) && (gAVPlayerObject.id != gSlideInfoList[gslideIndex].AVObjectID)) {
gAVPlayerObject.pause();
gAVPlayerObject = 0;
}
if(!gAVPlayerObject) {
gAVPlayerObject = document.getElementById(gSlideInfoList[gslideIndex].AVObjectID);
}
if( (gAVPlayerObject) && (gAVPlayerObject.paused == true)) {
gAVPlayerObject.currentTime = gSlideInfoList[gslideIndex].startTime;
gAVPlayerObject.play();
}
if(gAVPlayerObject) {
gAVPlayerInitOffsetTime = gSlideInfoList[gslideIndex].startTime;
}
}
gSlideDuration = 0;
}
showSlideData(gslideIndex);
}
else if(gslideIndex >= gSlideInfoList.length-1) {
var endTime = gSlideInfoList[gslideIndex].startTime + gSlideInfoList[gslideIndex].duration;
if( (gAVPlayerObject) && (gAVPlayerObject.currentTime >= endTime) ) {
clearInterval(gAutoSlideTimer);
gAutoSlideTimer = 0;
if(gAVPlayerObject) gAVPlayerObject.pause();
} else if( (!gAVPlayerObject) && (gSlideDuration >= gSlideInfoList[gslideIndex].duration) ) {
clearInterval(gAutoSlideTimer);
gAutoSlideTimer = 0;
}
}
} ";
$codestr = $codestr .$tempstr;
// add to the code
//complete the code with other functions
return true;
//return
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAvailableSlideUIDs(){\n\n $slideUIDs = $this->find( 'list', [\n 'fields' => [\n 'HeaderSlide.uid',\n 'HeaderSlide.uid'\n ]\n ]);\n\n //Return the slide UIDs in a a sequentially indexed array\n return array_values( $slideUIDs );\n\n }",
"public abstract function get_ids();",
"private function extractIdsArray($data)\n {\n return array_pluck($data['photoset'], 'id');\n }",
"public function getIds();",
"public function getIds();",
"function getSlideTitles() {\n global $slides;\n\n foreach ($slides[\"slides\"] as $slide) {\n $id = $slide[\"id\"];\n $title = $slide[\"title\"];\n echo \"<p class='sliderTitle' id='title$id'>$title</p>\";\n }\n }",
"protected function getPageIds()\n {\n return (array)explode(',', $this->getData('pages'));\n }",
"function stock_toolkit_get_slide_as_list(){\n\n\t$args = wp_parse_args( \n\t\tarray(\n\t\t\t'post_type' => 'slide',\n\t\t\t'numberposts' => -1,\n\t\t)\n\t);\n\n\t$posts = get_posts($args);\n\n\t$post_options = array(esc_html__('-- Select Slide --', 'stock-toolkit')=> '');\n\n\tif($posts){\n\t\tforeach ($posts as $post) {\n\t\t\t$post_options[ $post->post_title ] = $post->ID;\n\t\t}\n\t}\n\n\treturn $post_options;\n}",
"public function getIdArray()\n {\n $idArray = array();\n\n foreach ($this as $importedVideo) {\n $idArray[] = $importedVideo->id;\n }\n\n return $idArray;\n }",
"function get_slider_stories($ids){\r\n\r\n\t $res \t\t= '';\r\n\r\n\t $ci \t\t\t= & get_instance();\r\n\r\n\t $comma_id\t= implode(',',$ids); \r\n\r\n \t if(count($ids)>0){\r\n\r\n\t\t\t$ci->db->select('spidypickId, spideyImage, spidyName, headline,story_url, releaseDate');\r\n\r\n\t\t\t$ci->db->where_in('spidypickId',$ids);\r\n\r\n\t\t\t$ci->db->where(array('status'=>'1'));\r\n\r\n\t\t\t$ci -> db -> order_by(\"FIELD ( spidypickId, $comma_id )\", '', FALSE);\r\n\r\n\t\t\t$res \t\t= $ci->db->get(\"spidypick\")->result_array();// echo '***'.$ci->db->last_query();exit();\r\n\r\n \t }\r\n\r\n \t return $res;\r\n\r\n}",
"function post_ids() {\n\n\t\t$media_location = $this->media_location();\n\n\t\tif ( ! $media_location )\n\t\t\treturn array();\n\n\t\t$media_files = $media_location->media_files();\n\n\t\tif ( ! count( $media_files ) )\n\t\t\treturn array();\n\n\t\t// fetch releases\n\t\t$episode_ids = array_map( function ( $v ) { return $v->episode_id; }, $media_files );\n\t\t$episodes = Episode::find_all_by_where( \"id IN (\" . implode( ',', $episode_ids ) . \")\" );\n\n\t\treturn array_map( function ( $v ) { return $v->post_id; }, $episodes );\n\t}",
"protected function get_retrieved_ids() {\n $ids = $this->parse_ids($items);\n \n $sidx = $eidx = 0;\n if (is_array($this->page_size)) {\n $sidx = $this->page_size[0];\n $eidx = $this->page_size[1];\n if ($sidx < 0)\n $sidx = 0;\n if ($eidx < $sidx)\n $eidx = $sidx;\n if ($eidx >= count($ids))\n $eidx = count($ids) - 1;\n \n $len = $eidx - $sidx + 1;\n if ($sidx >= count($ids))\n $ids = array();\n else\n $ids = array_slice($ids, $sidx, $len);\n }\n\n list($start_count, $max_count) = $this->get_page_limit($this->page_size);\n $num_to_display = $max_count - $start_count + 1;\n $ids = array_slice($ids, $start_count, $num_to_display);\n\n // This is supposed to come at the end of the retrieval, but I don't know where to put it yet.\n // This is legacy code anyway and is going byebye soon.\n //$output[\"eod\"] = $start_count < $max_count;\n //$output[\"counts\"][\"displayed\"] = $start_count;\n //if (!$output[\"eod\"])\n // $output[\"counts\"][\"displayed\"]--;\n return $ids;\n }",
"function lc_grab_ids_from_gallery()\n{\n global $post;\n\n if ($post instanceof WP_Post === false) {\n return array();\n }\n\n $pattern = get_shortcode_regex();\n $ids = array();\n\n if (preg_match_all('/' . $pattern . '/s', $post->post_content, $matches)) { //finds the \"gallery\" shortcode and puts the image ids in an associative array at $matches[3]\n\n $count = count($matches[3]); //in case there is more than one gallery in the post.\n for ($i = 0; $i < $count; $i++) {\n $atts = shortcode_parse_atts($matches[3][$i]);\n if (isset($atts['ids'])) {\n $ids = array_merge($ids, explode(',', $atts['ids']));\n }\n }\n }\n return $ids;\n}",
"public function getIds()\n {\n\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"public function get_ids()\n {\n }",
"function hmg_get_gallery_ids( $post_id = null ) {\n\n\tif( null == $post_id ) \n\t\t$post_id = get_the_id(); \n\t\t\n\treturn array_filter( (array) get_post_meta( $post_id, '_hmg_gallery_images', true ) );\n\t\n}",
"public function getAllIds(): array;",
"protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }",
"function getStoragePageIds() ;",
"function createPubIds($galley, $article, $preview = false) {\t\t\n\t\t$pubIdPlugins =& \\PluginRegistry::loadCategory('pubIds', true, $article->getJournalId());\n\t\t$pubIds = array();\n\t\tforeach ($pubIdPlugins as $pubIdPlugin) {\n\t\t\t$pubIdType = $pubIdPlugin->getPubIdType();\n\t\t\t$pubIds[$pubIdType] = $pubIdPlugin->getPubId($galley, $preview);\n\t\t\t$pubIdsArticle[$pubIdType] = $pubIdPlugin->getPubId($article, $preview);\n\t\t}\n\t\tforeach ($pubIds as $pubIdType => $value) {\n\t\t\tif (!$value and isset($pubIdsArticle[$pubIdType])) {\n\t\t\t\t$pubIds[$pubIdType] = $pubIdsArticle[$pubIdType];\n\t\t\t}\n\t\t}\n\t\treturn $pubIds;\n\t}",
"public function getIds()\n {\n return $this->article_ids;\n }",
"function get_single_slider($pid) {\n $sql = \"SELECT * FROM slider WHERE id='$pid'\";\n $res = $this->mysqli->query($sql);\n return $res->fetch_array(MYSQLI_ASSOC);\n }",
"function getIds( array $Objects );",
"public function getPlaysIds(): array\n {\n return $this->playsIds;\n }",
"function sb_slideshow_slides( $sql ) {\n\tglobal $wpdb, $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$slides = get_post_meta( ( ! isset( $post->ID ) ? absint( $_POST['id'] ) : $post->ID ), 'slide', false ); // set single (third parameter) to false to pull ALL records with key \"slide\"\n\n\t$attachments = $wpdb->get_results( $sql );\n\n\t// push all image attachments info into array\n\t$indexes = array();\n\tforeach( $attachments as $attachment ) {\n\t\tarray_push( $indexes, count( $sb_slideshow_slides ) );\n\n\t\t$box = 'library';\n\t\t$order = '';\n\t\tforeach( $slides as $slide ) {\n\t\t\tif( $slide['attachment_id'] == $attachment->ID ) {\n\t\t\t\t$box = 'slides';\n\t\t\t\t$order = $slide['order'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$metadata = wp_get_attachment_metadata( $attachment->ID );\n\n\t\tarray_push( $sb_slideshow_slides, array(\n\t\t\t'box' \t\t\t=> $box,\n\t\t\t'order'\t\t\t=> $order,\n\t\t\t'attachment'\t\t=> array(\n\t\t\t\t'id' \t\t=> $attachment->ID,\n\t\t\t\t'year' \t\t=> mysql2date( 'Y', $attachment->post_date ),\n\t\t\t\t'month' \t=> mysql2date( 'm', $attachment->post_date ),\n\t\t\t\t'width'\t\t=> $metadata['width'],\n\t\t\t\t'height' \t=> $metadata['height'],\n\t\t\t\t'type' \t\t=> $attachment->post_mime_type,\n\t\t\t\t'link'\t\t=> $attachment->post_excerpt,\n\t\t\t\t'content'\t=> $attachment->post_content ),\n\t\t\t\t'image' \t=> '<img src=\"' . sb_get_post_image_url( array( 'width' => $sb_slideshow_interface['slide_width'], 'height' => $sb_slideshow_interface['slide_height'], 'image_id' \t=> $attachment->ID, 'echo' \t=> false ) ) . '\" width=\"' . $sb_slideshow_interface['slide_width'] . '\" height=\"' . $sb_slideshow_interface['slide_height'] . '\" />'\n\t\t\t)\n\t\t);\n\t}\n\n\tusort( $sb_slideshow_slides, 'sb_slideshow_slide_sort' ); // order the elements of the array\n\n\treturn $indexes;\n}",
"public function getImagesId()\n {\n $ids = array();\n foreach ($this->images as $image) {\n $ids[] = $image->getId();\n }\n return $ids;\n }",
"public function getSpotsIds() {\n $query = \"SELECT \" . $this->prefix . \"id FROM ' . $this->prefix . 'spot WHERE spot_track_id=\" . $this->track_id . \" ORDER BY spot_last_update DESC LIMIT \" . $this->limit_spots;\n\n $result = db_query($query);\n\n $spot_ids = array();\n while($row = mysqli_fetch_array($result)){\n $spot_ids[] = $row['spot_id'];\n }\n\n return $spot_ids;\n }",
"public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}",
"static function idsFromPhotos($photos) {\n $ids = array();\n foreach ($photos as $photo) {\n $ids[] = $photo->getId();\n }\n return $ids;\n }",
"function get_all_slide()\r\n {\r\n \r\n \r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n slide \r\n\r\n ORDER BY `slide_id` DESC\r\n\r\n \")->result_array();\r\n\r\n return $slide;\r\n }",
"public function getIds(): array\n {\n return $this->ids;\n }",
"function getEventIDs() {\n\t\t$return = array();\n\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$return[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function getIds()\n\t{\n\t\treturn $this->ids;\n\t}",
"public function getSlides()\n {\n return Slide::all();\n }",
"public function getAllSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_total)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_total);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_total, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}",
"public function get_slides_from_meta($slider_metas){\r\n $slides = array();\r\n if(is_array($slider_metas)){\r\n foreach($slider_metas as $slider_meta){\r\n $attachment_id = (int) $slider_meta['id'];\r\n $image_url = wp_get_attachment_url($attachment_id);\r\n $image_url = ($image_url===false) ? '' : $image_url;\r\n $slides[] = $image_url;\r\n }\r\n }\r\n return $slides;\r\n }",
"public function ids( array $params = array() );",
"public function getItemIds();",
"private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}",
"public function ids()\n {\n return $this->_ids;\n }",
"public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }",
"function get_slide($slide_id)\r\n {\r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `slide`\r\n\r\n WHERE\r\n `slide_id` = ?\r\n \",array($slide_id))->row_array();\r\n\r\n return $slide;\r\n }",
"public function getPageIds()\n {\n $arr = array();\n foreach($this->elements as $displayElement){\n if($displayElement->getType() == 'element'){\n $page = $displayElement->getElement()->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n if($displayElement->getType() == 'page'){\n $page = $displayElement->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n }\n\n return array_unique($arr);\n }",
"public function getActiveSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_active)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_active);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide WHERE isactive = '1'\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_active, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}",
"function get_video_ids() {\n\t$user_id = get_current_user_id();\n\t$ids = array();\n\t\n\tif (have_rows('events_access', 'user_' . $user_id)) { // If user have events\n\t\t$j = 0; // Outer counter\n\t\twhile (have_rows('events_access', 'user_' . $user_id)) {\n\t\t\tthe_row();\n\t\t\t$event_id = get_sub_field('event')[0];\n\t\t\t$event_access = get_sub_field('access');\n\t\t\t\n\t\t\t$free_lesson = get_field('free_lesson', $event_id);\n\t\t\tif ($free_lesson) { // If event have free lesson\n\t\t\t\t$ids[\"eventVideo_$j\" . \"_0\"] = $free_lesson['video_id'];\n\t\t\t}\n\t\t\t\n\t\t\tif ($event_access) { // If user have access to event\n\t\t\t\tif (have_rows('lessons', $event_id)) {\n\t\t\t\t\t$i = 1; // Inner counter\n\t\t\t\t\twhile (have_rows('lessons', $event_id)) {\n\t\t\t\t\t\tthe_row();\n\t\t\t\t\t\t$ids[\"eventVideo_$j\" . \"_$i\"] = get_sub_field('video_id');\n\t\t\t\t\t\t$i += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$j += 1;\n\t\t}\n\t}\n\t\n\treturn $ids;\n}",
"public function getIds()\n {\n return $this->ids;\n }",
"public function getIds()\n {\n return $this->ids;\n }",
"public function getAllIds();",
"function get_data_slider()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `slider`\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}",
"function ss_hammerOID_pollers_indexes() {\n\n $return_arr = array();\n\t\t\n\t$rows = db_fetch_assoc(\"SELECT id FROM poller\");\n\n\n for ($i=0;($i<sizeof($rows));$i++) {\n $return_arr[$i] = $rows[$i]['id'];\n }\n\n return $return_arr;\n}",
"public function get_slides_for_slider() {\n return $this->slides_to_include;\n }",
"private function selectParentListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tparent_list_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"parent_list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"public function getContainerIDsAndTitles()\n {\n $retval = array();\n if (isset($this->fields['container_ids_and_titles']) && !empty($this->fields['container_ids_and_titles'])) {\n foreach ($this->fields['container_ids_and_titles'] as $id_and_title) {\n $a = explode(chr(0x1F), str_replace(\"#31;\", chr(0x1F), $id_and_title), 3);\n if (count($a) == 3) {\n $retval[$a[0]] = array($a[1], $a[2]);\n }\n }\n }\n return $retval;\n }",
"function taminoGetIds() {\n $rval = $this->tamino->xquery($this->xquery);\n if ($rval) { // tamino Error\n print \"<p>LinkCollection Error: failed to retrieve linkRecord id list.<br>\";\n print \"(Tamino error code $rval)</p>\";\n } else { \n // convert xml ids into a php array \n $this->ids = array();\n $this->xml_result = $this->tamino->xml->getBranches(\"ino:response/xq:result\");\n if ($this->xml_result) {\n\t// Cycle through all of the branches \n\tforeach ($this->xml_result as $branch) {\n\t if ($att = $branch->getTagAttribute(\"id\", \"xq:attribute\")) {\n\t array_push($this->ids, $att);\n\t }\n\t} /* end foreach */\n } \n }\n\n }",
"public function getNewestSlides()\n {\n $returnValue = array();\n\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 begin\n $this->Database = new Database();\n $sql = $this->Database->prepare(\"SELECT * FROM hopetrac_main.inspiration_quotes ORDER BY id DESC LIMIT 0,10\");\n $sql->setFetchMode(PDO::FETCH_ASSOC);\n $sql->execute();\n\n $returnValue = $sql->fetchAll();\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 end\n\n return (array) $returnValue;\n }",
"public function getIdsList() {\n return $this->_get(1);\n }",
"public function getLoopsId();",
"private function range() {\n\n $data = array();\n\n for($i = 1; $i<= 2; $i++) {\n\n array_push($data, $this->id($i));\n\n }\n\n return $data;\n\n }",
"function get_slider($tipo,$idioma_id)\r\n {\r\n $sql = \"select * from slide s, pagina_web p \r\n where s.pagina_id = p.pagina_id and p.idioma_id=\".$idioma_id.\" and s.slide_tipo=\".$tipo;\r\n \r\n $resultado = $this->db->query($sql)->result_array();\r\n return $resultado; \r\n \r\n }",
"public function getStoragePageIds() {}",
"function kids(){\r\n\t\t// check if we need to generate the list\r\n\t\tif( $this->kids == null ){\r\n\t\t\t$this->kids = rsgGalleryManager::getList( $this->get('id') );\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->kids;\r\n\t}",
"function wpsp_lang_object_ids($ids_array, $type) {\n\tif(function_exists('icl_object_id')) {\n\t\t$res = array();\n\t\tforeach ($ids_array as $id) {\n\t\t\t$xlat = icl_object_id($id,$type,false);\n\t\t\tif(!is_null($xlat)) $res[] = $xlat;\n\t\t}\n\t\treturn $res;\n\t} else {\n\t\treturn $ids_array;\n\t}\n}",
"public function sigLeadershipsIds()\n {\n return $this->sigs()->where('main', 1)->lists('id')->toArray();\n }",
"function get_slider() {\n $sql = \"SELECT * FROM slider\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }",
"public function obterArrayIds(Shop $shop);",
"function getObjectIDs() {\n\t\t$tmp = array();\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$tmp[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\t\treturn $tmp;\n\t}",
"public function getReferenceIdsList(){\n return $this->_get(2);\n }",
"function getfileIds($fileArray){\n $imageIdsArray = [];\n foreach($fileArray as $file){\n $imageIdsArray[] = $file['id'];\n }\n return $imageIdsArray;\n}",
"function get_translation_ids() {\n\n\t\tif ( ! Integrations::is_wpml() ) {\n\t\t\treturn [ $this->get_id() ];\n\t\t}\n\n\t\tglobal $sitepress;\n\n\t\t$ids = [];\n\n\t\t$translations = $sitepress->get_element_translations( $this->get_id(), 'post_post', false, true );\n\n\t\tif ( is_array( $translations ) ) {\n\t\t\tforeach ( $translations as $translation ) {\n\t\t\t\t$ids[] = $translation->element_id;\n\t\t\t}\n\t\t}\n\n\t\t$ids[] = $this->get_id(); // sometimes wpml doesn't return default language id?\n\n\t\treturn Clean::ids( $ids );\n\t}",
"protected function _doc_ids($el, $force_array=true) {\n if($el instanceof self) $el = $el->ids;\n if($force_array) {\n if(is_int($el)) $el = array($el=>$this->doc()->ids[$el]);\n if(!is_array($el)) throw new Exception(__CLASS__ . '->' . __FUNCTION__ . ': not Array!');\n }\n return $el;\n }",
"public static function getGalleriesForDropdown()\n {\n return (array) BackendModel::getContainer()->get('database')->getPairs(\n 'SELECT i.id, i.title\n FROM slideshow_galleries AS i\n WHERE i.language = ?\n ORDER BY i.sequence ASC',\n array(BL::getWorkingLanguage())\n );\n }",
"function getSectionsIdOption() {\r\n\t\t$database = JFactory::getDBO();\r\n\r\n\t\t$sectoptions = array();\r\n\t\t$query = \"SELECT id, title\"\r\n\t\t\t\t. \"\\n FROM \" . $database->nameQuote($this->componentSectionTable)\r\n\t\t\t\t. \"\\n WHERE published = 1\"\r\n//\t\t\t\t. \"\\n AND access >= 0\"\r\n\t\t\t\t. \"\\n ORDER BY ordering\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$sectoptions = $database->loadObjectList();\r\n\r\n\t\treturn $sectoptions;\r\n\t}",
"function lang_object_ids($ids_array, $type) {\n if(function_exists('icl_object_id')) {\n $res = array();\n foreach ($ids_array as $id) {\n $xlat = icl_object_id($id,$type,false);\n if(!is_null($xlat)) $res[] = $xlat;\n }\n return $res;\n } else {\n return $ids_array;\n }\n}",
"public function getPageIds() {\r\n return array_keys($this->pageConfig);\r\n }",
"private function _extractUserIds(): array {\n $userIds = [];\n\n $queryUserIds = 'SELECT userSettings.id, userSettings.mineVisibilityWorldMap FROM `userOverview` LEFT JOIN `userSettings` ON userOverview.id = userSettings.id WHERE userSettings.mineVisibilityWorldMap = 1';\n $getUserIds = $this->_conn->query($queryUserIds);\n\n if($getUserIds->num_rows > 0) {\n while($id = $getUserIds->fetch_assoc()) {\n $userIds[] = $id['id'];\n }\n }\n\n return $userIds;\n }",
"private function selectChildListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tlist_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND parent_list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"function getXRefNotesForPublication($pub_id) {\r\n $CI = &get_instance();\r\n $result = array();\r\n $Q = $CI->db->get_where('notecrossrefid', array('xref_id' => $pub_id));\r\n foreach ($Q->result() as $row) {\r\n $next =$this->getByID($row->note_id);\r\n if ($next != null) {\r\n $result[] = $next;\r\n }\r\n }\r\n return $result;\r\n }",
"public function getObjectIds();",
"public function prepareStoreIds()\n {\n $storeIds = $this->cmsObject->getStoreId();\n //Fix for import wth Overdose_CMSContent\n if (null === $storeIds) {\n $storeIds = $this->cmsObject->getStores();\n }\n\n $storeIds = (array)$storeIds;\n if (empty($storeIds) || in_array(0, $storeIds)) {\n $storeIds = [0];\n }\n\n return $storeIds;\n }",
"function get_tags_ids()\n{\n $tmp_tags = array();\n $tags = get_tags();\n foreach ($tags as $tag) {\n array_push($tmp_tags, $tag['id']);\n }\n $tags = $tmp_tags;\n\n return $tags;\n}",
"private function getWarehouseIds(): array\n {\n return [1,2];\n }",
"function getPageBanners($id) {\n $this->db->select(\"*\");\n $this->db->where(\"pageID\", $id);\n $this->db->order_by(\"slideOrder ASC\");\n \t$query = $this->db->get('banner');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }",
"public function getItemIds(){\n\t return $this->getIds();\n\t}",
"function get_featured_slider() {\n $sql = \"SELECT * FROM slider WHERE publish='1'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }",
"private function extractPostIds()\n {\n $postIds = [];\n $documentType = $this->getConfig()->getDocumentType();\n\n if ($this->searchResult !== null && isset($this->searchResult['records'][$documentType])) {\n foreach ($this->searchResult['records'][$documentType] as $hit) {\n $postIds[] = (int) $hit['external_id'];\n }\n }\n\n if (empty($postIds)) {\n $postIds = [0];\n }\n\n return $postIds;\n }",
"public function getItemIds()\n {\n $this->loadItems();\n $items = [];\n foreach ($this->items as $item) {\n $items[] = $item->getId();\n }\n return $items;\n }",
"public function get_content_item_ids() {\n\t\t$items = $this->get_content_items();\n\t\tif ( empty( $items ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Map the IDs.\n\t\treturn array_map(\n\t\t\tfunction( $item ) {\n\t\t\t\treturn $item->get_data( 'post_id' );\n\t\t\t},\n\t\t\t$items\n\t\t);\n\t}",
"public function mapIds($results)\n {\n return collect($results->getDocuments())->pluck('id')->values();\n }",
"public function getEpisodeIds(){\n $result = array();\n $progam = null;\n $con = $this->mysqli->prepare(\n \"SELECT EpNum FROM episode where programName=? and callsign=?\");\n $con->bind_param('ss',$this->name,$this->callsign);\n $con->bind_result($progam);\n if($con->execute()){\n while($con->fetch()){\n array_push($result, $progam);\n }\n return $result;\n }\n else{return false;}\n }",
"public function getStoreIds();",
"public function read_sections_ids() {\n\n\t\t// Get course's sections id data from cache\n\t\t$ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $ids ) {\n\t\t\tglobal $wpdb;\n\t\t\t// get sections id\n\t\t\t$ids = $wpdb->get_col( $wpdb->prepare( \"SELECT section_id FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\t\t// Set cache\n\t\t\tLP_Object_Cache::set( 'course-' . $this->course_id, $ids, 'learn-press/course-sections-ids' );\n\t\t}\n\n\t\treturn $ids;\n\t}",
"private function getNextPrevIds() {\n $arrReturn = array();\n\n //Load all images on the current level\n $objCur = class_objectfactory::getInstance()->getObject($this->getSystemid());\n $arrImagesLevel = class_module_mediamanager_file::loadFilesDB($objCur->getPrevId(), class_module_mediamanager_file::$INT_TYPE_FILE, true);\n //Sort out the unallowed ones\n foreach($arrImagesLevel as $intKey => $objOneImage) {\n if(!$objOneImage->rightView())\n unset($arrImagesLevel[$intKey]);\n }\n\n //make array-keys numeric\n /** @var $arrImagesLevel class_module_mediamanager_file[] */\n $arrImagesLevel = array_values($arrImagesLevel);\n //Search the current image\n $intKeyHit = 0;\n foreach ($arrImagesLevel as $intKeyHit => $objOneImage) {\n if($objOneImage->getSystemid() == $this->getSystemid()) {\n break;\n }\n }\n\n $arrReturn[\"forward_1\"] = (isset($arrImagesLevel[$intKeyHit+1]) ? $arrImagesLevel[$intKeyHit+1]->getSystemid() : \"\");\n $arrReturn[\"forward_2\"] = (isset($arrImagesLevel[$intKeyHit+2]) ? $arrImagesLevel[$intKeyHit+2]->getSystemid() : \"\");\n $arrReturn[\"forward_3\"] = (isset($arrImagesLevel[$intKeyHit+3]) ? $arrImagesLevel[$intKeyHit+3]->getSystemid() : \"\");;\n\n $arrReturn[\"backward_1\"] = (isset($arrImagesLevel[$intKeyHit-1]) ? $arrImagesLevel[$intKeyHit-1]->getSystemid() : \"\");;\n $arrReturn[\"backward_2\"] = (isset($arrImagesLevel[$intKeyHit-2]) ? $arrImagesLevel[$intKeyHit-2]->getSystemid() : \"\");;\n $arrReturn[\"backward_3\"] = (isset($arrImagesLevel[$intKeyHit-3]) ? $arrImagesLevel[$intKeyHit-3]->getSystemid() : \"\");;\n\n return $arrReturn;\n }",
"public static function getIds($contents)\n { \n $return = [];\n foreach ($contents as $value) \n {\n $return[] = $value->id;\n }\n return $return;\n }",
"function the1slider_fetch_slider($id){\n\t\t\n\t\t# check if this is a Themes1_Slider post\n\t\tif ( get_post_type($id) !== 'the1_slider' ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t# get slides from post\n\t\t$slides = get_post_meta($id,'slides',true);\n\t\t\n\t\t# if no slides available, stop the function\n\t\tif ( !is_array($slides) || empty($slides) ) return false;\n\t\t\n\t\t# get slider settings. If any option not set, default will be used\n\t\t$settings_defaults = array(\n\t\t\t'width' \t\t=> '',\n\t\t\t'height'\t\t=> '',\n\t\t\t'overlayer-use'\t=> '',\n\t\t\t'fx'\t\t\t=> '',\n\t\t\t'autoplay'\t\t=> '',\n\t\t\t'autoplay_delay'=> '',\n\t\t\t'arrows'\t\t=> '',\n\t\t\t'bottom_bar'\t=> '',\n\t\t\t'thumb_width'\t=> '',\n\t\t\t'thumb_height'\t=> '',\n\t\t\t'tabs_color'\t=> '',\n\t\t);\n\t\t$settings = get_post_meta($id,'settings',true);\n\t\t$settings = ( is_array($settings) ? array_merge($settings_defaults,$settings) : $settings_defaults );\n\t\t\n\t\t# merge $slides and $settings in a single array\n\t\t$slider = array(\n\t\t\t'settings' \t=> $settings,\n\t\t\t'slides' \t=> $slides,\n\t\t);\n\t\t\n\t\t# return $slider\n\t\treturn $slider;\n\t\t\n\t}"
] | [
"0.7091818",
"0.65734255",
"0.6500556",
"0.64915705",
"0.64915705",
"0.63222426",
"0.6232934",
"0.62046564",
"0.61948305",
"0.61872244",
"0.61867285",
"0.6130438",
"0.6108768",
"0.6080826",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.6052439",
"0.60276335",
"0.6027504",
"0.6020588",
"0.5992224",
"0.5968076",
"0.5936595",
"0.5923755",
"0.59206676",
"0.5916926",
"0.5913416",
"0.5891272",
"0.58899546",
"0.58866674",
"0.58831674",
"0.5878555",
"0.5876676",
"0.58757794",
"0.58728665",
"0.5864399",
"0.5837758",
"0.583533",
"0.5831069",
"0.5829269",
"0.5820592",
"0.581326",
"0.5809605",
"0.58007526",
"0.57991797",
"0.5796381",
"0.5774438",
"0.5769146",
"0.5769146",
"0.57656246",
"0.5748139",
"0.5741292",
"0.5739156",
"0.57238966",
"0.57207423",
"0.57139283",
"0.5700636",
"0.5673414",
"0.56475914",
"0.5646492",
"0.56421983",
"0.5628801",
"0.5623462",
"0.55928254",
"0.5582198",
"0.5571261",
"0.55712265",
"0.55605114",
"0.55547506",
"0.55459714",
"0.5545741",
"0.5538235",
"0.5537991",
"0.55255467",
"0.5521948",
"0.55206287",
"0.5504132",
"0.5498133",
"0.54968554",
"0.5490532",
"0.5490383",
"0.5471644",
"0.547139",
"0.5470885",
"0.5465765",
"0.54613096",
"0.5452707",
"0.545155",
"0.54407287",
"0.5438175",
"0.5422932",
"0.54190856",
"0.5417406",
"0.5410834",
"0.54086345",
"0.5408264"
] | 0.0 | -1 |
Template Name: WPCampus 2018: Watch | function wpc_2018_enable_watch_videos() {
if ( function_exists( 'wpcampus_network_enable' ) ) {
wpcampus_network_enable( 'videos' );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caption() {\n\t\treturn \"watches\";\n\t}",
"function wp_print_community_events_templates()\n {\n }",
"public function mvr_ctr_basic_admin_template(): string {\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_elementor_template( 28653 );\n\t\t}\n\t}",
"function dw_quick_view() {\r\n\twc_get_template( 'dwqv-modal.php', array(), '', DWQV_DIR . 'templates/' );\r\n}",
"function livepress_template( $auto = false, $seconds_since_last = 0 ) {\n\tglobal $post;\n\n\t$is_live = LivePress_Updater::instance()->blogging_tools->get_post_live_status( $post->ID );\n\t$pin_header = LivePress_Updater::instance()->blogging_tools->is_post_header_enabled( $post->ID );\n\n\t$lp_status = $is_live ? 'lp-on' : 'lp-off';\n\t$pin_class = $pin_header ? 'livepress-pinned-header' : '';\n\t// Don't show the LivePress bar on front end if the post isn't live or LivePress disabled\n\tif ( ! $is_live || ! LivePress_Updater::instance()->has_livepress_enabled() )\n\t\treturn;\n\n\t$live = esc_html__( 'LIVE', 'livepress' );\n\t$about = wp_kses_post( __( 'Receive live updates to<br />this and other posts on<br />this site.', 'livepress' ) );\n\t$notifications = esc_html__( 'Notifications', 'livepress' );\n\t$updates = esc_html__( 'Live Updates', 'livepress' );\n\t$powered_by = wp_kses_post ( __( 'powered by <a href=\"http://livepress.com\">LivePress</a>', 'livepress' ) );\n\t$date = new DateTime();\n\t$interval_string = 'P0Y0M0DT0H' . floor( $seconds_since_last / 60 ) .'M' . $seconds_since_last % 60 . 'S';\n\n\t// Generate an ISO-8601 formatted timestamp for timeago.js\n\t$date->sub( new DateInterval( $interval_string ) );\n\t$date8601 = $date->format('c');\n\n\tstatic $called = 0;\n\tif ( $called++ ) return;\n\t$htmlTemplate = <<<HTML\n\t\t<div id=\"livepress\">\n\t\t\t<div class=\"lp-bar\">\n\t\t\t\t<div class=\"lp-status $lp_status $pin_class \"><span class=\"status-title\">$live</span></div>\n\t\t\t\t<div class=\"lp-updated\">\n\t\t\t\t\t<span class=\"lp-updated-counter\" data-min=\"$seconds_since_last\">\n\t\t\t\t\t\t<abbr class=\"livepress-timestamp\" title=\"$date8601\"></abbr>\n\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t<div class=\"lp-settings-button\"></div>\n\t\t\t\t<div id=\"lp-settings\">\n\t\t\t\t\t<div class=\"lp-settings-short\">\n\t\t\t\t\t\t<div class=\"lp-about\">\n\t\t\t\t\t\t\t$about\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"lp-setting-sound\" name=\"lp-setting-sound\" checked=\"checked\" />\n\t\t\t\t\t\t\t\t<label for=\"lp-setting-sound\">$notifications</label>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"lp-setting-updates\" name=\"lp-setting-updates\" checked=\"checked\" />\n\t\t\t\t\t\t\t\t<label for=\"lp-setting-updates\">$updates</label>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p class=\"powered-by\">$powered_by</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\nHTML;\n\n\n\t$image_url = LP_PLUGIN_URL . \"img/spin.gif\";\n\t$htmlTemplate = str_replace(\"SPIN_IMAGE\", $image_url, $htmlTemplate);\n\n\t$image_url = LP_PLUGIN_URL . \"img/lp-bar-logo.png\";\n\t$htmlTemplate = str_replace(\"LOGO_IMAGE\", $image_url, $htmlTemplate);\n\n\t$image_url = LP_PLUGIN_URL . \"img/lp-settings-close.gif\";\n\t$htmlTemplate = str_replace(\"CLOSE_SETTINGS_IMAGE\", $image_url, $htmlTemplate);\n\n\t$image_url = LP_PLUGIN_URL . \"img/lp-bar-cogwheel.png\";\n\t$htmlTemplate = str_replace(\"BAR_COG_IMAGE\", $image_url, $htmlTemplate);\n\n\t$lp_update = LivePress_Updater::instance();\n\t$htmlTemplate = str_replace(\"<!--UPDATES_NUM-->\",\n\t\t\t$lp_update->current_post_updates_count(), $htmlTemplate);\n\n\tif($auto)\n\t\t$htmlTemplate = str_replace('id=\"livepress\"', 'id=\"livepress\" class=\"auto\"', $htmlTemplate);\n\n\tif (LivePress_Updater::instance()->is_comments_enabled()) {\n\t\t$htmlTemplate = str_replace(array( \"<!--COMMENTS-->\", \"<!--/COMMENTS-->\" ), \"\", $htmlTemplate );\n\t\t$htmlTemplate = str_replace(\"<!--COMMENTS_NUM-->\",\n\t\t\t\t$lp_update->current_post_comments_count(), $htmlTemplate);\n\t} else {\n\t\t$htmlTemplate = preg_replace(\"#<!--COMMENTS-->.*?<!--/COMMENTS-->#s\", \"\", $htmlTemplate);\n\t}\n\n\tif ($auto) {\n\t\treturn $htmlTemplate;\n\t} else {\n\t\techo wp_kses_post( $htmlTemplate );\n\t}\n}",
"function wp_theme_auto_update_setting_template()\n {\n }",
"public function testUpdateChallengeActivityTemplate()\n {\n }",
"public function getTemplateName()\n {\n }",
"public function playground( )\n {\n\n $request = $this->getRequest();\n\n $template = $request->paramExists('template')?\n $request->param('template',Validator::CNAME)\n :'def';\n\n $this->view->setTitle('Welcome to Webfrap');\n $this->view->setTemplate( 'playground/'.$template );\n\n }",
"public function locatedTemplate() {\r\n wp_enqueue_script(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'index.js',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n\r\n foogallery_enqueue_style(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n }",
"function livepress_dashboard_template() {\n\techo '<div id=\"lp-switch-panel\" class=\"editor-hidden\">';\n\techo '<a id=\"live-switcher\" class=\"off preview button-secondary disconnected\" style=\"display: none\" title=\"' .\n\t\t\tesc_html__('Show or Hide the Real-Time Editor', 'livepress' ) .'\">' .\n\t\t\tesc_html__( 'Show', 'livepress' ) .\n\t\t'</a>';\n\techo '<h3>' .\n\t\t\tesc_html__( 'Real-Time Editor', 'livepress' ) .\n\t\t'</h3>';\n\techo '<span class=\"warning\">' .\n\t\t\tesc_html__( 'Click \"Show\" to activate the Real-Time Editor and streamline your liveblogging workflow.', 'livepress' ) .\n\t\t'</span>';\n\techo '</div>';\n}",
"protected function setupTemplate() {\r\n \r\n }",
"public function getTemplate() {}",
"public function getTemplateName(): string;",
"function wp_underscore_video_template()\n {\n }",
"public function testUpdateChallengeTemplate()\n {\n }",
"function bwrt_site_new_message() {\n $templates = bwrt_get_default_pages();\n\n ?>\n <h3>BWR Club Templates</h3>\n <p>This new club site will include <b><?php echo count($templates) ?></b> template page(s).\n To change the club site templates, toggle <em>BWR Template Page</em> in the page editor.</p>\n <?php\n}",
"function _preview_theme_template_filter()\n {\n }",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"function get_template()\n {\n }",
"function wp_print_revision_templates()\n {\n }",
"public function slcr_core_vc_set_template() { \n \n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-team-member.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-team-members-item.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-testimonial.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-testimonials-item.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-box.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-carousel.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-icon-boxes.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-icon-text.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-price-list.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-price-list-item.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-pricing-table.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-counter.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-image-hotspot.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-hotspot.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-image-comparison.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-progress-bars.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-insta-feed.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-typed-text.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-text-links.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-dropcap.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-alert.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-notifications.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-radial.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-text-reveal.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-video-modals.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-accordion-data.php' ); \n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-blog-grid.php' ); \n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-google-map.php' );\n include_once( SLCR_CORE_VC_ELEMENT_DIR.'slcr-core-service-box.php' );\n \n }",
"public function staff_lobby_sales_landing_template(): string {\n\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_elementor_template( 22921 );\n\t\t}\n\t}",
"public function template_path() {\n\t\t\treturn apply_filters( 'wd_template_path', 'wolf-discography/' );\n\t\t}",
"function khLess_shortcodes_init()\n{\n function khLess_shortcode($atts = [], $content = null)\n {\n get_template_part('template', 'schedule');\n }\n\n add_shortcode('khLess', 'khLess_shortcode');\n}",
"public function testCreateChallengeActivityTemplate()\n {\n }",
"public function get_template()\n {\n }",
"public function get_template()\n {\n }",
"function getTemplate();",
"public function eventSchedule()\n {\n $speakerName = array(\n \"daniela-pitta\"\n ,\"helena-saminez\"\n ,\"galvao-abbott\"\n ,\"bruno-porkaria\"\n ,\"atmos-maciel\"\n ,\"evaldo-barbosa\"\n ,\"fabio-soares\"\n ,\"nanderson-castro\"\n ,\"ricardo-coelho\"\n ,\"willian-mano\"\n ,\"romulo-martins\"\n ,\"alisson-gomes\"\n ,\"henrique-monteiro\"\n ,\"paulo-coelho\"\n );\n\n return $this->app['twig']->render('/when/when.twig',\n [\n 'link_when' => 'quando'\n ,'link_who' => '/quem'\n ,'speakerName' => $speakerName\n ]\n );\n }",
"public function print_template()\n {\n }",
"public function print_template()\n {\n }",
"public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }",
"public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }",
"function sunrise_theme_create_page()\n {\n require_once(get_template_directory().'/inc/templates/sunrise-admin.php');\n }",
"function wpc_2018_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2018',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}",
"public function template();",
"public function new_watch() {\r\n\t\t$this->event->add(ADD_WATCH_LOAD);\r\n\r\n\t\t$this->_headerData['headerClass'] = 'blue';\r\n\r\n\t\tarray_push($this->_headerData['javaScripts'],\r\n\t\t\t\"jquery.easy-autocomplete.min\", \"watch.autocomplete\");\r\n\r\n\t\tarray_push($this->_headerData['styleSheets'],\r\n\t\t\t\"easy-autocomplete.min\",\r\n\t\t\t\"easy-autocomplete.themes.min\"\r\n\t\t);\r\n\r\n\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t$this->load->view('measure/new-watch', $this->_bodyData);\r\n\r\n\t\t$this->load->view('footer');\r\n\t}",
"function get_template_name( $instance ) {\n return 'yc-headline';\n }",
"public function mvr_ump_wcfm_upgrade_template() {\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_elementor_template( 29585 );\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function template() { ?>\n\n\t\t<div class=\"widefat\">\n\n\t\t\t<div class=\"welcome-panel\">\n\n\t\t\t\t<div class=\"welcome-panel-content\">\n\n\t\t\t\t\t<h2>\n\t\t\t\t\t\t<?php esc_html_e( 'Donate Toward Future Development', 'user_roles' ); ?>\n\t\t\t\t\t</h2>\n\n\t\t\t\t\t<p class=\"about-description\">\n\t\t\t\t\t\t<?php esc_html_e( 'The user_roles plugin needs funding to cover development costs toward version 3.0.', 'user_roles' ); ?>\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<p class=\"user_roles-short-p\">\n\t\t\t\t\t\t<?php esc_html_e( \"user_roles itself will always remain free as long as I'm able to work on it. However, it is easily my largest and most complex plugin. A major update takes 100s of hours of development. If every user would donate just $1, it would fund fulltime development of this plugin for at least 3 years. Of course, it's not a reality that everyone is able donate. Pitching in any amount will help.\", 'user_roles' ); ?>\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<a target=\"_blank\" class=\"button button-primary button-hero\" href=\"<?php echo esc_url( 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E9D2YGZFM8QT4&source=url' ); ?>\"><?php esc_html_e( 'Donate Via PayPal', 'user_roles' ); ?></a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<a target=\"_blank\" href=\"https://Bestwebsite.com/#donate\"><?php esc_html_e( 'Learn More', 'user_roles' ); ?></a>\n\t\t\t\t\t</p>\n\n\t\t\t\t</div><!-- .plugin-card-top -->\n\n\t\t\t</div><!-- .plugin-card -->\n\n\t\t</div>\n\n\t<?php }",
"public function initTemplate() {}",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }",
"public function timeWorkshop() {\n\t\t$pageTitle = 'Time Management Strategies Workshop';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/owsub-time.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"public function forTemplate() {\n\t\treturn; \n\t}",
"function wp_underscore_playlist_templates()\n {\n }",
"function wpc_2016_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2016',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}",
"function learn_press_single_quiz_timer() {\n\t\tlearn_press_get_template( 'content-quiz/timer.php' );\n\t}",
"function templates()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['templates'] == 1 ) ? 'Skin Template' : 'Skin Templates';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t\n\t\tforeach ( $this->xml_array['templates_group']['template'] as $k => $v )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_delete( 'skin_templates', \"set_id=1 AND group_name='\".$v['group_name']['VALUE'].\"' AND func_name='\".$v['func_name']['VALUE'].\"'\" );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$this->_add_template( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['templates']} {$object} {$operation}....\" );\n\t}",
"function get_template_name($instance) {\n return 'template';\n }",
"function index(){\n\t\t$this->template->run();\n\t}",
"public function action_index()\n\t{\n\t\t$view = View::forge('tracker/watchable');\n\t\t$data = array(\n\t\t\t'page_title' => '動漫清單',\n\t\t\t'loggedin' => true,\n\t\t\t'user' => $this->getUserInfo(),\n\t\t);\n\t\t$view->set_global($data);\n\t\treturn $view;\n\t}",
"function template_manual()\n{\n\tglobal $context, $scripturl, $txt;\n\n\techo '<table width=\"100%\" height=\"50%\" bgcolor=\"#FFCC99\"><tr><td><b><center>', $context['viber_id'], '</center></b></td></tr></table>';\n}",
"public function output_widget_control_templates()\n {\n }",
"function app_template() {\n\t$template = <<<HTML\n\n\n\nHTML;\n\n $navigation = app_template_navigation();\n $dialogs = app_template_dialogs();\n\t$data['blocks'] = empty($navigation) ? array($dialogs) : array($dialogs, $navigation);\n\t$data['template'] = $template;\n\treturn $data;\n}",
"public function shortcode_template() {\n\t\treturn 'templates/shortcodes/projects.php';\n\t}",
"function speaker_bureau_theme_create_page() {\n require_once get_template_directory().'/inc/templates/speaker-bureau-admin.php';\n\n}",
"function qodef_re_marker_info_template() {\n\n $html = '<script type=\"text/template\" class=\"qodef-info-window-template\">\n\t\t\t\t<div class=\"qodef-info-window\">\n\t\t\t\t\t<div class=\"qodef-info-window-inner\">\n\t\t\t\t\t\t<a href=\"<%= itemUrl %>\"></a>\n\t\t\t\t\t\t<% if ( featuredImage ) { %>\n\t\t\t\t\t\t\t<div class=\"qodef-info-window-image\">\n\t\t\t\t\t\t\t\t<img src=\"<%= featuredImage[0] %>\" alt=\"<%= title %>\" width=\"<%= featuredImage[1] %>\" height=\"<%= featuredImage[2] %>\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<% } %>\n\t\t\t\t\t\t<div class=\"qodef-info-window-details\">\n\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t<%= title %>\n\t\t\t\t\t\t\t</h5>\n\t\t\t\t\t\t\t<p><%= address %></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</script>';\n\n print bridge_qode_get_module_part($html);\n\n }",
"public function render_vue_templates() {\n\t\t$this->current_page->render_vue_template( 'go-to-setup', 'common' );\n\t\t$this->current_page->render_vue_templates();\n\t}",
"function skcw_widget_descriptions() {\n\t$templates = get_option('skcw_templates_list');\n\tinclude(SKCW_DIR.'views/widget-page-view.php');\n}",
"function customize_themes_print_templates()\n {\n }",
"public function resourceWatchPath(): string\n {\n return \"/apis/{$this->getApiVersion()}/watch/namespaces/{$this->getNamespace()}/deployments/{$this->getIdentifier()}\";\n }",
"public function component()\n {\n return 'nova-timenow';\n }",
"public function run()\n {\n \tfor($itt = 1; $itt < 100; $itt++)\n \t{\n\t\t\tTemplate::create([\n\t\t\t\t'title'\t=>\t'Template '.$itt,\n\t\t\t\t'description'\t=>\t'Template '.$itt.' Description'\n\t\t\t]); \n \t}\n }",
"function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}",
"function show_template() {\n\tglobal $template;\n\tprint_r($template);\n}",
"function makeWeb()\n {\n\n $web = \"</div>No calendar information available.</div>\";\n if (isset($this->calendar->events)) {\n $web = \"\";\n foreach ($this->calendar->events as $event) {\n $timestamp = $this->textCalendar($event, [\"timestamp\"]);\n\n $web .=\n \"<div>\" .\n \"<div>\" .\n $this->thing->time_handler->textTime($timestamp) .\n \" \" .\n $event->summary .\n \" [\" .\n $event->runtime .\n \"] \" .\n \"</div><div>\" .\n $event->description .\n \"</div><div>\" .\n $event->location .\n \"</div></div>\";\n }\n }\n\n $this->thing_report[\"info\"] =\n \"Times are \" . $this->time_zone . \". Click refresh to update.\";\n\n $this->web = $web;\n $this->thing_report[\"web\"] = $this->web;\n }",
"public function index()\n {\n\n\t $template = storage_path('app/public/temp1.docx');\n\n \tif(file_exists($template)){\n \t\t$templateProcessor = new TemplateProcessor($template);\n\n $testData = array(\n array('List'=>'list 1'),\n array('List'=>'list 2'),\n array('List'=>'List 3')\n );\n\n\n\n // \t\t$testData = array(\n\t\t\t// array('Name'=>'Test Name 1', 'Value'=>123.45),\n\t\t\t// array('Name'=>'Test Name 2', 'Value'=>223.45),\n\t\t\t// array('Name'=>'Test Name 3', 'Value'=>323.45),\n\t\t\t// array('Name'=>'Test Name End', 'Value'=>423.45),\n\t\t\t// );\n\n // \t\t$t=$templateProcessor->cloneBlock('CLONEME', 3,true,true,$testData);\n\n // $t=$templateProcessor->cloneBlock('LI', 3,true,true,$testData);\n // $php = new PhpWord();\n \t\t// dd($t);\n \n $templateProcessor->setValue('Name','John Doe');\n \t\t$file=$templateProcessor->saveAs(public_path('w/h.docx'));\n dd($file);\n\n \t}\n \n\n \t\n }",
"public function getInspectTemplateName()\n {\n return $this->inspect_template_name;\n }",
"public function name($watch) {\r\n $name = h($watch['Watch']['name']);\r\n\r\n if ($watch['Watch']['order_id']) {\r\n $name .= '<span class=\"sold-watch\"> - sold</span>';\r\n }\r\n\r\n return $name;\r\n }",
"function ggAssingBookingTemplate(){\n $quote_page = get_page_by_path('thank-you');\n update_post_meta( $quote_page->ID, '_wp_page_template', 'booking-system-template.php' );\n}",
"protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }",
"function apoc_single_event() {\n\tinclude( THEME_DIR . '/library/templates/single-event.php' );\n}",
"public function testCreateChallengeTemplate()\n {\n }",
"public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### EVENT CALENDAR ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}",
"function tidyt_configured(){\n if( !defined('WP_TEMPLATE_DIRECTORY') )\n exit('<h1>WP_TEMPLATE_DIRECTORY was not defined.</h1> Add it to your wp-config.php file!');\n}",
"function CTemplate(){\n\t$this->vars = array();\n\t$this->template = array();\n\n\t$this->debug_mode = true;\n\tif (defined('PT_COMPRESSED_MODE') && PT_COMPRESSED_MODE) $this->compressed_mode = true;\n\telse $this->compressed_mode = false;\n\n\tif ($GLOBALS['app']->is_module('Registry'))\n\t\t$this->Registry = &$GLOBALS['app']->get_module('Registry');\n\t$this->system_vars = array('cycle_nesting' => -1, 'cycle_counters' => array());\n}",
"function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}",
"public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}",
"public function find_signed_in_template(): string {\n\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_elementor_template( 29134 );\n\t\t}\n\t}",
"public function index()\n\t{\n\t\t$cachePath = $this->templateCacheFilePath();\n\t\tif ( (!file_exists($cachePath)) || (filemtime($cachePath) < strtotime('-1 hour')) )\n\t\t{\n\t\t\t$this->generateTemplateCache();\n\t\t}\n\t\treturn $this->redirect($this->WordPressAbsoluteURL());\n\t}",
"public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('payroll_templates')->insert([\n [\n\n 'name' => 'Default',\n 'notes' => 'Default Payroll Template',\n 'picture' => 'default_payroll_template',\n ],\n\n ]);\n }",
"public function autoPublishWorkspaces() {}",
"public function autoPublishWorkspaces() {}",
"public final function print_template()\n {\n }",
"public function index() {\n\t $this->registry->template->show();\n\t}",
"function jes_theme_template_standart() {\r\nglobal $bp;\r\n/**************************************/\r\n/* Standart Template for Event Loop */\r\n/* */\r\n/* Base Template\t\t\t\t\t */\r\n/**************************************/\r\n?>\r\n<?php\r\n\t$jes_adata = get_site_option('jes_events' );\r\n\t$_eventstatus = eventstatus(jes_bp_get_event_edtsd(),jes_bp_get_event_edtsth(),jes_bp_get_event_edtstm(),jes_bp_get_event_edted(),jes_bp_get_event_edteth(),jes_bp_get_event_edtetm());\r\n?>\r\n<li>\r\n\t<div class=\"item-avatar\" id=\"jes-avatar\">\r\n\t\t<?php if ($jes_adata['jes_events_show_avatar_directory_size'] > 50 ) { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=full&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } else { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=thumb&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } ?>\r\n\t</div>\r\n\r\n\t<div class=\"item\" style=\"width:80%;\" id=\"jes-templ-item-<?php jes_bp_event_id() ?>\">\r\n\t\t<div class=\"item-title\" id=\"jes-title\"><a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_name() ?></a></div>\t\t\t\r\n\t\t\t<div class=\"item-meta\" id=\"jes-template-meta-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<em><?php echo $_eventstatus; ?></em> , <em><?php jes_bp_event_type() ?></em>\r\n\t\t\t\t<div class=\"item-desc\" id=\"jes-timedate-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<strong>Starts:</strong> <span class=\"meta\"><?php jes_bp_event_edtsd() ?>, \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t// JLL_MOD - conert military time to 12 hour\r\n\t\t\t\t$shour = jes_bp_get_event_edtsth();\r\n\t\t\t\tif ( $shour == '00' ) { \r\n\t\t\t\t\t$shour = '12';\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} elseif ( $shour > 12 ) { \r\n\t\t\t\t\t$shour = $shour - 12;\r\n\t\t\t\t\t$stime = ' pm';\r\n\t\t\t\t} elseif ( $shour < 10 ) { \r\n\t\t\t\t\t$shour = substr( $shour, -1 );\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t$ehour = jes_bp_get_event_edteth();\r\n\t\t\t\tif ( $ehour == '00' ) { \r\n\t\t\t\t\t$ehour = '12';\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} elseif ( $ehour > 12 ) { \r\n\t\t\t\t\t$ehour = $ehour - 12;\r\n\t\t\t\t\t$etime = ' pm';\r\n\t\t\t\t} elseif ( $ehour < 10 ) { \r\n\t\t\t\t\t$ehour = substr( $ehour, -1 );\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t?>\t\t\t\r\n\r\n\t\t\t\t\t<?php echo $shour; ?>:<?php jes_bp_event_edtstm() ?><?php echo $stime; ?></span>\r\n <?php if ( jes_bp_get_event_edtsd() == jes_bp_get_event_edted() && jes_bp_get_event_edtsth() == jes_bp_get_event_edteth() && jes_bp_get_event_edtstm() == jes_bp_get_event_edtetm() ) {} else { ?>\r\n <strong>Ends:</strong> <span><?php jes_bp_event_edted() ?>, <?php echo $ehour; ?>:<?php jes_bp_event_edtetm() ?><?php echo $etime; ?></span><?php }; ?>\r\n\t\t\t\t</div>\r\n\t\t\t<div class=\"item-desc\" id=\"jes-desc-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<span><strong>Where: </strong> <?php // JLL_MOD - removed ?><?php if ( jes_bp_event_is_visible() ) { ?><?php jes_bp_event_placedaddress() ?> <?php } ?></span><br />\r\n\t\t\t</div>\r\n\t\t<?php if ($jes_adata['jes_events_style'] == 'Standart') { ?>\r\n\t\t\t<?php // JLL_MOD - Removed text ?><?php jes_bp_event_description_excerpt() ?>\r\n\t\t<?php } else { ?>\r\n\t\t\t<?php jes_bp_event_description() ?>\r\n\t\t<?php } ?>\r\n\t\t\t</div>\t\t\t\t\r\n<?php do_action( 'bp_directory_events_item' ) ?>\r\n\t\t</div>\r\n\t\t<div class=\"action\" id=\"jes-button\">\r\n\t\t\t<?php \r\n\t\t\t\tif (!strpos($_eventstatus,__('Past event','jet-event-system')))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbp_event_join_button();\r\n\t\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t\t<div class=\"meta\" id=\"jes-approval-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<?php if ( $shiftcan ) \r\n\t\t\t\t\t\t\t{ ?>\r\n\t\t\t\t\t\t\t\t<span class=\"meta\"><em><?php _e('Event requires approval!','jet-event-system'); ?></em></span>\r\n\t\t\t\t\t<?php }\t?>\r\n\t\t\t\t\t<?php // JLL_MOD - removed event classification ?>\r\n\t\t\t\t\t<p><?php jes_bp_event_member_count() ?></p>\r\n\t\t\t\t\t<span class=\"activity\"><?php printf( __( 'Last activity:<br /> %s ago', 'jet-event-system' ), jes_bp_get_event_last_active() ) ?></span>\r\n\t\t\t\t</div>\r\n<?php do_action( 'bp_directory_events_actions' ) ?>\r\n\t\t\t</div>\r\n\t\t<div class=\"clear\"></div>\r\n</li>\r\n<?php\r\n// End Standart Template\r\n}",
"public function staff_lobby_get_credentials_template(): string {\n\n\t\tif ( Factory::get_instance( SiteDefaults::class )->is_mvr() ) {\n\t\t\treturn Factory::get_instance( VideoHelpers::class )->call_elementor_template( 22918 );\n\t\t}\n\t}",
"function casano_show_product_loop_new_flash() {\r\n\t\twc_get_template( 'loop/new-flash.php' );\r\n\t}",
"function create_blank_template_file() {\n\t$sourse = 'http://adepttechsolutions.com/lms_test/wp-content/plugins/tscore/admin/blank_tempp.php';\n\t\n\t$destination = get_template_directory_uri().'/blank_tempp.php';\n\tcopy($sourse, $destination);\t\n}",
"protected function getTemplate() :string\n {\n return \"cms::forms.customFields.wysiwyg\";\n }",
"public function get_custom_templates()\n {\n }"
] | [
"0.6049604",
"0.57118225",
"0.5580223",
"0.55565786",
"0.54781216",
"0.54729337",
"0.5429304",
"0.53471035",
"0.53406715",
"0.5319915",
"0.5316051",
"0.53141856",
"0.5276216",
"0.5275025",
"0.5272571",
"0.518251",
"0.51752186",
"0.51545906",
"0.5146451",
"0.5146451",
"0.5146451",
"0.5146451",
"0.5141554",
"0.51293594",
"0.5127741",
"0.51201355",
"0.50983196",
"0.50973976",
"0.5090194",
"0.5064525",
"0.5063446",
"0.5057492",
"0.50450665",
"0.504222",
"0.5040506",
"0.5037205",
"0.5037205",
"0.5026712",
"0.5012605",
"0.500369",
"0.5001326",
"0.49978694",
"0.49978554",
"0.4976828",
"0.4970531",
"0.49566507",
"0.49566507",
"0.49566507",
"0.49566507",
"0.49566507",
"0.49566507",
"0.49558568",
"0.49556896",
"0.49556488",
"0.4953966",
"0.49472302",
"0.49465862",
"0.49462438",
"0.4942229",
"0.49226126",
"0.49202174",
"0.49150395",
"0.49149173",
"0.49134216",
"0.49038517",
"0.49022162",
"0.49010235",
"0.4896583",
"0.48856324",
"0.48698747",
"0.48672226",
"0.4852491",
"0.48523265",
"0.483873",
"0.4835516",
"0.48302937",
"0.48256776",
"0.48145998",
"0.48099878",
"0.48097506",
"0.48059872",
"0.4804925",
"0.48012885",
"0.4796543",
"0.4791687",
"0.47881764",
"0.4785759",
"0.47855994",
"0.4781008",
"0.47725725",
"0.47668648",
"0.47664464",
"0.47664464",
"0.47659257",
"0.47650534",
"0.47604388",
"0.47517937",
"0.4750399",
"0.47429416",
"0.47360602",
"0.47321624"
] | 0.0 | -1 |
Prints watch videos page. | function wpc_2018_print_watch_videos_content( $content ) {
if ( function_exists( 'wpcampus_print_watch_videos' ) ) {
wpcampus_print_watch_videos( 'wpc-videos', array(
'playlist' => 'wpcampus-2018',
'show_event' => false,
'show_filters' => false,
));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wpc_2016_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2016',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}",
"public function Videos(){\n if(!isset($_SESSION[\"oturum\"])){\n header(\"location: \" . URL . \"login\" );\n }\n\n //Model Connections\n $movies = $this->model('Movie');\n $categories = $this->model('Categories');\n\n //Load data from model to views.\n $getVideos = $movies->getAllVideos();\n $getCategories = $categories->getAllCat();\n\n //Load views\n require VIEW_PATH . \"templates/header-yonetim.php\";\n require VIEW_PATH . \"videos/index.php\";\n require VIEW_PATH . \"templates/footer-yonetim.php\";\n }",
"public function watch () {\n\n\t\t$data_view = 'grid';\n\n\t\t// Grab an unknown number of arguments\n\t\t$args = func_get_args();\n\n\t\t// Grab the video ID from the arguments\n\t\t$video_id = array_pop($args);\n\n\t\t// Trash the slug and the \"watch\" segment\n\t\tarray_pop($args);\n\n\t\t// Tell the controller to skip the views within the index method\n\t\t$this->skip = true;\n\n\t\t// Call the index method because we don't want to duplicate code\n\t\tcall_user_func_array(array($this, 'index'), $args);\n\n\t\t// Get the specific video's details\n\t\t$this->data['video'] = $this->videos->get_by_id($video_id);\n\n\t\t$this->data['active_video_id'] = $video_id;\n\t\t$this->data['rating'] = null;\n\t\t$this->data['related-videos'] = null;\n\t\tif($this->data['video'] != null)\n\t\t{\n\t\t\t$this->data['active_video_id'] = $this->data['video']->id;\n\t\t\t// Get comments for video\n\t\t\t$this->data['comments'] = $this->comments->get($this->data['video']->id, 0, $this->config->item('comment-size'));\n\t\t\tif($this->data['comments'] != null) $this->data['comments_cnt'] = sizeof($this->data['comments']);\n\t\t\t// Get rating value\n\t\t\t$this->data['rating'] = $this->ratings->get($this->data['video']->id);\n\t\t\t// Get related videos\n\t\t\t$collection = $this->videos->get_related_videos($this->data['video']->id);\n\t\t\t$this->data['related_videos'] = $collection->videos;\n\t\t\t// set scroll pagination for related videos\n\t\t\t$this->data['scroll_links_related'] = $this->nav->get_scroll_bullets(sizeof($this->data['related_videos']), 'related videos');\n\t\t}\n\n\t\t// Append to the page title\n\t\t$this->data['title'] .= lang('title-separator') . $this->data['video']->name;\n\n\t\t// Create a search crumb\n\t\t$this->nav->make_breadcrumbs((object) array('uri' => 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'], 'name' => $this->data['video']->name));\n\n\t\t// Get the breadcrumbs created during the index lookup\n\t\t$this->data['breadcrumbs'] = $this->nav->make_breadcrumbs();\n\n\t\t// Set breadcrumb display\n\t\t$this->data['breadcrumb_display'] = $this->nav->breadcrumbs_display_text($this->data['breadcrumbs']);\n\n\t\t// If lineup id specificied, override data and grid with lineup view\n\t\tif(isset($this->data['lineup_data']))\n\t\t{\n\t\t\t$this->data['videos'] = $this->data['lineup_data'][0]->videos; \n\t\t\t$data_view = 'grid-lineups';\n\t\t\t// in case popular videos is empty, use videos from lineup playlist\n\t\t\tif($this->data['popular_videos'] == null || sizeof($this->data['popular_videos'])) {\n\t\t\t\t$this->data['popular_videos'] = $this->data['videos'];\n\t\t\t}\n\t\t}\n\n\t\t//$this->loadViews(array('player', 'grid','lineup','featuredproviders'), $this->data);\n\t\t$this->loadViews(array('video-details','sidebar-left',$data_view,'sidebar-right'), $this->data);\n\n\t}",
"public function indexAction() {\n\t if($this->settings['channel']) {\n\t $videos = $this->videoRepository->getUserUploads($this->settings['channel']); \n } else {\n $this->videoRepository->setQuery($this->settings);\n $queryUrl = $this->videoRepository->getQueryUrl(); \n\t\t $videos = $this->videoRepository->getVideos($query); \n\t\t $this->view->assign('query', $queryUrl);\n } \n\t\t$this->view->assign('videos', $videos);\n\t\tif($this->settings['singlePageOnListPage']) {\n\t\t $comments = $this->videoRepository->getComments($videos[0][vid]);\n\t\t $this->view->assign('comments', $comments);\n $this->response->addAdditionalHeaderData('\n <style>\n .tx-youtubeapi-video-list {\n \t\t\tfloat:left;\t\n \t\t\twidth:50%;\n \t\t\tpadding:0.5em;\n \t\t}\n \t\t\n \t\t.tx-youtubeapi-video-single {\n \t\t\tpadding:0.5em;\n \t\t}\n \t\t\n \t\t.tx-pagebrowse-pi1 {\n clear: both;\n }\n </style>');\n }\n \n\t\t$this->view->assign('settings', $this->settings);\n\t}",
"public function actionVideo()\n {\n $title = '微站设置/视频设置';\n //title of webpage,you can find title in /web/pub/top.php eg:wechat demo\n $keywords = 'wechat demo';\n //title of webpage,you can find title in /web/pub/top.php eg:''\n $description = '';\n return $this -> render('video',[\n 'title' => $title,//title of webpage,you can find title in the head of /web/pub/top.php\n 'keywords' => $keywords,//keywords of webpage,you can find keywords in the head of /web/pub/top.php\n 'description' => $description//description of webpage,you can find description in the head of /web/pub/top.php\n ]);\n }",
"public function view_videos($args)\n {\n $this->registry->template->Title = \"HiiFan News Portal :: Admin Home Page : View Videos\";\n $videoListArray = $this->registry->model->run(\"getAllVideoList\", $args);\n $this->registry->template->PresentPage = $args['start_page'];\n $this->registry->template->VideoListArray = $videoListArray;\n $this->registry->template->show(\"view_videos\");\n }",
"public function index()\n {\n $videos = $this->video->orderBy('id', 'desc')->paginate(10);\n\n $data = ['videos' => $videos, 'title' => $this->title];\n\n return view('admin.videos.index')->with($data);\n }",
"function wpc_2016_enable_watch_videos() {\n\tif ( function_exists( 'wpcampus_network_enable' ) ) {\n\t\twpcampus_network_enable( 'videos' );\n\t}\n}",
"public function index()\n {\n //\n session()->put('activeMenu', 'manageVideo');\n\n $videos = DB::table('videos')\n ->join('categories', 'videos.categoryID', '=', 'categories.categoryID')\n ->select('videos.videoID', 'videos.videoName', 'videos.videoDescription', 'videos.categoryID', 'categories.categoryName', 'videos.created_at', 'videos.updated_at')\n ->paginate(10);\n\n return view('video.videos', compact('videos'));\n }",
"public function index()\n {\n return view('mediamanagement::Frontend.Video.index')\n ->withVideos($this->video->getActive())\n ->withSeo($this->seo->findByField('page', 'video'));\n }",
"function wpc_2018_enable_watch_videos() {\n\tif ( function_exists( 'wpcampus_network_enable' ) ) {\n\t\twpcampus_network_enable( 'videos' );\n\t}\n}",
"function video() {\n echo json_encode(array('element' => '<video controls autoplay> <source src=\"skysignagelight.1564484463.mp4\" type=\"video/mp4\"></video>'));\n exit;\n }",
"public function index()\n {\n $videos = Video::paginate(15);\n\n return view('admin.videos.index', compact('videos'));\n }",
"public function video(){\n\t\t$data=array();\n\t\t$this->load->view('administrador/admin_video',$data);\n\t}",
"public function index()\n {\n $videos = Video::latest()->paginate(20);\n return view('videos.index', compact('videos'))->with('1', (request()->input('page', 1) - 1) * 20);\n }",
"public function index()\n {\n $videos = Videos::paginate();\n\n return view('admin.videos.index', compact('videos'));\n }",
"public function index()\n {\n $cat = Video::all();\n return view('admin.video.index', compact('cat'));\n }",
"public function index()\n {\n $title = 'Video Management';\n\n $video = Video::all();\n\n return view('video::index', ['videos' => $video])->withTitle($title);\n }",
"public function getIndex()\n {\n // Title\n $title = Lang::get('admin/videos/title.video_management');\n\n // Grab all the videos\n $videos = $this->video;\n\n // Show the page\n return View::make('admin/videos/index', compact('videos', 'title'));\n }",
"public function index()\n {\n \treturn view('panel.video.index');\n }",
"public function index()\n {\n $video = Video::all();\n return view('admin.videos.index', compact('video'));\n }",
"protected function getVideo()\n {\n $names = $this->generateVideoName();\n $command = implode(' ', [\n $this->getVideoServiceConfig('video_app'),\n '-i ' . $this->getVideoServiceConfig('video_source'),\n '-c copy',\n '-f mp4',\n '-t ' . $this->getVideoServiceConfig('video_length'),\n $names['file'],\n '1> ' . $names['log'],\n '2>&1',\n ]);\n\n if (0 === stripos(PHP_OS, 'WIN')) {\n pclose(popen('start /B ' . $command, 'r'));\n } else {\n pclose(popen($command . ' &', 'r'));\n }\n\n $this->createNewRecording($names['file']);\n if ($this->checkLog($names['log'])) {\n $this->getVideo();\n }\n }",
"public function index()\n {\n $videos=auth()->user()->videos->sortByDesc('created_at');\n $title='last uploaded videos';\n\n return view('videos.my-videos',compact('videos','title'));\n }",
"function pavi_the_display_video($args = array()){\n echo pavi_get_display_video($args);\n}",
"public function index()\n\t{\n\t\techo \"Call the combine method to concatenate your videos.\";\n\t}",
"public function index()\n {\n $videos = Video::all();\n\n return view('admin.videos.index', compact('videos'));\n }",
"public function index()\n {\n $videos = Video::all();\n return view('admin.videos.index', compact('videos'));\n }",
"public function index()\n {\n $videos = Video::orderBy('id','DESC')->get();\n \n return view('admin.video.index',compact('videos'));\n }",
"public function render()\n {\n return view('components.video');\n }",
"public function getVideos()\n {\n echo \"11\";\n }",
"function grve_print_portfolio_video( $video_mode = '' ) {\n\n\t$video_webm = grve_post_meta( 'grve_portfolio_video_webm' );\n\t$video_mp4 = grve_post_meta( 'grve_portfolio_video_mp4' );\n\t$video_ogv = grve_post_meta( 'grve_portfolio_video_ogv' );\n\t$video_embed = grve_post_meta( 'grve_portfolio_video_embed' );\n\n\tgrve_print_media_video( $video_mode, $video_webm, $video_mp4, $video_ogv, $video_embed );\n}",
"public function mostrarVideoVistaController()\n {\n //llamando al modelo\n $respuesta = @GestorVideosModel::mostrarVideoVistaModel(\"videos\");\n\n foreach ($respuesta as $dato) {\n echo '<li id=\"' . $dato['id'] . '\" ruta=\"' . $dato['ruta'] . '\" class=\"bloqueVideo\">\n <span class=\"fa fa-times eliminarVideo\"></span>\n <video controls class=\"handleVideo\">\n <source src=\"' . substr($dato['ruta'], 6) . '\" type=\"video/mp4\">\n </video>\n </li>';\n }\n\n }",
"function printVideo($photo_id, $secret){\n\n\t\t$video = $this->getPhotoSizes($photo_id);\n\t\t$output = '<object style=\"max-width: 100% important;\" type=\"application/x-shockwave-flash\" width=\"'.$video->sizes->size[9]->width.'\" height=\"'.$video->sizes->size[9]->height.'\" data=\"'.$video->sizes->size[9]->source.'\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">';\n\t\t$output .= '<param name=\"flashvars\" value=\"intl_lang=en-us&photo_secret='.$secret.'&photo_id='.$photo_id.'&flickr_show_info_box=false\"></param>';\n\t\t$output .= '<param name=\"movie\" value=\"'.$video->sizes->size[9]->source.'\"></param>';\n\t\t$output .= '<param name=\"bgcolor\" value=\"#000000\"></param>';\n\t\t$output .= '<param name=\"allowFullScreen\" value=\"true\"></param>';\n\t\t$output .= '<embed type=\"application/x-shockwave-flash\" src=\"'.$video->sizes->size[9]->source.'\" bgcolor=\"#000000\" allowfullscreen=\"true\" flashvars=\"intl_lang=en-use&photo_secret='.$secret.'&photo_id='.$photo_id.'&flickr_show_info_box=false\" height=\"'.$video->sizes->size[9]->height.'\" width=\"'.$video->sizes->size[9]->width.'\"></embed>';\n\t\t$output .= '</object>';\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}",
"public function actionVideo()\n {\n\n $arrParams = Yii::$app->request->queryParams;\n $arrParams['ArticleSearch']['category_id'] = Article::CAT_VIDEO;\n $searchModel = new ArticleSearch();\n $dataProvider = $searchModel->search($arrParams);\n $dataProvider->sort = [\n 'defaultOrder'=>['published_at'=>SORT_DESC]\n ];\n\n return $this->render('index_video', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ]);\n }",
"public function index()\n {\n //\n $videos = Video::all();\n return view('video.list', ['videos' => $videos]);\n }",
"public function show(Video $video)\n {\n //\n }",
"public function show(Video $video)\n {\n //\n }",
"public function show(Video $video)\n {\n //\n }",
"public function show(Video $video)\n {\n //\n }",
"public function index()\n {\n $videos = Video::orderBy('id','desc')->get();\n return view('admin.videos.index', compact('videos'));\n }",
"public function actionIndex()\n {\n $searchModel = new VideoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"function grve_print_media_video( $video_mode, $video_webm, $video_mp4, $video_ogv, $video_embed ) {\n\tglobal $wp_embed;\n\t$video_output = '';\n\n\tif( empty( $video_mode ) && !empty( $video_embed ) ) {\n\t\t$video_output .= '<div class=\"grve-media\">';\n\t\t$video_output .= $wp_embed->run_shortcode( '[embed]' . $video_embed . '[/embed]' );\n\t\t$video_output .= '</div>';\n\t} else {\n\n\t\tif ( !empty( $video_webm ) || !empty( $video_mp4 ) || !empty( $video_ogv ) ) {\n\t\t\t$video_output .= '<div class=\"grve-media\">';\n\t\t\t$video_output .= ' <video controls>';\n\n\t\t\tif ( !empty( $video_webm ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_webm . '\" type=\"video/webm\">';\n\t\t\t}\n\t\t\tif ( !empty( $video_mp4 ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_mp4 . '\" type=\"video/mp4\">';\n\t\t\t}\n\t\t\tif ( !empty( $video_ogv ) ) {\n\t\t\t\t$video_output .= '<source src=\"' . $video_ogv . '\" type=\"video/ogg\">';\n\t\t\t}\n\t\t\t$video_output .=' </video>';\n\t\t\t$video_output .= '</div>';\n\n\t\t}\n\t}\n\n\techo $video_output;\n\n}",
"public function index()\n \t{\n \t\t$videos=Video::orderBy('listing_order','desc')\n ->orderBy('updated_at','desc')->get();\n\n \t\treturn view('admin.video.manage',compact('videos'));\n \t}",
"public function index()\n {\n $videos = Video::OrderBy('id','desc')->get();\n return view('Admin.Videos.index')\n ->with('videos',$videos);\n }",
"public function PaginacionVideos()\n\t{\n\t\t$items_per_page = Input::get('can');\n\t\t$ordenar_items = Input::get('orde');\n\t\t$forma_orden = Input::get('por');\n\t\t$campos = array('id', 'title', 'videourl','rate','times_viewed','thumburl');\n $config = ConfigApp::First()->get();\n \n $items = Video::where('published', '=', 1)->where('memberid', '=', $config[0][\"UserJoomla\"])->where('filepath', '!=', 'File')->orderBy($ordenar_items, $forma_orden)->select($campos)->paginate($items_per_page);\n if ($items->isEmpty()) {\n\t\t echo '<div class=\"box-content\"><legend id=\"uniq\" class=\"alert alert-info\">No hay videos para visualizar</legend></div>';\n\t\t exit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$view = View::make('pages.video.items')->with('items', $items);\n\t\t echo $view;\n\t\t exit;\n\t\t}\n\t}",
"public function index(){\n $data['videos'] = $this->repository->getModel()->all();\n return view('admin_content.videos.index',$data);\n }",
"public function allVideos()\n {\n return view('orientation-route::all-videos')\n ->withVideos($this->video->orderBy('order_number', 'asc')->get());\n }",
"public function viewVideoAction()\n\t{\n\t\t$userSession = new Container('fo_user');\n\t\t$pageSession = new Container('fo_page');\n\t\t$this->layout('frontend');\n\t\t$request \t\t= $this->getRequest();\n\t\t$message\t\t= '';\n\t\t$errorMessage\t= '';\n\t\t\n\t\t$request\t= $this->getRequest();\n\t\t$id\t\t\t= $this->params()->fromRoute('id', 0);\n\t\t$originalID\t= base64_decode($id);\n\t\t$videoArray\t= $this->getVideoDetails($originalID);\n\t\t\n\t\t//\tTrack Video Views\n\t\tif(!isset($pageSession->pageSession['last_video']) || (isset($pageSession->pageSession['last_video']) && $pageSession->pageSession['last_video'] != $originalID)) {\n\t\t\t$this->trackVideoViews($originalID);\n\t\t\t$pageSession->pageSession\t= array('last_video' => $originalID);\n\t\t\t\n\t\t\t//\tAssign the recently viewed video in session\n\t\t\t$mediaArray\t\t\t\t\t\t= $userSession->mediaSession;\n\t\t\t$videosArray\t\t\t\t\t= $mediaArray['videos'];\n\t\t\t$videosArray[strtotime('now')]\t= $originalID;\n\t\t\t$mediaArray['videos']\t\t\t= $videosArray;\n\t\t\t$userSession->mediaSession\t\t= $mediaArray;\n\t\t}\n\t\t//\tMedia Tags\n\t\t$mediaIdArray[]\t= (string)$videoArray['_id'];\n\t\t$mediaTags\t\t= $this->getMediaTags($mediaIdArray, 1);\n\t\t\n\t\t//echo '<pre>===>'; print_r($mediaTags); echo '</pre>';\n\t\t//\tRecommended Videos\n\t\t$videoSession \t\t= new Container('fo_videos_recommended');\n\t\t$recommendedArray\t= array('title'\t\t=> $videoArray['media_title'],\n\t\t\t\t\t\t\t\t\t'category'\t=> $videoArray['media_category'],\n\t\t\t\t\t\t\t\t\t'tags'\t\t=> $mediaTags,\n\t\t\t\t\t\t\t\t\t'id'\t\t=> new \\MongoId($videoArray['_id']));\n\t\t$videoSession->videoSession\t= $recommendedArray;\n\t\t\n\t\t$tempUserSession= $userSession->mediaSession;\n\t\t$extFriendsArray= array();\n\t\t\n\t\tif(isset($tempUserSession['friends']) && is_array($tempUserSession['friends']) && count($tempUserSession['friends']) > 0 && count($mediaIdArray) > 0) {\n\t\t\t$extFriendsArray\t= $this->getExtendedFriends($tempUserSession['friends'], $mediaIdArray);\n\t\t}\n\t\t\n\t\t$likes\t\t= $this->getVideoLikes((string)$videoArray['_id']);\n\t\t$like\t= 0;\n\t\t$dislike= 0;\n\t\tif(is_array($likes) && count($likes) > 0) {\n\t\t\tforeach($likes as $lkey => $lvalue) {\n\t\t\t\tif($lvalue['rating'] == 'like') {\n\t\t\t\t\t$like++;\n\t\t\t\t} else if($lvalue['rating'] == 'dislike') {\n\t\t\t\t\t$dislike++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new ViewModel(array(\n\t\t\t'userObject'\t=> $userSession->userSession,\n\t\t\t'message'\t\t=> $message,\n\t\t\t'errorMessage'\t=> $errorMessage,\n\t\t\t'extended'\t\t=> $extFriendsArray,\n\t\t\t'videoArray'\t=> $videoArray,\n\t\t\t'like'\t\t\t=> $like,\n\t\t\t'dislike'\t\t=> $dislike,\n\t\t\t'action'\t\t=> $this->params('action'),\n\t\t\t'controller'\t=> $this->params('controller'),\n\t\t));\n }",
"public function index(VideoStorage $vs)\n {\n $currentDate = Carbon::now();\n\n $videos = Video::whereDate(\"published_date\", \">\", $currentDate->subDays(config('gb.index_show_days_video')))\n ->orWhere(\"status\", \"=\", \"DOWNLOADED\")->orderBy('published_date', 'desc')\n ->paginate();\n\n $videoSizing = new VideoSizing();\n $videoSizing->getDirectorySize(\"gb_videos\");\n\n return view('main', ['videos' => $videos,\n 'humanSize' => $videoSizing->returnAsHuman(),\n 'dirPercentage' => $videoSizing->returnAsPercentage(config('gb.storage_limit')),\n 'rawSize' => $videoSizing->returnAsBytes()]);\n }",
"function aidtransparency_print_vimeo_videos($post = null, $number = 2)\r\n{\r\n global $post;\r\n $vidoesStr = false; //types_render_field(\"home_page_vimeo\", array( 'post_id' => $post->ID, 'raw' => true ) );\r\n $videoIds = array_map( 'trim', explode(',', $vidoesStr) );//Make into array and trim members\r\n if(count($videoIds) > 0) :\r\n $count = 1;\r\n ?>\r\n <div class=\"videos\">\r\n <?php foreach ($videoIds as $videoId) : if( $count > $number ) continue; ?>\r\n <div class=\"video <?php print sweetapple_get_row_class($count, 2);?>\" >\r\n <a href=\"http://vimeo.com/<?php echo $videoId;?>\" class=\"vimeo-video\" data-vimeoid=\"<?php echo $videoId;?>\">View this Vimeo video</a>\r\n </div>\r\n <?php $count++; endforeach;?>\r\n </div><!--.videos -->\r\n <?php endif;\r\n}",
"public function render(Video $video): string;",
"public function lecteurVideoAction($ListeDesVideos){\n\t\n\t\t$html ='<script>\n\t\t\t\t var tab = [];\n\t\t </script>';\n\t\t$i = 0;\n\t\tforeach ($ListeDesVideos as $Liste) {\n\t\t\t\t\n\t\t\tif($Liste['format'] == \"video/mp4\" || $Liste['format'] == \"video/m4v\") {\n\t\t\t\t$html .='<script>\n \t\t tab['.$i++.'] = {\n\t \"title\":\"'. $Liste['titre'] .' <span class=\\'supprimerVideoIns'.$i.'\\' > </span>\",\n\t\t \"m4v\":\"/simens/public/videos/'. $Liste['nom'] .'\",\n\t\t };\n\t\n\t\t setTimeout(function() {\n\t $(function () {\n\t\t $(\".supprimerVideoIns'.$i.'\").click(function () { return false; });\n\t\t $(\".supprimerVideoIns'.$i.'\").dblclick(function () { supprimerVideo('.$Liste['id'].'); return false; });\n\t });\n }, 1000);\n \t\t </script>';\n\t\t\t}\n\t\t\telse\n\t\t\tif($Liste['format'] == \"video/webm\") {\n\t\t\t\t$html .='<script>\n \t\t tab['.$i++.'] = {\n\t \"title\":\"'. $Liste['titre'] .'<span class=\\'supprimerVideoIns'.$i.'\\' > </span>\",\n\t\t \"webmv\":\"/simens/public/videos/'. $Liste['nom'] .'\",\n\t\t };\n\t\t \n\t\t setTimeout(function() {\n\t $(function () {\n\t\t $(\".supprimerVideoIns'.$i.'\").click(function () { return false; });\n\t\t $(\".supprimerVideoIns'.$i.'\").dblclick(function () { supprimerVideo('.$Liste['id'].'); return false; });\n\t });\n }, 1000);\n \t\t </script>';\n\t\t\t}\n\t\t}\n\t\n\t\t$html .='<script>\n\t\t\t\t $(document).ready(function(){\n\t\n\t new jPlayerPlaylist({\n\t\t jPlayer: \"#jquery_jplayer_1\",\n\t\t cssSelectorAncestor: \"#jp_container_1\"\n\t },\n\t\t\t\t tab\n\t\t\t\t ,{\n\t\t swfPath: \"../../dist/jplayer\",\n\t\t supplied: \"webmv, ogv, m4v\",\n\t\t useStateClassSkin: true,\n\t\t autoBlur: false,\n\t\t smoothPlayBar: true,\n\t\t keyEnabled: true\n\t });\n\t\n });\n\t\n\t\t\t\tscriptAjoutVideo();\n\t\t </script>';\n\t\t\t\n\t\t$html .='\n\t\n\t\t<form id=\"my_form_video\" method=\"post\" action=\"/simens/public/consultation/ajouter-video\" enctype=\"multipart/form-data\">\n\t\t<div id=\"jp_container_1\" class=\"jp-video jp-video-270p\" role=\"application\" aria-label=\"media player\" style=\"margin: auto;\">\n\t <div class=\"jp-type-playlist\">\n\t\t<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>\n\t\t<div class=\"jp-gui\">\n\t\t\t<div class=\"jp-video-play\">\n\t\t\t\t<button class=\"jp-video-play-icon\" role=\"button\" tabindex=\"0\">play</button>\n\t\t\t</div>\n\t\t\t<div class=\"jp-interface\">\n\t\t\t\t<div class=\"jp-progress\">\n\t\t\t\t\t<div class=\"jp-seek-bar\">\n\t\t\t\t\t\t<div class=\"jp-play-bar\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"jp-current-time\" role=\"timer\" aria-label=\"time\"> </div>\n\t\t\t\t<div class=\"jp-duration\" role=\"timer\" aria-label=\"duration\"> </div>\n\t\t\t\t<div class=\"jp-controls-holder\">\n\t\t\t\t\t<div class=\"jp-controls\">\n\t\t\t\t\t\t<button class=\"jp-previous\" role=\"button\" tabindex=\"0\">previous</button>\n\t\t\t\t\t\t<button class=\"jp-play\" role=\"button\" tabindex=\"0\">play</button>\n\t\t\t\t\t\t<button class=\"jp-next\" role=\"button\" tabindex=\"0\">next</button>\n\t\t\t\t\t\t<button class=\"jp-stop\" role=\"button\" tabindex=\"0\">stop</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"jp-volume-controls\">\n\t\t\t\t\t\t<button class=\"jp-mute\" role=\"button\" tabindex=\"0\">mute</button>\n\t\t\t\t\t\t<button class=\"jp-volume-max\" role=\"button\" tabindex=\"0\">max volume</button>\n\t\t\t\t\t\t<div class=\"jp-volume-bar\">\n\t\t\t\t\t\t\t<div class=\"jp-volume-bar-value\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"jp-toggles\">\n\t\t\t\t\t\t<button class=\"jp-full-screen\" role=\"button\" tabindex=\"0\">full screen</button>\n\t\t\t\t\t</div>\n\t\n\t\t\t\t <div class=\"jp-toggles2\" id=\"jp-toggles-video\" >\n\t\t\t\t <div class=\"jp-ajouter-video\">\n\t\t\t\t <input type=\"file\" name=\"fichier-video\" id=\"fichier-video\">\n\t\t\t\t </div>\n\t\t\t\t\t</div>\n\t\n\t\t\t\t</div>\n\t\t\t\t<div class=\"jp-details\">\n\t\t\t\t\t<div class=\"jp-title\" aria-label=\"title\"> </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"jp-playlist\">\n\t\t\t<ul>\n\t\t\t\t<li> </li>\n\t\t\t</ul>\n\t\t</div>\n\t </div>\n </div>\n\t\t</form>';\n\t\treturn $html;\n\t}",
"public function index()\n {\n //\n $user_id = \\Auth::user()->id; //auth()->id();\n $usuario = UserMoodle::where('id', $user_id)->first();\n\n $videos = Video::all();\n\n\n \n\n return view('admin.videos.index', compact('videos', 'usuario'));\n }",
"function plgContentplug_hwd_vs_videoplayer()\r\n\t{\r\n\t}",
"public function actionVideo_tutorials()\t\n\t\t\n\t {\t\n\t \n $this->pageTitle='Video Tutorials - Business Supermarket';\n\t\t\t \n $this->render('video_tutorials',array('model' =>$model));\n\t\t\t \n\t }",
"public function index()\n {\n $videos = Video::published()->orderBy('id', 'desc');\n if(request()->has('search') && request()->get('search') != ''){\n $videos = $videos->where('name', 'like', '%'.request()->get('search').'%');\n }\n $videos = $videos->paginate(30);\n return view('home', compact('videos'));\n }",
"public function index()\n {\n $videos = Video::inRandomOrder()->paginate(12);\n return view('welcome', compact('videos', 'movielist'));\n }",
"public function index()\n {\n $data = Iklanvideo::paginate(6);\n return view('admin.datavideo.index')->with('data', $data);\n }",
"function tpl_show($video)\n{\n global $smarty, $config;\n\n // imageurl\n $video['imgurl'] = getThumbnail($video['imgurl'], $video['title']);\n\n // make soft linebreaks:\n $video['filename'] = preg_replace('/(_|\\.|-)/', '$1<wbr />', $video['filename']);\n\n // split comma-separated countries, prevent empty array\n $video['country'] = preg_split('/,\\s*/', $video['country'], -1, PREG_SPLIT_NO_EMPTY);\n\n // split comma-separated multiple languages, prevent empty array\n $video['language'] = preg_split('/,\\s*/', $video['language'], -1, PREG_SPLIT_NO_EMPTY);\n\n // humanreadable filesize:\n $video['filesize'] = round($video['filesize']/(1024*1024), 2);\n\n // break plot and comment\n $video['plot'] = nl2br($video['plot']);\n $video['comment'] = nl2br($video['comment']);\n\n\t// cast\n $smarty->assign('cast_toggle', $config['showcasttoggle']);\n $show_cast = true;\n if ($config['showcasttoggle'])\n {\n $show_cast = (isset($_GET['show_cast']) && $_GET['show_cast'] == '1');\n }\n $smarty->assign('show_cast', $show_cast);\n $video['cast'] = [];\n if ($show_cast)\n {\n \t$video['cast'] = prepare_cast($video['actors']);\n }\n\n // prepare the custom fields\n customfields($video, 'out');\n\n // hide owner if not using multi-user\n if (!$config['multiuser']) unset($video['owner']);\n\n // get drilldown url for image\n if ($video['imdbID'])\n {\n require_once './engines/engines.php';\n $smarty->assign('link', engineGetContentUrl($video['imdbID'], engineGetEngine($video['imdbID'])));\n }\n\n // add episodes information\n if (array_key_exists('episodes', $video) && is_array($video['episodes']))\n {\n // allow multiple columns\n $smarty->assign('listcolumns', session_get('listcolumns'));\n }\n\n $smarty->assign('castcolumns', $config['castcolumns']);\n $smarty->assign('video', $video);\n\n // get genre ids and names\n $smarty->assign('genres', getItemGenres($video['id'], true));\n\n // make engines available\n $smarty->assign('engines', $config['engine']);\n\n // allow XML export\n foreach (array('xls','pdf','xml') as $export)\n {\n if ($config[$export]) $smarty->assign($export, 'show.php?id='.$video['id'].'&');\n }\n // new-style way of exporting\n // $smarty->assign('exports', listExports('show.php?id='.$video['id'].'&'));\n}",
"function bp_videossubnav_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->control_panel_store_video();\n\t}",
"public function show(VideoType $video_type)\n {\n //\n }",
"public function index()\n {\n $user = Auth::user();\n $videos_ativos = Videos::where('excluido', 0)->get();\n $videos_excluidos = Videos::where('excluido', 1)->get();\n\n return view('pages.painel.listar.video.index', compact('user', 'videos_ativos', 'videos_excluidos'));\n }",
"public function showScheduledMovies()\n {\n try {\n $movieRepository = $this->getRepository('movie');\n $totalMovies = $movieRepository->getRowsCount();\n\n $currentPage = $this->getQueryParam('page');\n $moviesPerPage = $this->getQueryParam('movies_per_page');\n\n $paginator = new Paginator($currentPage, $totalMovies, $moviesPerPage);\n\n $movieList = $movieRepository->loadPage($paginator->getCurrentPage(), $paginator->getResultsPerPage());\n\n $context = [\n 'paginator' => $paginator,\n 'movieList' => $movieList,\n ];\n\n return $this->render('showscheduledmovies', $context);\n } catch (Exception $ex) {\n $this->addErrorMessage('Something went wrong!');\n\n return $this->render('showscheduledmovies', $context);\n }\n }",
"public function process() {\n // Add oembed streams to video file types.\n $video = file_type_load('video');\n $video->mimetypes[] = 'video/oembed';\n $video->streams[] = 'oembed';\n file_type_save($video);\n\n // Oembed specific display settings for videos.\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '560',\n 'height' => '340',\n 'wmode' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '180',\n 'height' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__preview__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__teaser__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n }",
"public function index()\n {\n $auth = Auth::user();\n if(! $auth->access()->admin) {\n $videos = $this->video->whereIn('access_name', $auth->accessList())\n ->orderBy('order_number', 'asc')->get();\n }else {\n $videos = $this->video->orderBy('order_number', 'asc')->get();\n }\n return view('orientation-route::all')\n ->withVideos($videos);\n }",
"function getVideos($url, $width, $height, $config) {\r\n \t$video = '';\r\n\r\n\t\t$url = trim($url);\r\n\t\t$url = str_replace('http://', '', $url);\r\n\r\n // youtube\r\n if (strpos($url,'outube.com')) {\r\n $found = 1;\r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://www.youtube.com/v/'.$split[1].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");';\r\n // Dailymotion\r\n } elseif (strpos($url,'ailymotion.co')) {\r\n $found = 1;\r\n $video = 'new SWFObject(\"http://'.$url.'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");';\r\n // video.google.com/.de\r\n } elseif (strpos($url,'ideo.google.')) {\r\n $found = 1; \r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://video.google.com/googleplayer.swf?docId='.$split[1].'&hl='.$GLOBALS['TSFE']->lang.'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // Metacafe\r\n } elseif (strpos($url,'metacafe.')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://www.metacafe.com/fplayer/'.$split[2].'/.swf\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // MyVideo.de\r\n } elseif (strpos($url,'yvideo.de')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://www.myvideo.de/movie/'.$split[2].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // clipfish.de\r\n\t\t} elseif (strpos($url,'lipfish.de')) {\r\n $found = 1;\r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://www.clipfish.de/videoplayer.swf?as=0&videoid='.$split[1].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n\t\t// sevenload\r\n\t\t} elseif (strpos($url,'sevenload.com')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://de.sevenload.com/pl/'.$split[2].'/'.$width.'x'.$height.'/swf\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n } \r\n\r\n\t\treturn $video;\r\n\t}",
"public function getWatchedVideos($page = 0, $limit = 0) {\n\t\t$conn\t\t\t= $this->connect();\n\t\t$userSession\t= new Container('fo_user');\n\t\t//\tWatched Videos\n\t\t$videoWatchedSession\t= new Container('fo_videos_watched');\n\t\t$skip\t\t\t= ($page - 1) * $limit;\n\t\t$collection\t\t= $conn->snapstate->media_views;\n\t\t$sort\t\t\t= array('date_viewed' => 1);\n\t\t$document\t\t= array('user_id' => (string)$userSession->userSession['_id']);\n\t\t\n\t\t/*\tif($limit > 0)\n\t\t\t$results\t= $collection->find($document)->skip($skip)->limit($limit)->sort($sort);\n\t\telse\n\t\t\t$results\t= $collection->find($document)->sort($sort);\n\t\treturn $results;\t*/\n\t\t\n\t\t/*\t// use all fields\n\t\t$keys = array(\"media_id\" => 1);;\n\t\t// set intial values\n\t\t$initial = array(\"items\" => array());\n\t\t// JavaScript function to perform\n\t\t$reduce = \"function (obj, prev) { prev.items.push(obj.date_viewed); }\";\n\t\t$condition = array('condition' => $document);\n\t\t$results\t= $collection->group($keys, $initial, $reduce, $condition);\n\t\treturn $results;\t\n\t\t\t*/\n\t\t\n\t\t$results\t= $collection->aggregate(array(\n\t\t\t\t\t\t array('$match' => $document),\n\t\t\t\t\t\t array('$group' => array('_id' => '$media_id', 'views' => array('$sum' => 1))),\n\t\t\t\t\t\t));\n\t\t$resultArray['total']\t= (isset($results['result'])) ? count($results['result']) : 0;\n\t\t$sort\t\t= array('views' => -1);\n\t\t$results\t= $collection->aggregate(array(\n\t\t\t\t\t\t\tarray('$match' => $document),\n\t\t\t\t\t\t array('$group' => array('_id' => '$media_id', 'date' => array('$max' => '$date_viewed'), 'views' => array('$sum' => 1))),\n\t\t\t\t\t\t array('$sort' => $sort),\n\t\t\t\t\t\t\tarray('$skip' => $skip),\n\t\t\t\t\t\t\tarray('$limit' => $limit),\n\t\t\t\t\t\t));\n\t\t$resultArray['records']\t= (isset($results['result'])) ? $results['result'] : array();\n\t\treturn $resultArray;\n\t\t\n\t}",
"public function show(UploadVideo $uploadVideo)\n {\n //\n }",
"public function index()\n {\n $format = Carbon::now()->subMonth();\n $videos = $this->video->where('user_id', Auth::user()->id);\n $username = Auth::user()->username;\n $categories = Category::all();\n $latest = $this->video->whereDateFormat('created_at', '>=', $format);\n\n return view('pages.library', compact('videos', 'latest', 'username'))->with('categories', $categories);\n }",
"public function index()\n {\n $videos = DB::select('SELECT * from video order by created_at DESC');\n $likes = Like::all();\n return view('videos.index', compact(['videos', 'likes']));\n }",
"public function print_downloads_page() {\n\n\t\t$admin_url = add_query_arg(\n\t\t\t[\n\t\t\t\t'post_type' => 'schedule',\n\t\t\t\t'page' => 'conf-schedule-downloads',\n\t\t\t], admin_url( 'edit.php' )\n\t\t);\n\n\t\t$hootsuite_tmpl_url = add_query_arg(\n\t\t\t[\n\t\t\t\t'dwnld_hootsuite_template_csv' => 1,\n\t\t\t], $admin_url\n\t\t);\n\n\t\t$schedule_info_url = add_query_arg(\n\t\t\t[\n\t\t\t\t'dwnld_session_info_csv' => 1,\n\t\t\t], $admin_url\n\t\t);\n\n\t\t$hootsuite_tmpl_csv = wp_nonce_url( $hootsuite_tmpl_url, 'dwnld_hootsuite_template_csv', 'dwnld_hootsuite_template_csv_nonce' );\n\t\t$schedule_info_csv = wp_nonce_url( $schedule_info_url, 'dwnld_session_info_csv', 'dwnld_session_info_csv_nonce' );\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <ul>\n <li><a href=\"<?php echo $hootsuite_tmpl_csv; ?>\">Hootsuite template for day-of tweets</a></li>\n <li><a href=\"<?php echo $schedule_info_csv; ?>\">Session information, including feedback URLs</a></li>\n </ul>\n </div>\n\t\t<?php\n\n\t}",
"public function show($id)\n {\n return view('video::show');\n }",
"public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}",
"public function listPlaylistVideosAction()\n {\n\t\t$result = new ViewModel();\n\t $result->setTerminal(true);\n\t\t\n\t\t$matches\t= $this->getEvent()->getRouteMatch();\n\t\t$page\t\t= $matches->getParam('id', 1);\n\t\t$perPage\t= $matches->getParam('perPage', '');\n\t\t\n\t\t//\tSession for listing\n\t\t$listingSession = new Container('fo_listing');\n\t\tif($page == '0') {\n\t\t\t$listingSession->page\t= 1;\n\t\t\t$page\t= 1;\n\t\t} else if($listingSession->offsetExists('page')) {\n\t\t\t$page\t= $listingSession->page+1;\n\t\t\t$listingSession->page\t= $page;\n\t\t} else {\n\t\t\t$listingSession->page\t= 1;\n\t\t\t$page\t= 1;\n\t\t}\n\t\t$perPage\t\t= PERPAGE;\n\t\t$message\t\t= '';\n\t\t$recordsArray\t= $this->listPlaylistVideos($listingSession->playlist, $page, $perPage);\n\t\t\n\t\t$result->setVariables(array('records'\t\t=> $recordsArray['records'],\n\t\t\t\t\t\t\t\t\t'message'\t\t=> $message,\n\t\t\t\t\t\t\t\t\t'page'\t\t\t=> $page,\n\t\t\t\t\t\t\t\t\t'perPage'\t\t=> $perPage,\n\t\t\t\t\t\t\t\t\t'extended'\t\t=> $recordsArray['extended'],\n\t\t\t\t\t\t\t\t\t'totalRecords'\t=> $recordsArray['total'],\n\t\t\t\t\t\t\t\t\t'action'\t\t=> $this->params('action'),\n\t\t\t\t\t\t\t\t\t'controller'\t=> $this->params('controller')));\n\t\treturn $result;\n }",
"public function watch($id)\n {\n LearnVideo::findOrFail($id)->watchedBy(Auth::id());\n }",
"public function vodVideosListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t$user\t\t\t\t\t\t=\tnew userManagement();\n\t\t\t\t$tutor\t\t\t=\t $user->getInstructors();\n\t\t\t\t$instmnt\t\t=\t new instrument();\n\t\t\t\t$instrument_list=\t $instmnt->getAllInstruments();\n\t\t\t\t$courses\t\t=\t new userCourse();\n\t\t\t\t$course_list\t=\t$courses->getAllTaughtCourses();\n\t\t\t\t\n\t\t\t\tunset($_SESSION[\"txtCourse\"]);\n\t\t\t\tunset($_SESSION[\"txtInst\"]);\n\t\t\t\tunset($_SESSION['instrument_id']);\n\t\t\t\t\t\t\t\n\t\t\t\tif(!empty($_POST[\"txtInst\"])){\n\t\t\t\t\t$_SESSION[\"txtInst\"]\t=\ttrim($_POST[\"txtInst\"]);\n\t\t\t\t}\n\t\t\t\tif(!empty($_POST[\"txtCourse\"])){\n\t\t\t\t\t$_SESSION[\"txtCourse\"]\t=\ttrim($_POST[\"txtCourse\"]);\n\t\t\t\t}\n\t\t\t\tif(!empty($_POST['instrument_id'])){\n\t\t\t\t$_SESSION[\"instrument_id\"]\t\t=\t$_POST[\"instrument_id\"];\n\t\t\t\t}\t\t\n\t\t\t\t\n\t\t\t\t$txtInst\t\t=\t$_POST[\"txtInst\"];\n\t\t\t\t$txtCourse\t\t=\t$_POST[\"txtCourse\"];\n\t\t\t\t$instrument_id\t=\t$_POST[\"instrument_id\"];\n\t\t\t\n\t\t\t\treturn array(\"tutor\"=>$tutor,\"instrument\"=>$instrument_list,\"course\"=>$course_list,\"txtInst\"=>$txtInst,\"txtCourse\"=>$txtCourse,\"instrument_id\"=>$instrument_id);\n\t\t\t}",
"public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}",
"public function index() {\n\t\tif ($this->session->userdata('logged_in') == TRUE && $this->session->userdata('rid') == 1 ) {\n\t\t\t// Set Page Title\n\t\t\t$header['page_title'] = \"Video List\";\n\t\t\t$page = 1;\t\t\n\t\t\t$id = 1;\n\t\t\t$videos = $this->Signature_model->getAllVideo($id);\n\n\t\t\t// Create the data array to pass to view\n\t\t\t$menu_details['session'] = $this->session->userdata;\n\n\t\t\t$data['videos'] = $videos;\n\n\t\t\t$data['message'] = $this->session->flashdata('message');\n\n\t\t\t$this->load->view('admin/common/header', $header);\n\t\t\t$this->load->view('admin/common/left_menu', $menu_details);\n\t\t\t$this->load->view('admin/signature_video/list', $data);\n\t\t\t$this->load->view('admin/common/footer');\n\t\t} else {\n\t\t\tredirect('admin/login');\n\t\t}\n\t}",
"public function indexAction() {\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n if (!Engine_Api::_()->core()->hasSubject()) {\r\n return $this->setNoRender();\r\n }\r\n\t\t$setting = Engine_Api::_()->getApi('settings', 'core');\r\n\t\tif (!$setting->getSetting('video_enable_chanel', 1)) {\r\n return $this->setNoRender();\r\n }\r\n\t\t$this->view->tab =\t$this->_getParam('tab','inside');\r\n\t\t$this->view->photo =\t$this->_getParam('photo','pPhoto');\r\n\t\t$this->view->option =\t$this->_getParam('option',array('report','follow','like','share','delete','edit','favourite','stats','rating','verified'));\r\n\t\t\r\n // Get subject and check auth\r\n $this->view->subject = $subject = Engine_Api::_()->core()->getSubject('sesvideo_chanel');\r\n\t\t$this->view->video_count = $subject->countVideos();\r\n\t\t$this->view->photo_count = $subject->count();\r\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\r\n\t\t$this->view->can_edit = 0;\r\n\t\t$this->view->can_delete = 0;\r\n\t\tif($viewer->getIdentity() != 0){\r\n\t\t\t$this->view->can_edit = $canEdit = $subject->authorization()->isAllowed($viewer, 'edit');\r\n\t\t\t$this->view->can_delete = $canDelete = $subject->authorization()->isAllowed($viewer, 'delete');\r\n\t\t}\r\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\r\n\t\t$this->view->viewer_id = $viewer->getIdentity();\r\n\t\t // rating code\r\n $this->view->allowShowRating = $allowShowRating = Engine_Api::_()->getApi('settings', 'core')->getSetting('video.ratechanel.show', 1);\r\n $this->view->allowRating = $allowRating = Engine_Api::_()->getApi('settings', 'core')->getSetting('video.chanel.rating', 1);\r\n $this->view->getAllowRating = $allowRating;\r\n if ($allowRating == 0) {\r\n if ($allowShowRating == 0)\r\n $showRating = false;\r\n else\r\n $showRating = true;\r\n } else\r\n $showRating = true;\r\n $this->view->showRating = $showRating;\r\n\t\t\r\n if ($showRating) {\r\n $this->view->canRate = $canRate = Engine_Api::_()->authorization()->isAllowed('sesvideo_chanel', $viewer, 'rating_chanel');\r\n $this->view->allowRateAgain = $allowRateAgain = Engine_Api::_()->getApi('settings', 'core')->getSetting('video.ratechanel.again', 1);\r\n $this->view->allowRateOwn = $allowRateOwn = Engine_Api::_()->getApi('settings', 'core')->getSetting('video.ratechanel.own', 1);\r\n if ($canRate == 0 || $allowRating == 0)\r\n $allowRating = false;\r\n else\r\n $allowRating = true;\r\n if ($allowRateOwn == 0 && $mine)\r\n $allowMine = false;\r\n else\r\n $allowMine = true;\r\n $this->view->allowMine = $allowMine;\r\n $this->view->allowRating = $allowRating;\r\n $this->view->rating_type = $rating_type = 'sesvideo_chanel';\r\n $this->view->rating_count = $rating_count = Engine_Api::_()->getDbTable('ratings', 'sesvideo')->ratingCount($subject->getIdentity(), $rating_type);\r\n $this->view->rated = $rated = Engine_Api::_()->getDbTable('ratings', 'sesvideo')->checkRated($subject->getIdentity(), $viewer->getIdentity(), $rating_type);\r\n $rating_sum = Engine_Api::_()->getDbTable('ratings', 'sesvideo')->getSumRating($subject->getIdentity(), $rating_type);\r\n if ($rating_count != 0) {\r\n $this->view->total_rating_average = $rating_sum / $rating_count;\r\n } else {\r\n $this->view->total_rating_average = 0;\r\n }\r\n if (!$allowRateAgain && $rated) {\r\n $rated = false;\r\n } else {\r\n $rated = true;\r\n }\r\n $this->view->ratedAgain = $rated;\r\n }\r\n }",
"public function videoListDisplayed(AcceptanceTester $I)\n {\n $I->wantTo('Verify Video List is displayed on the Edit Episode page. - C15640');\n if(EpisodeEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$episodeViewData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$episodeViewData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n\n $I->expect('Video List is displayed.');\n $I->waitForElementVisible(ContentPage::$clickableTable, 30);\n $I->see('VIDEOS');\n $I->see('series_view_filled_data_automation_1_episode_1_media_id', ContentPage::$videoTable);\n }",
"public function Youtube(){\n\n\t\t$departamentos=DB::table('deptos')\n\t\t\t->paginate(6);\n\t\treturn View::make('Administrador.Youtube.show', array('departamentos'=>$departamentos));\n\t}",
"public function viewsVideo($video)\n {\n return $this->performRequest('GET',\"/videos1/{$video}\");\n }",
"public function index()\n {\n $videos = KidVid::all();\n\n return response()->json($videos);\n }",
"function display($group_id = NULL) {\n\t\tglobal $bp;\n\t\t$root_url = get_bloginfo( \"url\" ) . \"/\";\n\n\t\techo do_shortcode('[videowhisper_watch channel=\"' .$bp->groups->current_group->slug. '\"]');\n\t}",
"public function viewVideo_action() {\r\n Auth::checkAuthentication();\r\n $userID = Session::get('user_id');\r\n $userRole = Session::get('user_role');\r\n $lessonID = Request::post('lessonID');\r\n \r\n if(isset($userID) && isset($userRole) && isset($lessonID)) {\r\n if (LessonModel::canViewLesson($userID, $userRole, $lessonID)) {\r\n LessonModel::recordViewedVideo($userID, $lessonID);\r\n \r\n $response_array['canViewAssessment'] = LessonModel::hasViewedVideoAndGame($userID, $lessonID);\r\n echo json_encode($response_array);\r\n } else {\r\n Redirect::to('lesson/index');\r\n }\r\n } else {\r\n Redirect::to('error/index');\r\n }\r\n }",
"public function obtainVideos()\n {\n return $this->performRequest('GET','/videos');\n }",
"public function index()\n {\n $vids = Vid::all();\n return view('all.vid', ['vid' => $vids]);\n }",
"public function getEditlist()\n {\n // Title\n $title = Lang::get('admin/videos/title.video_edit');\n\n // Grab all the videos\n $videos = $this->video;\n\n // Show the page\n return View::make('admin/videos/editlist', compact('videos', 'title'));\n }",
"public function indexAction()\n {\n $module = $this->params('module');\n\n // Get config\n $config = Pi::service('registry')->config->read($module);\n\n // category list\n $categoriesJson = Pi::api('category', 'video')->categoryListJson();\n\n // Save statistics\n if (Pi::service('module')->isActive('statistics')) {\n Pi::api('log', 'statistics')->save('video', 'index');\n }\n\n // Check homepage type\n switch ($config['homepage_type']) {\n default:\n case 'list':\n $this->view()->setTemplate('video-angular');\n $this->view()->assign('config', $config);\n $this->view()->assign('categoriesJson', $categoriesJson);\n $this->view()->assign('pageType', 'all');\n break;\n\n case 'category':\n case 'custom':\n // Set title\n $title = (!empty($config['homepage_title'])) ? $config['homepage_title'] : __('List of videos');\n\n // Set info\n $categories = [];\n $where = ['status' => 1];\n $order = ['display_order DESC', 'title ASC', 'id DESC'];\n $select = $this->getModel('category')->select()->where($where)->order($order);\n $rowSet = $this->getModel('category')->selectWith($select);\n\n // Make list\n foreach ($rowSet as $row) {\n $categories[$row->id] = Pi::api('category', 'video')->canonizeCategory($row);\n }\n\n // Set category tree\n $categoryTree = [];\n if (!empty($categories)) {\n $categoryTree = Pi::api('category', 'video')->makeTreeOrder($categories);\n }\n\n // Set view\n $this->view()->setTemplate('video-category-index');\n $this->view()->assign('config', $config);\n $this->view()->assign('categories', $categories);\n $this->view()->assign('categoryTree', $categoryTree);\n $this->view()->assign('productTitleH1', $title);\n $this->view()->assign('showIndexDesc', 1);\n $this->view()->assign('isHomepage', 1);\n break;\n }\n }",
"public function index() {\n\n /*\n Check Authentication of User\n */\n\n if( !Auth::guard('admin')->check()) {\n return redirect()->intended(route('admin.login'));\n }\n\n /*\n define a variable\n */\n $videoListings = array();\n\n /*\n Get Video details\n */\n $videos = Video::all();\n\n if( isset( $videos ) && !empty( $videos ) ) {\n foreach( $videos as $video ) {\n\n /*\n Get Video seo id\n */\n $VideoSeo = VideoSeo::where( 'video_id', $video->id )->get();\n\n $videoListings[] = array(\n 'id' => $video->id,\n 'seoID' => isset( $VideoSeo[0]->id ) ? $VideoSeo[0]->id : '',\n 'name' => $video->name,\n );\n }\n }\n\n return view( 'backend.video', [ 'videos' => $videoListings] );\n }",
"function ShowVideoRight()\n{\n\techo(\"<tr><td height='2'></td></tr>\");\n\t$str0=\"select value1 from options where name='video'\";\n\t$result0=mysql_query($str0) or die(mysql_error());\n\t$row0=mysql_fetch_array($result0);\n\tif ($row0['value1']==1)\n\t{ \n\t\techo(\"<tr><td valign='middle' background='images/menuphai.png' class='topbartitle' height='30'\"); \n\t\techo(\"width='216'>\");\n\t\n\t\techo(\" \".getPara('video','value2'));\n\t\t/*echo(\"<tr><td bgcolor='\");\n\t\techo(background());\n\t\techo(\"' class='leftmenumainitem'\"); \n\t\techo(\"width='216' valign='top'><img src='image/point.jpg' /> \");\n\t\techo(getPara('video','value2'));*/\n\t\techo(\"</td>\");\n\t\t\t\n\t\t//echo(\"</tr><tr><td height='200' background='pic/bodybar.jpg'><div class='topnews'>\");\n\t\techo(\"</tr><tr><td height='176'>\");\n\t\t$str00=\"select * from video where trang_thai='1' and hot='1' order by id desc limit 0,1\";\n\t\t$result00=mysql_query($str00) or\tdie(mysql_error());\n\t\twhile ($row00=mysql_fetch_array($result00))\n\t\t{\n\t\t\techo(\"<div id=\\\"MediaPlayer333\\\">\n\t\t\t<object id=\\\"player\\\" classid=\\\"clsid: D27CDB6E-AE6D-11cf-96B8-444553540000\\\" name=\\\"player\\\" width=\\\"214\\\" height=\\\"175\\\">\n\t\t\t<param name=\\\"movie\\\" value=\\\"jwplayer/player.swf\\\"/>\n\t\t\t<param name=\\\"allowfullscreen\\\" value=\\\"true\\\" />\n\t\t\t<param name=\\\"allowscriptaccess\\\" value=\\\"always\\\" />\n\t\t\t<param name=\\\"flashvars\\\" value=\".$row00['link'].\" />\n\t\t\t<embed\n\t\t\ttype=\\\"application/x-shockwave-flash\\\"\n\t\t\tid=\\\"player2\\\"\n\t\t\tname=\\\"player2\\\"\n\t\t\tsrc=\\\"jwplayer/player.swf\\\"\n\t\t\twidth=\\\"214\\\"\n\t\t\theight=\\\"175\\\"\n\t\t\tallowscriptaccess=\\\"always\\\"\n\t\t\tallowfullscreen=\\\"true\\\"\n\t\t\tflashvars=\\\"file=\".$row00['link'].\"\\\">\n\t\t\t</embed>\n\t\t\t</object>\n\t\t\t</div>\");\n\t\t}\n\t\tmysql_free_result($result00);\n\t\t\n\t\t$str1=\"select * from video where trang_thai='1' and hot='1' order by id desc limit 0,5\";\n\t\t$result=mysql_query($str1) or\n\t\t\tdie(mysql_error());\n\t\t\t\n\t\t\techo(\"<ul class='box2video'>\");\n\t\t\t$stt=1;\n\t\twhile ($row=mysql_fetch_array($result))\n\t\t{\n\t\t\t\n\t\t\techo(\"<li>\");\n\t\t\techo(\"<a href=\\\"#\\\" id=\\\"abcd\\\" onclick=\\\"JavaScript:showVideo3('LOAD\".$row[\"id\"].\"');\\\" >\n \".$row['ghi_chu'].\"</a>\");\n\t\t\techo(\"</li>\");\n\t\t\t$stt++;\n\t \t}\n\t\t\t\n\t\t\techo(\"</ul>\");\n\t\t\n\t\t//echo($row['value3']);\n\t\t\n\t\tmysql_free_result($result);\n\t\techo(\"</td></tr>\");\n\t\t//echo(\"<tr><td background='pic/bottombar.jpg'\"); \n\t\t//echo(\" height='12'></tr>\");\n\t\techo(\"<script language=\\\"JavaScript\\\">\n\nvar HttPRequest = false;\n\nfunction showVideo3(str)\n\t\t {\n\t\t\n\t\tHttPRequest = false;\n\t\t\n\t\tif (window.XMLHttpRequest) { // Mozilla, Safari,...\n\t\t\n\t\tHttPRequest = new XMLHttpRequest();\n\t\t\n\t\tif (HttPRequest.overrideMimeType) {\n\t\t\n\t\tHttPRequest.overrideMimeType('text/html');\n\t\t\n\t\t}\n\t\t\n\t\t} else if (window.ActiveXObject) { // IE\n\t\t\n\t\ttry {\n\t\t\n\t\tHttPRequest = new ActiveXObject(\\\"Msxml2.XMLHTTP\\\");\n\t\t\n\t\t} catch (e) {\n\t\t\n\t\ttry {\n\t\t\n\t\tHttPRequest = new ActiveXObject(\\\"Microsoft.XMLHTTP\\\");\n\t\t\n\t\t} catch (e) {}\n\t\t\n\t\t}\n\t\t\n\t\t}\n\t\tif (!HttPRequest) {\n\t\t\n\t\talert('Cannot create XMLHTTP instance');\n\t\t\n\t\treturn false;\n\t\t\n\t\t}\n\t\tvar url = 'aj3.php';\n\t\t\n\t\tvar pmeters =\n\n\t\t\\\"str=\\\" + str;\n\t\tHttPRequest.open('POST',url,true);\n\t\t\n\t\tHttPRequest.setRequestHeader(\\\"Content-type\\\", \\\"application/x-www-form-urlencoded\\\");\n\t\t\n\t\tHttPRequest.setRequestHeader(\\\"Content-length\\\", pmeters.length);\n\t\t\n\t\tHttPRequest.setRequestHeader(\\\"Connection\\\", \\\"close\\\");\n\t\t\n\t\tHttPRequest.send(pmeters);\n\t\t\n\t\tHttPRequest.onreadystatechange = function()\n\t\t\n\t\t{\n\t\t\n\t\tif(HttPRequest.readyState == 3) // Loading Request\n\t\t\n\t\t{\n\t\tdocument.getElementById(\\\"MediaPlayer333\\\").innerHTML = \\\"Now is Loading...\\\";\n\t\t}\n\t\tif(HttPRequest.readyState == 4) // Return Request\n\t\t\n\t\t{\n\t\tdocument.getElementById(\\\"MediaPlayer333\\\").innerHTML = HttPRequest.responseText;\n\t\t}\n\t\t\t \t\t\n\t\t}\n\t\t\n\t\t}\n\t\t</script>\");\t\n\t}\n\tmysql_free_result($result0);\n}",
"public function index()\n {\n //Using Eloquent instead of DB\n $videos = Videos::orderBy('votes', 'DESC')->get();\n return view('videos.index', [\n 'videos' => $videos\n ]); // resources/views/books/index.blade.php\n }",
"function show_one_video($video_id,$width,$height,$skin_media='default.zip'){\n\n\t\t$str_select=\"*\";\n\t\t$arr_where=array($this->_table.'.video_id'=>$video_id);\n\n\t\t$this->db->select($str_select);\n\t\t$this->db->where($arr_where);\n\n\t\t$query=$this->db->get($this->_table);\n\t\t$arr_video=$query->row_array();\n\n\t\t$string_video='';\n\n\t\tif(is_array($arr_video) && !empty($arr_video)){\n\n\t\t\tif(preg_match(\"/youtube.com/\",element('video_file',$arr_video,''))){\n\n\t\t\t\t$string_youtube=\"<iframe width='\".$width.\"' height='\".$height.\"' src='\".element('video_file',$arr_video,'').\"' frameborder='0' allowfullscreen></iframe>\";\n\t\t\t\treturn $string_youtube;\n\t\t\t}\n\n\t\t\t$string_flashvars=\"netstreambasepath=\".base_url();\n\t\t\t$string_flashvars.= \"&playlist.position=none\";\n\t\t\t$string_flashvars.= \"&playlist.size=0\";\n\t\t\t$string_flashvars.= \"&skin=\".base_url().DIR_PUBLIC.\"mediaplayer/skin/\".$skin_media;\n\t\t\t$string_flashvars.= \"&config=\".base_url().DIR_PUBLIC.\"mediaplayer/config/config.xml\";\n\t\t\t$string_flashvars.= \"&title=\".element('video_name',$arr_video,'');\n\t\t\t$string_flashvars.= \"&file=\".base_src_video(element('video_file',$arr_video,''));\n\t\t\tif(element('video_img',$arr_video,'') != \"\")\n\t\t\t\t$string_flashvars.= \"&image=\".base_src_img(element('video_img',$arr_video,''));\n\n\t\t\t$string_video=\"<object width='\".$width.\"' height='\".$height.\"' \";\n\t\t\t$string_video.= \"classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' \";\n\t\t\t$string_video.= \"codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' \";\n\t\t\t$string_video.= \"align='center' style='overflow:hidden'>\";\n\n\t\t\t$string_video.= \"<param name='movie' value='\".base_url().DIR_PUBLIC.\"mediaplayer/player.swf'>\";\n\t\t\t$string_video.= \"<param name='quality' value='high'>\";\n\t\t\t$string_video.= \"<param name='allowscriptaccess' value='always'>\";\n\t\t\t$string_video.= \"<param name='wmode' value='transparent'>\";\n\t\t\t$string_video.= \"<param name='allowfullscreen' value='true'>\";\n\t\t\t$string_video.= \"<param name='flashvars' value='\".$string_flashvars.\"'>\";\n\t\t\t$string_video.= \"<embed width='\".$width.\"' height='\".$height.\"' \";\n\t\t\t$string_video.= \"type='application/x-shockwave-flash' \";\n\t\t\t$string_video.= \"pluginspage='http://www.macromedia.com/go/getflashplayer' \";\n\t\t\t$string_video.= \"align='center' style='overflow:hidden' \";\n\n\t\t\t$string_video.= \"src='\".base_url().DIR_PUBLIC.\"mediaplayer/player.swf' \";\n\t\t\t$string_video.= \"quality='high' \";\n\t\t\t$string_video.= \"allowscriptaccess='always' \";\n\t\t\t$string_video.= \"wmode='transparent' \";\n\t\t\t$string_video.= \"allowfullscreen='true' \";\n\t\t\t$string_video.= \"flashvars='\".$string_flashvars.\"'>\";\n\t\t\t$string_video.= \"</object>\";\n\t\t}\n\t\treturn $string_video;\n\n\t}",
"public function actionThird()\n {\n $id = $_GET['id'];\n\n $title = VideoLibrary::model()->findByPK($id)->title;\n $description = VideoLibrary::model()->findByPK($id)->description;\n $url = VideoLibrary::model()->findByPK($id)->url;\n $this->render('watchVideo', array('url'=>$url,'title'=>$title,'description'=>$description) );\n }",
"function videos() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n if ($id > 0) {\n $query = \"select * from videos where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__); \n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n\n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n }\n }",
"public function show($id)\n {\n $video = Video::findOrFail($id);\n return view('admin.videos.show', compact('video'));\n }",
"public function add_video_glance() {\n\t\t/* How many videos are published. */\n\t\t$video_count = wp_count_posts( 'video' )->publish;\n\t\t\n\t\t/* Get the correct label (video, videos) depending on the count. */\n\t\t$video_type = get_post_type_object( 'video' );\n\t\t$video_text = _n( $video_type->labels->singular_name, $video_type->labels->name, intval( $video_count ), 'makigas-videoman' );\n\t\t\n\t\t/* Render HTML code. */\n\t\techo '<li class=\"page-count video-count\">';\n\t\techo '<a href=\"edit.php?post_type=video\">' . $video_count . ' ' . strtolower( $video_text ) . '</a>';\n\t\techo '</li>';\n\t\t\n\t\t/* TODO: content: \"\\f236\"; in CSS: */\n\t}",
"function pavi_shortcode_video($atts = array()){\n \n return pavi_get_display_video($atts);\n}",
"public static function getAllVideo()\n {\n \treturn VedioGallary::all();\n }",
"public function show($id)\n {\n $video = Video::find($id);\n return view('Admin.Videos.view')\n ->with('video',$video);\n }"
] | [
"0.72184587",
"0.6371902",
"0.63163924",
"0.63097936",
"0.62435746",
"0.622321",
"0.6176564",
"0.6164794",
"0.6153655",
"0.6133823",
"0.6124422",
"0.6115143",
"0.60959274",
"0.60726327",
"0.6063696",
"0.6013747",
"0.6006231",
"0.5990126",
"0.59749126",
"0.59701407",
"0.59503686",
"0.59349424",
"0.59314173",
"0.5930345",
"0.5924427",
"0.59123397",
"0.5904795",
"0.5899546",
"0.58842206",
"0.58805263",
"0.58732885",
"0.58714795",
"0.5867279",
"0.5828705",
"0.582454",
"0.5797648",
"0.5797648",
"0.5797648",
"0.5797648",
"0.57971156",
"0.57966065",
"0.57943654",
"0.5790603",
"0.578583",
"0.5750624",
"0.5750226",
"0.5746987",
"0.57412905",
"0.57380205",
"0.57330734",
"0.5725273",
"0.5690417",
"0.5683701",
"0.5674137",
"0.56641066",
"0.5648198",
"0.56256306",
"0.5625009",
"0.56105363",
"0.56042606",
"0.55959034",
"0.55917025",
"0.5578024",
"0.55766386",
"0.5555005",
"0.5548687",
"0.55423796",
"0.55357754",
"0.5528382",
"0.55192786",
"0.5511682",
"0.5508185",
"0.5506265",
"0.5501141",
"0.5482655",
"0.5471943",
"0.54688126",
"0.5468109",
"0.54385597",
"0.5434625",
"0.54334146",
"0.5419952",
"0.5408437",
"0.54035074",
"0.54034615",
"0.54026246",
"0.54020405",
"0.5400995",
"0.5395226",
"0.5393148",
"0.5388618",
"0.5385211",
"0.5374705",
"0.53738475",
"0.5369352",
"0.53641605",
"0.53424144",
"0.53387195",
"0.53316313",
"0.53315586"
] | 0.71291244 | 1 |
Create an order based on the attributes of a charge. | public static function createForCharge(\Stripe\Charge $charge, $user)
{
return self::create([
'user_id' => $user->id,
'charge_id' => $charge['id'],
'charged_at' => $charge['created'],
'charge_amount' => $charge['amount'],
'card_last_four' => $charge['source']['last4'],
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildOrder($orders) {\n\t$order = [\n\t\t\"service_uid\" => $orders[0][15],\n\t\t\"points\" => 0,\n\t\t\"invoice_number\" => $orders[0][2],\n\t\t\"purchase_detail\" => [],\n\t\t\"prices\" => [],\n\t\t\"branch_name\" => $orders[0][0],\n\t\t\"createtime\" => date('Y-m-d H:i:s')\n\t];\n\n\t$total = 0;\n\t$discount = 0;\n\tforeach ($orders as $o) {\n\t\t$order['purchase_detail'][] = [\n\t\t\t\"sku\" => $o[3],\n\t\t\t\"product_name\" => $o[4],\n\t\t\t\"category\" => [$o[5], $o[6]],\n\t\t\t\"quantity\" => (int) abs($o[16]),\n\t\t\t\"unit_price\" => (float) $o[17],\n\t\t\t\"variations\" => [\n\t\t\t\t['name' => 'Linea', 'value' => $o[5]],\n\t\t\t\t['name' => 'Color', 'value' => $o[10]],\n\t\t\t\t['name' => 'Talle', 'value' => $o[11]],\n\t\t\t]\n\t\t];\n\n\t\t$total += (int) abs($o[16]) * (float) $o[17];\n\t\t$discount += abs($o[19]);\n\t}\n\n\t$order['prices'] = [\n\t\t\"gross\" => $total,\n\t\t\"discount\" => $discount,\n\t\t\"total\" => $total - $discount\n\t];\n\n\treturn $order;\n}",
"public function create_charge( $token, $order ) {\n\t\t$description = sprintf(\n\t\t\t'Total %s charged for %d items, including shipping cost %s & tax %s',\n\t\t\t$order->get_total(),\n\t\t\t$order->get_item_count(),\n\t\t\t$order->get_shipping_total(),\n\t\t\t$order->get_total_tax()\n\t\t);\n\n\t\t$country_code = WC()->countries->get_country_calling_code( $order->get_billing_country() );\n\t\t$phone_number = preg_replace( '/[^0-9]/i', '', $order->get_billing_phone() );\n\t\tif ( $country_code === substr( $phone_number, 0, strlen( $country_code ) ) ) {\n\t\t\t$phone_number = substr( $phone_number, strlen( $country_code ) );\n\t\t}\n\n\t\t$data = array(\n\t\t\t'amount' => $order->get_total(),\n\t\t\t'currency' => $order->get_currency(),\n\t\t\t'threeDSecure' => true,\n\t\t\t'save_card' => false,\n\t\t\t'description' => $description,\n\t\t\t'statement_descriptor' => 'Sample',\n\t\t\t'reference' => array(\n\t\t\t\t'order' => $order->get_id()\n\t\t\t),\n\t\t\t'receipt' => array(\n\t\t\t\t'email' => false,\n\t\t\t\t'sms' => false\n\t\t\t),\n\t\t\t'customer' => array(\n\t\t\t\t'first_name' => $order->get_billing_first_name(),\n\t\t\t\t'last_name' => $order->get_billing_last_name(),\n\t\t\t\t'email' => $order->get_billing_email(),\n\t\t\t\t'phone' => array(\n\t\t\t\t\t'country_code' => $country_code,\n\t\t\t\t\t'number' => $phone_number\n\t\t\t\t)\n\t\t\t),\n\t\t\t'source' => array(\n\t\t\t\t'id' => $token\n\t\t\t),\n\t\t\t'post' => array(\n\t\t\t\t'url' => 'http://your_website.com/post_url'\n\t\t\t),\n\t\t\t'redirect' => array(\n\t\t\t\t'url' => $order->get_checkout_order_received_url()\n\t\t\t)\n\t\t);\n\n\t\treturn $this->request( 'charges', 'POST', $data );\n\t}",
"public function create()\n {\n $order = new Order();\n $order->setAccountId($this->accountId);\n $order->setLanguage($this->language);\n\n return $order;\n }",
"public function buildOrderRequest(Model $order, string $currency)\n {\n $data = [\n 'idempotency_key' => uniqid(),\n 'order' => [\n 'reference_id'=> (string) $order->id,\n 'line_items' => $this->buildProducts($order->products, $currency),\n 'discounts' => $this->buildDiscounts($order->discounts, $currency),\n 'taxes' => $this->buildTaxes($order->taxes),\n ],\n ];\n\n // Add product level discounts to order level taxes\n if ($this->productDiscounts->isNotEmpty()) {\n $data['order']['discounts'] = $this->productDiscounts->merge($data['order']['discounts'])->toArray();\n $this->productDiscounts = collect([]);\n }\n\n // Add product level taxes to order level taxes\n if ($this->productTaxes->isNotEmpty()) {\n $data['order']['taxes'] = $this->productTaxes->merge($data['order']['taxes'])->toArray();\n $this->productTaxes = collect([]);\n }\n\n return new CreateOrderRequest($data);\n }",
"public function create() : Orders;",
"public function createCharge(array $attributes)\n {\n return $this->makeCharge($attributes)->commit();\n }",
"public function makeCharge(array $attributes = [])\n {\n return $this->makeTransaction('oneclick.charge', $attributes);\n }",
"public function generateOrder();",
"protected function mapChargeToObject()\n {\n if (is_null($this->_charge)) {\n return $this;\n }\n\n $this->setData('transaction_id', $this->_charge->id);\n $this->setData('description', $this->_charge->description);\n $this->setData('amount', $this->_charge->amount);\n $this->setData('status', $this->_charge->status);\n $this->setData('fiat_value', $this->_charge->fiat_value);\n $this->setData('source_fiat_value', $this->_charge->source_fiat_value);\n $this->setData('currency', $this->_charge->currency);\n $this->setData('created_at', $this->_charge->created_at);\n $this->setData('order_id', $this->_charge->order_id);\n $this->setData('success_url', $this->_charge->success_url);\n $this->setData('notes', $this->_charge->notes);\n\n $this->setData('transactions', new Varien_Data_Collection());\n if ($this->_charge->transactions && is_array($this->_charge->transactions)) {\n $transactions = new Varien_Data_Collection();\n\n foreach ($this->_charge->transactions as $transaction) {\n $item = Mage::getModel('opennode_bitcoin/transaction', $transaction);\n $transactions->addItem($item);\n }\n\n $this->setData('transactions', $transactions);\n }\n\n $this->setData('lightning_invoice', Mage::getModel('opennode_bitcoin/invoice_ligthning',\n $this->_charge->lightning_invoice\n ));\n\n $this->setData('chain_invoice', Mage::getModel('opennode_bitcoin/invoice_onChain',\n $this->_charge->chain_invoice\n ));\n\n return $this;\n }",
"public function create(Order $order)\n {\n //\n }",
"public static function createOrder($data)\r\n\t{\r\n\t\treturn new Order($id);\r\n\t}",
"public function make()\n {\n $orderState = new OrderState();\n $orderState->setProcessed(true);\n $orderState->setShipped(false);\n\n $orderItem1 = new LineItem();\n $orderItem1->setName('someItemName1');\n $orderItem1->setDescription('item description');\n $orderItem1->setQuantity(1);\n $orderItem1->setSku('AS1210000');\n $orderItem1->setSalePrice('90.00');\n $orderItem1->setTotalPrice('100.00');\n\n $orderItem2 = new LineItem();\n $orderItem2->setName('someItemName2');\n $orderItem2->setDescription('item description');\n $orderItem2->setQuantity(1);\n $orderItem2->setSku('AS3420000');\n $orderItem2->setSalePrice('40.00');\n $orderItem2->setTotalPrice('50.00');\n\n $order = new Order();\n $order->setGrandTotal('160.00');\n $order->setOrderDate(Carbon::parse('2017-05-12T00:00:00.000Z'));\n $order->setTaxAmount('15.00');\n $order->setCurrency('AUD');\n $order->setCustomerOrderId('ORDER-123456789');\n\n $order->setLineItems(collect([$orderItem1,$orderItem2]));\n $order->setStates($orderState);\n\n return $order;\n }",
"private function prepareOrderData($data)\n {\n $order = new Order();\n $order->datumPorucivanja = isset($data->datumPorucivanja) ? $data->datumPorucivanja : \"\";\n $order->datumTransakcije = isset($data->datumTransakcije) ? $data->datumTransakcije : \"\";\n $order->idPorudzbine = isset($data->idPorudzbine) ? $data->idPorudzbine : \"\";\n $order->napomena = isset($data->napomena) ? $data->napomena : \"\";\n $order->idProizvoda = isset($data->idProizvoda) ? $data->idProizvoda : \"\";\n $order->idKlijenta = isset($data->idKlijenta) ? $data->idKlijenta : \"\";\n return $order;\n }",
"protected function createOrder(){\n $order = Auth::user()->orders()->create(['status' => 'aguardando']);\n\n return $order;\n }",
"public function create(array $data): Order\n {\n return Order::create($data);\n }",
"private function createOrder()\n {\n $order = $this->getMock(\\OxidEsales\\Eshop\\Application\\Model\\Order::class, array('validateDeliveryAddress', '_sendOrderByEmail'));\n // sending order by email is always successful for tests\n $order->expects($this->any())->method('_sendOrderByEmail')->will($this->returnValue(1));\n //mocked to circumvent delivery address change md5 check from requestParameter\n $order->expects($this->any())->method('validateDeliveryAddress')->will($this->returnValue(0));\n\n $this->testOrderId = substr_replace( oxRegistry::getUtilsObject()->generateUId(), '_', 0, 1 );\n $order->setId($this->testOrderId);\n\n return $order;\n }",
"public function create_order( $args = array() )\n {\n return $this->_request('createorder', $args);\n }",
"public function creating(Order $Order)\n {\n //code...\n }",
"public static function createOrder ()\n\t{\n $user=Auth::user();// here to get the user info and store it in the $user variable\n $order=$user->orders()->create([\n 'total'=>Cart::total(),\n 'delivered' =>0\n\n ]);\n // the delivered column will get by default the value zero which means that this order\n // is not delivered yet \n\n $cartItems=cart::content();\n //seek for intels about attach function \n\n foreach($cartItems as $cartItem)\n $order->orderItems()->attach($cartItem->id,[\n 'qty'=>$cartItem->qty ,\n 'total' => $cartItem->qty*$cartItem->price \n ]);\n\n\t}",
"public function createOrders()\n {\n $orderIds = array();\n $this->_validate();\n\n $shippingAddresses = $this->getQuote()->getAllShippingAddresses();\n $orders = array();\n\n if ($this->getQuote()->hasVirtualItems()) {\n $shippingAddresses[] = $this->getQuote()->getBillingAddress();\n }\n\n try {\n $quote = $this->getQuote();\n $quote->unsReservedOrderId();\n $quote->reserveOrderId();\n $incrementid = $quote->getReservedOrderId();\n $index = 1;\n\n // Step 1: Create Bundle Order\n $bundleorder = $this->_createBundleOrder();\n\n foreach ($shippingAddresses as $address) {\n $order = $this->_prepareOrderCustomIncrementId($incrementid.'-'.$index, $address);\n $orders[] = $order;\n Mage::dispatchEvent(\n 'checkout_type_multishipping_create_orders_single',\n array('order'=>$order, 'address'=>$address)\n );\n\n $index++;\n }\n\n // Step 2: Reference Address Order to Bundle Order\n\n // return $this;\n\n foreach ($orders as $order) {\n $order->place();\n $order->save();\n if ($order->getCanSendNewEmailFlag()){\n $order->queueNewOrderEmail();\n }\n $orderIds[$order->getId()] = $order->getIncrementId();\n }\n\n // Step 3: set last order id\n Mage::getSingleton('core/session')->setOrderIds($orderIds);\n // Mage::getSingleton('checkout/session')->setLastQuoteId($this->getQuote()->getId());\n\n // $this->getQuote()\n // ->setIsActive(false)\n // ->save();\n //\n // Mage::dispatchEvent('checkout_submit_all_after', array('orders' => $orders, 'quote' => $this->getQuote()));\n\n return $this;\n } catch (Exception $e) {\n Mage::dispatchEvent('checkout_multishipping_refund_all', array('orders' => $orders));\n throw $e;\n }\n }",
"function createOrder() {\n\t$postData = new Order;\n\n\treturn $postData->getOrderJson();\n}",
"protected function createOrder(array $data = null)\n {\n $order = new Order();\n if ($data !== null) {\n $order->setData($data);\n }\n return $order;\n }",
"public static function createOrder(array $data)\n {\n $orderOpen = new Order($data);\n $orderOpen->save();\n return $orderOpen;\n }",
"private function _serializeOrder($record)\n {\n $order = new Order();\n $order->OrderID = $record['OrderID'];\n $order->CustomerID = $record['CustomerID'];\n $order->EmployeeID = $record['EmployeeID'];\n $order->OrderDate = !is_null($record['OrderDate']) ? $record['OrderDate']->format('Y-m-d\\TH:i:s'): null;\n $order->RequiredDate = !is_null($record['RequiredDate']) ? $record['RequiredDate']->format('Y-m-d\\TH:i:s'): null;\n $order->ShippedDate = !is_null($record['ShippedDate']) ? $record['ShippedDate']->format('Y-m-d\\TH:i:s'): null;\n $order->ShipVia = $record['ShipVia'];\n $order->Freight = $record['Freight'];\n $order->ShipName = $record['ShipName'];\n $order->ShipAddress = $record['ShipAddress'];\n $order->ShipCity = $record['ShipCity'];\n $order->ShipRegion = $record['ShipRegion'];\n $order->ShipPostalCode = $record['ShipPostalCode'];\n $order->ShipCountry = $record['ShipCountry'];\n return $order;\n }",
"public function createOrder($arr){\n\t\t$start_coordinates = implode(\",\", $arr['origin']);\n\t\t$end_coordinates = implode(\",\", $arr['origin']);\n\t\t$distance = $arr['distance'];\n\t\t$arr = $this->model->create([\n\t\t\t'start_coordinates' => $start_coordinates,\n\t\t\t'end_coordinates' => $end_coordinates,\n\t\t\t'distance' => $distance,\n\t\t\t'status' => 'UNASSIGNED'\n\t\t]);\n\t\treturn $arr;\n\t}",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"function line_allowance_charge_new($args)\n {\n global $_lib;\n $allowance_chargeH['invoicelineallowancecharge_InvoiceType'] = 'in';\n $allowance_chargeH['invoicelineallowancecharge_InvoiceLineID'] = $args['LineID'];\n $allowance_chargeH['invoicelineallowancecharge_AllowanceChargeType'] = 'line';\n return $_lib['db']->db_new_hash($allowance_chargeH, $this->line_allowance_charge_table);\n }",
"public static function get_order_by_charge_id( $charge_id ) {\n\t\tglobal $wpdb;\n\n\t\t$order_id = $wpdb->get_var( $wpdb->prepare( \"SELECT DISTINCT ID FROM $wpdb->posts as posts LEFT JOIN $wpdb->postmeta as meta ON posts.ID = meta.post_id WHERE meta.meta_value = %s AND meta.meta_key = %s\", $charge_id, '_transaction_id' ) );\n\n\t\tif ( ! empty( $order_id ) ) {\n\t\t\treturn wc_get_order( $order_id );\n\t\t}\n\n\t\treturn false;\n\t}",
"public function generateOrderFromPayPal($payload) {\n $response = self::checkPayPalResponseForErrors($payload);\n\n $paypal_order_id = array_key_exists(\"id\", $response) ? $response->id : \"id\";\n $purchase_unit = $response->purchase_units[0];\n $order_reference = array_key_exists(\"reference_id\", $purchase_unit) ? $purchase_unit->reference_id : bin2hex(uniqid());\n\n $products_licenses = (object) array();\n // from separate product objects with the same product_code, each containing only 1 license, create one product object with all licenses\n foreach($purchase_unit->items as $item) {\n if (array_key_exists(\"sku\", $item)) {\n $items = explode(\";\", base64_decode($item->sku));\n if (count($items) == 2) {\n $product_code = $items[0];\n $license_key = $items[1];\n \n if (array_key_exists($product_code, $products_licenses)) {\n $licenses = array_merge($products_licenses->$product_code, array(array(\"key\" => $license_key)));\n } else {\n $licenses = array(array(\"key\" => $license_key));\n }\n $products_licenses->$product_code = $licenses;\n }\n }\n }\n // basic order data\n $order_data = (object) array();\n $order_data->id = $order_reference . \"_paypal_\" . $paypal_order_id;\n $order_data->created = array_key_exists(\"create_time\", $response) ? date(\"Y-m-j H:i:s\", strtotime($response->create_time)) : \"\";\n $order_data->append = true;\n\n // customer data\n if (array_key_exists(\"payer\", $response)) {\n $order_data->customer = (object) array();\n $order_data->customer->email = array_key_exists(\"email_address\", $response->payer) ? $response->payer->email_address : \"\";\n\n if (array_key_exists(\"name\", $response->payer)) {\n $order_data->customer->first_name = array_key_exists(\"given_name\", $response->payer->name) ? $response->payer->name->given_name : \"\";\n $order_data->customer->last_name = array_key_exists(\"surname\", $response->payer->name) ? $response->payer->name->surname : \"\";\n }\n }\n // order items\n $order_data->items = array();\n foreach($products_licenses as $key => $value) {\n array_push($order_data->items, array(\n \"product_code\" => $key,\n \"licenses\" => $value,\n ));\n }\n return json_encode($order_data);\n }",
"public function create( &$order ) {\n\t\t/**\n\t\t * Filter the generated order ID.\n\t\t *\n\t\t * @param string $order_key The uniquely-generated ID for this order.\n\t\t */\n\t\t$order_key = apply_filters( 'woocommerce_generate_order_key', uniqid( 'order_' ) );\n\n\t\t$order->set_order_key( 'wc_' . $order_key );\n\t\t$this->creating = true;\n\n\t\tparent::create( $order );\n\t}",
"public function newOrder($values)\n\t{\n\t\treturn $this->getRequest('NewOrder', $values);\n\t}",
"public function create()\n {\n if (!is_null($this->_charge)) {\n return $this;\n }\n\n $this->_charge = Charge::create($this->getParams(), $this->getAuth());\n $this->mapChargeToObject();\n return $this;\n }",
"public function createObjectFromArray(array $data){\r\n\r\n $order = new Order( $data['customer_id'],\r\n $data['date'],\r\n $data['id']\r\n );\r\n return $order;\r\n }",
"public function createReverseCharge(array $attributes)\n {\n return $this->makeReverseCharge($attributes)->commit();\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function newEntity(array $attributes = [])\n\t{\n\t\treturn new SaleOrder($attributes);\n\t}",
"public function __construct($order)\n {\n $this->order=$order;\n }",
"public function order_create()\n {\n $this->_checkPartner();\n \n $mod_c = $this->_getConfig();\n if(isset($mod_c['orders_limit']) && $mod_c['orders_limit']) {\n $sql = \"SELECT COUNT(id) FROM client_order WHERE client_id = :cid AND DATE_FORMAT(created_at, '%Y-%m-%d') = :date GROUP BY client_id\";\n $count = R::getCell($sql, array('cid'=>$this->client->id, ':date'=>date('Y-m-d')));\n if($count >= $mod_c['orders_limit']) {\n throw new Box_Exception('Daily orders limit reached. Order today :today out of :limit', array(':today'=>$count, ':limit'=>$mod_c['orders_limit']), 8804);\n }\n }\n \n $partner = $this->service->getPartner($this->client);\n $price = $this->service->getPartnerPrice($this->client);\n \n if(isset($mod_c['check_balance']) && $mod_c['check_balance']) {\n $client = $this->getApiAdmin()->client_get(array('id'=>$this->client->id));\n if($client['balance'] < $price) {\n throw new Box_Exception('Not enough money in balance to create order. You must have at least $:price in your balance', array(':price'=>$price), 8808);\n }\n }\n \n if(!isset($mod_c['lid'])) {\n throw new Box_Exception('Partners program is temporary disabled.',null, 8806);\n }\n \n if($partner->product_id) {\n $product_id = $partner->product_id;\n } else {\n $product_id = $mod_c['lid'];\n }\n \n $odata = array(\n 'client_id' => $this->client->id,\n 'product_id' => $product_id,\n 'price' => $price,\n 'quantity' => 1,\n 'period' => '1M',\n 'activate' => true,\n 'invoice_option' => 'no-invoice',\n 'config' => array(\n 'partner_id' => $this->client->id,\n ),\n );\n \n $order_id = $this->getApiAdmin()->order_create($odata);\n \n $odata = array(\n 'id' => $order_id,\n 'invoice_option'=> 'issue-invoice',\n 'expires_at' => date('Y-m-d', strtotime('+14 days')),\n );\n $this->getApiAdmin()->order_update($odata);\n \n $this->service->addOrderForPartner($this->client, $order_id);\n \n $this->getApiAdmin()->hook_call(array('event'=>'onAfterPartnerOrderCreate', 'params'=>array('client_id'=>$this->client->id, 'order_id'=>$order_id)));\n \n $this->_log('Partner created new order #%s', $order_id);\n return $order_id;\n }",
"public function createCustomOrder()\n {\n AutoEvent::select('custom_order')->increment('custom_order', 1);\n $this->custom_order = 0;\n }",
"public function getOrder()\n {\n // echo 'start at order_id = ' . $first ;\n // echo '<br><br>';\n $raws = DB::table('raw_order_transaction')->where('migrate_status', 'no')->take(100)->get();\n\n foreach ($raws as $key => $val)\n {\n try\n {\n $order = new Order;\n\n // Auto\n // $order->id = ;\n // $order->pkey = ;\n\n // OK\n $order->app_id = 1;\n $order->order_ref = $val->order_ref;\n $order->ref1 = $val->ref_1;\n $order->ref2 = $val->ref_2;\n $order->ref3 = $val->ref_3;\n\n // Set payment_order_id = null (Temporarily)\n $order->payment_order_id = NULL;\n $order->barcode = $val->barcode;\n\n // Right ?\n $order->customer_ref_id = $val->member_ref_id;\n\n // OK\n $order->customer_name = $val->customer_name;\n $order->customer_address = $val->customer_address;\n $order->customer_district = $val->customer_district;\n $order->customer_district_id = (int) DB::table('districts')->where('name', '=', $val->customer_district)->pluck('id');\n $order->customer_city = $val->customer_city;\n $order->customer_city_id = (int) DB::table('cities')->where('name', '=', $val->customer_city)->pluck('id');\n $provinceId = (int) DB::table('cities')->where('name', '=', $val->customer_city)->pluck('province_id');\n if ($provinceId > 0)\n {\n $order->customer_province = DB::table('provinces')->where('id', $provinceId)->pluck('name');\n $order->customer_province_id = $provinceId;\n }\n $order->customer_postcode = $val->customer_postcode;\n $order->customer_tel = $val->customer_tel;\n $order->customer_email = $val->customer_email;\n\n // Where ?\n $order->customer_info_modified_at = NULL;\n\n $order->payment_channel = $val->payment_channel;\n\n if ( !empty($val->payment_method_code) )\n {\n if ( $val->payment_method_code == 'CCinstM#3' or $val->payment_method_code == 'CCinstM#6' )\n {\n $val->payment_method_code = 'CCinstM';\n }\n\n $order->payment_method = DB::table('payment_methods')->where('code', '=', $val->payment_method_code)->pluck('id');\n }\n\n $order->installment = $val->installment;\n $order->transaction_time = $val->transaction_time;\n $order->total_price = $val->total_price;\n\n // Calculate Later ?\n $order->discount = 0;\n\n // OK ?\n $order->discount_text = NULL;\n $order->total_shipping_fee = 0;\n\n // right ?\n $order->sub_total = $order->total_price - $order->discount;\n\n $orderStatus = array(\n // 'delivering' => Order::SHIPPING_SENDING,\n 'order-complete' => Order::STATUS_NEW,\n 'waiting-payment' => Order::STATUS_WAITING,\n // 'success' => Order::STATUS_COMPLETE\n );\n\n if ( !empty($val->order_status) )\n {\n if ( Str::slug($val->order_status) == 'delivering' or Str::slug($val->order_status) == 'success' )\n {\n continue;\n }\n\n $order->order_status = $orderStatus[Str::slug($val->order_status)];\n }\n\n $paymentStatus = array(\n 'success' => Order::PAYMENT_RECONCILE,\n 'processing' => Order::PAYMENT_WAITING,\n 'waiting-approve' => Order::PAYMENT_SUCCESS,\n 'failed' => Order::PAYMENT_FAILED\n );\n\n if ( !empty($val->payment_status) )\n {\n $order->payment_status = $paymentStatus[Str::slug($val->payment_status)];\n }\n\n // ???\n $order->gift_status = NULL;\n $order->sla_time_at = NULL;\n $order->customer_status = NULL;\n $order->customer_sla_time_at = NULL;\n\n // ???\n $order->expired_at = $val->expired_at;\n $order->invoice = $val->invoice;\n // Default\n $order->analytics_status = ( empty($val->analytic_status) ) ? 'N' : $val->analytic_status ;\n $order->created_at = ( empty($val->created_at) ) ? date('Y-m-d H:i:s') : $val->created_at ;\n $order->updated_at = ( empty($val->updated_at) ) ? date('Y-m-d H:i:s') : $val->updated_at ;\n $order->deleted_at = $val->deleted_at;\n\n $order->save();\n\n // Mapping\n DB::table('order_maps')->insert(\n array(\n 'itruemart_id' => $val->order_id,\n 'pcms_id' => $order->id,\n 'pkey' => $order->pkey,\n )\n );\n\n // In this migration data, 1 order has only one shipments,\n // create shipment for this order\n $orderShipment = new OrderShipment;\n $orderShipment->order_id = $order->id;\n\n // null ?\n $orderShipment->shipment_ref = '';\n\n // Fix !\n $orderShipment->shipping_method = ShippingMethod::where('name', '=', 'iTruemart Free Shipping')->pluck('id');\n $orderShipment->shipping_fee = 0;\n\n // Fix ?\n $orderShipment->shipment_status = 'delivered';\n\n // We'll calculate this later.\n $orderShipment->total_price = 0;\n\n $orderShipment->stock_type = NULL;\n $orderShipment->vendor_id = NULL;\n $orderShipment->shop_id = NULL;\n $orderShipment->tracking_number = NULL;\n $orderShipment->sla_time_at = NULL;\n $orderShipment->created_at = $val->created_at;\n $orderShipment->updated_at = $val->updated_at;\n $orderShipment->deleted_at = $val->deleted_at;\n\n $orderShipment->save();\n\n\n\n $rawItems = DB::table('raw_order_item')->where('order_id', $val->order_id)->get();\n\n foreach ($rawItems as $k => $item)\n {\n try\n {\n if ( empty($item->order_id) or empty($item->inventory_id) or empty($item->name) or empty($item->quantity) or empty($item->price) )\n {\n continue;\n }\n\n // $osi is mean '$orderShipmentItem'\n $osi = new OrderShipmentItem;\n $osi->shipment_id = $orderShipment->id;\n $osi->order_id = $order->id;\n $osi->material_code = $item->material_code;\n $osi->inventory_id = $item->inventory_id;\n $osi->name = $item->name;\n // $osi->category = ;\n // $osi->brand = ;\n $osi->quantity = $item->quantity;\n // $osi->price = $item->price;\n // $osi->margin = $item->margin;\n // $osi->discount = $item->discount;\n // $osi->total_price = $item->total_price;\n\n // itruemart logic ??? WTF !?\n $osi->price = $item->total_price;\n $osi->total_price = $osi->price * $osi->quantity;\n $osi->margin = $item->margin;\n $osi->total_margin = $item->total_margin;\n $osi->discount = $item->discount;\n\n $osi->vendor_id = (int) $item->vendor_id;\n $osi->shop_id = (int) $item->shop_id;\n $osi->options = $item->options;\n // default\n // $osi->item_status = ;\n // $osi->is_gift_item = ;\n $osi->tracking_number = $item->tracking_number;\n $osi->created_at = $item->created_at;\n $osi->updated_at = $item->updated_at;\n $osi->deleted_at = $item->deleted_at;\n\n $osi->save();\n\n DB::table('raw_order_item')->where('id', $item->id)->update( array('migrate_status' => 'yes') );\n }\n catch (Exception $e)\n {\n d($e);\n DB::table('raw_order_item')->where('id', $item->id)->update( array('migrate_status' => 'error') );\n die();\n }\n }\n\n DB::table('raw_order_transaction')->where('id', $val->id)->update( array('migrate_status' => 'yes') );\n }\n catch (Exception $e)\n {\n d($e);\n DB::table('raw_order_transaction')->where('id', $val->id)->update( array('migrate_status' => 'error') );\n die();\n }\n }\n\n $count = count($raws);\n echo \"migrate complete. ( {$count} rows )\";\n\n echo '<script>';\n echo 'var delay = 5000;';\n echo 'setTimeout(function(){';\n echo 'window.location.reload();';\n echo '}, delay);';\n echo '</script>';\n }",
"public function createCharge(array $details)\n {\n try {\n $charge = Charge::create([\n 'source' => $details['token'],\n 'amount' => $details['amount'],\n 'currency' => strtolower($details['currency']),\n 'customer' => $details['stripe_id'] ?? (optional(Auth::user())->stripe_id ? Auth::user()->stripe_id : null),\n 'description' => $details['description'] ?? null,\n 'metadata' => $details['metadata'] ?? null,\n ]);\n\n if ($details['order'] ?? false) {\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment succeeded: {$charge->id}\");\n }\n\n return $charge;\n } catch (Stripe_CardError $e) {\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n } catch (Stripe_InvalidRequestError $e) {\n // Invalid parameters were supplied to Stripe's API\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n } catch (Stripe_AuthenticationError $e) {\n // Authentication with Stripe's API failed\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n } catch (Stripe_ApiConnectionError $e) {\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n } catch (Stripe_Error $e) {\n // Display a very generic error to the user\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n } catch (Exception $e) {\n // Something else happened, completely unrelated to Stripe\n report($e);\n if ($details['order'] ?? false) {\n $this->updateOrderStatus($details['order'], 'STATUS_PAYMENT_FAILED');\n\n activity()\n ->performedOn($details['order'])\n ->log(\"Payment failed: {$e->getMessage()}\");\n }\n throw new PaymentFailedException($e->getMessage());\n }\n }",
"public function createQuote()\n\t{\n\t\t$this->setType($_POST['frmquotetype']);\n\t\t$this->setDate($_POST['frmquotedate']);\n\t\t$this->setStatus('Open');\n\t\t$this->setJobName($_POST['frmjobname']);\n\t\t$this->setJobAddress($_POST['frmjobaddress']);\n\t\t$this->setJobCity($_POST['frmjobcity']);\n\t\t$this->setJobZipcode($_POST['frmjobzipcode']);\n\t\t$this->setAttention($_POST['frmattn']);\n\t\t// Here we are going to post the tax rate and turn it into a float.\n\t\t$unformatted_tax_rate = $_POST['frmtaxrate'];\n\t\t$this->setTaxRate((float)$unformatted_tax_rate);\n\t\t$this->setCostBeforeTax($_POST['cartBeforeTaxCost']);\n\t\t$this->setTotalCost($_POST['cartTotalCost']);\n\t\t$this->setSalesTax($_POST['cartTax']);\n\t\t$this->setMonthlyTotal($_POST['cartMonthlyTotal']);\n\t\t$this->setDeliveryTotal($_POST['cartDeliveryTotal']);\n\t\t$this->setHidden(null);\n\n\t\t// Need to insert the new order into the database.\n\t\t$this->getDB()->insert('quotes', [\n\t\t\t\t'quote_customer' \t\t=> $this->getCustomer(),\n\t\t\t\t'quote_customer_id' \t=> $this->getCustomerId(),\n\t\t\t\t'quote_date' \t\t\t=> $this->getDate(),\n\t\t\t\t'quote_status' \t\t\t=> $this->getStatus(),\n\t\t\t\t'quote_type' \t\t\t=> $this->getType(),\n\t\t\t\t'job_name' \t\t\t\t=> $this->getJobName(),\n\t\t\t\t'job_city' \t\t\t\t=> $this->getJobCity(),\n\t\t\t\t'job_address' \t\t\t=> $this->getJobAddress(),\n\t\t\t\t'job_zipcode' \t\t\t=> $this->getJobZipcode(),\n\t\t\t\t'attn' \t\t\t\t\t=> $this->getAttention(),\n\t\t\t\t'tax_rate' \t\t\t\t=> $this->getTaxRate(),\n\t\t\t\t'cost_before_tax' \t\t=> $this->getCostBeforeTax(),\n\t\t\t\t'total_cost' \t\t\t=> $this->getTotalCost(),\n\t\t\t\t'sales_tax' \t\t\t=> $this->getSalesTax(),\n\t\t\t\t'monthly_total' \t\t=> $this->getMonthlyTotal(),\n\t\t\t\t'delivery_total'\t\t=> $this->getDeliveryTotal(),\n\t\t\t\t'hidden'\t\t\t\t=> $this->getHidden()\n\t\t\t]);\n\n\t\t// If properly inserted, grab the ID, else throw error.\n\t\tif($this->getDB()->lastId() != null)\n\t\t{\n\t\t\t$this->id = $this->getDB()->lastId();\n\t\t} \n\t\telse \n\t\t{\n\t\t\tthrow new Exception(\"There was an error inserting the quote into the database.\");\n\t\t}\n\t\t\n\t}",
"public function orders(): Orders\n {\n return new Orders($this);\n }",
"protected function createOrderFromQuote(string $reservedOrderId)\n {\n $quote = $this->getQuoteByReservedOrderId($reservedOrderId);\n if (!$quote instanceof \\Magento\\Quote\\Model\\Quote) {\n return;\n }\n\n //fix missing email validation\n if ($quote->getCustomerEmail() == null) {\n\n $quote->setCustomerEmail(\n $quote->getBillingAddress()->getEmail()\n );\n }\n\n $order = $this->createOrder($quote);\n\n //keep the quote active but remove the canceled order from it\n $quote->setIsActive(true);\n $quote->setOrigOrderId(null);\n $quote->setReservedOrderId(null);\n $quote->save();\n return $order;\n\n\n }",
"public function getOrder()\n {\n return $this->orderFactory->create()->load($this->getReservedOrderId(), 'increment_id');\n }",
"private function _buildOrderClause()\n {\n $order = array();\n\n switch ( $this->orderby ) {\n case self::ORDERBY_DATE:\n $order[] = 'date_enreg' . ' ' . $this->ordered;\n break;\n case self::ORDERBY_BEGIN_DATE:\n $order[] = 'date_debut_cotis' . ' ' . $this->ordered;\n break;\n case self::ORDERBY_END_DATE:\n $order[] = 'date_fin_cotis' . ' ' . $this->ordered;\n break;\n case self::ORDERBY_MEMBER:\n $order[] = 'nom_adh' . ' ' . $this->ordered;\n $order[] = 'prenom_adh' . ' ' . $this->ordered;\n break;\n case self::ORDERBY_TYPE:\n $order[] = ContributionsTypes::PK;\n break;\n case self::ORDERBY_AMOUNT:\n $order[] = 'montant_cotis' . ' ' . $this->ordered;\n break;\n /*\n Hum... I really do not know how to sort a query with a value that\n is calculated code side :/\n case self::ORDERBY_DURATION:\n break;*/\n default:\n $order[] = $this->orderby . ' ' . $this->ordered;\n break;\n }\n\n return $order;\n }",
"public function order($order) {\n\t\t$model = $this->model;\n\t\t// For each order field, it is added as an OrderField object\n\t\tforeach ($order as $field => $fieldOrder) {\n\t\t\t$this->order[] = new \\lulo\\query\\OrderField($this, $model, $field, $fieldOrder);\n\t\t}\n\t\treturn $this;\n\t}",
"public static function createOrder($currency, $amount, $client_id, $client_secret)\n {\n $request = new OrdersCreateRequest();\n $request->prefer('return=representation');\n $request->body = self::buildRequestBody($currency, $amount);\n // 3. Call PayPal to set up a transaction\n $client = PayPalClient::client($client_id, $client_secret);\n return $client->execute($request);\n dd(\"cjkasdf\");\n }",
"function __construct ()\n\t\t{\n\t\t\tparent::__construct ('Charges', 'Charge', 'Charge');\n\t\t}",
"public function newOrder($order)\n {\n $this->request = ['method' => 'POST', 'path' => '%2Fmerchant%2Forders%2F'];\n\n $concatenateParams = '';\n\n foreach ($order as $k => $v) {\n $value = urlencode($v);\n $concatenateParams .= \"&{$k}={$value}\";\n }\n\n $this->header = $this->setHeader($concatenateParams);\n\n $api = $this->callApi(\"merchant/orders/\", $this->request['method'], $order);\n\n return $api;\n }",
"protected function create_transaction_by_order( WC_Order $order ) {\n\t\t$space_id = get_option( WooCommerce_PostFinanceCheckout::CK_SPACE_ID );\n\t\t$create_transaction = new \\PostFinanceCheckout\\Sdk\\Model\\TransactionCreate();\n\t\t$create_transaction->setCustomersPresence( \\PostFinanceCheckout\\Sdk\\Model\\CustomersPresence::VIRTUAL_PRESENT );\n\t\t$space_view_id = get_option( WooCommerce_PostFinanceCheckout::CK_SPACE_VIEW_ID, null );\n\t\tif ( ! empty( $space_view_id ) ) {\n\t\t\t$create_transaction->setSpaceViewId( $space_view_id );\n\t\t}\n\t\t$create_transaction->setAutoConfirmationEnabled( false );\n\t\tif ( isset( $_COOKIE['wc_postfinancecheckout_device_id'] ) ) {\n\t\t\t$create_transaction->setDeviceSessionIdentifier( sanitize_text_field( wp_unslash( $_COOKIE['wc_postfinancecheckout_device_id'] ) ) );\n\t\t}\n\t\t$this->assemble_order_transaction_data( $order, $create_transaction );\n\t\t$create_transaction = apply_filters( 'wc_postfinancecheckout_modify_order_create_transaction', $create_transaction, $order );\n\t\t$transaction = $this->get_transaction_service()->create( $space_id, $create_transaction );\n\t\t$this->update_transaction_info( $transaction, $order );\n\t\treturn $transaction;\n\t}",
"private function _getSnapOrder(){\n\t $mOrder = $this->getOrder();\n\t \n\t\t$order = new SnapOrder();\n\t\t\n\t\t$order->id = $this->_getOrderId($this->getConfigData('order_prefix'), $mOrder->getRealOrderId());\n\t\t$order->total_subtotal = $mOrder->getSubtotal();\n\t\t$order->total_discount = abs($mOrder->getDiscountAmount());\n\t\t$order->total_shipping = $mOrder->getShippingAmount();\n\t\t$order->total_tax = $mOrder->getTaxAmount();\n\t\t$order->total = $mOrder->getBaseGrandTotal();\n\t\t$order->currency_code = $mOrder->getOrderCurrencyCode();\n\t\t\n\t\t$products = $mOrder->getAllItems();\n\t\tfor($i = 0; $i < count($products); $i++) {\n\t\t\t$order_lines[$i] = $this->_getOrderItem($products[$i]);\n\t\t}\n\t\t$order->lines = $order_lines;\n\t\t\n\t\t$billing = $mOrder->getBillingAddress();\n\t\t$shipping = $mOrder->getShippingAddress();\n\t\t\n\t\t$order->billto_address = $this->_getAddress($billing);\n\t\tif(!empty($shipping)){\n\t\t\t$order->shipto_address = $this->_getAddress($billing);\n\t\t}\n\t\t\n\t\treturn $order;\n\t}",
"public function setOrderAttributes($requestParameters = array());",
"private function create(): array\n {\n $response = $this->createClient()->v1()->orders()->create([\n 'symbol' => 'AGCO',\n 'qty' => 1,\n 'side' => 'buy',\n 'type' => 'market',\n 'time_in_force' => 'day'\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n\n return json_decode($response->getBody()->getContents(), true);\n }",
"public static function CreateOrder_Details(\n $Discount, \n $OrderID, \n $ProductID, \n $Quantity, \n $UnitPrice)\n { \n $Order_Details = new Order_Details();\n $Order_Details->Discount = $Discount;\n $Order_Details->OrderID = $OrderID;\n $Order_Details->ProductID = $ProductID;\n $Order_Details->Quantity = $Quantity;\n $Order_Details->UnitPrice = $UnitPrice;\n return $Order_Details;\n }",
"public function createTransaction($ch){\n $tx = new Transactions();\n $tx->cart_id = $this->cart_id;\n $tx->gateway = static::$gateway;\n $tx->type = $ch->payment_method_details->type;\n $tx->amount = $this->grandTotal;\n $tx->success = ($this->chargeSuccess)? 1 : 0;\n $tx->charge_id = $ch->id;\n $tx->reason = $ch->outcome->reason;\n $tx->card_brand = $ch->payment_method_details->card->brand;\n $tx->last4 = $ch->payment_method_details->card->last4;\n $tx->complex_save();\n return $tx;\n }",
"protected function prepareOrder($order_type_id, Context $context) {\n if (!isset($this->orders[$order_type_id])) {\n $order_storage = $this->entityTypeManager->getStorage('commerce_order');\n $this->orders[$order_type_id] = $order_storage->create([\n 'type' => $order_type_id,\n 'ip_address' => $this->requestStack->getCurrentRequest()->getClientIp(),\n // Provide a flag that can be used in the order create hook/event\n // to identify orders used for price calculation purposes.\n 'data' => ['provider' => 'order_price_calculator'],\n ]);\n }\n\n $order = $this->orders[$order_type_id];\n // Make sure that the order data matches the data passed in the context.\n $order->setStoreId($context->getStore()->id());\n $order->setCustomerId($context->getCustomer()->id());\n $order->setEmail($context->getCustomer()->getEmail());\n // Start from a clear set of adjustments each time.\n $order->clearAdjustments();\n\n return $order;\n }",
"public function actionOrder()\n {\n $request = Yii::$app->getRequest();\n $requestParams = $request->getBodyParams();\n \n if (empty($requestParams)) {\n $requestParams = $request->getQueryParams();\n }\n \n $query = Order::find()\n ->where(['customer_id' => $this->customer_id])\n ->andWhere(['<>', 'status_id', Order::STATUS_DRAFT])\n // filter based on date range\n ->andFilterWhere([\n 'between',\n 'ordered_at',\n $request->getBodyParam('order_from'),\n $request->getBodyParam('order_to')\n ]);\n \n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => ['params' => $requestParams],\n 'sort' => ['params' => $requestParams],\n ]);\n \n return $dataProvider;\n }",
"public function postOrderMake() {\n\n /*\n Array\n (\n [12_97d170e1550eee4afc0af065b78cda302a97674c] => 5\n [metrics] => Порода:\n Пол:\n Обхват шеи:\n Обхват груди:\n Длина спины:\n Обхват передней лапы:\n От шеи до передней лапы:\n Между передними лапами:\n\n [name] => фывчфы\n [email] => [email protected]\n [address] => фывфы\n [tel] => фывфы\n [pay_type] => 1\n )\n */\n\n #Helper::ta(Input::all());\n\n /**\n * Получаем корзину\n */\n CatalogCart::getInstance();\n $goods = CatalogCart::get_full();\n #Helper::ta($goods);\n\n /**\n * Формируем массив с продуктами\n */\n $products = [];\n if (count($goods)) {\n foreach ($goods as $good_hash => $good) {\n $products[$good_hash] = [\n 'id' => $good->id,\n 'count' => $good->_amount,\n 'price' => $good->price,\n 'attributes' => (array)$good->_attributes,\n ];\n }\n }\n #Helper::ta($products);\n\n $pay_type = @$this->pay_types[Input::get('pay_type')] ?: NULL;\n\n /**\n * Формируем окончательный массив для создания заказа\n */\n $order_array = [\n 'client_name' => Input::get('name'),\n 'delivery_info' => Input::get('address') . ' ' . Input::get('email') . ' ' . Input::get('tel'),\n 'comment' => $pay_type . \"\\n\\n\" . Input::get('metrics'),\n 'status' => 1, ## Статус заказа, нужно подставлять ID статуса наподобие \"Новый заказ\"\n 'products' => $products,\n ];\n #Helper::tad($order_array);\n\n $order = Catalog::create_order($order_array);\n\n /*\n $json_request = [];\n $json_request['responseText'] = '';\n $json_request['status'] = FALSE;\n\n if (is_object($order) && $order->id)\n $json_request['status'] = TRUE;\n\n\n return Response::json($json_request, 200);\n */\n\n if (is_object($order) && $order->id) {\n\n CatalogCart::clear();\n return Redirect::route('mainpage');\n #return Redirect::route('catalog-order-success');\n\n } else {\n\n return URL::previous();\n }\n }",
"public function buildChargeRequest(array $prepData)\n {\n return new CreatePaymentRequest($prepData);\n }",
"function allowance_charge_new($args)\n {\n global $_lib;\n $allowance_chargeH['invoiceallowancecharge_InvoiceType'] = 'in';\n $allowance_chargeH['invoiceallowancecharge_InvoiceID'] = $this->ID;\n return $_lib['db']->db_new_hash($allowance_chargeH, $this->allowance_charge_table);\n }",
"public static function createOrder($config = NULL)\n {\n if ($config == NULL) {\n WebPay::throwMissingConfigException();\n }\n\n return new CreateOrderBuilder($config);\n }",
"public function createMallCharge(array $attributes = [])\n {\n return $this->makeMallCharge($attributes)->commit();\n }",
"private function createMagentoOrder()\n {\n Mage::register('order_status_changing', true);\n\n /** @var Oyst_OneClick_Model_Magento_Quote $magentoQuoteBuilder */\n $magentoQuoteBuilder = Mage::getModel('oyst_oneclick/magento_quote', $this->orderResponse);\n $magentoQuoteBuilder->buildQuote();\n\n /** @var Oyst_OneClick_Model_Magento_Order $magentoOrderBuilder */\n $magentoOrderBuilder = Mage::getModel('oyst_oneclick/magento_order', $magentoQuoteBuilder->getQuote());\n $magentoOrderBuilder->buildOrder();\n\n $magentoOrderBuilder->getOrder()->addStatusHistoryComment(\n Mage::helper('oyst_oneclick')->__(\n '%s import order id: \"%s\".',\n $this->paymentMethod,\n $this->orderResponse['id']\n )\n )->save();\n\n // Change status of order if need to be invoice\n $this->changeStatus($magentoOrderBuilder->getOrder());\n\n Mage::unregister('order_status_changing');\n\n return $magentoOrderBuilder->getOrder();\n }",
"private function _addOrderElement($submit)\n {\n $order = $submit->addChild('order');\n $order['orderCode'] = $this->orderCode;\n if ($this->paResponse) {\n $info3DSecure = $order->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n $session = $order->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n return $order;\n }\n $this->_addDescriptionElement($order);\n $this->_addAmountElement($order);\n $this->_addPaymentDetailsElement($order);\n $this->_addShopperElement($order);\n $this->_addShippingElement($order);\n $this->_addBillingElement($order);\n\n\n if ($this->echoData) {\n $order->addChild('echoData', $this->echoData);\n }\n\n $this->_addDynamic3DSElement($order);\n $this->_addCreateTokenElement($order);\n $this->_addDynamicInteractionTypeElement($order);\n\n return $order;\n }",
"public function newEntity(array $attributes = [])\n {\n return new CustomerPayment();\n }",
"public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }",
"public function createExpressCheckoutOrder($tid){}",
"public function testCreateChargeable()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->post($this->url('chargeables'), [\n 'chargeable_service_id' => 1,\n 'owner_id' => 2\n ]);\n \n $response->assertStatus(201);\n\n $response->assertJsonStructure([\n 'id',\n 'chargeable_service_id',\n 'owner_id',\n 'amount'\n ]);\n\n $response->assertJson([\n 'chargeable_service_id' => 1\n ]);\n }",
"public function getOrders(){\n if ( is_null($this->orders) ){\n $db = $this->getTable()->getAdapter();\n $sid = $this->getCourier()->getId();\n\n //get all orders of courier service\n $sql = sprintf(\"select id from orders\n where (billCourier=0 or billCourier is NULL)\n and courierId = %d\",$sid);\n \n $rows = $db->fetchAll($sql);\n $orders = new SplObjectStorage();\n foreach($rows as $o){\n try{\n $order = new Yourdelivery_Model_Order($o['id']);\n\n if ( $order->getMode() == \"great\" && $order->getState() != 2 &&\n //check for great which do not provide pfand\n //kreiner, gela\n !in_array($order->getCourier()->getId(),array(12123,12115)) ){\n continue;\n }\n\n if ( $order->getState() < 0 ){\n continue;\n }\n\n if ( $order->getDeliverTime() > $this->until ){\n continue;\n }\n\n $orders->attach($order);\n }\n catch ( Yourdelivery_Exception_Database_Inconsistency $e ){\n\n }\n }\n $this->orders = $orders;\n }\n return $this->orders;\n }",
"public function createOrderState()\n\t{\n\t\t$this->pendingD();\n\t\t$this->acceptedD();\n\t\t$this->pendingP3f();\n\t\t$this->acceptedP3f();\n\t}",
"public function actionOrder()\n {\n // Получаем номер заказа из $_GET\n $orderId = intval(Yii::app()->request->getQuery('id'));\n\n // Инициализируем модель по номеру заказа\n $order = Orders::model()->find('id=:id AND status=:status', array(':id'=>$orderId,':status'=>'NEW'));\n\n // Если не найдено, выводим ошибку\n if ($order === null)\n {\n Yii::app()->user->setFlash('error', \"<strong>Ошибка!</strong> Заказ с таким номером не найден или у него изменен статус! Для решения проблемы оформите пожалуйста новый заказ!\");\n }\n else\n {\n // Пытаемся найти транзакцию в логах по номеру заказа\n $payment = Logpayment::model()->find('order_id=:order_id',array(':order_id'=>$orderId));\n\n // Если не нашли транзакцию, создаем новый лог\n if ($payment === null)\n {\n $payment = new Logpayment;\n $payment->user_id = $order->user_id;\n $payment->order_id = $order->id;\n $payment->amount = $order['price'];\n $payment->currency = $order['currency'];\n $payment->in_out = 'IN';\n $payment->pay_system = 'YAM';\n $payment->payed_type = 'AUTO';\n $payment->state = 'I';\n $payment->timestamp = new CDbExpression('NOW()');\n $payment->save();\n }\n else\n {\n if(in_array($payment->state,array(\"S\")))\n {\n Yii::app()->user->setFlash('error', \"<strong>Ошибка!</strong> Этот счет уже оплачен. Обратитесь к администратору сайта для решения проблемы (раздел Контакты).\");\n }\n }\n }\n \n // Параметры платежной системы\n $userModel = User::model()->findByPk($order->user_id);\n $uid = '410012058541159'; // Кошелек продавца\n $comment = urlencode ('Оплата заказа #'.$order->id.' от пользователя '.$userModel->email.' в интернет-магазине Gifm.ru'); // Комментарий\n\n $this->render('create',array('order'=>$order,'uid'=>$uid,'comment'=>$comment));\n }",
"public static function CreateNewOrder($user_id, $table_number, $dishes): Order\n {\n $price = 0;\n foreach ($dishes as $dish) {\n $dishPrice = Dish::find($dish['id'])->price;\n $price += $dish['quantity'] * $dishPrice;\n $dish['price'] = $dishPrice;\n }\n\n $order = new Order([\n \"price\" => $price,\n ]);\n\n // Set user id or table number\n if(!is_null($user_id)) {\n $order->user_id = $user_id;\n } else {\n $order->table_number = $table_number;\n }\n $order->save();\n\n // Add dishes to the order\n foreach ($dishes as $dish) {\n $order->dishes()->attach(\n $dish['id'],\n [\n 'quantity' => $dish['quantity'],\n 'price' => $dish['price'],\n 'comment' => $dish['comment'] ?? null,\n ]\n );\n }\n\n return $order;\n }",
"public function &CreateOrder($id, $date, $name, $value, $status)\n\t\t{\n\t\t\t$order = new DataPushOrder($id, $date, $name, $value, $status);\n\n\t\t\t$this->AddOrder($order);\n\n\t\t\treturn $order;\n\t\t}",
"protected function _getOrderCreateModel() {\n\t\treturn Mage::getSingleton('adminhtml/sales_order_create');\n\t}",
"public function creating(Order $order)\n\t{\n\t\t$user = auth()->user();\n\n\t\t// auto set status = pending\n\t\tif (is_null($order->status)) {\n\t\t\t$order->status = Order::STATUS_PENDING;\n\t\t}\n\n\t\t// auto set user_id\n\t\tif (!empty($user)) {\n\n\t\t\t// set user_id as author\n\t\t\tif (empty($order->user_id)) {\n\t\t\t\t$order->user_id = $user->id;\n\t\t\t}\n\n\t\t\t// set company_id\n\t\t\tif (\n\t\t\t\tempty($order->company_id) &&\n\t\t\t\t!is_null($user->getCurrentCompanyId())\n\t\t\t) {\n\t\t\t\t$order->company_id = $user->getCurrentCompanyId();\n\t\t\t}\n\t\t}\n\t}",
"public function charges();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function testCreateOrder() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'order_items' => [$order_item],\n 'uid' => $this->loggedInUser,\n 'store_id' => $this->store,\n ]);\n\n $order_exists = (bool) Order::load($order->id());\n $this->assertNotEmpty($order_exists, 'The new order has been created in the database.');\n }"
] | [
"0.5980189",
"0.59595215",
"0.5950711",
"0.59360516",
"0.58234584",
"0.5813438",
"0.58033156",
"0.5671984",
"0.56533015",
"0.5641409",
"0.5637551",
"0.5585764",
"0.5584091",
"0.55672723",
"0.55497193",
"0.55447143",
"0.5524416",
"0.55082005",
"0.54963654",
"0.5480509",
"0.5466246",
"0.54528815",
"0.53924996",
"0.5362724",
"0.5326967",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5314647",
"0.5299182",
"0.52931803",
"0.5275136",
"0.5273478",
"0.5261124",
"0.52458495",
"0.5236373",
"0.5230352",
"0.522814",
"0.522814",
"0.522814",
"0.522814",
"0.522814",
"0.522814",
"0.522814",
"0.522814",
"0.5209932",
"0.5203173",
"0.5193645",
"0.5186597",
"0.5178936",
"0.5176331",
"0.51716495",
"0.51674706",
"0.5164399",
"0.5163173",
"0.5157098",
"0.51540077",
"0.51516974",
"0.51278365",
"0.5120772",
"0.5110264",
"0.5096045",
"0.50954366",
"0.50954235",
"0.5075465",
"0.5067157",
"0.5063486",
"0.5053486",
"0.50389034",
"0.5036651",
"0.5031372",
"0.50255954",
"0.5015978",
"0.50154334",
"0.4996501",
"0.49941576",
"0.49861532",
"0.49815136",
"0.49764904",
"0.49741024",
"0.4964289",
"0.49527997",
"0.49506494",
"0.49301842",
"0.4919805",
"0.49153534",
"0.4912244",
"0.49111807",
"0.49111807",
"0.49111807",
"0.49111807",
"0.49111807",
"0.49111807",
"0.49083304"
] | 0.5040755 | 74 |
Display a listing of the resource. | public function index()
{
//
/*$roles = Role::all();
return view('blog.admin.categories.index')->withCategories($categories);*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
/*$this->validate($request,[
'name' => 'required|max:255'
]);
$category = new Category;
$category->name = $request->name;
$category->save();
Session::flash('success', ' New Category has been created');
return redirect()->route('categories.index');*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$roles = Role::all();
$role = Role::find($id);
$users = User::whereHas('roles', function ($query) use ($role){
$query->where('id',$role->id);
})->orderBy('created_at','desc')->paginate(10);
return view('users.role')->withRoles($roles)->withRole($role)->withUsers($users);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"public function remove($id);",
"public function remove($id);",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853",
"0.58968836",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58800334",
"0.5869308",
"0.5861188",
"0.5811069",
"0.5774596",
"0.5763277",
"0.5755447",
"0.5747713",
"0.5742094",
"0.573578",
"0.5727048",
"0.57164854",
"0.5712422",
"0.57092893",
"0.57080173",
"0.5707143",
"0.5704078",
"0.5696418",
"0.5684556",
"0.5684556",
"0.56790006",
"0.5678463",
"0.5658492",
"0.564975",
"0.5648406",
"0.56480885",
"0.5641393",
"0.5638992",
"0.56302536",
"0.56228197",
"0.5616424",
"0.5607389",
"0.56033397",
"0.5602035",
"0.55991143",
"0.55988586",
"0.5590501",
"0.5581284",
"0.55681103",
"0.5566215",
"0.55644745",
"0.5563726",
"0.55593926",
"0.55583876",
"0.5548547",
"0.5542015",
"0.5541403",
"0.5541403",
"0.55397224",
"0.55390894",
"0.55376494",
"0.5531044",
"0.5529739",
"0.55279493",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527671",
"0.5527155",
"0.5526666",
"0.55245256",
"0.552101",
"0.55183184"
] | 0.0 | -1 |
Array with fields from functions.clean_up.csvTableFields from TS Constructor. The method initiate the parent object | function __construct( $parentObj )
{
$this->pObj = $parentObj;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initCSV() {}",
"public function __construct()\n {\n parent::__construct(\"CSV headers and rows did not match up.\");\n }",
"public function __construct() {\n parent::__construct();\n $this->_table_columns = array(\"id\", \"entry_date\", \"account_type\", \"entry_value\", \"memo\", \"expense\", \"confirm\", \"deleted\", \"create_stamp\", \"modified_stamp\");\n }",
"public function csvData()\n {\n }",
"function &_getColumnsOfCSV(){\r\n \r\n $journal =& Request::getJournal();\r\n \r\n\t\t// Implement the columns of the CSV \r\n\t\t$columns = array();\r\n\t\t\r\n // General\r\n\t\tif (Request::getUserVar('checkProposalId')){\r\n\t\t\t$columns = $columns + array('proposalId' => Locale::translate(\"common.proposalId\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDecisions')){\r\n\t\t\t$columns = $columns + array('committee' => Locale::translate(\"editor.article.committee\"));\r\n\t\t\t$columns = $columns + array('decisionType' => Locale::translate(\"editor.reports.decisionType\"));\r\n\t\t\t$columns = $columns + array('decisionStatus' => Locale::translate(\"editor.reports.decisionStatus\"));\r\n\t\t\t$columns = $columns + array('decisionDate' => Locale::translate(\"editor.reports.decisionDate\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDateSubmitted')){\r\n\t\t\t$columns = $columns + array('submitDate' => Locale::translate(\"editor.reports.submitDate\"));\r\n\t\t}\r\n \r\n // Investigator(s)\r\n\t\tif (Request::getUserVar('checkName')){\r\n\t\t\t$columns = $columns + array('investigator' => Locale::translate(\"editor.reports.author\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkAffiliation')){\r\n\t\t\t$columns = $columns + array('investigatorAffiliation' => Locale::translate(\"editor.reports.authorAffiliation\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkEmail')){\r\n\t\t\t$columns = $columns + array('investigatorEmail' => Locale::translate(\"editor.reports.authorEmail\"));\r\n\t\t}\r\n \r\n // Titles and Abstract\r\n\t\tif (Request::getUserVar('checkScientificTitle')){\r\n\t\t\t$columns = $columns + array('scientificTitle' => Locale::translate(\"editor.reports.scientificTitle\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkPublicTitle')){\r\n\t\t\t$columns = $columns + array('publicTitle' => Locale::translate(\"editor.reports.publicTitle\"));\r\n\t\t}\r\n if (Request::getUserVar('checkBackground')){\r\n\t\t\t$columns = $columns + array('background' => Locale::translate(\"proposal.background\"));\r\n\t\t}\r\n if (Request::getUserVar('checkObjectives')){\r\n\t\t\t$columns = $columns + array('objectives' => Locale::translate(\"proposal.objectives\"));\r\n\t\t}\r\n if (Request::getUserVar('checkStudyMethods')){\r\n\t\t\t$columns = $columns + array('studyMethods' => Locale::translate(\"proposal.studyMethods\"));\r\n\t\t}\r\n if (Request::getUserVar('checkExpectedOutcomes')){\r\n\t\t\t$columns = $columns + array('expectedOutcomes' => Locale::translate(\"proposal.expectedOutcomes\"));\r\n\t\t}\r\n \r\n // Proposal Details\r\n\t\tif (Request::getUserVar('checkStudentResearch')){\r\n\t\t\t$columns = $columns + array('studentInstitution' => Locale::translate(\"editor.reports.studentInstitution\"));\r\n\t\t\t$columns = $columns + array('studentAcademicDegree' => Locale::translate(\"editor.reports.studentAcademicDegree\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkResearchDates')){\r\n\t\t\t$columns = $columns + array('startDate' => Locale::translate(\"proposal.startDate\"));\r\n\t\t\t$columns = $columns + array('endDate' => Locale::translate(\"proposal.endDate\"));\r\n } \r\n\t\tif (Request::getUserVar('checkKii')){\r\n\t\t\t$columns = $columns + array('kii' => Locale::translate(\"proposal.keyImplInstitution\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkMultiCountry')){\r\n\t\t\t$columns = $columns + array('countries' => Locale::translate(\"proposal.multiCountryResearch\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('nationwide')){\r\n\t\t\t$columns = $columns + array('nationwide' => Locale::translate(\"proposal.nationwide\"));\r\n\t\t} \r\n\t\tif (Request::getUserVar('checkResearchDomain')){\r\n\t\t\t$columns = $columns + array('researchDomain' => Locale::translate(\"proposal.researchDomains\"));\r\n\t\t}\r\n if (Request::getUserVar('checkResearchField')){\r\n\t\t\t$columns = $columns + array('researchField' => Locale::translate(\"proposal.researchField\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkProposalType')){\r\n\t\t\t$columns = $columns + array('proposalType' => Locale::translate(\"editor.reports.proposalType\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDataCollection')){\r\n\t\t\t$columns = $columns + array('dataCollection' => Locale::translate(\"editor.reports.dataCollection\"));\r\n\t\t}\r\n \r\n // Sources of Monetary and Material Support\r\n\t\tif (Request::getUserVar('checkTotalBudget')){\r\n\t\t\t$columns = $columns + array('totalBudget' => Locale::translate(\"proposal.fundsRequired\").' ('.$journal->getSetting('sourceCurrency').')');\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkSources')){\r\n\t\t\t$columns = $columns + array('sourceInstitution' => Locale::translate(\"editor.reports.spreadsheet.sourceInstitution\"));\r\n\t\t\t$columns = $columns + array('sourceAmount' => Locale::translate(\"editor.reports.spreadsheet.sourceAmount\").' ('.$journal->getSetting('sourceCurrency').')'); \r\n\t\t}\r\n \r\n // Risk Assessment\r\n\t\tif (Request::getUserVar('checkIdentityRevealed')){\r\n\t\t\t$columns = $columns + array('identityRevealed' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.identityRevealedAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkUnableToConsent')){\r\n\t\t\t$columns = $columns + array('unableToConsent' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.unableToConsentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkUnder18')){\r\n\t\t\t$columns = $columns + array('under18' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.under18Abb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDependentRelationship')){\r\n\t\t\t$columns = $columns + array('dependentRelationship' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.dependentRelationshipAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkEthnicMinority')){\r\n\t\t\t$columns = $columns + array('ethnicMinority' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.ethnicMinorityAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkImpairment')){\r\n\t\t\t$columns = $columns + array('impairment' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.impairmentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkPregnant')){\r\n\t\t\t$columns = $columns + array('pregnant' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.pregnantAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkNewTreatment')){\r\n\t\t\t$columns = $columns + array('newTreatment' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.newTreatmentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkBioSamples')){\r\n\t\t\t$columns = $columns + array('bioSamples' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.bioSamplesAbb'));\r\n\t\t\t$columns = $columns + array('exportHumanTissue' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.exportHumanTissueAbb'));\r\n\t\t\t$columns = $columns + array('exportReason' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.exportReason')); \r\n }\r\n\t\tif (Request::getUserVar('checkRadiation')){\r\n\t\t\t$columns = $columns + array('radiation' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.radiationAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDistress')){\r\n\t\t\t$columns = $columns + array('distress' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.distressAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkInducements')){\r\n\t\t\t$columns = $columns + array('inducements' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.inducementsAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkSensitiveInfo')){\r\n\t\t\t$columns = $columns + array('sensitiveInfo' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.sensitiveInfoAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkReproTechnology')){\r\n\t\t\t$columns = $columns + array('reproTechnology' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.reproTechnologyAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkGenetic')){\r\n\t\t\t$columns = $columns + array('genetic' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.geneticsAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkStemCell')){\r\n\t\t\t$columns = $columns + array('stemCell' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.stemCellAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkBiosafety')){\r\n\t\t\t$columns = $columns + array('biosafety' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.biosafetyAbb'));\r\n\t\t}\r\n \r\n return $columns;\r\n \r\n }",
"function _init_fields()\n\t{\n\t\tif($this->table_name)\n\t\t{\n\t\t\t$this->db_fields = $this->db->list_fields($this->table_name);\n\t\t\t\n\t\t\tforeach($this->db_fields as $field)\n\t\t\t{\n\t\t\t\t$this->{$field} = NULL;\n\t\t\t}\n\t\t}\n\t}",
"public function __construct() {\n\t\t$this->csv = array('header' => array(), 'body' => array());\n\t\t$this->maxNumberOfDatabaseRows = array('contact' => 1, 'member' => 1, 'phone' => 0, 'mail' => 0, 'address' => 0, 'study' => 0);\n\t\t$this->base = new BaseDataController();\t\n\t}",
"public function __construct()\n {\n parent::__construct();//, $this->fields);\n parent::findTable($this->tableName);\n }",
"public function __construct($fields = [])\n {\n\n parent::__construct($this->prepareFields($fields));\n }",
"protected function initTableFields()\r\n {\r\n $this->addField(self::$ID, STRING, \"\");\r\n $this->addField(self::$USER_ID, STRING, \"\");\r\n $this->addField(self::$LOGIN_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$LOGOUT_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$STATUS, INTEGER, USER_ACCESS_TOKEN_STATUS_INVALID);\r\n $this->addField(self::$LONGITUDE, INTEGER, 0);\r\n $this->addField(self::$LATITUDE, INTEGER, 0);\r\n $this->addField(self::$CLIENT_IP, STRING, \"\");\r\n }",
"protected function prepare_fields()\n {\n }",
"function init(){\n\t\t/*\n\t\t * Redefine this object, call parent then use addField to specify which fields\n\t\t * you are going to use\n\t\t */\n\t\tparent::init();\n\t\t$this->table_name = get_class($this);\n\t}",
"function load_table_data($fields = '') {\n\t$output = array();\n\tif (is_array($this->line_items) && is_array($fields)) {\n\t foreach ($this->line_items as $key => $row) {\n\t\t$row_data = array();\n\t\tforeach ($fields as $idx => $element) {\n\t\t $row_data['r' . $idx] = $this->line_items[$key][$element->fieldname];\n\t\t}\n\t\t$output[] = $row_data;\n\t }\n\t}\n\treturn $output;\n }",
"public function __construct($csvData,$adminId,$type)\n { \n $this->type = $type;\n $this->csvData = $csvData;\n $this->adminId = $adminId;\n }",
"public function __construct() {\n parent::__construct();\n $this->tableName = \"variables2\";\n $this->table = \"erp_custom_fields\";\n }",
"public function __construct()\n {\n\n /**\n * City CSV File Path\n */\n $this->file = fopen(resource_path('/db_data/us_places.csv'), 'r');\n /**\n * City CSV Delimiter\n */\n $this->delimiter = \",\";\n $this->iterator = 0;\n /**\n * Header to combine to each CSV row\n * same as DB City columns\n */\n $this->header = ['id', 'country_code', 'state_id', 'lga_id', 'name', 'latitude', 'longitude', 'timezone', 'slug'];\n }",
"public function __construct(array $columns, array $values = null) {\n\t\t$this->init();\n\t\tif (is_array($values)) {\n\t\t\t$this->_values = $values;\n\t\t}\n\t\tforeach ($columns as $row) {\n\t\t\t\n\t\t\t$key = $row['Field'];\n\t\t\t$this->_properties[$key] = array();\n\t\t\t$this->_properties[$key]['Field'] = $row['Field'];\n\t\t\t$this->_properties[$key]['Type'] = substr ($row['Type'],0,strcspn ( $row['Type'], \"(\"));\n\t\t\t$this->_properties[$key]['Default'] = $row['Default'];\n\t\t\t$this->_properties[$key]['Extra'] = $row['Extra'];\n\t\t\t$this->_properties[$key]['Comment'] = $row['Comment'];\n\t\t\t$this->_properties[$key]['Null'] = $row['Null'];\n\t\t\t$this->_properties[$key]['Required'] = (!$row['Null']) ? true:false;\n\t\t\t$this->_properties[$key]['Attributes'] = null;\n\t\t\t$this->_properties[$key]['ElementType'] = ($row['Extra']=='auto_increment') ? 'hidden': $this->_baseElements[$this->_properties[$key]['Type']];\n\t\t\tif (isset($row['Error'])) $this->_properties[$key]['Error'] = $row['Error'];\n\t\t\tswitch ($this->_properties[$key]['Type']) {\n\t\t\t\tcase 'enum' : $this->_properties[$key]['values'] = str_replace (\"'\",\"\",trim(strstr($row['Type'], '('),'()'));\n\t\t\t\tbreak;\n\t\t\t\tcase 'set' : $this->_properties[$key]['values'] = str_replace (\"'\",\"\",trim(strstr($row['Type'], '('),'()'));\n\t\t\t\tbreak;\n\t\t\t\t//case 'date' : $this->_properties[$key]['values'] = 'CURRENT_DATE';\n\t\t\t\t//break;\n\t\t\t\tcase 'datetime' : $this->_properties[$key]['values'] = 'NOW()';\n\t\t\t\tbreak;\n\t\t\t\tcase 'timestamp' : $this->_properties[$key]['values'] = 'NOW()';\n\t\t\t\tbreak;\n\t\t\t\tdefault : {\n\t\t\t\t\t$this->_properties[$key]['values'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tif (is_array($values)) {\n\t\t\t$this->filled = 1;\n\t\t\t$this->fillValues($values);\n\t\t\t\n\t\t} else {\n\t\t\t$this->filled = 0;\n\t\t}\n\t}",
"function __construct($config = array())\n\t{\n\t\tif (empty($config['filter_fields'])) {\n <# Dim OrderableFields As New List(Of String) #>\n <# For Each row In JComponentDataTable.Rows #>\n\t\t\t<# \t OrderableFields.Add(row.Field) #>\n <# Next #>\n\t\t\t$config['filter_fields'] = explode(',','<#= Join(OrderableFields.ToArray(), \",\") #>');\n\t\t}\n\t\t$config['_tableType'] = '<#= StrConv(Value(\"Task.nameObject\"), VbStrConv.ProperCase) #>';\n\t\t$config['_tablePrefix'] = '<#= Value(\"Extension.name\") #>Table';\n\t\tparent::__construct($config);\n\t}",
"function __construct()\n\t{\n\t\t// changes the metaColumnsSQL, adds columns: attnum[6]\n\t}",
"public function getRequiredCsvFields()\n {\n // indexes are specified for clarity, they are used during import\n return [\n 0 => __('created_at'),\n 1 => __('product_id'),\n 2 => __('status_id'),\n 3 => __('Title'),\n 4 => __('Detail'),\n 5 => __('nickname'),\n 6 => __('customer_id'),\n 7 => __('option_id'),\n 8 =>__('stores')\n ];\n }",
"public function __construct()\n {\n $this->_dataSrc = 'csv';\n $this->_data = 'test.csv';\n $this->_output = 'text';\n }",
"function __construct(){\n\n $this->_columns = array(\n 'activity' => array(\n 'dao' => 'CRM_Activity_DAO_Activity',\n 'alias' => 'activity',\n 'fields' => array(\n 'activity_type_id' => array(\n 'title' => 'Update method',\n 'required' => TRUE\n ),\n 'activity_date_time' => array(\n 'title' => 'Date',\n 'required' => TRUE\n )\n )\n ),\n 'activity_target' => array(\n 'dao' => 'CRM_Activity_DAO_ActivityTarget',\n 'fields' => array(\n 'target_contact_id' => array(\n 'title' => 'Target contact ID',\n 'required' => TRUE,\n 'no_display'=> true, \n )\n )\n ),\n 'contact' => array(\n 'alias' => 'contact',\n 'dao' => 'CRM_Contact_DAO_Contact',\n 'fields' => array(\n 'display_name' => array(\n 'title' => 'Name',\n 'required' => TRUE\n ),\n )\n )\n );\n parent::__construct();\n }",
"function __construct()\n {\n $this->tablename = 'opt_ctk_log';\n $this->sql_orderby = 'tgl_ctk desc';\n\t\t\n $this->fieldlist = array('nm_file', 'tgl_ctk', 'userid');\n $this->fieldlist['nm_file'] = array('pkey' => 'y');\n\t\t \n\t\t\t\t\n }",
"function __construct()\r\n {\r\n $this->field_names = func_get_args();\r\n }",
"function oak_import_csv() {\n global $wpdb;\n\n $table = $_POST['table'];\n $rows = $_POST['rows'];\n $single_name = $_POST['single_name'];\n\n $table_name = $table;\n if ( $_POST['wellDefinedTableName'] == 'false' ) :\n $table_name = $wpdb->prefix . 'oak_' . $table;\n if ( $single_name == 'term' ) :\n $table_name = $wpdb->prefix . 'oak_taxonomy_' . $table;\n elseif( $single_name == 'object' ) :\n $table_name = $wpdb->prefix . 'oak_model_' . $table;\n endif;\n endif;\n\n foreach( $rows as $key => $row ) :\n if ( $key != 0 && !is_null( $row[1] ) ) :\n $arguments = [];\n foreach( $rows[0] as $property_key => $property ) :\n if ( $property != 'id' && $property_key < count( $rows[0] ) && $property != '' ) :\n $arguments[ $property ] = $this->oak_filter_word( $row[ $property_key ] );\n endif;\n if ( strpos( $property, '_trashed' ) != false ) :\n $arguments[ $_POST['single_name'] . '_trashed' ] = $row[ $property_key ];\n endif;\n endforeach;\n $result = $wpdb->insert(\n $table_name,\n $arguments\n );\n endif;\n endforeach;\n\n wp_send_json_success();\n }",
"public function __construct($new_csv){\t\n\t\t\t//Sets the private csv file variable with the file that was passed in\n\t\t\t$this->csv_file = $new_csv;\n\t\t}",
"public function init()\r\n\t{\r\n\t\tif (count($this->table_fields) < 1)\r\n\t\t\treturn false;\r\n\t\tforeach ($this->table_fields as $table_field) {\r\n\t\t\tif ($table_field->get_primary_key()) {\r\n\t\t\t\t$this->id_field = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_name_key()) {\r\n\t\t\t\t$this->name_fields[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_unike_key()) {\r\n\t\t\t\t$this->unike_keys[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function __construct() {\n $this->dbal = new SupraCsvDBAL(DB_NAME,DB_HOST,DB_USER,DB_PASSWORD);\n $this->plugin = new SupraCsvParser_Plugin();\n }",
"public function prepare($fields)\n {\n foreach ($fields as $key => $values) {\n if (!is_null($values) && array_key_exists($key, array_flip($this->_csvHeader))) {\n foreach ($values as $value) {\n $this->map($value, $values);\n }\n }\n }\n }",
"public function csvDownAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get form id\r\n \t\t */\r\n \t\t$form_id = $this->getAttribute('form_id');\r\n \t\t\r\n \t\t/**\r\n \t\t * get form entry field list\r\n \t\t */\r\n \t\t$form_field_list = $this->db_model->getFormFieldList($form_id);\r\n \t\t//print_r($form_field_list);\r\n \t\t\r\n \t\tforeach ($form_field_list as $field_row){\r\n \t\t\t\r\n \t\t\tif (preg_match('/^privacy_/', $field_row['name'])) continue;\r\n \t\t\t\r\n \t\t\tif (preg_match('/^name_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_1'] \t\t= $expl[0].'-'.$expl[2];\r\n \t\t\t\t$csv_header[$field_row['name'].'_2'] \t\t= $expl[0].'-'.$expl[3];\r\n \t\t\t\t$csv_header[$field_row['name'].'_kana_1'] \t= $expl[1].'-'.$expl[4];\r\n \t\t\t\t$csv_header[$field_row['name'].'_kana_2'] \t= $expl[1].'-'.$expl[5];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^address_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_pcode'] \t\t= $expl[0];\r\n \t\t\t\t$csv_header[$field_row['name'].'_pref'] \t\t= $expl[1];\r\n \t\t\t\t$csv_header[$field_row['name'].'_address_a'] \t= $expl[2];\r\n \t\t\t\t$csv_header[$field_row['name'].'_address_b'] \t= $expl[3];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^birthday_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_year_type'] \t= '年式';\r\n \t\t\t\t$csv_header[$field_row['name'].'_year'] \t\t= $field_row['label'].'-'.$expl[0];\r\n \t\t\t\t$csv_header[$field_row['name'].'_month'] \t\t= $field_row['label'].'-'.$expl[1];\r\n \t\t\t\t$csv_header[$field_row['name'].'_day'] \t\t\t= $field_row['label'].'-'.$expl[2];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^ynradio_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$yn_expl = explode('|yn|', $field_row['ynfields']);\r\n \t\t\t\t$yn_field_array = array();\r\n \t\t\t\t\r\n \t\t\t\tforeach ($yn_expl as $ym_row){\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_row_expl = explode('_', $ym_row);\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field = $yn_row_expl[0].'_'.$yn_row_expl[1];\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field_expl = explode(':=:', $yn_row_expl[2]);\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field_list[$field_row['name'].'_'.$yn_field]['name'] = $field_row['name'].'_'.$yn_field;\r\n \t\t\t\t\t$yn_field_list[$field_row['name'].'_'.$yn_field][$yn_field_expl[0]] = $yn_field_expl[1];\r\n \t\t\t\t\t\r\n\r\n \t\t\t\t\tif (!in_array($yn_field, $yn_field_array)){\r\n \t\t\t\t\t\t$yn_field_array[$yn_row_expl[1]] = $yn_field;\r\n \t\t\t\t\t}else \r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t} // foreach ($yn_expl as $ym_row){\r\n \t\t\t\t\r\n \t\t\t\t/**\r\n\t\t\t \t * sort yes no field as input sequence\r\n\t\t\t \t */\r\n\t\t\t \tksort($yn_field_array);\r\n \t\t\t\t\r\n \t\t\t\t//print_r($yn_expl);\r\n \t\t\t\t//print_r($yn_field_list);\r\n \t\t\t\t//print_r($yn_field_array);\r\n \t\t\t\t\r\n \t\t\t\tif (is_array($yn_field_array)){\r\n \t\t\t\t\t$csv_header[$field_row['name']] = $field_row['label'];\r\n \t\t\t\t\tforeach ($yn_field_array as $yn_field){\r\n \t\t\t\t\t\t$csv_header[$field_row['name'].'_'.$yn_field] = $field_row['label'].'-'.$yn_field_list[$yn_field]['label'];\r\n \t\t\t\t\t}\r\n \t\t\t\t} // if (is_array($yn_field_array)){\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t$csv_header[$field_row['name']] = $field_row['label']; \r\n \t\t}\r\n \t\t\r\n \t\t//print_r($csv_header);\r\n \t\t\r\n \t\t/**\r\n \t\t * get mail data list\r\n \t\t */\r\n \t\t$mail_data_list = $this->db_model->getFormMailData($form_id);\r\n \t\t//print_r($mail_data_list[0]);\r\n \t\t//$mail_data_list_t[]=$mail_data_list[0];\r\n \t\t//$mail_data_list_t[]=$mail_data_list[1];\r\n \t\t\r\n \t\t$form_data_list = array();\r\n \t\t\r\n \t\tif (is_array($mail_data_list) && !empty($mail_data_list)){\r\n\t \t\tforeach ($mail_data_list as $mail_data){\r\n\t \t\t\t$tmp_data = array();\r\n\t \t\t\t\t\r\n\t \t\t\tforeach ($csv_header as $header_key=>$header_value){\r\n\t \t\t\t\t\r\n\t \t\t\t\tforeach ($mail_data as $data_key => $data_value){\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (preg_match('/^privacy_/', $data_key)) continue;\r\n\t \t\t\t\t\t\r\n\t\t \t\t\t\t\r\n\t \t\t\t\t\t/**\r\n\t \t\t\t\t\t * for name set\r\n\t \t\t\t\t\t */\r\n\t \t\t\t\t\tif (preg_match('/^name_[0-9]/', $data_key)){\r\n\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_name_1 = explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_name_2 = explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_kana_1 = explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_kana_2 = explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_name_1[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_name_1[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_name_2[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_name_2[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_kana_1[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_kana_1[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_kana_2[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_kana_2[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^name_[0-9]/', $header_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for address set\r\n\t\t\t \t\t\t */\r\n\t\t \t\t\t\tif (preg_match('/^address_[0-9]/', $data_key)){\r\n\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_pcode_1\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_pcode_2\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_pref\t\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_address_a\t= explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t$exp_address_b\t= explode(':=:', $expl[4]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_1', '', $exp_pcode_1[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_pcode_1[1].'-'.$exp_pcode_2[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_pref[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_pref[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_address_a[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_address_a[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_address_b[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_address_b[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^address_[0-9]/', $header_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for birthday set\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^birthday_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_year_type\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_year\t\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_month\t\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_day\t\t= explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_year_type[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $this->data_class->getYearTypeName($exp_year_type[1]);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_year[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_year[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_month[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_month[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_day[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_day[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^birthday_[0-9]/', $header_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for mail\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^mail_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_mail\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_mail', '', $exp_mail[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_mail[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^mail_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for tel number\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^tel_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_tel_1\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_tel_2\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_tel_3\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_1', '', $exp_tel_1[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_tel_1[1].'-'.$exp_tel_2[1].'-'.$exp_tel_3[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^tel_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for password\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^password_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_password\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_pass', '', $exp_password[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_password[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^password_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for yes no fields\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^ynradio_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tforeach ($expl as $yn_row){\r\n\t\t\t \t\t\t\t\t$yn_row_expl = explode(':=:', $yn_row);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t\tif ($header_key == $yn_row_expl[0]){\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t/**\r\n\t\t\t \t\t\t\t\t\t * for yes no label\r\n\t\t\t \t\t\t\t\t\t */\r\n\t\t\t \t\t\t\t\t\tif ($match[0] == $header_key){\r\n\t\t\t \t\t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\t$value = $this->getYesNoLabel($form_field_list, $data_key, $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t\t\t} // if ($match[0] == $header_key){\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t/**\r\n\t\t\t \t\t\t\t\t\t * for yes no field's select and radio option \r\n\t\t\t \t\t\t\t\t\t */\r\n\t\t\t \t\t\t\t\t\tif (preg_match('/^ynradio_[0-9]_select_[0-9]/', $yn_row_expl[0], $match) || preg_match('/^ynradio_[0-9]_radio_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t \t\t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$expl = explode(':other:', $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$value = $this->getYesNoOptionValue($yn_field_list, $yn_row_expl[0], $expl[0]);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t\t\t\t \t\t\t\telse\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t} // if (preg_match('/^ynradio_[0-9]_select_[0-9]/', $yn_row_expl[0], $match) || preg_match('/^ynradio_[0-9]_radio_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t/**\r\n\t\t\t\t\t\t \t\t\t * for yes no field's checkbox option\r\n\t\t\t\t\t\t \t\t\t */\r\n\t\t\t\t\t\t \t\t\tif (preg_match('/^ynradio_[0-9]_checkbox_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$expl = explode(':other:', $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$option_expl = explode('::', $expl[0]);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$value = array();\r\n\t\t\t\t\t\t \t\t\t\tforeach ($option_expl as $row)\r\n\t\t\t\t\t\t \t\t\t\t\t$value[] = $this->getYesNoOptionValue($yn_field_list, $yn_row_expl[0], $row);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = join(',', $value).',その他:'.$expl[1];\r\n\t\t\t\t\t\t \t\t\t\telse\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = join(',', $value);\r\n\t\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t} // if (preg_match('/^checkbox_[0-9]/', $data_key)){\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $yn_row_expl[1];\r\n\t\t\t \t\t\t\t\t}\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t} // if (preg_match('/^ynradio_[0-9]/', $header_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for select and radion fields\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^select_[0-9]/', $data_key, $match) || preg_match('/^radio_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t$value = $this->getOptionValue($form_field_list, $data_key, $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($data_key == $header_key ){\r\n\t\t\t \t\t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t \t\t\t\t\telse\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^select_[0-9]/', $data_key, $match) || preg_match('/^radio_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for checkbox field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^checkbox_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t$option_expl = explode('::', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$value = array();\r\n\t\t\t \t\t\t\tforeach ($option_expl as $row)\r\n\t\t\t \t\t\t\t\t$value[] = $this->getOptionValue($form_field_list, $data_key, $row);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($data_key == $header_key ){\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = join(',', $value).',その他:'.$expl[1];\r\n\t\t\t \t\t\t\t\telse\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = join(',', $value);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^checkbox_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for survey options\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^svid_[0-9]_fid_[0-9]_sid_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$survey_expl = explode('_', $data_key);\r\n\t\t\t \t\t\t\t$survey_id = $survey_expl[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$value = $this->getSurveyOptionValue($survey_id, $data_key, $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t \t\t\t\telse\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^svid_[0-9]_fid_[0-9]_sid_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for image field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^image_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($data_value))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = _HTTP.$GLOBALS['gl_wpcms_Info']['wpcms_path'].'/wpform/file/imageDisplay/image_name/'.$data_value;\r\n\t\t\t \t\t\t\telse \r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = \"\";\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^image_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t/**\r\n\t\t\t \t\t\t * for pdf field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^pdf_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($data_value))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = _HTTP.$GLOBALS['gl_wpcms_Info']['wpcms_path'].'/wpform/file/pdfDisplay/pdf_name/'.$data_value;\r\n\t\t\t \t\t\t\telse \r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = \"\";\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^pdf_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t \t\t\t\t\tif ($data_key == $header_key ){\r\n\t \t\t\t\t\t\t$tmp_data[$header_key] = $data_value;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t} // foreach ($mail_data as $data_key => $data_value){\r\n\t \t\t\t\t\r\n\t \t\t\t} // foreach ($csv_header as $header_key=>$header_value){\r\n\t \t\t\t\r\n\t \t\t\t//$form_data_list[] = $tmp_data;\r\n\t \t\t\t$form_data_list[] = implode(',', $tmp_data);\r\n\t \t\t\t\r\n\t \t\t} // foreach ($mail_data_list as $mail_data){\r\n \t\t\r\n \t\t} // if (is_array($mail_data_list) && !empty($mail_data_list)){\r\n \t\t\r\n \t\t\r\n \t\t//print_r($form_data_list);\r\n \t\t//exit;\r\n \t\t\r\n \t\t/**\r\n \t\t * make csv header text\r\n \t\t */\r\n \t\t$csv_header_txt = mb_convert_encoding(implode(',', $csv_header), \"Shift_JIS\");\r\n \t\t\r\n \t\t/**\r\n \t\t * make csv data\r\n \t\t */\r\n \t\t$csv_data_txt = mb_convert_encoding(implode(\"\\n\", $form_data_list), \"Shift_JIS\");\r\n \t\t\r\n \t\t/**\r\n\t\t * make csv downloadable\r\n\t\t */\r\n\t\theader(\"Cache-Control: public\");\r\n\t\theader(\"Pragma: public\");\r\n\t\t\r\n\t\t$csv_name = \"form_name\"; \r\n\t\t\r\n\t\theader(sprintf(\"Content-disposition: attachment; filename=%s.csv\",$csv_name));\r\n\t\theader(sprintf(\"Content-type: application/octet-stream; name=%s.csv\",$csv_name));\r\n\r\n\t\t/**\r\n\t\t * make csv text\r\n\t\t */\r\n\t\t$csv_txt = $csv_header_txt.\"\\n\".$csv_data_txt;\r\n\t\t\r\n\t\techo $csv_txt;\r\n\t\texit;\r\n \t\t\r\n \t}",
"abstract protected function createFields();",
"public function buildFields() {\n }",
"public function __construct(Csv $csv)\n {\n $this->csv = $csv;\n }",
"function __construct($row, AttributeGroup $grp){\n\n\t\t\n\t\t$this->Group = $grp;\n\t\t\n\t\tif($grp->UseRealTable){\n\t\t\t$this->fieldName = $row['name'];\n\t\t\t$this->tableName = $grp->RealTableName;\n\t\t\t$this->AsTableName = $grp->RealTableName;\n\t\t} else {\n\t\t\t$this->fieldName = 'value';\n\t\t\t$this->tableName = $GLOBALS['attribute_type_tables'][$row['type']];\n\t\t\t$this->AsTableName = 'tbl'.$grp->Id.'_'.$row['id'];\n\t\t}\n\t\tif($row['php_data']){\n\t\t\t$row['php_data']=unserialize($row['php_data']);\n\t\t}\n\t\t\n\t\t$this->Id = $row['id'];\n\t\t$this->Name = $row['name'];\n\t\t$this->Type = $row['type'];\n\t\t$this->LabelPrefix = $row['prefix'];\n\t\t$this->LabelSuffix = $row['suffix'];\n\t\t$this->PHPData = $row['php_data'];\n\t\t\n\t\t\n\t\t//$row['value'] = '';\n\t\t//$row['orig_value'] = '';\n\t\t/*\n\t\tIMPORTANT FEAttribute extends ArrayObject\n\t\t\nMnogo neiasen bug. Kogato dobavih v getBeValue na ManagedImages da vrashta i $this[\"value\"][\"sizes\"]=$this->ImageSizes;\nVsichko se pochupi, vsichki FEAttr instancii poluciha i te taia stoinost. Tova e pri situacia che predi tova ne im e izvikano izrichno $this['value'] = neshtosi.\nNe se izvikva, ako ne sme zaredili danni prez loadData.\nIzglezda niakade copy on write mehanizma se pochupva pri naslediavane na ArrayObject\n\t\t\n\t\t*/\n\t\t\n//\t\tparent::__construct($row);\n\t}",
"public function createCsv(){\n $this->header = NULL;\n $this->csv = array();\n if (($handle = fopen($this->url, 'r')) !== FALSE)\n {\n while (($row = fgetcsv($handle, 1000, $this->separatore)) !== FALSE)\n {\n if(!$this->header)\n $this->header = $this->trimField($row);\n else\n $this->csv[] = array_combine($this->header, $this->trimField($row));\n }\n fclose($handle);\n }\n }",
"protected function __construct($tbl, $column_array, $field_array) {\n\t\t$this->table = $tbl;\n\t\t$this->columns = $column_array;\n\t\t$this->fields = $field_array;\n\t\t$this->map = Util::MakeAssocArray($this->columns,$this->fields);\n\t\t$this->_id = uniqid();\t\t// Every object in the database has a random hash\n\t}",
"function setFields($array)\r\n\t{\r\n\t\t$db = new \\Fmw\\Core\\Db();\r\n\t\t$fields = $db->getColumns($this->getTabName($this->defTab));\r\n\t\tif ($fields) {\r\n\t\t\t$colName = false;\r\n\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$colName = $field['Field'];\r\n\r\n\t\t\t\tif (isset($array[$field['Field']])) {\r\n\r\n\t\t\t\t\tif ($field['Type'] == 'text') {\r\n\t\t\t\t\t\tif (isFormatedText($field['Field'])) {\r\n\t\t\t\t\t\t\t$array[$colName] = $array[$colName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->$colName = $array[$colName];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"abstract protected function fields(): array;",
"abstract protected function fields(): array;",
"function __construct(array $fields, $concatenator = ''){\n\t\tparent::__construct();\n\t\t$this->fields = $fields;\r\n\t\t$this->concatenator = $concatenator;\r\n\t}",
"public function __construct($table, $showColArray)\n {\n $this->getRows($table);\n //$this->rows = ORM::for_table($table)->find_array();\n $this->showColArray = $showColArray;\n $this->makeStrArray();\n }",
"function __construct(table $t, array $fields, array $joins, array $wheres, $alias=null) {\n //\n //The fields of this class passed as an array must also be an array object \n $this->fields = new fields($fields);\n //\n //the parent constructor gieven the root, joins, wheres and the alias \n parent::__construct($t, $joins, $wheres, $alias);\n }",
"public function getTableFields()\n {\n return array(\n array(\"Field\" => \"uid_empresa\", \"Type\" => \"int(10)\", \"Null\" => \"NO\", \"Key\" => \"PRI\", \"Default\" => \"\", \"Extra\" => \"auto_increment\"),\n array(\"Field\" => \"endeve_id\", \"Type\" => \"varchar(60)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_no_obligatorio\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre\", \"Type\" => \"varchar(100)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre_comercial\", \"Type\" => \"varchar(200)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"representante_legal\", \"Type\" => \"varchar(512)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cif\", \"Type\" => \"varchar(20)\", \"Null\" => \"NO\", \"Key\" => \"UNI\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"direccion\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"localidad\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"provincia\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cp\", \"Type\" => \"int(8)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"accion\", \"Type\" => \"timestamp\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"CURRENT_TIMESTAMP\", \"Extra\" => \"\"),\n array(\"Field\" => \"updated\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_provincia\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_municipio\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"convenio\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"created\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"aviso_caducidad_subcontratas\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"color\", \"Type\" => \"varchar(10)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"email\", \"Type\" => \"varchar(255)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_enterprise\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"logo\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"skin\", \"Type\" => \"varchar(300)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"dokify\", \"Extra\" => \"\"),\n array(\"Field\" => \"lang\", \"Type\" => \"varchar(2)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"es\", \"Extra\" => \"\"),\n array(\"Field\" => \"activo_corporacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_aplicacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"receive_summary\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"date_last_summary\", \"Type\" => \"int(16)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"license\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_validation_partner\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price_urgent\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"validation_languages\", \"Type\" => \"varchar(250)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cost\", \"Type\" => \"float\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pay_for_contracts\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_periodicity\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_attached\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_validated\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_rejected\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_expired\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_transfer_pending\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"kind\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"min_app_version\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"2\", \"Extra\" => \"\"),\n array(\"Field\" => \"prevention_service\", \"Type\" => \"varchar(20)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_idle\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"corporation\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirement_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_referrer\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_self_controlled\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"has_custom_login\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"header_img\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"), array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirements_origin_company_cloneables\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n );\n }",
"private function __construct(array $row)\n {\n /** @var Model $modelClass */\n $modelClass = self::getClass();\n $lowercaseModelName = strtolower(self::getClassName());\n\n $modelScheme = $modelClass::getScheme();\n\n foreach ($modelScheme->getFieldColumnMap() as $fieldName => $columnName) {\n $this->_row[$fieldName] = null;\n\n if (empty($row)) {\n continue;\n }\n\n if (array_key_exists($fieldName, $row)) {\n $this->set($fieldName, $row[$fieldName]);\n unset($row[$fieldName]);\n continue;\n }\n\n $length = strlen($lowercaseModelName);\n if (strpos($fieldName, $lowercaseModelName) === 0) {\n $field = '/' . substr($fieldName, $length + 1);\n if (array_key_exists($field, $row)) {\n $this->set($fieldName, $row[$field]);\n unset($row[$field]);\n continue;\n }\n }\n\n foreach (['__json', '__fk', '_geo'] as $ext) {\n $field = strstr($fieldName, $ext, true);\n if ($field !== false && array_key_exists($field, $row)) {\n $this->set($field, $row[$field]);\n unset($row[$field]);\n\n continue 2;\n }\n }\n }\n\n $this->_data = $row;\n }",
"public function __construct( array $aFields )\n\t{\n\t\tparent::__construct(null);\n\t\t\n\t\tforeach ($aFields as $value)\n\t\t{\n\t\t\t$this->fields[] = $value;\n\t\t}\n\t}",
"function __construct ($filename) {\n $this->filename = $filename;\n $this->file = fopen($filename,'c+');\n\n $this->fields = fgetcsv($this->file);\n }",
"protected function _initAllFIeld() \n\t{\n\t\t$sql = 'select COLUMN_NAME from information_schema.COLUMNS where table_name = \"' . $this->table.'\"\n\t\t\t\tAND `TABLE_SCHEMA`=\"'. $this->db .'\";';\n\n\t\t$this->_fields = array_column($this->_getSelectResult($sql), 'COLUMN_NAME');\n\t}",
"protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }",
"function __construct() {\n if($this->Fields) {\n foreach($this->Fields as $key => $value) {\n $this->$key = null;\n if($value['extra'] === \"auto_increment\") $this->Id = $key;\n if($value['extra'] === \"ref\") $this->Ref = $key;\n }\n }\n }",
"public function prepareFieldset();",
"function erp_get_import_export_fields() {\n $erp_fields = [\n 'contact' => [\n 'required_fields' => [\n 'first_name',\n 'email'\n ],\n 'fields' => [\n 'first_name',\n 'last_name',\n 'email',\n 'phone',\n 'mobile',\n 'other',\n 'website',\n 'fax',\n 'notes',\n 'street_1',\n 'street_2',\n 'city',\n 'state',\n 'postal_code',\n 'country',\n 'currency',\n ]\n ],\n 'company' => [\n 'required_fields' => [\n 'email',\n 'company',\n ],\n 'fields' => [\n 'email',\n 'company',\n 'phone',\n 'mobile',\n 'other',\n 'website',\n 'fax',\n 'notes',\n 'street_1',\n 'street_2',\n 'city',\n 'state',\n 'postal_code',\n 'country',\n 'currency',\n ]\n ],\n 'employee' => [\n 'required_fields' => [\n 'first_name',\n 'last_name',\n 'user_email',\n ],\n 'fields' => [\n 'first_name',\n 'middle_name',\n 'last_name',\n 'user_email',\n 'designation',\n 'department',\n 'location',\n 'hiring_source',\n 'hiring_date',\n 'date_of_birth',\n 'reporting_to',\n 'pay_rate',\n 'pay_type',\n 'type',\n 'status',\n 'other_email',\n 'phone',\n 'work_phone',\n 'mobile',\n 'address',\n 'gender',\n 'marital_status',\n 'nationality',\n 'driving_license',\n 'hobbies',\n 'user_url',\n 'description',\n 'street_1',\n 'street_2',\n 'city',\n 'country',\n 'state',\n 'postal_code',\n ]\n ]\n ];\n\n return apply_filters( 'erp_import_export_csv_fields', $erp_fields );\n}",
"function __construct($tabName){\n\t\tif(count($tabName) == 1){\n\t\t\tparent::setTableName($tabName);\n\t\t\t/**$this->s = */parent::executeQuery();\n\t\t\t//parent::displayResults($this->s);\n\t\t}else{\n\t\t\t$this->fieldName = $tabName[\"fieldName\"];\n\t\t\t$this->fieldValue = $tabName[\"fieldValue\"];\n\t\t\tparent::setTableName($tabName[\"tabName\"]);\n\t\t\t$this->s = parent::executeQuery();\n\t\t\t//parent::displayResults($this->s);\n\t\t\t}\n\t}",
"public function getRequiredCsvFields()\n {\n // indexes are specified for clarity, they are used during import\n return [\n 0 => __('Coupon ID'),\n 1 => __('Name'),\n 2 => __('Code'),\n 3 => __('Discount'),\n 4 => __('Type'),\n 5 => __('Free Product Discount'),\n 6 => __('Max Uses'),\n 7 => __('Valid From'),\n\t\t\t8 => __('Valid Until'),\n 9 => __('Minimum Order Total'),\n 10 => __('Price Type'),\n 11 => __('Available Codes'),\n 12 => __('Apply discount to'), \n 13 => __('Minimum Order Quantity'),\n 14 => __('Applicable to Product Types'),\n\t\t\t15 => __('Applicable to Skus'),\n\t\t\t16 => __('Apply coupon to product'),\n 17 => __('Applicable to Products')\n ];\n }",
"public abstract function createFields();",
"public function buildHeaderFields() {}",
"public function __construct()\n {\n $this->setColumnsMeta(array(\n 'ubicacion'=> array('enum:poste|puntoRecogida|centroEmergencia'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('es', 'eu'));\n\n $this->setParentList(array(\n 'CubosIbfk1'=> array(\n 'property' => 'Contribuyente',\n 'table_name' => 'Contribuyentes',\n ),\n 'CubosIbfk3'=> array(\n 'property' => 'CubosTipos',\n 'table_name' => 'CubosTipos',\n ),\n 'CubosIbfk4'=> array(\n 'property' => 'PuntosRecogida',\n 'table_name' => 'PuntosRecogida',\n ),\n 'CubosIbfk5'=> array(\n 'property' => 'Poste',\n 'table_name' => 'Postes',\n ),\n 'CubosIbfk6'=> array(\n 'property' => 'CentrosEmergencia',\n 'table_name' => 'CentrosEmergencia',\n ),\n ));\n\n $this->setDependentList(array(\n 'IncidenciasIbfk1' => array(\n 'property' => 'Incidencias',\n 'table_name' => 'Incidencias',\n ),\n 'RecogidasIbfk2' => array(\n 'property' => 'Recogidas',\n 'table_name' => 'Recogidas',\n ),\n ));\n\n\n\n\n $this->_defaultValues = array(\n 'ubicacion' => 'poste',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }",
"function __construct($row = null) {\n $this->_data = array();\n $this->_extra = array();\n if (!isset(self::$_defaults[$this->getObjectName()])) {\n // maintain the default data (column values) separately\n self::$_defaults[$this->getObjectName()] = array();\n $this->loadDefaults();\n }\n\n // clone from the default data. much faster than reloading the column values every time\n $def =& self::$_defaults[$this->getObjectName()];\n foreach ($def as $k => &$d) {\n $this->_data[$k] = clone $d;\n }\n\n if (is_array($row)) {\n $this->loadFromRow($row);\n } else if (is_int($row)) {\n $this->setValue('id', $row);\n }\n }",
"public function __construct() {\n\t\t\t$this->TablesAndAttributes = QueryTablesAndAttributes();\n \t$this->tableNames = $this->makeTableNamesArray($this->TablesAndAttributes);\n \t$this->PKattributes = $this->makePKattributesArray($this->TablesAndAttributes);\n \t$this->schema = $this->dbSchema($this->TablesAndAttributes);\n\n \t// read the spread sheet file\n \t$this->createTempFile();\n\n \t// create a database object from the spread sheet\n \t$this->spreadSheetDatabase = $this->parseFile();\n\n \t//add tuple objects to the database, selectively\n\t\t\t$this->add($this->spreadSheetDatabase);\n\n\t\t\t$this->addToReferenceTables($this->spreadSheetDatabase);\n \t// debug display\n \t//$this->spreadSheetDatabase->display();\n\n\t\t}",
"protected function parseCsv() {\r\n\t\t\r\n\t\t$csv_data = array();\r\n\t\twhile ($this->_currentRow = fgetcsv($this->_fileHandler, null, $this->_delimiter, $this->_enclosure)) {\r\n\t\t\t$csv_data[] = $this->_currentRow;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_data = $csv_data;\r\n\t}",
"public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }",
"public function __construct()\n\t{\n\t\t$this->tableObjects = Array();\n\t\t$this->count = 0;\n\t}",
"protected function buildCoreFields(): void\n {\n //====================================================================//\n // Reference\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"increment_id\")\n ->name('Reference')\n ->microData(\"http://schema.org/Invoice\", \"confirmationNumber\")\n ->isReadOnly()\n ->isListed()\n ;\n //====================================================================//\n // Customer Object\n $this->fieldsFactory()->create((string) self::objects()->encode(\"ThirdParty\", SPL_T_ID))\n ->identifier(\"customer_id\")\n ->name('Customer')\n ->microData(\"http://schema.org/Organization\", \"ID\")\n ->isRequired()\n ->isReadOnly()\n ;\n //====================================================================//\n // Customer Email\n $this->fieldsFactory()->create(SPL_T_EMAIL)\n ->identifier(\"customer_email\")\n ->name(\"Email du contact\")\n ->microData(\"http://schema.org/ContactPoint\", \"email\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Order Date\n $this->fieldsFactory()->create(SPL_T_DATETIME)\n ->identifier(\"created_at\")\n ->name(\"Date\")\n ->microData(\"http://schema.org/DataFeedItem\", \"dateCreated\")\n ->isReadOnly()\n ->isListed()\n ;\n }",
"function __construct($TableName = 'rate_breakpoint') {\n $this->idrate_breakpoint = new DB_Field('idrate_breakpoint', 0, new DbIntSanitizer());\n $this->Household_Size = new DB_Field('Household_Size', 0, new DbIntSanitizer(), TRUE, TRUE);\n $this->Rate_Category = new DB_Field('Rate_Category', '', new DbStrSanitizer(4), TRUE, TRUE);\n $this->Breakpoint = new DB_Field('Breakpoint', 0, new DbIntSanitizer(), TRUE, TRUE);\n $this->Timestamp = new DB_Field('Timestamp', NULL, new DbDateSanitizer(\"Y-m-d H:i:s\"));\n\n // This line stays at the end of the function.\n parent::__construct($TableName);\n }",
"public function __construct() {\n $this->columnas = new ArrayCollection();\n }",
"function get_csv_header_fields()\r\n {\r\n\t\t$this->analyse_file($this->file_name, intval(filesize($this->file_name) / 1024) + 1024);\r\n\t\t\r\n\t\tif(count($this->arr_csv_columns) > 0) {\r\n\t\t\t$arr_temp = $this->arr_csv_columns;\r\n\t\t\t$this->arr_csv_columns = NULL;\r\n\r\n\t\t\tforeach($arr_temp as $key => $value) {\r\n\t\t\t\t$st = str_replace(\",,\", \" , , \", $arr_temp[$key]);\r\n\t\t\t\t//$st = $arr_temp[$key];\r\n\t\t\t\t$arr = str_getcsv($st);\r\n\t\t\t\t$this->arr_csv_columns[] = $arr;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->arr_csv_columns = '';\r\n\t\t}\r\n\t\treturn true;\r\n\t\t\r\n $this->arr_csv_columns = array();\r\n $fpointer = fopen($this->file_name, \"r\");\r\n if ($fpointer)\r\n {\r\n\t\t\t$arr = array();\r\n\t\t\twhile (($data = fgetcsv($fpointer, 10*1024, $this->field_separate_char, $this->field_enclose_char)) !== false) { \r\n\t\t\t\t$arr[] = $data;\r\n\t\t\t}\r\n\t\t\t$this->arr_csv_columns = $arr;\r\n unset($arr);\r\n fclose($fpointer);\r\n }\r\n else\r\n $this->error = \"file cannot be opened: \".(\"\"==$this->file_name ? \"[empty]\" : @mysql_escape_string($this->file_name));\r\n return $this->arr_csv_columns;\r\n }",
"public function __construct ($csv_data) {\n\t\t$this->csv_data\t= $csv_data;\n\t\t$this->results\t= \"\";\n\t\t$this->warnings = array();\n\t}",
"public function __construct(array $fields)\n {\n $fields = collect($settings);\n\n\n }",
"protected function DoFormatCSV()\n\t{\t\t\n\t\t$csv_data = array_map( 'str_getcsv', file( $this->csv_temp_file ) );\n\t\t\n\t\t$dates = $csv_data[ 9 ];\n\t\t$values = $csv_data[ 10 ];\n\t\t\n\t\tfor( $i = 0; $i < sizeof( $dates ); $i++ ){\n\t\t\tif( empty( $dates[ $i ] ) ){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->data->AddList(\n\t\t\t\tarray(\n\t\t\t\t\t\"Date\" => $dates[ $i ],\n\t\t\t\t\t\"Volume\" => isset( $values[ $i ] ) ? (int)$values[ $i ] : 0\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t\n\t\tif( ! sizeof( $this->data->Chart ) ){\n\t\t\t$this->data = FALSE;\n\t\t}\n\t\t\n\t\treturn $this;\n\t}",
"protected function process_fields($table, $data, $format)\n {\n }",
"public function __construct($tableinfo) {\n\t\t\tparent::__construct( $tableinfo ); }",
"public function makeFieldList() {}",
"protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('funcionario');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('nome', 'nome', 'varchar', 255, array());\r\n $this->metadata()->addField('login', 'login', 'varchar', 45, array());\r\n $this->metadata()->addField('senha', 'senha', 'varchar', 255, array());\r\n $this->metadata()->addField('email', 'email', 'varchar', 255, array());\r\n $this->metadata()->addField('lotacao', 'lotacao', 'varchar', 45, array());\r\n\r\n \r\n }",
"public function __construct()\n {\n $this->setColumnsList(array(\n 'tipoId'=>'tipoId',\n 'tipo'=>'tipo',\n 'tipo_eu'=>'tipoEu',\n 'tipo_es'=>'tipoEs',\n 'createdOn'=>'createdOn',\n 'updateOn'=>'updateOn',\n ));\n\n $this->setColumnsMeta(array(\n 'tipo'=> array('ml'),\n ));\n\n $this->setMultiLangColumnsList(array(\n 'tipo'=>'Tipo',\n ));\n\n $this->setAvailableLangs(array('es', 'eu'));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n 'IncidenciasIbfk2' => array(\n 'property' => 'Incidencias',\n 'table_name' => 'Incidencias',\n ),\n ));\n\n\n $this->setOnDeleteSetNullRelationships(array(\n 'incidencias_ibfk_2'\n ));\n\n $this->_defaultValues = array(\n 'tipo' => '',\n 'tipoEu' => '',\n 'tipoEs' => '',\n 'createdOn' => '0000-00-00 00:00:00',\n 'updateOn' => 'CURRENT_TIMESTAMP',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }",
"abstract public function getFields(): array;",
"function __construct($arrData=array())\n\t{\n $this->data = $arrData;\n $this->tableName = \"tblusers\";\n\n require_once(C_P_CLASES.'utils/tables.names.php');\n //inicializo nombres de campos de tabla\n $tmpIns = new A_TABLENAMES(\"\");\n $tmpIns->set_dataTblusers();\n $this->arrDataNames = $tmpIns->get_tblusers();\n $this->domain = C_DOMAIN;\n }",
"protected static function genChildDbFieldTableTemplate() { return array(); }",
"protected function setupFields()\n {\n }",
"public function prepareRow($row) {\t\n\n //change the options of csv (Less than a year,11 - 15 years,More than 15,6 - 10 years) with our new option value for field__which_year_did_you_start_\n if ($row->YearsSmoking) {\n\t\t$YearsOptions = Array( 1 => \"Less than a year\", 8 => \"6 - 10 years\",13 => \"11 - 15 years\",15 => \"More than 15\");\n\t\t$dasheddate = str_replace('/', '-', $row->DateRegistration);\n\t\t$yearscount = array_search(trim($row->YearsSmoking), $YearsOptions);\n\t\tif (!empty($yearscount) && !empty($dasheddate)) {\n\t\t\t$yearofsmoking = date('Y', strtotime('-'.$yearscount.' year', strtotime($dasheddate)));\t\n\t\t\t$row->YearsSmoking = $yearofsmoking;\n\t\t} else {\n\t\t\t$row->YearsSmoking = \"\";\t\t\t\n\t\t}\n }\n //change the options of csv (Less than 5,15 - 19,More than 30,20 - 24,5 - 9,25 - 30,10 - 14) with our new option value for field_how_many_cigarettes_do_you\n if ($row->CigarettesEachDay) {\n\t\t$CigarettesOptions = Array( 5 => \"Less than 5\", 9 => \"5 - 9\",14 => \"10 - 14\",19 => \"15 - 19\",24 => \"20 - 24\",30 => \"25 - 30\",35 => \"More than 30\");\n\t\t$CigarettesEachDay = array_search($row->CigarettesEachDay, $CigarettesOptions);\n\t\t$row->CigarettesEachDay = $CigarettesEachDay;\n }\n //change the options of csv (Never before,Once,More than twice) with our new option value for field_have_you_used_champix_befo\n if ($row->TriedChampix) {\n\t\tif ($row->TriedChampix != \"Never before\") {\n\t\t\t$row->TriedChampix = \"yes\";\t\t\t\n\t\t} else {\n\t\t\t$row->TriedChampix = \"no\";\t\t\t\n\t\t}\n } \t \n\t//change the options of csv (Once,Twice,More than 15 times,11 - 15 times,6 - 10 times,3 times) with our new option value field_how_many_times_have_you_tr\n if ($row->TimesQuitSmoking) {\n\t\t$Times_qs_options = Array( 1 => \"Once\", 2 => \"Twice\",3 => \"3 times\",8 => \"6 - 10 times\",13 => \"11 - 15 times\",15 => \"More than 15 times\");\n\t\t$TimesQuitSmoking = array_search(trim($row->TimesQuitSmoking), $Times_qs_options);\n\t\t$row->TimesQuitSmoking = $TimesQuitSmoking;\n }\n\t//change the options of csv (Boredom,Driving,Concentrating,Enforced no-smoking,Stress,Offered a cigarette,Anxious / nervous,Alcohol,Waking up,Completed a task,Relaxed,Coffee / Tea,With Smokers,Socialising) with our new option value field_what_triggers_you_to_smoke\n if ($row->PrimaryTriggers) {\n\t\t$PrimaryTriggersOptions = Array( 'boredom' => \"Boredom\", 'socialising' => \"Socialising\",'stress' => \"Stress\");\t\t\n\t\t$Oldoptions = explode(\"|\", $row->PrimaryTriggers);\n\t\t$PrimaryTriggers = array_intersect($PrimaryTriggersOptions,$Oldoptions);\n\t\t$PrimaryTriggers = array_flip($PrimaryTriggers);\n\t\t$row->PrimaryTriggers = $PrimaryTriggers;\n }\n\t//change the options of csv (Weight gain,Dealing with stress/mood changes/irritability,Failing this quit attempt,Being able to break the habit/routine,Nicotine withdrawal symptoms) with our new option value field_how_many_times_have_you_tr\n if ($row->Fears) {\n\t\t$FearsOptions = Array('failing quit attempt' => 'Failing this quit attempt','mood' => 'Dealing with stress/mood changes/irritability','weight gain' => 'Weight gain','withdrawal' => 'Nicotine withdrawal symptoms');\t\t\n\t\t$FearsOldoptions = explode(\"|\", $row->Fears);\n\t\t$Fears = array_intersect($FearsOptions,$FearsOldoptions);\n\t\t$Fears = array_flip($Fears);\n\t\t$row->Fears = $Fears;\n }\n \n \n }",
"function __construct()\n {\n parent::__construct('../data/Sets.csv', 'id');\n }",
"protected function initFieldNames()\n {\n $this->field_names = new FieldList(['collections.collections_id', 'title', 'inv_no', '`status`'], ['collections_id', 'title', 'inv_no', '`status`']);\n }",
"public function __construct() {\n parent::__construct();\n\n $this->addFieldMapping('c4m_source_of_funding', 'funding')\n ->separator(';');\n\n $this->addFieldMapping('c4m_partner', 'partner')\n ->separator(';');\n\n $this->addFieldMapping('c4m_implemented_by', 'implementation')\n ->separator(';');\n\n $this->addFieldMapping('c4m_cris_decision_number', 'cris_decision')\n ->separator(';');\n\n $this->addFieldMapping('c4m_cris_contract_number', 'cris_contract')\n ->separator(';');\n }",
"abstract public function fields();",
"protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }",
"function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('Test_model');\n\t\t$this->load->library('csvimport');\n\t}",
"function ReInitTableColumns()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::ReInitTableColumns();\" . \"<HR>\";\n foreach ($this->form_fields as $prefix => $form) {\n foreach ($form as $i => $field) {\n foreach ($field as $param => $value) {\n //if found database parameters\n if (strpos($param, \"dbfield_\") !== false) {\n $columnparam = substr($param, strlen(\"dbfield_\"), strlen($param));\n $this->Storage->setColumnParameter($field[\"field_name\"], trim($columnparam), $value);\n }\n }\n }\n }\n }",
"public function __construct($fields)\n {\n $this->fields = $fields;\n }",
"public function __construct($fields)\n {\n $this->fields = $fields;\n }",
"public function __construct(){\n\t\tparent::__construct($this->table);\n\t}",
"protected function _initsTable() {}",
"function __construct($_dataTableName = 'Application_Model_DbTable_ProjectCcLicense')\n {\n $this->_dataTableName = $_dataTableName;\n $this->_dataTable = new $this->_dataTableName;\n }",
"protected function initResultFields()\r\n {\r\n }",
"private function readFields( )\n {\n global $UNDERQL;\n\n $l_fs = @ mysql_list_fields( $UNDERQL['db']['name'], $this->table_name );\n $l_fq = @ mysql_query( 'SHOW COLUMNS FROM `' . $this->table_name . '`' );\n $l_fc = @ mysql_num_rows( $l_fq );\n @ mysql_free_result( $l_fq );\n $i = 0;\n\n $this->table_fields_names[$this->table_name] = array( );\n $this->string_fields = array( );\n\n while ( $i < $l_fc )\n {\n $l_f = mysql_fetch_field( $l_fs );\n if ( $l_f->numeric != 1 )\n $this->string_fields[@ count( $this->string_fields )] = $l_f->name;\n\n $this->table_fields_names[$this->table_name]\n [@count($this->table_fields_names[$this->table_name])] = $l_f->name;\n $i++;\n }\n }",
"private function prepare_fields( $table_configuration ) {\n\t\t$this->key_fields = $table_configuration['key_fields'];\n\t\t$this->range_field = $table_configuration['range_field'];\n\t\t$this->checksum_fields = $table_configuration['checksum_fields'];\n\t\t$this->filter_values = isset( $table_configuration['filter_values'] ) ? $table_configuration['filter_values'] : null;\n\t\t$this->additional_filter_sql = ! empty( $table_configuration['filter_sql'] ) ? $table_configuration['filter_sql'] : '';\n\t\t$this->parent_table = isset( $table_configuration['parent_table'] ) ? $table_configuration['parent_table'] : null;\n\t\t$this->parent_join_field = isset( $table_configuration['parent_join_field'] ) ? $table_configuration['parent_join_field'] : $table_configuration['range_field'];\n\t\t$this->table_join_field = isset( $table_configuration['table_join_field'] ) ? $table_configuration['table_join_field'] : $table_configuration['range_field'];\n\t}",
"function MyCSVAdmin($dir = null)\n {\n if (isset($dir))\n $this->dir = $dir;\n\n if (isset($_SERVER['PHP_SELF']))\n $this->SELF = $_SERVER['PHP_SELF'];\n elseif (isset($GLOBALS['PHP_SELF']))\n $this->SELF = $GLOBALS['PHP_SELF'];\n $this->SELF = str_replace(\"index.php\", \"\", $this->SELF);\n\n if ($this->GET('table')) {\n $this->table = new MyCSV($this->GET('table'));\n $this->_getTypes();\n }\n }",
"function __construct($table_name, $class_name) {\n parent::__construct($table_name, $class_name, \"dictionary_table_text\", \"dictionary_table_text\");\n $this->foreigen_keys = array();\n $this->select_display_field = \"person_type_name\";\n $this->fields_prev_text_array = array(\"person_type_name\"=>\"Наименование должности\");\n $this->hidden_keys = array(\"id\"=>\"hidden\", \"code\"=>\"hidden\");\n }",
"function __construct($row) {\n\t\t $this->id = $row ['id'];\n\t\t $this->name = $row ['name'];\n\t\t $this->city = $row ['city'];\n\t\t $this->street = $row ['street'];\n\t\t $this->contact = $row ['contact'];\t\t \t\n\t }",
"public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_age_model_method = null;\n $this->_core_id = null;\n $this->_age_model_notes = array();\n $this->_contact_id = null;\n $this->_age_model_id_status = 0;\n }",
"function __construct ($arrDetails)\n\t\t{\n\t\t\tparent::__construct ('Field');\n\t\t\t\n\t\t\t$this->Push (new dataInteger\t('Id',\t\t\t$arrDetails ['Id']));\n\t\t\t$this->Push (new dataString\t\t('Entity',\t\t$arrDetails ['Entity']));\n\t\t\t$this->Push (new dataString\t\t('Field',\t\t$arrDetails ['Field']));\n\t\t\t$this->Push (new dataString\t\t('Label',\t\t$arrDetails ['Label']));\n\t\t\t$this->Push (new dataString\t\t('Title',\t\t$arrDetails ['Title']));\n\t\t\t$this->Push (new dataString\t\t('Description',\tnl2br ($arrDetails ['Description'])));\n\t\t}",
"function getTableFields(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $sql = \"SELECT field_name, field_label\n\t\t FROM export_tabs_fields\n\t\t WHERE source_id = '\".$this->penelopeTabID.\"' ORDER BY field_num ; \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$tableFields = array();\n\t\t\t\t$tableFields[] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t\t\t\n\t\t\t\t$tableFieldsTemp = array();\n\t\t\t\t$tableFieldsTemp[self::primaryKeyField] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t \n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $tableFields[] = $row[\"field_label\"];\n\t\t\t\t\t $tableFieldsTemp[$row[\"field_name\"]] = $row[\"field_label\"];\n\t\t\t\t}\n\t\t\t\t$this->tableFieldsTemp = $tableFieldsTemp;\n\t\t\t\t$this->tableFields = $tableFields;\n\t\t }\n\t\t else{\n\t\t\t\treturn false;\n\t\t }\n\t\t \n\t }",
"public function __construct()\n {\n //Dit is niet nodig om te kunnen authenticeren! Autenticatie loopt enkel via LDAP.\n //Opmaak: geen header! naam; guid; gebruikersprofielnaam; (gebruikersprofiel)organogram functienaam;dienstnaam; (optioneel rolenaam)\n $this->gebruikercsv =\"database/csv/Gebruikers.csv\";\n $this->delimiter = ';';\n }",
"private function __construct($table, $data = array()) {\n $temp = array_merge(array('data' => array()), $data);\n\n $this->set_table_name($table);\n $this->load_columns_information();\n $this->new_register = true;\n\n\n // Carrega os dados iniciais, caso $temp['data'] esteja definido\n if(sizeof($temp['data']) > 0)\n $this->load_data($temp['data']);\n }"
] | [
"0.7261639",
"0.6564941",
"0.64760524",
"0.6379491",
"0.6352982",
"0.6289181",
"0.61774784",
"0.6100279",
"0.6089668",
"0.6081211",
"0.6054398",
"0.60237443",
"0.59224045",
"0.5913266",
"0.5908257",
"0.5907287",
"0.5898471",
"0.5884764",
"0.58560175",
"0.5851096",
"0.5835364",
"0.5835211",
"0.58339363",
"0.5830128",
"0.5818273",
"0.57996905",
"0.5773684",
"0.5773116",
"0.57721275",
"0.5758002",
"0.5750401",
"0.5745717",
"0.57277906",
"0.5721757",
"0.5719343",
"0.57161456",
"0.5707409",
"0.5702154",
"0.5702154",
"0.56988394",
"0.56844145",
"0.5672412",
"0.56575316",
"0.565216",
"0.5652038",
"0.563883",
"0.5633471",
"0.5632257",
"0.56042176",
"0.5600466",
"0.5596005",
"0.55787265",
"0.55781955",
"0.55703133",
"0.55621696",
"0.5544364",
"0.55290234",
"0.5526634",
"0.55235577",
"0.5512879",
"0.55125076",
"0.55124223",
"0.5510197",
"0.54885495",
"0.54882133",
"0.5485913",
"0.5481526",
"0.54746413",
"0.5472132",
"0.5469982",
"0.54692423",
"0.546756",
"0.5463468",
"0.54580116",
"0.5456439",
"0.5451425",
"0.54512346",
"0.54505587",
"0.54430497",
"0.5440233",
"0.5434862",
"0.54335594",
"0.54318184",
"0.54257995",
"0.54232305",
"0.54230326",
"0.54230326",
"0.5422951",
"0.54194623",
"0.5411929",
"0.54074955",
"0.54067945",
"0.54062927",
"0.54012316",
"0.5396118",
"0.53920877",
"0.5391532",
"0.5388062",
"0.5387508",
"0.5386526",
"0.5381516"
] | 0.0 | -1 |
getMode() : Display a single item from the database | private function getMode()
{
$mode = $this->mode;
$conf_view = $this->conf_view;
$sumOfModes = count( $conf_view );
// RETURN false : there isn't any single view
if ( $sumOfModes < 1 )
{
// RETURN : no DRS prompt needed
if ( !$this->pObj->b_drs_error )
{
return false;
}
// RETURN : DRS prompt
$this->getModeDRSnoView();
return false;
}
// mode isn't proper. Move it to 1.
if ( $mode > $sumOfModes )
{
$mode = 1;
}
return $mode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function showSingle($id);",
"function show(int $id);",
"public function show(Modelo $modelo)\n {\n //\n }",
"public function show(Modelo $modelo)\n {\n //\n }",
"public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }",
"public function show($id)\n {\n //$this->_DetailItem();\n }",
"public function viewdetailsAction()\n {\n $productId = $this->_getParam('product_id');\n $product = $this->_model->setId($productId);\n $this->view->product = $product->fetch(); \n \n }",
"public function show($id)\n {\n $item = $this->itemCRUD->find_item($id);\n\n\n $this->load->view('theme/header');\n $this->load->view('itemCRUD/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }",
"public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }",
"function show() {\n echo $this->fetch();\n }",
"public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }",
"public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }",
"public function show($id){\n\t\t//\n\t}",
"public function show($id){\n\t\t//\n\t}",
"public function detail($tradeID, $mode = '')\n {\n $trade = $this->trade->getByID($tradeID);\n if($trade->type == 'out') $this->loadModel('tree')->checkRight($trade->category);\n\n if($_POST)\n {\n $result = $this->trade->saveDetail($tradeID); \n if($result) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));\n $this->send(array('result' => 'fail', 'message' => dao::getError()));\n }\n\n $details = $this->trade->getDetail($tradeID);\n if(empty($details))\n {\n $detail = $trade;\n $detail->desc = '';\n $detail->money = '';\n $details[] = $detail;\n }\n\n $this->view->title = $this->lang->trade->detail;\n $this->view->modalWidth = 900;\n $this->view->trade = $trade;\n $this->view->details = $details;\n $this->view->users = $this->loadModel('user')->getPairs('nodeleted,noforbidden');\n\n if($trade->type == 'in' or $trade->type == 'out') $this->view->categories = $this->loadModel('tree')->getOptionMenu($trade->type, 0, $removeRoot = true);\n\n $this->display();\n }",
"public function show($id) {}",
"function showitem($Id)\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '订单详情';\n $this->global['pageName'] = 'order_detail';\n\n $data['empty'] = NULL;\n\n $item = $this->getItemInfo($Id);\n\n $userinfo = $this->user_model->getProviderInfos($this->user_model->getIdByUserId($item->provider_id));\n $item->provider_name = $userinfo->username;\n $item->provider_userid = $userinfo->userid;\n $this->global['model'] = $item;\n $this->loadViews(\"order_manage/order_detail\", $this->global, $data, NULL);\n }\n }",
"public function show($id) {\r\n //\r\n }",
"public function show($id) {\r\n //\r\n }",
"public function show($id)\n\t{\n \n\t}",
"public function show($id)\n\t{\t\n\n\t}",
"public function show($id) {\n\t //\n }",
"function showitem($Id)\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '单品活动详情';\n $this->global['pageName'] = 'user_detail';\n $this->global['typelist'] = $this->product_util_model->getProductTypeList();\n\n $data['empty'] = NULL;\n\n $item = $this->getItemInfo($Id);\n $userinfo = $this->user_model->getProviderInfos($item->provider_id);\n $item->provider_name = $userinfo->username;\n $item->provider_userid = $userinfo->userid;\n\n $this->global['brandlist'] = $this->product_util_model->getProductBrandList($item->type);\n $this->global['datalist'] = $this->user_model->getProductList($item->type, $item->brand, $item->provider_id);\n\n $this->global['model'] = $item;\n $this->loadViews(\"user_manage/user_detail\", $this->global, $data, NULL);\n }\n }",
"public function show($id)\r\n {\r\n \r\n }",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id)\n\t{\n\n\t\t\n\t}",
"public function show($id)\n\t{\n\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show($id)\r\n {\r\n \r\n }",
"public function show($id)\r\n {\r\n \r\n }",
"function product_view()\n {\n \t$id= $_GET['id'];\n $model = new ProductModel();\n $data = $model->where('id', $id)->first();\n echo view('Admin/product_view', $data);\n }",
"public function show($id)\n\t{ \n\t\t//\n\t}",
"public function show($id)\n {\n \t//\n }",
"public function show($id)\n {\n \t//\n }",
"public function show($id)\n\t {\n\t //\n\t }",
"public function show($id)\n\t{\n //\n\t}",
"public function show($id)\r\r\n {\r\r\n //\r\r\n }",
"public function show($id)\r\r\n {\r\r\n //\r\r\n }",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($id)\n {\n \n \n }",
"public function show()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'show',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/show', $data);\n }",
"public function displayOneArticle()\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $this->showArticleDetails = $query->fetch();\n\n // Change the author by the nickname corresponding to the id given\n $model = $this->userModel->displayOneUser($this->showArticleDetails['author']);\n $this->showArticleDetails['author'] = $model['nickname'];\n\n // Change the category by the name corresponding to the id given\n if ($this->showArticleDetails['category'] !== null) {\n $model = $this->categoryModel->displayOneCategory((int)$this->showArticleDetails['category']);\n $this->showArticleDetails['category'] = $model['name'];\n }\n\n $query = $this->commentModel->displayCommentsFromArticle($this->articleId);\n $this->showComments = $query->fetchAll();\n }",
"public function show( $id ) {\n //\n }",
"public function show_detail($i_id=0)\r\n {}",
"public function show_detail($i_id=0)\r\n {}",
"public function show($id)\n {\n // theres no show, only edit\n }",
"public function show($id) {\n\t\t\t//\n\t\t}",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\n {\n \n \n }",
"public function show($id)\n\t{\n\t //\n\t}",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\r\n {\r\n //\r\n }",
"public function show($id)\n {\n \n }",
"public function show($id) \n {\n //\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id) {\n\n\t}",
"public function show($id)\n {\n return $this->commandBus->execute(new \\Sailr\\Item\\GetSingleItemCommand($id));\n }"
] | [
"0.65377283",
"0.6361877",
"0.62688947",
"0.62688947",
"0.62545556",
"0.6201617",
"0.6152115",
"0.6103773",
"0.60771",
"0.6076273",
"0.6052327",
"0.6047852",
"0.6030736",
"0.6030736",
"0.60179985",
"0.60174125",
"0.60130465",
"0.6002538",
"0.6002538",
"0.60019404",
"0.59934825",
"0.5988732",
"0.5982066",
"0.5978409",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596749",
"0.596492",
"0.596492",
"0.5958411",
"0.5958411",
"0.5958411",
"0.5953872",
"0.5953872",
"0.59516716",
"0.59420204",
"0.59371805",
"0.5934418",
"0.5930954",
"0.5930954",
"0.59301597",
"0.59274006",
"0.59186745",
"0.59186745",
"0.5917833",
"0.5916587",
"0.59161913",
"0.5915794",
"0.5909861",
"0.5907719",
"0.5907719",
"0.5907667",
"0.59071505",
"0.59066755",
"0.59013975",
"0.5901383",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.5900866",
"0.58949256",
"0.5880843",
"0.5878803",
"0.5878803",
"0.58775103",
"0.587715"
] | 0.0 | -1 |
hook_afterConsolidatetRows( ): Implement the hook rows_filter_values | private function hook_afterConsolidatetRows()
{
// Hook isn't used
if ( !is_array( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ 'browser' ][ 'browser_single' ] ) )
{
// RETURN without any prompt to DRS
if ( !$this->pObj->b_drs_hooks )
{
return;
}
// RETURN with a prompt to DRS
$prompt = 'Any third party extension doesn\'t use the HOOK browser_single.';
t3lib_div::devlog( '[INFO/HOOK] ' . $prompt, $this->pObj->extKey, 0 );
$prompt = 'See Tutorial Hooks: http://typo3.org/extensions/repository/view/browser_tut_hooks_en/current/';
t3lib_div::devlog( '[HELP/HOOK] ' . $prompt, $this->pObj->extKey, 1 );
return;
}
// Implement the hook
$_params = array( 'pObj' => &$this );
foreach ( ( array ) $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ 'browser' ][ 'browser_single' ] as $_funcRef )
{
t3lib_div::callUserFunction( $_funcRef, $_params, $this );
}
// RETURN : no DRS prompt needed
if ( !$this->pObj->b_drs_hooks )
{
return;
}
$i_extensions = count( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ 'browser' ][ 'browser_single' ] );
$arr_ext = array_values( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ 'browser' ][ 'browser_single' ] );
$csv_ext = implode( ',', $arr_ext );
if ( $i_extensions > 1 )
{
t3lib_div::devlog( '[INFO/SQL] The third party extensions ' . $csv_ext . ' use the HOOK browser_single.', $this->pObj->extKey, -1 );
t3lib_div::devlog( '[HELP/SQL] In case of errors or strange behaviour please check this extenions!', $this->pObj->extKey, 1 );
return;
}
t3lib_div::devlog( '[INFO/SQL] The third party extension ' . $csv_ext . ' uses the HOOK browser_single.', $this->pObj->extKey, -1 );
t3lib_div::devlog( '[HELP/SQL] In case of errors or strange behaviour please check this extenion!', $this->pObj->extKey, 1 );
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function filter_row(&$row) {}",
"private function get_filterItemsFromRows()\n {\n // Default return value\n $arr_return = array();\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // RETURN rows are empty\n if ( empty( $this->rows ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return $arr_return;\n }\n // RETURN rows are empty\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }",
"private function get_filterItems()\n {\n $arr_return = array();\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Default return value\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // Set rows, if current filter is with areas\n $this->areas_toRows();\n\n// 4.1.16, 120927, dwildt, -\n// // RETURN rows are empty\n// if( empty ( $this->rows) )\n// {\n// // DRS\n// if( $this->pObj->b_drs_warn )\n// {\n// $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n// t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n// }\n// // DRS\n// return $arr_return;\n// }\n// // RETURN rows are empty\n// 4.1.16, 120927, dwildt, -\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n if ( !empty( $arr_return ) )\n {\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n }\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }",
"abstract protected function filterFieldvalue();",
"function AggregateListRowValues() {\n\t}",
"function AggregateListRowValues() {\n\t}",
"function AggregateListRowValues() {\n\t}",
"function AggregateListRowValues() {\n\t}",
"public function aggregateListRowValues()\n\t{\n\t}",
"public function aggregateListRowValues()\n\t{\n\t}",
"protected function _prepareRowsAction() {\n \n }",
"function filter_TR_By_S_A_F_E_C($SEDE, $AREA, $FACULTAD, $ESCUELA, $CARRERA,$TABLE_R)\n{\n global $mysqli;\n $TRES = $TABLE_R;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio))AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice FROM \" .$TRES. \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? AND car_ia = ? \");\n $parametros = array(\"iiiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA, &$CARRERA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"function filter_TR_By_S_A_F_E($SEDE, $AREA, $FACULTAD, $ESCUELA,$TABLE_R)\n{\n global $mysqli;\n $TRES = $TABLE_R;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice FROM \" .$TRES. \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? \");\n $parametros = array(\"iiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"private function get_filter()\n {\n $arr_return = array();\n\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // Set marker label\n $markerLabel = '###' . strtoupper( $this->curr_tableField ) . '###';\n\n // RETURN condition isn't met\n if ( !$this->ts_getCondition() )\n {\n $arr_return[ 'data' ][ 'marker' ][ $markerLabel ] = null;\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }\n // RETURN condition isn't met\n\n $this->set_currFilterIsArea();\n\n // Get filter rows\n $arr_return = $this->get_rows();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }\n $rows = $arr_return[ 'data' ][ 'rows' ];\n unset( $arr_return );\n // Get filter rows\n // Set class var $rows\n $this->rows = $rows;\n\n // Localise the rows\n $this->localise();\n\n // Render the filter rows\n $arr_return = $this->get_filterItems();\n $items = $arr_return[ 'data' ][ 'items' ];\n unset( $arr_return );\n $arr_return[ 'data' ][ 'marker' ][ $markerLabel ] = $items;\n // Render the filter rows\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }",
"function GetExtendedFilterValues() {\n\t\tglobal $deals_details;\n\n\t\t// Field dealer\n\t\t$sSelect = \"SELECT DISTINCT rep.dealer FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.dealer ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->dealer->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\n\t\t// Field date_start\n\t\t$sSelect = \"SELECT DISTINCT rep.date_start FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.date_start ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->date_start->DropDownList = ewrpt_GetDistinctValues($deals_details->date_start->DateFilter, $wrkSql);\n\n\t\t// Field status\n\t\t$sSelect = \"SELECT DISTINCT rep.status FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.status ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->status->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\t}",
"private function get_filterItemsDefault()\n {\n $arr_return = array();\n\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // Default return value\n $items = null;\n $arr_return[ 'data' ][ 'items' ] = $items;\n\n // Add the first item to the rows\n $this->set_firstItem();\n\n // LOOP rows\n $this->row_number = 0;\n\n//var_dump( __METHOD__, __LINE__, 'Sieht so aus, wie wenn $uid von $this->rows nicht multiple ist. Wo wird $uid gesetzt?' . PHP_EOL, $this->rows );\n foreach ( ( array ) $this->rows as $uid => $row )\n {\n $key = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n $value = $row[ $key ];\n\n // #56339, dwildt, +\n list( $table ) = explode( '.', $this->curr_tableField );\n switch ( true )\n {\n case( $this->pObj->localTable == $table ):\n $items = $this->get_filterItemLocaltable( $uid, $value, $items );\n break;\n default:\n $items = $this->get_filterItemForeigntable( $uid, $value, $items );\n//var_dump( __METHOD__, __LINE__, $uid, $value, $items );\n break;\n }\n $this->row_number++;\n }\n // LOOP rows\n $items = $this->get_maxItemsWrapBeginEnd( $items );\n\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n\n $trimItems = trim( $items );\n if ( !empty( $trimItems ) )\n {\n $arr_return[ 'data' ][ 'items' ] = $items;\n }\n else\n {\n unset( $arr_return );\n }\n return $arr_return;\n }",
"private function get_filterItemsWrap( $items )\n {\n $arr_return = array();\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n $conf_name = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field ];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // IF NOT CATEGORY_MENU ajax class onchange\n // #41753.01, 121010, dwildt, 4-\n// if($conf_name != 'CATEGORY_MENU')\n// {\n// $conf_array = $this->pObj->objJss->class_onchange($conf_name, $conf_array, $this->row_number);\n// }\n // #41753.01, 121010, dwildt, 11+\n switch ( true )\n {\n case( $conf_name == 'CATEGORY_MENU' ):\n case( $conf_name == 'TREEMENU' ):\n // Follow the workflow\n break;\n default:\n $conf_array = $this->pObj->objJss->class_onchange( $conf_name, $conf_array, $this->row_number );\n break;\n }\n // IF NOT CATEGORY_MENU ajax class onchange\n // DRS :TODO:\n if ( $this->pObj->b_drs_devTodo )\n {\n $prompt = 'Check multiple!';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n // Set multiple property\n // SWITCH type of filter\n switch ( $conf_name )\n {\n case ( 'SELECTBOX' ) :\n $size = $conf_array[ 'size' ];\n $multiple = null;\n if ( $size >= 2 )\n {\n if ( $conf_array[ 'multiple' ] == 1 )\n {\n $multiple = ' ' . $conf_array[ 'multiple.' ][ 'selected' ];\n }\n }\n break;\n case ( 'CHECKBOX' ) :\n// // #i0185, 150715, dwildt\n// $size = null;\n// $multiple = null;\n// if ( $conf_array[ 'multiple' ] == 1 )\n// {\n// $multiple = ' ' . $conf_array[ 'multiple.' ][ 'selected' ];\n// }\n// break;\n case ( 'CATEGORY_MENU' ) :\n case ( 'RADIOBUTTONS' ) :\n $size = null;\n $multiple = null;\n break;\n // #41753.01, 121010, dwildt, 4+\n case ('TREEVIEW') :\n $size = null;\n $multiple = true;\n break;\n default :\n if ( $this->pObj->b_drs_error )\n {\n $prompt = 'undefined value in switch: \\'';\n t3lib_div :: devlog( '[ERROR/JSS] ' . $prompt . $conf_name . '\\'', $this->pObj->extKey, 3 );\n }\n echo '<h1>Undefined value</h1>\n <h2>' . $conf_name . ' is not defined</h2>\n <p>Method ' . __METHOD__ . ' (line: ' . __LINE__ . ')</p>\n <p>Sorry, this error shouldn\\'t occured!</p>\n <p>Browser - TYPO3 without PHP</p>\n ';\n exit;\n break;\n }\n // SWITCH type of filter\n // Set multiple property\n // Get the all items wrap\n $itemsWrap = $this->htmlSpaceLeft . $conf_array[ 'wrap.' ][ 'object' ];\n // Remove empty class\n $itemsWrap = str_replace( ' class=\"\"', null, $itemsWrap );\n\n // Get nice piVar\n $key_piVar = $this->nicePiVar[ 'key_piVar' ];\n //$arr_piVar = $this->nicePiVar['arr_piVar'];\n $str_nicePiVar = $this->nicePiVar[ 'nice_piVar' ];\n\n // Get ID\n $id = $this->pObj->prefixId . '_' . $str_nicePiVar;\n $id = str_replace( '.', '_', $id );\n\n // Replace marker\n $itemsWrap = str_replace( '###TABLE.FIELD###', $key_piVar, $itemsWrap );\n $itemsWrap = str_replace( '###ID###', $id, $itemsWrap );\n $itemsWrap = str_replace( '###SIZE###', $size, $itemsWrap );\n $itemsWrap = str_replace( '###MULTIPLE###', $multiple, $itemsWrap );\n // Replace marker\n // Wrap all items\n $items = PHP_EOL . $items . $this->htmlSpaceLeft;\n $items = str_replace( '|', $items, $itemsWrap );\n // Wrap all items\n // IF CATEGORY_MENU ajax class onchange\n // #41753.01, 121010, dwildt, 4-\n// if($conf_name == 'CATEGORY_MENU')\n// {\n// $conf_array = $this->pObj->objJss->class_onchange($conf_name, $conf_array, $this->row_number);\n// }\n // #41753.01, 121010, dwildt, 10+\n switch ( true )\n {\n case( $conf_name == 'CATEGORY_MENU' ):\n case( $conf_name == 'TREEVIEW' ):\n $conf_array = $this->pObj->objJss->class_onchange( $conf_name, $conf_array, $this->row_number );\n break;\n default:\n // Follow the workflow\n break;\n }\n // IF CATEGORY_MENU ajax class onchange\n // Wrap the filter\n $items = $this->get_filterWrap( $items );\n\n // RETURN content\n $arr_return[ 'data' ][ 'items' ] = $items;\n return $arr_return;\n }",
"private function areas_toRows()\n {\n // RETURN filter hasn't areas\n if ( !$this->bool_currFilterIsArea )\n {\n return;\n }\n // RETURN filter hasn't areas\n // Get areas from TS\n $areas = $this->ts_getAreas();\n // Convert areas to rows\n $rows = $this->areas_toRowsConverter( $areas );\n $this->rowsFromAreaWoHits = $rows;\n\n // Count the hits for each area row\n $rows = $this->areas_countHits( $rows );\n // Remove area rows without hits, if it's needed\n $rows = $this->areas_wiHitsOnly( $rows );\n\n // Override class var rows\n $this->rows = $rows;\n\n return;\n }",
"public function getFilteredRows($rows) {\n $filterRows = array();\n $filterRow = array();\n //-------------------\n // Получим параметры запроса\n $request = $this->getRequest();\n $params = $request->getParams();\n $table = $params['table'];\n\n if ($table == 'admin.blog_posts') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"content\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n if ($table == 'admin.blog_posts_tags') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"sortColumn\":\n case \"ascDescFlg\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n if ($table == 'admin.blog_posts_images') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"sortColumn\":\n case \"ascDescFlg\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n if ($table == 'admin.blog_posts_audio') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"sortColumn\":\n case \"ascDescFlg\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n if ($table == 'admin.blog_posts_video') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"sortColumn\":\n case \"ascDescFlg\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n if ($table == 'admin.blog_posts_locations') {\n foreach ($rows as $row) {\n // Отфильтруем ненужные поля в записи (масиве)\n foreach ($row as $key => $value) {\n // Исключим поля\n switch ($key) {\n case \"content\":\n case \"correction\":\n case \"details\":\n case \"sortColumn\":\n case \"ascDescFlg\":\n break;\n default :\n $filterRow[$key] = $value;\n break;\n }\n }\n if (count($filterRow) > 0) {\n $filterRows[] = $filterRow;\n }\n $filterRow = array();\n }\n }\n return $filterRows;\n }",
"abstract function get_sql_filter($data);",
"function calculate_data() {\n $this->data = $this->get_default_data();\n\n // Get extra icons... send list of filters but don't include exceptions - as we do need the filter list here\n $exceptions = $this->get_filter_exceptions();\n $rest_of_filters = array();\n foreach ($this->filter->_fields as $key => $value) {\n if (!in_array($key,$exceptions)) {\n $rest_of_filters[] = $key;\n }\n }\n // Pass the rest_of_filters array, but then also let the method know this is a special config filter\n $extra_icons = $this->filter->get_sql_filter('',\n $rest_of_filters,\n $this->allow_interactive_filters(),\n $this->allow_configured_filters(),\n '',\n true);\n\n foreach ($this->data as $key => $value) {\n\n //If key is in choices array and not in extra_icons\n if (array_key_exists($key,$this->checkboxes_filter->options['choices']) &&\n !strpos($extra_icons,$key)) {\n // then we need to remove it from $this->data in fact...\n unset($this->data[$key]);\n continue;\n }\n //first step - try getting the item value directly\n $data_item = $this->get_data_item($key);\n\n if ($data_item !== FALSE) {\n $this->data[$key]->value = $data_item;\n } else {\n //backup plan - use SQL query to get the item value\n\n $use_filters = true;\n $sql = $this->get_data_item_sql($key, $use_filters);\n if ($sql !== FALSE) {\n //parse SQL for a WHERE clause\n\n $has_where_clause = php_report::sql_has_where_clause($sql);\n\n $conditional_symbol = 'WHERE';\n\n if($has_where_clause) {\n $conditional_symbol = 'AND';\n }\n\n // apply filters if applicable\n if(!empty($this->filter) && !empty($use_filters)) {\n // Include filter_exceptions here so that our config type filter is not included in the filters added to the final sql\n $sql_filter = $this->filter->get_sql_filter('',\n $this->get_filter_exceptions($key),\n $this->allow_interactive_filters(),\n $this->allow_configured_filters());\n if(!empty($sql_filter)) {\n $sql .= \" {$conditional_symbol} ({$sql_filter})\";\n }\n }\n //obtain field value\n if ($field_data = get_field_sql($sql)) {\n $this->data[$key]->value = $field_data;\n }\n }\n }\n }\n\n }",
"function fn_advanced_import_filter_out_null_values(&$row)\n{\n foreach ($row as $key => $value) {\n\n if ($value === null) {\n unset($row[$key]);\n }\n }\n\n return true;\n}",
"function filter_TR_By_S_A_F($SEDE, $AREA, $FACULTAD,$TABLE_R)\n{\n global $mysqli;\n $TRES = $TABLE_R;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice FROM \" .$TRES. \" where sede = ? AND area_i = ? AND fac_ia = ?\");\n $parametros = array(\"iii\", &$SEDE, &$AREA, &$FACULTAD);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"function filter_TREPORTE_By_S_A_F($SEDE, $AREA, $FACULTAD, $state, $row, $index)\n{\n global $mysqli;\n $TR = \"resultados2017\";\n $addQuery = \"ORDER BY \" . $row . \" \" . $index;\n $lastQuery = \"limit 20\";\n\n //SET QUERY\n //1 to send at main table\n //2 to send at the report\n\n if ($state == 1) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? limit 20\");\n $parametros = array(\"iii\", &$SEDE, &$AREA, &$FACULTAD);\n $data = $query->getresults($parametros);\n\n } elseif ($state == 2) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? \" . $addQuery);\n $parametros = array(\"iii\", &$SEDE, &$AREA, &$FACULTAD);\n $data = $query->getresults($parametros);\n\n } else {\n //error\n }\n\n//return\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }",
"function filter_TREPORTE_By_S_A_F_E_C($SEDE, $AREA, $FACULTAD, $ESCUELA, $CARRERA, $state, $row, $index)\n{\n global $mysqli;\n $TR = \"resultados2017\";\n\n $addQuery = \"ORDER BY \" . $row . \" \" . $index;\n $lastQuery = \"limit 20\";\n\n //SET QUERY\n //1 to send at main table\n //2 to send at the report\n\n if ($state == 1) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? AND car_ia = ? limit 20\");\n $parametros = array(\"iiiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA, &$CARRERA);\n $data = $query->getresults($parametros);\n\n } elseif ($state == 2) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? AND car_ia = ? \" . $addQuery);\n $parametros = array(\"iiiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA, &$CARRERA);\n $data = $query->getresults($parametros);\n\n } else {\n //error\n }\n\n//return\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"function filter_TREPORTE_By_S_A_F_E($SEDE, $AREA, $FACULTAD, $ESCUELA, $state, $row, $index)\n{\n global $mysqli;\n $TR = \"resultados2017\";\n $addQuery = \"ORDER BY \" . $row . \" \" . $index;\n $lastQuery = \"limit 20\";\n\n //SET QUERY\n //1 to send at main table\n //2 to send at the report\n\n if ($state == 1) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? limit 20 \");\n $parametros = array(\"iiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA);\n $data = $query->getresults($parametros);\n\n } elseif ($state == 2) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? \" . $addQuery);\n $parametros = array(\"iiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA);\n $data = $query->getresults($parametros);\n\n } else {\n //error\n }\n\n//return\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"private function filter() {\r\n $globalSearch = array();\r\n $columnSearch = array();\r\n\r\n $columns = $this->resource->setDatatableFields(TRUE);\r\n\r\n $dtColumns = $this->pluck($columns, 'dt');\r\n\r\n if (isset($this->resource->requestData['search']) && $this->resource->requestData['search']['value'] != '') {\r\n\r\n $str = $this->resource->requestData['search']['value'];\r\n\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n if ($requestColumn['searchable'] == 'true') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Individual column filtering\r\n if (isset($this->resource->requestData['columns'])) {\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n $str = $requestColumn['search']['value'];\r\n if ($requestColumn['searchable'] == 'true' &&\r\n $str != '') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Combine the filters into a single string\r\n $where = '';\r\n if (count($globalSearch)) {\r\n $where = '(' . implode(' OR ', $globalSearch) . ')';\r\n }\r\n if (count($columnSearch)) {\r\n $where = $where === '' ?\r\n implode(' AND ', $columnSearch) :\r\n $where . ' AND ' . implode(' AND ', $columnSearch);\r\n }\r\n\r\n return $where;\r\n }",
"public function applyFilter($value)\n\t{\n\t\treturn;\n\t}",
"function filterBy_S_A_F_E_C($SEDE, $AREA, $FACULTAD, $ESCUELA, $CARRERA,$TABLE_I)\n{\n global $mysqli;\n $TINS = $TABLE_I;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia\n FROM \" .$TINS. \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? AND car_ia = ? \");\n $parametros = array(\"iiiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA, &$CARRERA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function testGetRowsFilterCustomData() {\n $this->enableAllComponents();\n $ids = $this->createCustomGroupWithField([]);\n $contacts = $this->createContacts(2);\n foreach ($contacts as $contact) {\n $contribution = $this->callAPISuccess('Contribution', 'create', [\n 'total_amount' => 4,\n 'financial_type_id' => 'Donation',\n 'contact_id' => $contact['id'],\n ]);\n $this->callAPISuccess('Contact', 'create', ['id' => $contact['id'], 'custom_' . $ids['custom_field_id'] => $contribution['id']]);\n }\n\n $params = [\n 'report_id' => 'contribution/contributions',\n 'fields' => ['contribution_id'],\n 'custom_' . $ids['custom_field_id'] . '_op' => 'eq',\n 'custom_' . $ids['custom_field_id'] . '_value' => $contribution['id'],\n ];\n $rows = $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n $this->assertEquals(1, count($rows));\n }",
"function prepareRowData(array &$row)\n{\n sanitizeDataQueried($row);\n convertAllDates($row);\n roundRawGrade($row);\n}",
"function filterBy_S_A_F_E($SEDE, $AREA, $FACULTAD, $ESCUELA,$TABLE_I)\n{\n global $mysqli;\n $TINS = $TABLE_I;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia\n FROM \" .$TINS. \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? \");\n $parametros = array(\"iiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function _processResults(){\n $data = array();\n foreach($this->_resultset as $doc){\n\t$fields = array();\n\tforeach($doc as $key => $value){\n $fields[$key] = $value;\n }\n \t$data[] = $fields;\n }\n $processor = new Pas_Solr_SensitiveFields();\n $clean = $processor->cleanData($data, $this->_getRole(), $this->_core);\n return $clean;\n }",
"private function init_consolidationAndSelect_setArrayConsolidation()\n {\n // LOOP : each filter (table.field)\n foreach ( ( array ) $this->arr_tsFilterTableFields as $tableField )\n {\n list( $table ) = explode( '.', $tableField );\n $tableUid = $table . '.uid';\n\n // CONTINUE : $arrConsolidation contains the current tableUid\n if ( in_array( $tableUid, ( array ) $this->pObj->arrConsolidate[ 'addedTableFields' ] ) )\n {\n continue;\n }\n // CONTINUE : $arrConsolidation contains the current tableUid\n // #47089, 120410, dwildt\n // CONTINUE : select clause contains the current tableUid\n // #50214, 130720, dwildt, 1-\n //$pos = strpos( $this->pObj->conf_sql, $tableUid );\n // #50214, 130720, dwildt, 1+\n $pos = strpos( $this->pObj->conf_sql[ 'select' ], $tableUid );\n if ( !( $pos === false ) )\n {\n continue;\n }\n // CONTINUE : select clause contains the current tableUid\n // #47089, 120410, dwildt\n // Add current tableUid\n $this->pObj->arrConsolidate[ 'addedTableFields' ][] = $tableUid;\n\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n t3lib_div :: devlog( '[INFO/FILTER] Table ' . $tableUid . ' is added to arrConsolidate[addedTableFields].', $this->pObj->extKey, 0 );\n }\n // DRS\n }\n // LOOP : each filter (table.field)\n }",
"function filter_TREPORTE_By_S($SEDE, $state, $row, $index)\n{\n global $mysqli;\n $TR = \"resultados2017\";\n $addQuery = \"ORDER BY \" . $row . \" \" . $index;\n $lastQuery = \"limit 20\";\n\n //SET QUERY\n //1 to send at main table\n //2 to send at the report\n if ($state == 1) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? limit 20\");\n $parametros = array('i', &$SEDE);\n $data = $query->getresults($parametros);\n\n } else if ($state == 2) {\n $query = new Query($mysqli, \"SELECT apellido,nombre,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,sede,areap,ps,gatb,pca,indice,verbal,numer FROM \" . $TR . \" where sede = ? \" . $addQuery);\n $parametros = array('i', &$SEDE);\n $data = $query->getresults($parametros);\n\n } else {\n //error\n }\n\n//return\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function filtering();",
"private function get_filterItemsTree()\n {\n $arr_return = array();\n\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // Set cObj->data treeview\n $this->cObjData_setFlagTreeview();\n // Set marker treeview\n $this->markerArray[ '###TREEVIEW###' ] = 1;\n\n // Get table and field\n //list( $table, $field ) = explode( '.', $this->curr_tableField );\n // Get TS filter configuration\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n //$conf_array = $this->conf_view['filter.'][$table . '.'][$field . '.'];\n // Needed for tree_setOneDim( )\n $this->arr_rowsTablefield = $this->rows;\n\n // Removes all rows with a null key\n // @todo: 120521, dwildt : rows with key null should removed before counting hits!\n // sum of hits can be wrong\n unset( $this->arr_rowsTablefield[ null ] );\n\n // Get the labels for the fields uid, value and treeParentField\n $this->uidField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n $this->valueField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n $this->treeParentField = $this->sql_filterFields[ $this->curr_tableField ][ 'treeParentField' ];\n\n\n\n// //////////////////////////////////////////////////////\n// //\n// // Order the values\n//\n// // Get the values for ordering\n// // @todo: 121018, dwildt, is multisort needed?\n// $arr_value = array( );\n// foreach ( $this->arr_rowsTablefield as $key => $row )\n// {\n// $arr_value[$key] = $row[$this->valueField];\n// }\n// // Get the values for ordering\n//\n// // Set DESC or ASC\n// if ( strtolower( $conf_array['order.']['orderFlag'] ) == 'desc' )\n// {\n// $order = SORT_DESC;\n// }\n// if ( strtolower( $conf_array['order.']['orderFlag'] ) != 'desc' )\n// {\n// $order = SORT_ASC;\n// }\n// // Set DESC or ASC\n//\n// // Order the rows\n// array_multisort( $arr_value, $order, $this->arr_rowsTablefield );\n// // Order the values\n\n unset( $this->tmpOneDim );\n // Parent uid of the root records: 0 of course\n $uid_parent = 0;\n // Set rows of the current tablefield to a one dimensional array\n $this->tree_setOneDim( $uid_parent );\n // Get the renderd tree. Each element of the returned array contains HTML tags.\n $arr_tableFields = $this->tree_getRendered();\n $items = implode( null, $arr_tableFields );\n unset( $this->tmpOneDim );\n\n\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n\n $items = $this->get_filterWrap( $items );\n\n // Unset cObj->data treeview\n $this->cObjData_unsetFlagTreeview();\n // Unset marker treeview\n unset( $this->markerArray[ '###TREEVIEW###' ] );\n\n // RETURN\n $trimItems = trim( $items );\n if ( !empty( $trimItems ) )\n {\n $arr_return[ 'data' ][ 'items' ] = $items;\n }\n else\n {\n unset( $arr_return );\n }\n return $arr_return;\n }",
"private function get_filterItemCObj( $uid, $value )\n {\n static $firstLoop = true;\n static $loop = array();\n static $conf_array = null;\n\n//// #56339\n//$this->pObj->dev_var_dump( $uid, $this->markerArray['###UID###'] );\n//$this->pObj->dev_var_dump( $uid, $value );\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n if ( !isset( $loop[ $this->curr_tableField ] ) )\n {\n $loop[ $this->curr_tableField ] = 0;\n }\n else\n {\n $loop[ $this->curr_tableField ] ++;\n }\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n }\n\n // Item class\n // Get TS configuration of the current filter / tableField\n $conf_name = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field ];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n // #41753.01, 121010, dwildt, 4-\n// if($conf_name == 'CATEGORY_MENU')\n// {\n// $conf_array = $this->pObj->objJss->class_onchange($conf_name, $conf_array, $this->row_number);\n// }\n // #41753.01, 121010, dwildt, 10+\n switch ( true )\n {\n case( $conf_name == 'CATEGORY_MENU' ):\n case( $conf_name == 'TREEVIEW' ):\n $conf_array = $this->pObj->objJss->class_onchange( $conf_name, $conf_array, $this->row_number );\n break;\n default:\n // Follow the workflow\n break;\n }\n\n//var_dump( __METHOD__, __LINE__, $value, $conf_array );\n // DRS :TODO:\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'Check AJAX ###ONCHANGE###';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n\n $this->markerArray[ '###CLASS###' ] = $this->replace_itemClass( $conf_array, '###CLASS###' );\n $this->markerArray[ '###STYLE###' ] = $this->replace_itemStyle( $conf_array, '###STYLE###' );\n $this->markerArray[ '###TITLE###' ] = $this->replace_itemTitle( '###TITLE###' );\n $this->markerArray[ '###URL###' ] = $this->replace_itemUrl( $conf_array, $uid, '###URL###' );\n // #i0129, 150218, dwildt, 1+\n $this->markerArray[ '###ID###' ] = $table . '__' . $field . '__' . $uid;\n $this->markerArray[ '###ITEM_SELECTED###' ] = $this->replace_itemSelected( $conf_array, $uid, $value, '###ITEM_SELECTED###' );\n // #40354, #40354, 4.1.7, 1+\n $this->markerArray[ '###TABLE.FIELD###' ] = $this->nicePiVar[ 'key_piVar' ];\n\n // 3.9.20: Be careful: Method need 10 milliseconds. Can be a\n // performance problem in case of a lot records!\n //$conf_array = $this->replace_marker( $conf_array );\n // Get the COA configuration for the value\n // SWITCH first item\n switch ( true )\n {\n case( $uid == $conf_array[ 'first_item.' ][ 'option_value' ] ):\n $cObj_name = $conf_array[ 'first_item.' ][ 'cObject' ];\n $cObj_conf = $conf_array[ 'first_item.' ][ 'cObject.' ];\n break;\n default:\n $cObj_name = $conf_array[ 'wrap.' ][ 'item.' ][ 'cObject' ];\n $cObj_conf = $conf_array[ 'wrap.' ][ 'item.' ][ 'cObject.' ];\n break;\n }\n // SWITCH first item\n // Get the COA configuration for the value\n\n $this->cObjData_setFlagDisplayInCaseOfNoCounting();\n\n $item = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n\n // 3.9.20\n // 3.9.20: Be careful: Method need 10 milliseconds. Can be a\n // performance problem in case of a lot records!\n $item = $this->pObj->cObj->substituteMarkerArray( $item, $this->markerArray );\n\n // 3.9.20: Code is moved from above\n // Workaround: remove ###ONCHANGE###\n $item = str_replace( ' class=\" ###ONCHANGE###\"', null, $item );\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'class=\" ###ONCHANGE###\" is removed. Check the code!';\n t3lib_div::devlog( '[WARN/TODO] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // Workaround: remove ###ONCHANGE###\n\n $this->cObjData_unsetFlagDisplayInCaseOfNoCounting();\n\n // maxItemsTagEndBegin\n // DRS :TODO:\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'Check maxItemsPerRow!';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n $item = $this->get_maxItemsTagEndBegin( $item );\n // maxItemsTagEndBegin\n\n\n $firstLoop = false;\n\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n }\n return $item;\n }",
"private function get_filterItem( $uid, $value )\n {\n static $loop = array();\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n if ( !isset( $loop[ $this->curr_tableField ] ) )\n {\n $loop[ $this->curr_tableField ] = 0;\n }\n else\n {\n $loop[ $this->curr_tableField ] ++;\n }\n\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n }\n\n // Get TS configuration of the current filter / tableField\n $conf_name = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field ];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // Make a backup\n $cObjDataBak = $this->pObj->cObj->data;\n // Add elements of current row to cObj->data\n $this->cObjData_updateRow( $uid );\n\n $this->set_markerArrayUpdateRow( $uid );\n\n // IF first_item, set the first item tree view\n if ( $uid == $conf_array[ 'first_item.' ][ 'option_value' ] )\n {\n $this->set_firstItemTreeView();\n }\n // IF first_item, set the first item tree view\n // DEVELOPMENT: Browser engine 4.x\n switch ( $this->pObj->dev_browserEngine )\n {\n case( 3 ):\n // stdWrap the current value\n $item = $this->get_filterItemValueStdWrap( $conf_name, $conf_array, $uid, $value );\n break;\n case( 4 ):\n // #i0112, 141218, dwildt, 1+\n case( 5 ):\n // Wrap the current value by the cObject\n $this->updateWizard( 'filter_cObject' );\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, '### 1' );\n }\n $item = $this->get_filterItemCObj( $uid, $value );\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, '### 2' );\n }\n break;\n default:\n $header = 'FATAL ERROR!';\n $text = 'Sorry, this error shouldn\\'t occure: case is undefined.';\n $this->pObj->drs_die( $header, $text );\n break;\n }\n // DEVELOPMENT: Browser engine 4.x\n\n\n $this->set_itemCurrentNumber();\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, '### 3' );\n }\n\n // Reset cObj->data\n $this->pObj->cObj->data = $cObjDataBak;\n\n if ( $loop[ $this->curr_tableField ] < 2 )\n {\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n }\n return $item;\n }",
"private function sql_resToRows_allItemsWiHits( $res, $rows_wiHits )\n {\n // Get all rows - get all filter items\n $rows_wiAllItems = $this->sql_resToRows( $res );\n//$this->pObj->dev_var_dump( $rows_wiAllItems );\n // RETURN all rows are empty\n if ( empty( $rows_wiAllItems ) )\n {\n return null;\n }\n // RETURN all rows are empty\n // RETURN all rows, there isn't any row with a hit\n if ( empty( $rows_wiHits ) )\n {\n return $rows_wiAllItems;\n }\n // RETURN all rows, there isn't any row with a hit\n // Get label of the hits field\n $hitsField = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n\n // LOOP all items\n foreach ( array_keys( ( array ) $rows_wiAllItems ) as $uid )\n// foreach( ( array ) $rows_wiAllItems as $uid => $row )\n {\n // If there is an hit, take it over\n if ( isset( $rows_wiHits[ $uid ] ) )\n {\n $hits = $rows_wiHits[ $uid ][ $hitsField ];\n $rows_wiAllItems[ $uid ][ $hitsField ] = $hits;\n }\n // If there is an hit, take it over\n }\n // LOOP all items\n // RETURN rows\n return $rows_wiAllItems;\n }",
"public function updateRowCheckInjections($table, $row, $filter)\r\n {\r\n\r\n //call to check validation of query injection of filter:\r\n $filterObj = $filter;\r\n if (gettype($filterObj)==object) {\r\n $filterObj = array();\r\n foreach ($filter as $key => $value) {\r\n array_push($filterObj, array($key,$value));\r\n }\r\n }\r\n $filter_obj = $this->processFilter($filterObj,$this->error);\r\n if(!$filter_obj) return false;\r\n \r\n $array = $row;\r\n if (!is_array($array)) {\r\n $array = json_decode($row);\r\n }\r\n \r\n \r\n if (count($array) ==0) {\r\n array_push($this->error, \"Post does not contain any data!\");\r\n return false;\r\n }\r\n\r\n //check if any post data is not a valid column_name:\r\n $all_columns = $this->getRows(\"SHOW COLUMNS FROM $table \", true);\r\n $table_columns = array();\r\n foreach ($all_columns as $col_row) {\r\n $col_name = $col_row[\"Field\"];\r\n array_push($table_columns, $col_name);\r\n }\r\n\r\n $where_columns = array();\r\n foreach ($filterObj as $filterRow) {\r\n array_push($where_columns, $filterRow[0]);\r\n }\r\n foreach ($where_columns as $where_column) {\r\n if (!in_array($where_column, $table_columns)) {\r\n array_push($this->error, \"field: $where_column is not in table: $table\");\r\n return false;\r\n }\r\n }\r\n $posted_columns = array_keys($array);\r\n foreach ($posted_columns as $posted_column) {\r\n if (!in_array($posted_column, $table_columns)) {\r\n array_push($this->error, \"field: $posted_column is not in table: $table\");\r\n return false;\r\n }\r\n }\r\n \r\n $setCommand = \"\";\r\n $values_arr = array();\r\n $param_type = \"\"; //array();\r\n $count = 0;\r\n foreach ($array as $key => $value) {\r\n $count+=1;\r\n if (strlen($setCommand)==0) {\r\n $setCommand .= $key.\" = ? \";\r\n } else {\r\n $setCommand .= \", \".$key.\" = ? \";\r\n }\r\n array_push($values_arr, $value);\r\n $param_type .= \"s\";\r\n }\r\n $filterRowValues =$filter_obj[\"filterRowValues\"];\r\n foreach ($filterRowValues as $sValue) {\r\n $param_type.=\"s\";\r\n }\r\n\r\n $sql = \"update $table set \".$setCommand;\r\n $a_params = array();\r\n array_push($a_params, $param_type);\r\n foreach ($values_arr as $singleValue) {\r\n array_push($a_params, $singleValue);\r\n }\r\n //adding params of where:\r\n \r\n if(strlen($filter_obj[\"filterWhere\"]) >0){\r\n foreach ($filterRowValues as $singleValue) {\r\n array_push($a_params, $singleValue);\r\n }\r\n $sql .= \" where \".$filter_obj[\"filterWhere\"];\r\n }\r\n \r\n //echo json_encode($a_params);\r\n $this->sql_statement = $sql;\r\n $stmt = $this->conn->prepare($sql);\r\n\r\n if (!$stmt) {\r\n array_push($this->error, \"updateRow: Error in preparing statement (\".$sql.\") \\n\".$this->conn->error);\r\n return false;\r\n } elseif(count($a_params)<1) {\r\n array_push($this->error, \"update must have parameters: \".$sql.\") \\n\");\r\n return false;\r\n } else {\r\n call_user_func_array(array($stmt, 'bind_param'), $this->refValues($a_params));\r\n $result = $stmt->execute();\r\n $count = $this->getConn()->affected_rows;\r\n $this->rowCount = $count;\r\n $stmt->close();\r\n\r\n if($count>0 && $count<10){\r\n $result_sql = \"select * from $table \";\r\n $result_row = $this->getRowsv2($result_sql,$filter, true);\r\n return $result_row;\r\n }\r\n return true;\r\n }\r\n }",
"public function process_filter_data_query($filter_data = array())\r\n {\r\n if($this->is_error === true){return;}\r\n \r\n // Peform lower module/table query statement\r\n foreach ($this->model_id_list() as $convert_condition)\r\n {\r\n // Use to store the extracted data\r\n $data_record = array();\r\n \r\n // Loop through data to obtain all value\r\n foreach ($convert_condition[\"data_column\"] as $data)\r\n {\r\n $data_name = $data[\"data\"];\r\n $data_key = $data[\"column\"];\r\n \r\n // Need to process each data\r\n foreach($filter_data as $f_key => $f_data)\r\n {\r\n // Peform string serach to cater for \"=\", \">\" and \"<\" symbol\r\n if(strpos($f_key,$data_name) !== false)\r\n {\r\n // Perform string replace\r\n $new_key = str_replace($data_name, $data_key, $f_key);\r\n $data_record[$new_key] = $filter_data[$f_key];\r\n unset($filter_data[$f_key]);\r\n }\r\n }\r\n }\r\n\r\n if($data_record !== array())\r\n {\r\n $mode = $convert_condition[\"table\"].\"_model\";\r\n $this->load->model($mode); // Invoke necessary model\r\n \r\n // Throw to sub model to process\r\n $data_record = $this->$mode->process_filter_data_query($data_record);\r\n \r\n // Check any name that is not tie to model\r\n foreach ($data_record as $r_key => $d_key)\r\n {\r\n if(strpos($r_key, \".\") === false)\r\n {\r\n // Map those with current sub model\r\n $new_key = $convert_condition[\"table\"].\".\".$r_key;\r\n $data_record[$new_key] = $data_record[$r_key];\r\n unset($data_record[$r_key]);\r\n }\r\n }\r\n \r\n $filter_data = array_merge($filter_data, $data_record);\r\n }\r\n\r\n // Merge back the data to filter data\r\n\r\n // @todo - careful about the range search and pattern, might not require as\r\n // currently as the column need range is at top level \r\n //$keys = array_keys($array); \r\n //$search_count (int) preg_grep(\"/c$/\",$keys);\r\n }\r\n \r\n return $filter_data;\r\n }",
"function filter_modify_strip_value(\n string $projectId,\n string $instanceId,\n string $tableId\n): void {\n // Connect to an existing table with an existing instance.\n $dataClient = new BigtableClient([\n 'projectId' => $projectId,\n ]);\n $table = $dataClient->table($instanceId, $tableId);\n\n $filter = Filter::value()->strip();\n\n $rows = $table->readRows([\n 'filter' => $filter\n ]);\n\n foreach ($rows as $key => $row) {\n // The \"print_row\" helper function is defined in https://cloud.google.com/bigtable/docs/samples/bigtable-reads-print\n print_row($key, $row);\n }\n}",
"private static function _getFilter() {}",
"private function get_rowsWiHits()\n {\n // Get SQL ressource for filter items with one hit at least\n $arr_return = $this->sql_resWiHits();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }\n $res = $arr_return[ 'data' ][ 'res' ];\n unset( $arr_return );\n // Get SQL ressource for filter items with one hit at least\n // Get rows from SQL ressource\n $arr_return[ 'data' ][ 'rows' ] = $this->sql_resToRows( $res );\n\n // Count all hits\n $this->sum_hits( $arr_return[ 'data' ][ 'rows' ] );\n\n // RETURN rows\n return $arr_return;\n }",
"protected function setFilterArray() {\n $primary_keys = getPrimaryKeys($this->table_name);\n foreach ($primary_keys as $pk) {\n if (isset($_GET[$pk])) {\n $this->filter[$pk] = Mysql::SQLValue($_GET[$pk]);\n }\n }\n }",
"abstract protected function _buildCalcRows();",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"private function cObjData_updateRow( $uid )\n {\n static $firstVisit = true;\n\n // RETURN: empty row\n if ( empty( $this->rows[ $uid ] ) )\n {\n return;\n }\n // RETURN: empty row\n // Add each element of the row to cObj->data\n foreach ( ( array ) $this->rows[ $uid ] as $key => $value )\n {\n $this->pObj->cObj->data[ $key ] = $value;\n }\n\n // Add the field uid with the uid of the current row\n $key = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n $value = $this->rows[ $uid ][ $key ];\n $this->pObj->cObj->data[ 'uid' ] = $value;\n\n // Add the field value with the value of the current row\n $key = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n $value = $this->rows[ $uid ][ $key ];\n $this->pObj->cObj->data[ 'value' ] = $value;\n\n // Add the field hits with the hits of the filter item\n $key = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n $value = $this->rows[ $uid ][ $key ];\n $this->pObj->cObj->data[ 'hits' ] = $value;\n//$this->pObj->dev_var_dump( $this->pObj->cObj->data['hits'] );\n // Add the field rowNumber with the number of the current row\n $key = $this->pObj->prefixId . '.rowNumber';\n $value = $this->itemsPerHtmlRow[ 'currItemNumberInRow' ];\n\n // DRS\n if ( $firstVisit && $this->pObj->b_drs_cObjData )\n {\n foreach ( ( array ) $this->pObj->cObj->data as $key => $value )\n {\n $arr_prompt[] = '\\'' . $key . '\\' => \\'' . $value . '\\'';\n }\n $prompt = 'cObj->data of the first row: ' . implode( '; ', ( array ) $arr_prompt );\n t3lib_div::devlog( '[OK/COBJ] ' . $prompt, $this->pObj->extKey, -1 );\n }\n // DRS\n\n $firstVisit = false;\n }",
"protected function applyFiltering()\n\t{\n\t\tif (!$this->hasFilters()) return;\n\n\t\tparse_str($this->filters, $list);\n\t\tforeach ($list as $column => $value) {\n\t\t\tif ($value !== '') {\n\t\t\t\t$this[$column]->applyFilter($value);\n\t\t\t}\n\t\t}\n\t}",
"private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }",
"protected function filterItems()\n\t{\n\t\t// must be in this order\n\t\t$this->applyDefaultFiltering();\n\t\t$this->applyDefaultSorting();\n\t\t$this->applyItems();\n\t\t$this->applyFiltering();\n\t\t$this->applySorting();\n\t\t$this->applyPaging();\n\t}",
"private function modifyFilters($cells){\n $cells = $this->modifyGroupInput($cells);\n return $cells;\n }",
"private function applyFilter($dataRow, $index)\n {\n foreach($this->filters as $filter){\n\n if(!$filter->filterData($dataRow)){\n\n unset($this->data[$index]);\n\n break;\n }\n }\n }",
"private function _prepareRow($array){\n return array_merge($this->_blankRow, $array);\n }",
"public function dataHook($rows)\n {\n foreach ($rows as &$row)\n {\n $row = (array) $row;\n\n // Change fields' name\n if (isset($row['order_id']))\n {\n $row['virtuemart_order_id'] = $row['order_id']; \n }\n \n if (isset($row['user_id']))\n {\n $row['virtuemart_user_id'] = $row['user_id']; \n }\n \n if (isset($row['vendor_id']))\n {\n $row['virtuemart_vendor_id'] = $row['vendor_id']; \n }\n \n if (isset($row['order_shipping']))\n {\n $row['order_shipment'] = $row['order_shipping']; \n }\n \n if (isset($row['order_shipping_tax']))\n {\n $row['order_shipment_tax'] = $row['order_shipping_tax']; \n }\n \n if (isset($row['cdate']))\n {\n $row['created_on'] = $row['cdate']; \n }\n \n if (isset($row['mdate']))\n {\n $row['modified_on'] = $row['mdate']; \n }\n \n if (isset($row['ship_method_id']))\n {\n $row['virtuemart_shipmentmethod_id'] = $row['ship_method_id']; \n }\n\n\t // Remove fields not exist in destination table\n\t // $this->_removeUnusedFields($row);\n }\n\n return $rows;\n }",
"function filter_TR_By_S($SEDE,$TABLE_R)\n{\n global $mysqli;\n $TRES = $TABLE_R;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice FROM \" .$TRES. \" where sede = ?\");\n $parametros = array('i', &$SEDE);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function getAllRisk($page, $row, $order_by = null, $order = null, $filter_by = null, $filter_value = null)\n\t{\n\t\t$ex_or = $ex_filter = '';\n\t\t$par = false;\n\t\t\n\t\tif ($order_by != null) {\n\t\t\t$order_by = $order_by;\n\t\t\t$ex_or = ' order by '.$order_by.' '.$order;\n\t\t}\n\n\t\tif ($filter_by == null || $filter_by == '' ) {\n\t\t\t//dibuat risk event aja biar ga error\n\t\t\t$filter_by = 'risk_event';\n\t\t}\n\t\t\n\t\tif ($filter_by != null && $filter_value != null) {\n\t\t\tif($filter_value == 'ALL'){\n\t\t\t\t\t$filter_value = '';\n\t\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$date = date(\"Y-m-d\");\n\t\t$sql = \"select * from (select \n a.risk_id,\n a.risk_code,\n a.risk_date,\n g.risk_status,\n a.periode_id,\n g.risk_input_by,\n a.risk_input_division,\n a.risk_owner,\n a.risk_division,\n a.risk_library_id,\n a.risk_event,\n a.risk_description,\n a.risk_category,\n a.risk_sub_category,\n a.risk_2nd_sub_category,\n a.risk_cause,\n a.risk_impact,\n \n \n a.risk_level,\n a.risk_impact_level,\n a.risk_likelihood_key,\n a.suggested_risk_treatment,\n a.risk_treatment_owner,\n\n g.created_by,\n g.created_date,\n g.switch_flag,\n b.ref_value as risk_status_v,\n c.ref_value as risk_level_v,\n d.ref_value as impact_level_v,\n e.l_title as likelihood_v,\n f.division_name as risk_owner_v\n from t_risk a \n join t_risk_change g on a.risk_id = g.risk_id\n left join m_reference b on a.risk_status = b.ref_key and b.ref_context = 'risk.status.user'\n left join m_reference c on a.risk_level = c.ref_key and c.ref_context = 'risklevel.display'\n left join m_reference d on a.risk_impact_level = d.ref_key and d.ref_context = 'impact.display'\n left join m_likelihood e on a.risk_likelihood_key = e.l_key\n left join m_division f on a.risk_owner = f.division_id\n left join m_periode on m_periode.periode_id = a.periode_id\n where a.periode_id IN (select max(periode_id) from m_periode) and g.risk_status > 1 and g.risk_status < 3 and g.existing_control_id is null\n and a.\".$filter_by.\" like '%\".$filter_value.\"%'\n order by a.risk_id desc\n \n ) as another\n group by another.risk_code\n\n UNION\n select * from (select \n a.risk_id,\n a.risk_code,\n a.risk_date,\n a.risk_status,\n a.periode_id,\n a.risk_input_by,\n a.risk_input_division,\n a.risk_owner,\n a.risk_division,\n a.risk_library_id,\n a.risk_event,\n a.risk_description,\n a.risk_category,\n a.risk_sub_category,\n a.risk_2nd_sub_category,\n a.risk_cause,\n a.risk_impact,\n \n \n a.risk_level,\n a.risk_impact_level,\n a.risk_likelihood_key,\n a.suggested_risk_treatment,\n a.risk_treatment_owner,\n\n a.created_by,\n a.created_date,\n a.switch_flag,\n b.ref_value as risk_status_v,\n c.ref_value as risk_level_v,\n d.ref_value as impact_level_v,\n e.l_title as likelihood_v,\n f.division_name as risk_owner_v\n from t_risk a \n \n left join m_reference b on a.risk_status = b.ref_key and b.ref_context = 'risk.status.user'\n left join m_reference c on a.risk_level = c.ref_key and c.ref_context = 'risklevel.display'\n left join m_reference d on a.risk_impact_level = d.ref_key and d.ref_context = 'impact.display'\n left join m_likelihood e on a.risk_likelihood_key = e.l_key\n left join m_division f on a.risk_owner = f.division_id\n left join m_periode on m_periode.periode_id = a.periode_id\n where a.periode_id IN (select max(periode_id) from m_periode) and a.risk_status > 1 and a.existing_control_id is null\n and a.\".$filter_by.\" like '%\".$filter_value.\"%'\n order by a.risk_id desc\n \n ) as another\n group by another.risk_code\n\n\n\n\n\n\t\t\t\t\"\n\t\t\t\t.$ex_filter\n\t\t\t\t\n\t\t\t\t.$ex_or;\n\t\t$res = $this->getPagingData($sql, $par, $page, $row, 'risk_id', true);\n\t\treturn $res;\n\t}",
"function addRowsOptionValue(&$rows, &$rowNumber, $customLabel, $customField) {\n if ($this->_optionGroupId == 0) {\n $apiParams = array(\n 'version' => 3,\n 'custom_group_id' => $this->_customGroupId,\n 'label' => $customLabel\n );\n $apiCustomField = civicrm_api('CustomField', 'Getsingle', $apiParams);\n if (!isset($apiCustomField['is_error']) || $apiCustomField['is_error'] == 0) {\n if (isset($apiCustomField['option_group_id'])) {\n $this->_optionGroupId = $apiCustomField['option_group_id'];\n }\n }\n }\n $apiParams = array(\n 'version' => 3,\n 'option_group_id' => $this->_optionGroupId\n );\n $apiOptionValues = civicrm_api('OptionValue', 'Get', $apiParams);\n if ($apiOptionValues['is_error'] == 0) {\n foreach($apiOptionValues['values'] as $optionValueId => $apiOptionValue) {\n /*\n * Calculate number of contacts in econ_status, only print if any\n */\n $aantalIn = $this->calculateAantalInContacts($apiOptionValue['label'], $customField);\n if ($aantalIn > 0) {\n $rows[$rowNumber]['label'] = ts($apiOptionValue['label']);\n $rows[$rowNumber]['aantal'] = $aantalIn;\n $rows[$rowNumber]['percentage'] = CRM_Utils_HilreportsUtils::calculatePercentage($aantalIn, $this->_aantalContacts).\"%\";\n $rowNumber++;\n $this->_aantalRijen++;\n }\n }\n /*\n * last time for none\n */\n $aantalIn = $this->calculateAantalInContacts('none', $customField);\n if ($aantalIn > 0) {\n $rows[$rowNumber]['label'] = 'Onbekend';\n $rows[$rowNumber]['aantal'] = $aantalIn;\n $rows[$rowNumber]['percentage'] = CRM_Utils_HilreportsUtils::calculatePercentage($aantalIn, $this->_aantalContacts).\"%\";\n $rowNumber++;\n $this->_aantalRijen++;\n }\n }\n }",
"function filterByS_A_F($SEDE, $AREA, $FACULTAD,$TABLE_I)\n{\n global $mysqli;\n $TINS = $TABLE_I;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia\n FROM \" .$TINS. \" where sede = ? AND area_i = ? AND fac_ia = ?\");\n $parametros = array(\"iii\", &$SEDE, &$AREA, &$FACULTAD);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"protected function _filterValue(&$value)\n {\n foreach ($this->getFilters() as $filter) {\n $value = $filter->filter($value);\n }\n }",
"public function getRowsv2($sql, $filter = null, $inner = false)\r\n {\r\n $filterObj = $this->processFilter($filter);\r\n \r\n\r\n if (strlen($filterObj[\"filterWhere\"])>0) {\r\n if (!strpos(strtoupper($sql), \"WHERE\")) {\r\n $sql.=\" where \";\r\n }\r\n $sql.=$filterObj[\"filterWhere\"];\r\n }\r\n $filterRowValues = $filterObj[\"filterRowValues\"];\r\n if(!$inner) $this->sql_statement = $sql;\r\n $stmt = $this->conn->prepare($sql);\r\n\r\n if (!$stmt) {\r\n array_push($this->error, \"getRowsv2: Error in preparing statement4(\".$sql.\") \\n\".$this->conn->error);\r\n //echo $this->error;\r\n return false;\r\n } else {\r\n \r\n if (count($filterRowValues)>0) {\r\n $a_params = array();\r\n $param_types = \"\";\r\n foreach ($filterRowValues as $sValue) {\r\n $param_types.=\"s\";\r\n }\r\n array_push($a_params, $param_types);\r\n foreach ($filterRowValues as $singleValue) {\r\n array_push($a_params, $singleValue);\r\n }\r\n \r\n call_user_func_array(array($stmt, 'bind_param'), $this->refValues($a_params));\r\n }\r\n $stmt->execute();\r\n $rows = $this->db->fetch($stmt);\r\n $stmt->close();\r\n if (!$inner) {\r\n $this->rowCount = count($rows);\r\n }\r\n return $rows;\r\n }\r\n }",
"abstract public function filterFields();",
"private function set_maxItemsPerHtmlRow()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n $conf_name = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field ];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // Set default values\n $maxItemsPerHtmlRow = false;\n $rowBegin = null;\n $rowEnd = null;\n $noItemValue = null;\n // Set default values\n // SWITCH $conf_name\n // Set values\n switch ( $conf_name )\n {\n case( 'CHECKBOX' ) :\n case( 'RADIOBUTTONS' ) :\n // #56332, 140227, dwildt, 1+\n case( 'SELECTBOX' ) :\n $maxItemsPerHtmlRow = ( int ) $conf_array[ 'wrap.' ][ 'itemsPerRow' ];\n if ( $maxItemsPerHtmlRow > 0 )\n {\n $str_row_wrap = $conf_array[ 'wrap.' ][ 'itemsPerRow.' ][ 'wrap' ];\n list( $rowBegin, $rowEnd ) = explode( '|', $str_row_wrap );\n $noItemValue = $conf_array[ 'wrap.' ][ 'itemsPerRow.' ][ 'noItemValue' ];\n }\n break;\n case( 'CATEGORY_MENU' ) :\n // #56332, 140227, dwildt, 1-\n// case( 'SELECTBOX' ) :\n // #41753.01, 121010, dwildt, 1+\n case( 'TREEVIEW' ) :\n // Do nothing\n break;\n default :\n if ( $this->pObj->b_drs_error )\n {\n $prompt = 'undefined value in switch: \\'';\n t3lib_div :: devlog( '[ERROR/JSS] ' . $prompt . $conf_name . '\\'', $this->pObj->extKey, 3 );\n }\n echo '<h1>Undefined value</h1>\n <h2>' . $conf_name . ' is not defined</h2>\n <p>Method ' . __METHOD__ . ' (line: ' . __LINE__ . ')</p>\n <p>Sorry, this error shouldn\\'t occured!</p>\n <p>Browser - TYPO3 without PHP</p>\n ';\n exit;\n break;\n }\n // SWITCH $conf_name\n // Set class var $htmlSpaceLeft\n $this->itemsPerHtmlRow[ 'maxItemsPerHtmlRow' ] = $maxItemsPerHtmlRow;\n $this->itemsPerHtmlRow[ 'rowBegin' ] = $rowBegin;\n $this->itemsPerHtmlRow[ 'rowEnd' ] = $rowEnd;\n $this->itemsPerHtmlRow[ 'noItemValue' ] = $noItemValue;\n $this->itemsPerHtmlRow[ 'currRowNumber' ] = 0;\n // #40354, #40354, 4.1.7, 1+\n $this->itemsPerHtmlRow[ 'currItemNumberAbsolute' ] = 0;\n $this->itemsPerHtmlRow[ 'currItemNumberInRow' ] = 0;\n\n return;\n }",
"private function prepare_filter_values_as_sql( $filter_values = array(), $table_prefix = '' ) {\n\t\tglobal $wpdb;\n\n\t\tif ( ! is_array( $filter_values ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$result = array();\n\n\t\tforeach ( $filter_values as $field => $filter ) {\n\t\t\t$key = ( ! empty( $table_prefix ) ? $table_prefix : $this->table ) . '.' . $field;\n\n\t\t\tswitch ( $filter['operator'] ) {\n\t\t\t\tcase 'IN':\n\t\t\t\tcase 'NOT IN':\n\t\t\t\t\t$values_placeholders = implode( ',', array_fill( 0, count( $filter['values'] ), '%s' ) );\n\t\t\t\t\t$statement = \"{$key} {$filter['operator']} ( $values_placeholders )\";\n\n\t\t\t\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t\t\t\t$prepared_statement = $wpdb->prepare( $statement, $filter['values'] );\n\n\t\t\t\t\t$result[] = $prepared_statement;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}",
"protected function _processData() {\n $result = $this->getSelect()->query()->fetchAll();\n if ($mainReportResults = $this->getMainReportResults()) {\n $toReturn = array();\n $list = $this->_helper()->getList($mainReportResults, $this->_compareAttribute);\n foreach ($result as $row) {\n $toReturn[array_search($row[$this->_compareAttribute], $list)] = $row;\n }\n $result = $toReturn;\n }\n return $result;\n }",
"function getCalculatedRows();",
"function my_columns_filter( $columns ) {\n unset($columns['tags']);\n unset($columns['categories']);\n unset($columns['tags']);\n unset($columns['comments']);\n return $columns;\n}",
"function AggregateListRow() {\n\t}",
"abstract public function prepareFilteredCount();",
"function getFilter()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t$tableModel \t=& $this->_table;\r\n\t\t$formModel\t\t=& $tableModel->getForm();\r\n\t\t$elName2 \t\t= $this->getFullName( false, false, false );\r\n\t\tif (!$formModel->hasElement( $elName2 )) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$groupModel\t\t=& $this->_group;\r\n\t\t$table\t\t\t\t=& $tableModel->getTable();\r\n\t\t$element\t\t\t=& $this->getElement();\r\n\t\t$origTable \t\t= $table->db_table_name;\r\n\t\t$fabrikDb \t\t=& $tableModel->getDb();\r\n\t\t$params\t\t\t=& $this->getParams( );\r\n\r\n\t\t$js \t\t\t\t\t= \"\";\r\n\t\t$elName \t\t= $this->getFullName( false, true, false );\r\n\t\t$dbElName\t\t= $this->getFullName( false, false, false );\r\n\r\n\t\t$ids \t\t\t\t= $tableModel->getColumnData( $elName2 );\r\n\t\t//for ids that are text with apostrophes in\r\n\t\tfor ($x=0;$x<count( $ids );$x++) {\r\n\t\t\t$ids[$x] = addSlashes( $ids[$x] );\r\n\t\t}\r\n\t\t$elLabel\t\t\t\t= $element->label;\r\n\t\t$elExactMatch \t= $element->filter_exact_match;\r\n\t\t$v \t\t\t\t= $elName . \"[value]\";\r\n\t\t$t \t\t\t\t= $elName . \"[type]\";\r\n\t\t$e \t\t\t\t= $elName . \"[match]\";\r\n\t\t$jt \t\t\t= $elName . \"[join_db_name]\";\r\n\t\t$jk \t\t\t= $elName . \"[join_key_column]\";\r\n\t\t$jv \t\t\t= $elName . \"[join_val_column]\";\r\n\t\t$origDate \t\t= $elName . \"[filterVal]\";\r\n\t\t$fullword \t\t= $elName . \"[full_words_only]\";\r\n\t\t//corect default got\r\n\t\t$default = $this->getDefaultFilterVal();\r\n\r\n\t\t$aThisFilter = array();\r\n\r\n\t\t//filter the drop downs lists if the table_view_own_details option is on\r\n\t\t//other wise the lists contain data the user should not be able to see\r\n\t\t// note, this should now use the prefilter data to filter the list\r\n\r\n\t\t/* check if the elements group id is on of the table join groups if it is then we swap over the table name*/\r\n\t\t$fromTable = $origTable;\r\n\t\t$joinStr = $tableModel->_buildQueryJoin();\r\n\r\n\t\tforeach ($tableModel->_aJoins as $aJoin) {\r\n\t\t\t/** not sure why the group id key wasnt found - but put here to remove error **/\r\n\t\t\tif (array_key_exists( 'group_id', $aJoin )) {\r\n\t\t\t\t\t\r\n\t\t\t\tif ($aJoin->group_id == $element->group_id && $aJoin->element_id == 0) {\r\n\t\t\t\t\t$fromTable = $aJoin->table_join;\r\n\t\t\t\t\t$elName = str_replace( $origTable . '.', $fromTable . '.', $elName);\r\n\t\t\t\t\t$v = $fromTable . '___' . $element->name . \"[value]\";\r\n\t\t\t\t\t$t = $fromTable . '___' . $element->name . \"[type]\";\r\n\t\t\t\t\t$e = $fromTable . '___' . $element->name . \"[match]\";\r\n\t\t\t\t\t$fullword = $elName . \"[full_words_only]\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* elname should be in format table.key add quotes:*/\r\n\t\t$dbElName = explode( \".\", $dbElName );\r\n\t\t$dbElName = \"`\" . $dbElName[0] . \"`.`\" . $dbElName[1] . \"`\";\r\n\r\n\t\t$tabletype = $params->get( 'my_table_data', 'username' );\r\n\r\n\t\t$sql = \"SELECT DISTINCT( $tabletype ) AS elText, id AS elVal FROM #__users \\n\";\r\n\t\t$sql .= \"WHERE id IN ('\" . implode( \"','\", $ids ) . \"')\"\r\n\t\t. \"\\n GROUP BY elText ASC\";\r\n\r\n\r\n\t\t$context = \"com_fabrik.table\" . $tableModel->_id . \".filter.\" . trim($elName);\r\n\t\t$default = $mainframe->getUserStateFromRequest( $context, trim($elName), $default );\r\n\r\n\r\n\t\tswitch ( $element->filter_type )\r\n\t\t{\r\n\t\t\tcase \"range\":\r\n\t\t\t\t$db->setQuery( $sql );\r\n\t\t\t\t$oDistinctData = $db->loadObjectList( );\r\n\t\t\t\t$aThisFilter[] = JHTML::_('select.option', '', JText::_( 'PLEASE SELECT' ) );\r\n\t\t\t\tif (is_array( $oDistinctData )) {\r\n\t\t\t\t\t$aThisFilter = array_merge( $aThisFilter, $oDistinctData );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$attribs = 'class=\"inputbox fabrik_filter\" size=\"1\" ';\r\n\t\t\t\t$default1 = (is_array($default)) ? $default['value'][0] : '';\r\n\t\t\t\t$return \t = JHTML::_('select.genericlist', $aThisFilter , $v.'[]', $attribs, \"elVal\", 'elText', $default1, $element->name . \"_filter_range_0\" );\r\n\t\t\t\t$default1 = (is_array($default)) ? $default['value'][1] : '';\r\n\t\t\t\t$return \t .= JHTML::_('select.genericlist', $aThisFilter , $v.'[]', $attribs, \"elVal\", 'elText', $default1 , $element->name . \"_filter_range_1\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"dropdown\":\r\n\t\t\t\t$db->setQuery( $sql );\r\n\t\t\t\t$oDistinctData = $db->loadObjectList();\r\n\t\t\t\t$aThisFilter[] = JHTML::_('select.option', '', JText::_( 'PLEASE SELECT' ) );\r\n\t\t\t\tif (is_array( $oDistinctData )) {\r\n\t\t\t\t\t$aThisFilter = array_merge( $aThisFilter, $oDistinctData );\r\n\t\t\t\t}\r\n\t\t\t\t$return \t = JHTML::_('select.genericlist', $aThisFilter , $v, 'class=\"inputbox fabrik_filter\" size=\"1\" ' , \"elVal\", 'elText', $default );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"field\":\r\n\r\n\t\t\t\t$default = ( is_array( $default ) && array_key_exists( 'value', $default) ) ? $default['value'] : '';\r\n\t\t\t\tif (get_magic_quotes_gpc()) {\r\n\t\t\t\t\t$default\t\t\t= stripslashes( $default );\r\n\t\t\t\t}\r\n\t\t\t\t$default = htmlspecialchars( $default );\r\n\t\t\t\t$return = \"<input type='text' name='$v' class=\\\"inputbox fabrik_filter\\\" value=\\\"$default\\\" $jsfilter />\";\r\n\t\t\t\tbreak;\r\n\t\t\t\t//moved to table options\r\n\t\t\t\t/*case \"search\":\r\n\t\t\t\t */\r\n\t\t}\r\n\t\t$return .= \"\\n<input type='hidden' name='$t' value='$element->filter_type' />\\n\";\r\n\t\t$return .= \"\\n<input type='hidden' name='$e' value='$elExactMatch' />\\n\";\r\n\t\t$return .= \"\\n<input type='hidden' name='$fullword' value='\" . $params->get('full_words_only', '0') . \"' />\\n\";\r\n\t\treturn $return;\r\n\t}",
"function change_columns_filter( $columns ) {\n unset($columns['product_tag']);\n unset($columns['sku']);\n unset($columns['featured']);\n unset($columns['product_type']);\n unset($columns['post_type']);\n unset($columns['price']);\n return $columns;\n}",
"public function applyFilterReport() {\n\t\t$this->table->writeFilterToSession();\n\t\t$this->table->resetOffset();\n\t\t$this->report();\n\t}",
"function process_row( $item1, $filelayout, $filelayout_count, $default_these, $ep_separator, $languages, $custom_fields ) {\n\n // first we clean up the row of data\n if (EP_EXCEL_SAFE_OUTPUT == true) {\n $items = $item1;\n } else {\n // chop blanks from each end\n $item1 = ltrim(rtrim($item1));\n \n // blow it into an array, splitting on the tabs\n $items = explode($ep_separator, $item1);\n }\n\n // make sure all non-set things are set to '';\n // and strip the quotes from the start and end of the stings.\n // escape any special chars for the database.\n foreach( $filelayout as $key => $value){\n $i = $filelayout[$key];\n if (isset($items[$i]) == false) {\n $items[$i]='';\n } else {\n // Check to see if either of the magic_quotes are turned on or off;\n // And apply filtering accordingly.\n if (function_exists('ini_get')) {\n //echo \"Getting ready to check magic quotes<br />\";\n if (ini_get('magic_quotes_runtime') == 1){\n // The magic_quotes_runtime are on, so lets account for them\n // check if the first & last character are quotes;\n // if it is, chop off the quotes.\n if (substr($items[$i],-1) == '\"' && substr($items[$i],0,1) == '\"'){\n $items[$i] = substr($items[$i],2,strlen($items[$i])-4);\n }\n // now any remaining doubled double quotes should be converted to one doublequote\n if (EP_REPLACE_QUOTES == true){\n if (EP_EXCEL_SAFE_OUTPUT == true) {\n $items[$i] = str_replace('\\\"\\\"',\""\",$items[$i]);\n }\n $items[$i] = str_replace('\\\"',\""\",$items[$i]);\n $items[$i] = str_replace(\"\\'\",\"'\",$items[$i]);\n }\n } else { // no magic_quotes are on\n // check if the last character is a quote;\n // if it is, chop off the 1st and last character of the string.\n if (substr($items[$i],-1) == '\"' && substr($items[$i],0,1) == '\"'){\n $items[$i] = substr($items[$i],1,strlen($items[$i])-2);\n }\n // now any remaining doubled double quotes should be converted to one doublequote\n if (EP_REPLACE_QUOTES == true){\n if (EP_EXCEL_SAFE_OUTPUT == true) {\n $items[$i] = str_replace('\"\"',\""\",$items[$i]);\n }\n $items[$i] = str_replace('\"',\""\",$items[$i]);\n $items[$i] = str_replace(\"'\",\"'\",$items[$i]);\n }\n }\n }\n }\n }\n\n\n // /////////////////////////////////////////////////////////////\n // Do specific functions without processing entire range of vars\n // /////////////////////////////\n // first do product extra fields\n if (isset($items[$filelayout['v_products_extra_fields_id']]) ){ \n \n $v_products_model = $items[$filelayout['v_products_model']];\n // EP for product extra fields Contrib by minhmaster DEVSOFTVN ==========\n $v_products_extra_fields_id = $items[$filelayout['v_products_extra_fields_id']];\n// $v_products_id = $items[$filelayout['v_products_id']];\n $v_products_extra_fields_value = $items[$filelayout['v_products_extra_fields_value']];\n \n $sql = \"SELECT p.products_id as v_products_id FROM \".TABLE_PRODUCTS.\" as p WHERE p.products_model = '\" . $v_products_model . \"'\";\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n\n\t\t$sql_exist\t=\t\"SELECT products_extra_fields_value FROM \".TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS. \" WHERE (products_id ='\".$row['v_products_id']. \"') AND (products_extra_fields_id ='\".$v_products_extra_fields_id .\"')\";\n\n\t\tif (tep_db_num_rows(tep_db_query($sql_exist)) > 0) {\n\t\t\t$sql_extra_field\t=\t\"UPDATE \".TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS.\" SET products_extra_fields_value='\".$v_products_extra_fields_value.\"' WHERE (products_id ='\". $row['v_products_id'] . \"') AND (products_extra_fields_id ='\".$v_products_extra_fields_id .\"')\";\n\t\t\t$str_err_report= \" $v_products_extra_fields_id | $v_products_id | $v_products_model | $v_products_extra_fields_value | <b><font color=black>Product Extra Fields Updated</font></b><br />\";\n\t\t} else {\n\t\t\t$sql_extra_field\t=\t\"INSERT INTO \".TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS.\"(products_id,products_extra_fields_id,products_extra_fields_value) VALUES ('\". $row['v_products_id'] .\"','\".$v_products_extra_fields_id.\"','\".$v_products_extra_fields_value.\"')\";\n\t\t\t$str_err_report= \" $v_products_extra_fields_id | $v_products_id | $v_products_model | $v_products_extra_fields_value | <b><font color=green>Product Extra Fields Inserted</font></b><br />\";\n\t\t}\n\n $result = tep_db_query($sql_extra_field);\n \n echo $str_err_report;\n // end (EP for product extra fields Contrib by minhmt DEVSOFTVN) ============\n \n // /////////////////////\n // or do product deletes\n } elseif ( $items[$filelayout['v_status']] == EP_DELETE_IT ) {\n // Get the ID\n $sql = \"SELECT p.products_id as v_products_id FROM \".TABLE_PRODUCTS.\" as p WHERE p.products_model = '\" . $items[$filelayout['v_products_model']] . \"'\";\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n if (tep_db_num_rows($result) == 1 ) {\n tep_db_query(\"delete from \" . TABLE_PRODUCTS_TO_CATEGORIES . \" where products_id = '\" . $row['v_products_id'] . \"'\");\n\n $product_categories_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS_TO_CATEGORIES . \" where products_id = '\" . $row['v_products_id'] . \"'\");\n $product_categories = tep_db_fetch_array($product_categories_query);\n\n if ($product_categories['total'] == '0') {\n // gather product attribute data\n $result = tep_db_query(\"select pov.products_options_values_id from \" . TABLE_PRODUCTS_ATTRIBUTES . \" pa left join \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" pov on pa.options_values_id=pov.products_options_values_id where pa.products_id = '\" . (int)$row['v_products_id'] . \"'\");\n $remove_attribs = array();\n while ($tmp_attrib = tep_db_fetch_array($result)) {\n $remove_attribs[] = $tmp_attrib;\n }\n\n // check each attribute name for links to other products\n foreach ($remove_attribs as $rakey => $ravalue) {\n $product_attribs_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS_ATTRIBUTES . \" where options_values_id = '\" . (int)$ravalue['products_options_values_id'] . \"'\");\n $product_attribs = tep_db_fetch_array($product_attribs_query);\n // if no other products linked, remove attribute name\n if ((int)$product_attribs['total'] == 1) {\n tep_db_query(\"delete from \" . TABLE_PRODUCTS_OPTIONS_VALUES. \" where products_options_values_id = '\" . (int)$ravalue['products_options_values_id'] . \"'\");\n }\n }\n // remove attribute records\n tep_db_query(\"delete from \" . TABLE_PRODUCTS_ATTRIBUTES . \" where products_id = '\" . (int)$row['v_products_id'] . \"'\");\n\n // remove product\n tep_remove_product($row['v_products_id']);\n }\n\n if (USE_CACHE == 'true') {\n tep_reset_cache_block('categories');\n tep_reset_cache_block('also_purchased');\n }\n echo \"Deleted product \" . $items[$filelayout['v_products_model']] . \" from the database<br />\";\n \n } else {\n echo \"Did not delete \" . $items['v_products_model'] . \" since it is not unique<br> \";\n }\n \n // //////////////////////////////////\n // or do regular product processing\n // //////////////////////////////////\n } else {\n\n // /////////////////////////////////////////////////////////////////////\n //\n // Start: Support for other contributions in products table\n //\n // /////////////////////////////////////////////////////////////////////\n $ep_additional_select = '';\n\t\n if (EP_ADDITIONAL_IMAGES == true) {\n $ep_additional_select .= 'p.products_image_description as v_products_image_description,';\n }\n\n if (EP_MORE_PICS_6_SUPPORT == true) { \n $ep_additional_select .= 'p.products_subimage1 as v_products_subimage1,p.products_subimage2 as v_products_subimage2,p.products_subimage3 as v_products_subimage3,p.products_subimage4 as v_products_subimage4,p.products_subimage5 as v_products_subimage5,p.products_subimage6 as v_products_subimage6,';\n } \n\n if (EP_ULTRPICS_SUPPORT == true) { \n $ep_additional_select .= 'products_image_med as v_products_image_med,products_image_lrg as v_products_image_lrg,products_image_sm_1 as v_products_image_sm_1,products_image_xl_1 as v_products_image_xl_1,products_image_sm_2 as v_products_image_sm_2,products_image_xl_2 as v_products_image_xl_2,products_image_sm_3 as v_products_image_sm_3,products_image_xl_3 as v_products_image_xl_3,products_image_sm_4 as v_products_image_sm_4,products_image_xl_4 as v_products_image_xl_4,products_image_sm_5 as v_products_image_sm_5,products_image_xl_5 as v_products_image_xl_5,products_image_sm_6 as v_products_image_sm_6,products_image_xl_6 as v_products_image_xl_6,';\n }\n\t\t\n if (EP_PDF_UPLOAD_SUPPORT == true) { \n $ep_additional_select .='p.products_pdfupload as v_products_pdfupload, p.products_fileupload as v_products_fileupload,';\n }\n\n if (EP_MVS_SUPPORT == true) {\n $ep_additional_select .= 'vendors_id as v_vendor_id,';\n }\n\n if (MASTER_PRODUCTS_SUPPORT == true) {\n $ep_additional_select .='p.products_master as v_products_master, p.products_master_status as v_products_master_status,';\n }\n\n foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { \n $ep_additional_select .= 'p.' . $key . ' as v_' . $key . ',';\n }\n\n // /////////////////////////////////////////////////////////////////////\n // End: Support for other contributions in products table\n // /////////////////////////////////////////////////////////////////////\n \n \n // now do a query to get the record's current contents\n $sql = \"SELECT\n p.products_id as v_products_id,\n p.products_model as v_products_model,\n p.products_image as v_products_image,\n $ep_additional_select\n p.products_price as v_products_price,\n p.products_weight as v_products_weight,\n p.products_date_available as v_date_avail,\n p.products_date_added as v_date_added,\n p.products_tax_class_id as v_tax_class_id,\n p.products_quantity as v_products_quantity,\n p.manufacturers_id as v_manufacturers_id,\n subc.categories_id as v_categories_id,\n p.products_status as v_status_current\n FROM\n \".TABLE_PRODUCTS.\" as p,\n \".TABLE_CATEGORIES.\" as subc,\n \".TABLE_PRODUCTS_TO_CATEGORIES.\" as ptoc\n WHERE\n p.products_model = '\" . $items[$filelayout['v_products_model']] . \"' AND\n p.products_id = ptoc.products_id AND\n ptoc.categories_id = subc.categories_id\n LIMIT 1\n \";\n\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n\n // determine processing status based on dropdown choice on EP menu\n if ((sizeof($row) > 1) && ($_POST['imput_mode'] == \"normal\" || $_POST['imput_mode'] == \"update\")) {\n $process_product = true;\n } elseif ((is_null($row) || sizeof($row) == 1) && ($_POST['imput_mode'] == \"normal\" || $_POST['imput_mode'] == \"addnew\")) {\n $process_product = true;\n } else {\n $process_product = false;\n }\n\n if ($process_product == true) {\n\n while ($row){\n // OK, since we got a row, the item already exists.\n // Let's get all the data we need and fill in all the fields that need to be defaulted \n // to the current values for each language, get the description and set the vals\n foreach ($languages as $key => $lang){\n // products_name, products_description, products_url\n $sql2 = \"SELECT * \n FROM \".TABLE_PRODUCTS_DESCRIPTION.\"\n WHERE\n products_id = \" . $row['v_products_id'] . \" AND\n language_id = '\" . $lang['id'] . \"'\n LIMIT 1\n \";\n $result2 = tep_db_query($sql2);\n $row2 = tep_db_fetch_array($result2);\n // Need to report from ......_name_1 not ..._name_0\n $row['v_products_name_' . $lang['id']] = $row2['products_name'];\n $row['v_products_description_' . $lang['id']] = $row2['products_description'];\n $row['v_products_url_' . $lang['id']] = $row2['products_url'];\n foreach ($custom_fields[TABLE_PRODUCTS_DESCRIPTION] as $key => $name) { \n $row['v_' . $key . '_' . $lang['id']] = $row2[$key];\n }\n // header tags controller support\n if(isset($filelayout['v_products_head_title_tag_' . $lang['id'] ])){\n $row['v_products_head_title_tag_' . $lang['id']] = $row2['products_head_title_tag'];\n $row['v_products_head_desc_tag_' . $lang['id']] = $row2['products_head_desc_tag'];\n $row['v_products_head_keywords_tag_' . $lang['id']] = $row2['products_head_keywords_tag'];\n }\n // end: header tags controller support\n }\n \n // start with v_categories_id\n // Get the category description\n // set the appropriate variable name\n // if parent_id is not null, then follow it up.\n\t\t\t\t$thecategory_id = $row['v_categories_id'];\n\t\t\t\tfor( $categorylevel=1; $categorylevel<=(EP_MAX_CATEGORIES+1); $categorylevel++){\n\t\t\t\t\tif ($thecategory_id){\n\t\t\n\t\t\t\t\t\t$sql3 = \"SELECT parent_id, \n\t\t\t\t\t\t categories_image\n\t\t\t\t\t\t\t FROM \".TABLE_CATEGORIES.\"\n\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t categories_id = \" . $thecategory_id . '';\n\t\t\t\t\t\t$result3 = tep_db_query($sql3);\n\t\t\t\t\t\tif ($row3 = tep_db_fetch_array($result3)) {\n\t\t\t\t\t\t\t$temprow['v_categories_image_' . $categorylevel] = $row3['categories_image'];\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tforeach ($languages as $key => $lang){\n\t\t\t\t\t\t\t$sql2 = \"SELECT categories_name\n\t\t\t\t\t\t\t\t FROM \".TABLE_CATEGORIES_DESCRIPTION.\"\n\t\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t\t categories_id = \" . $thecategory_id . \" AND\n\t\t\t\t\t\t\t\t\t language_id = \" . $lang['id'];\n\t\t\t\t\t\t\t$result2 = tep_db_query($sql2);\n\t\t\t\t\t\t\tif ($row2 = tep_db_fetch_array($result2)) {\n\t\t\t\t\t\t\t\t$temprow['v_categories_name_' . $categorylevel . '_' . $lang['id']] = $row2['categories_name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t// now get the parent ID if there was one\n\t\t\t\t\t\t$theparent_id = $row3['parent_id'];\n\t\t\t\t\t\tif ($theparent_id != ''){\n\t\t\t\t\t\t\t// there was a parent ID, lets set thecategoryid to get the next level\n\t\t\t\t\t\t\t$thecategory_id = $theparent_id;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// we have found the top level category for this item,\n\t\t\t\t\t\t\t$thecategory_id = false;\n\t\t\t\t\t\t}\n\t\t \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$temprow['v_categories_image_' . $categorylevel] = '';\n\t\t\t\t\t\tforeach ($languages as $key => $lang){\n\t\t\t\t\t\t\t$temprow['v_categories_name_' . $categorylevel . '_' . $lang['id']] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n // temprow has the old style low to high level categories.\n\t\t\t\t$newlevel = 1;\n\t\t\t\t// let's turn them into high to low level categories\n\t\t\t\tfor( $categorylevel=EP_MAX_CATEGORIES+1; $categorylevel>0; $categorylevel--){\n\t\t\t\t\t$found = false;\n\t\t\t\t\tif ($temprow['v_categories_image_' . $categorylevel] != ''){\n\t\t\t\t\t\t$row['v_categories_image_' . $newlevel] = $temprow['v_categories_image_' . $categorylevel];\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($languages as $key => $lang){\n\t\t\t\t\t\tif ($temprow['v_categories_name_' . $categorylevel . '_' . $lang['id']] != ''){\n\t\t\t\t\t\t\t$row['v_categories_name_' . $newlevel . '_' . $lang['id']] = $temprow['v_categories_name_' . $categorylevel . '_' . $lang['id']];\n\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($found == true) {\n\t\t\t\t\t\t$newlevel++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// default the manufacturer \n if ($row['v_manufacturers_id'] != ''){\n $sql2 = \"SELECT manufacturers_name\n FROM \".TABLE_MANUFACTURERS.\"\n WHERE\n manufacturers_id = \" . $row['v_manufacturers_id']\n ;\n $result2 = tep_db_query($sql2);\n $row2 = tep_db_fetch_array($result2);\n $row['v_manufacturers_name'] = $row2['manufacturers_name'];\n }\n\n if (EP_MVS_SUPPORT == true) {\n $result2 = tep_db_query(\"select vendors_name from \".TABLE_VENDORS.\" WHERE vendors_id = \" . $row['v_vendor_id']);\n $row2 = tep_db_fetch_array($result2);\t\t\n $row['v_vendor'] = $row2['vendors_name'];\n }\n\n/* if (MASTER_PRODUCTS_SUPPORT == true) {\n $result2 = tep_db_query(\"select products_master from \".TABLE_PRODUCTS.\" WHERE products_id = \" . $row['v_products_id']);\n $row2 = tep_db_fetch_array($result2);\n $row['v_products_master'] = $row2['vendors_name'];\n }\n*/ \n //elari -\n //We check the value of tax class and title instead of the id\n //Then we add the tax to price if EP_PRICE_WITH_TAX is set to true\n $row_tax_multiplier = tep_get_tax_class_rate($row['v_tax_class_id']);\n $row['v_tax_class_title'] = tep_get_tax_class_title($row['v_tax_class_id']);\n if (EP_PRICE_WITH_TAX == true){\n $row['v_products_price'] = $row['v_products_price'] + round(($row['v_products_price'] * $row_tax_multiplier / 100), EP_PRECISION);\n }\n // now create the internal variables that will be used\n // the $$thisvar is on purpose: it creates a variable named what ever was in $thisvar and sets the value\n foreach ($default_these as $tkey => $thisvar){\n $$thisvar = $row[$thisvar];\n }\n \n $row = tep_db_fetch_array($result);\n }\n \n // this is an important loop. What it does is go thru all the fields in the incoming \n // file and set the internal vars. Internal vars not set here are either set in the \n // loop above for existing records, or not set at all (null values) the array values \n // are handled separatly, although they will set variables in this loop, we won't use them.\n foreach( $filelayout as $key => $value ){\n if (!($key == 'v_date_added' && empty($items[ $value ]))) {\n $$key = $items[ $value ];\n }\n }\n \n //elari... we get the tax_clas_id from the tax_title\n //on screen will still be displayed the tax_class_title instead of the id....\n if ( isset( $v_tax_class_title) ){\n $v_tax_class_id = tep_get_tax_title_class_id($v_tax_class_title);\n }\n //we check the tax rate of this tax_class_id\n $row_tax_multiplier = tep_get_tax_class_rate($v_tax_class_id);\n \n //And we recalculate price without the included tax...\n //Since it seems display is made before, the displayed price will still include tax\n //This is same problem for the tax_clas_id that display tax_class_title\n if (EP_PRICE_WITH_TAX == true){\n $v_products_price = round( $v_products_price / (1 + ($row_tax_multiplier * .01)), EP_PRECISION);\n }\n \n // if they give us one category, they give us all categories. convert data structure to a multi-dim array\n unset ($v_categories_name); // default to not set.\n unset ($v_categories_image); // default to not set.\n\t\t\tforeach ($languages as $key => $lang){\n\t\t\t $baselang_id = $lang['id'];\n\t\t\t break;\n\t\t\t}\n if ( isset( $filelayout['v_categories_name_1_' . $baselang_id] ) ){\n\t\t\t\t$v_categories_name = array();\n\t\t\t\t$v_categories_image = array();\n $newlevel = 1;\n for( $categorylevel=EP_MAX_CATEGORIES; $categorylevel>0; $categorylevel--){\n\t\t\t\t\t$found = false;\n\t\t\t\t\tif ($items[$filelayout['v_categories_image_' . $categorylevel]] != '') {\n\t\t\t\t\t $v_categories_image[$newlevel] = $items[$filelayout['v_categories_image_' . $categorylevel]];\n\t\t\t\t\t $found = true;\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($languages as $key => $lang){\n\t\t\t\t\t\tif ( $items[$filelayout['v_categories_name_' . $categorylevel . '_' . $lang['id']]] != ''){\n\t\t\t\t\t\t\t$v_categories_name[$newlevel][$lang['id']] = $items[$filelayout['v_categories_name_' . $categorylevel . '_' . $lang['id']]];\n\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t}\n }\n\t\t\t\t\tif ($found == true) {\n\t\t\t\t\t $newlevel++;\n\t\t\t\t\t}\n }\n while( $newlevel < EP_MAX_CATEGORIES+1){\n $v_categories_image[$newlevel] = ''; // default the remaining items to nothing\n\t\t\t\t\tforeach ($languages as $key => $lang){\n $v_categories_name[$newlevel][$lang['id']] = ''; // default the remaining items to nothing\n\t\t\t\t\t}\n $newlevel++;\n }\n }\n \n if (ltrim(rtrim($v_products_quantity)) == '') {\n $v_products_quantity = 1;\n }\n \n if (empty($v_date_avail)) {\n $v_date_avail = 'NULL';\n } else {\n $v_date_avail = \"'\" . date(\"Y-m-d H:i:s\",strtotime($v_date_avail)) . \"'\";\n }\n \n if (empty($v_date_added)) {\n $v_date_added = \"'\" . date(\"Y-m-d H:i:s\") . \"'\";\n } else {\n $v_date_added = \"'\" . date(\"Y-m-d H:i:s\",strtotime($v_date_added)) . \"'\";\n }\n \n // default the stock if they spec'd it or if it's blank\n if (isset($v_status_current)){\n $v_db_status = strval($v_status_current); // default to current value\n } else {\n $v_db_status = '1'; // default to active\n }\n if (trim($v_status) == EP_TEXT_INACTIVE){\n // they told us to deactivate this item\n $v_db_status = '0';\n } elseif (trim($v_status) == EP_TEXT_ACTIVE) {\n $v_db_status = '1';\n } \n \n if (EP_INACTIVATE_ZERO_QUANTITIES == true && $v_products_quantity == 0) {\n // if they said that zero qty products should be deactivated, let's deactivate if the qty is zero\n $v_db_status = '0';\n }\n \n if ($v_manufacturer_id==''){\n $v_manufacturer_id=\"NULL\";\n }\n \n if (trim($v_products_image)==''){\n $v_products_image = EP_DEFAULT_IMAGE_PRODUCT;\n }\n \n if (strlen($v_products_model) > EP_MODEL_NUMBER_SIZE ){\n echo \"<font color='red'>\" . strlen($v_products_model) . $v_products_model . \"... ERROR! - Too many characters in the model number.<br />\n 12 is the maximum on a standard OSC install.<br />\n Your maximum product_model length is set to \".EP_MODEL_NUMBER_SIZE.\".<br />\n You can either shorten your model numbers or increase the size of the<br />\n \\\"products_model\\\" field of the \\\"products\\\" table in the database.<br />\n Then change the setting at the top of the easypopulate.php file.</font>\";\n die();\n }\n \n \n // OK, we need to convert the manufacturer's name into id's for the database\n if ( isset($v_manufacturers_name) && $v_manufacturers_name != '' ){\n $sql = \"SELECT man.manufacturers_id\n FROM \".TABLE_MANUFACTURERS.\" as man\n WHERE\n man.manufacturers_name = '\" . tep_db_input($v_manufacturers_name) . \"'\";\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n if ( $row != '' ){\n foreach( $row as $item ){\n $v_manufacturer_id = $item;\n }\n } else {\n // to add, we need to put stuff in categories and categories_description\n $sql = \"SELECT MAX( manufacturers_id) max FROM \".TABLE_MANUFACTURERS;\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n $max_mfg_id = $row['max']+1;\n // default the id if there are no manufacturers yet\n if (!is_numeric($max_mfg_id) ){\n $max_mfg_id=1;\n }\n \n // Uncomment this query if you have an older 2.2 codebase\n /*\n $sql = \"INSERT INTO \".TABLE_MANUFACTURERS.\"(\n manufacturers_id,\n manufacturers_name,\n manufacturers_image\n ) VALUES (\n $max_mfg_id,\n '$v_manufacturers_name',\n '\".EP_DEFAULT_IMAGE_MANUFACTURER.\"'\n )\";\n */\n \n // Comment this query out if you have an older 2.2 codebase\n $sql = \"INSERT INTO \".TABLE_MANUFACTURERS.\"(\n manufacturers_id,\n manufacturers_name,\n manufacturers_image,\n date_added,\n last_modified\n ) VALUES (\n $max_mfg_id,\n '\".tep_db_input($v_manufacturers_name).\"',\n '\".EP_DEFAULT_IMAGE_MANUFACTURER.\"',\n '\".date(\"Y-m-d H:i:s\").\"',\n '\".date(\"Y-m-d H:i:s\").\"'\n )\";\n $result = tep_db_query($sql);\n $v_manufacturer_id = $max_mfg_id;\n \n $sql = \"INSERT INTO \".TABLE_MANUFACTURERS_INFO.\"(\n manufacturers_id,\n manufacturers_url,\n languages_id\n ) VALUES (\n $max_mfg_id,\n '',\n '\".EP_DEFAULT_LANGUAGE_ID.\"'\n )\";\n $result = tep_db_query($sql);\n }\n }\n \n // if the categories names are set then try to update them\n\t\t\tforeach ($languages as $key => $lang){\n\t\t\t $baselang_id = $lang['id'];\n\t\t\t break;\n\t\t\t}\n if ( isset( $filelayout['v_categories_name_1_' . $baselang_id] ) ){\n // start from the highest possible category and work our way down from the parent\n $v_categories_id = 0;\n $theparent_id = 0;\n for ( $categorylevel=EP_MAX_CATEGORIES+1; $categorylevel>0; $categorylevel-- ){\n\t\t\t\t //foreach ($languages as $key => $lang){\n $thiscategoryname = $v_categories_name[$categorylevel][$baselang_id];\n if ( $thiscategoryname != ''){\n // we found a category name in this field, look for database entry\n $sql = \"SELECT cat.categories_id\n FROM \".TABLE_CATEGORIES.\" as cat, \n \".TABLE_CATEGORIES_DESCRIPTION.\" as des\n WHERE\n cat.categories_id = des.categories_id AND\n des.language_id = \" . $baselang_id . \" AND\n cat.parent_id = \" . $theparent_id . \" AND\n des.categories_name like '\" . tep_db_input($thiscategoryname) . \"'\";\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n\n if ( $row != '' ){\n // we have an existing category, update image and date\n\t\t\t\t\t\t\tforeach( $row as $item ){\n $thiscategoryid = $item;\n }\n\t\t\t\t\t\t\t$cat_image = '';\n\t\t\t\t\t\t\tif (!empty($v_categories_image[$categorylevel])) {\n\t\t\t\t\t\t\t $cat_image = \"categories_image='\".tep_db_input($v_categories_image[$categorylevel]).\"', \";\n\t\t\t\t\t\t\t} elseif (isset($filelayout['v_categories_image_' . $categorylevel])) {\n\t\t\t\t\t\t\t $cat_image = \"categories_image='', \";\n\t\t\t\t\t\t\t} \n $query = \"UPDATE \".TABLE_CATEGORIES.\"\n SET \n $cat_image\n last_modified = '\".date(\"Y-m-d H:i:s\").\"'\n WHERE \n categories_id = '\".$row['categories_id'].\"'\n LIMIT 1\";\n \n tep_db_query($query);\n } else {\n // to add, we need to put stuff in categories and categories_description\n $sql = \"SELECT MAX( categories_id) max FROM \".TABLE_CATEGORIES;\n $result = tep_db_query($sql);\n $row = tep_db_fetch_array($result);\n $max_category_id = $row['max']+1;\n if (!is_numeric($max_category_id) ){\n $max_category_id=1;\n }\n $sql = \"INSERT INTO \".TABLE_CATEGORIES.\" (\n categories_id,\n parent_id,\n categories_image,\n sort_order,\n date_added,\n last_modified\n ) VALUES (\n $max_category_id,\n $theparent_id,\n '\".tep_db_input($v_categories_image[$categorylevel]).\"',\n 0,\n '\".date(\"Y-m-d H:i:s\").\"',\n '\".date(\"Y-m-d H:i:s\").\"'\n )\";\n $result = tep_db_query($sql);\n \n foreach ($languages as $key => $lang){\n $sql = \"INSERT INTO \".TABLE_CATEGORIES_DESCRIPTION.\" (\n categories_id,\n language_id,\n categories_name\n ) VALUES (\n $max_category_id,\n '\".$lang['id'].\"',\n '\".(!empty($v_categories_name[$categorylevel][$lang['id']])?tep_db_input($v_categories_name[$categorylevel][$lang['id']]):'').\"'\n )\";\n tep_db_query($sql);\n }\n \n $thiscategoryid = $max_category_id;\n }\n // the current catid is the next level's parent\n $theparent_id = $thiscategoryid;\n $v_categories_id = $thiscategoryid; // keep setting this, we need the lowest level category ID later\n }\n\t\t\t\t // }\n }\n }\n\n \n if ($v_products_model != \"\") {\n // products_model exists!\n foreach ($items as $tkey => $item) {\n print_el($item);\n }\n \n // find the vendor id from the name imported\n if (EP_MVS_SUPPORT == true) {\n $vend_result = tep_db_query(\"SELECT vendors_id FROM \".TABLE_VENDORS.\" WHERE vendors_name = '\". $v_vendor . \"'\");\n $vend_row = tep_db_fetch_array($vend_result);\n $v_vendor_id = $vend_row['vendors_id'];\n }\n\n // process the PRODUCTS table\n $result = tep_db_query(\"SELECT products_id FROM \".TABLE_PRODUCTS.\" WHERE (products_model = '\". $v_products_model . \"')\");\n \n // First we check to see if this is a product in the current db.\n if (tep_db_num_rows($result) == 0) {\n \n // insert into products\n echo \"<font color='green'> !New Product!</font><br />\";\n \n // /////////////////////////////////////////////////////////////////////\n //\n // Start: Support for other contributions\n //\n // /////////////////////////////////////////////////////////////////////\n $ep_additional_fields = '';\n $ep_additional_data = '';\n\n if (EP_ADDITIONAL_IMAGES == true) { \n $ep_additional_fields .= 'products_image_description,';\n $ep_additional_data .= \"'\".tep_db_input($v_products_image_description).\"',\";\n } \n\t\t\t\n foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { \n $ep_additional_fields .= $key . ',';\n }\n\n foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { \n $tmp_var = 'v_' . $key;\n $ep_additional_data .= \"'\" . $$tmp_var . \"',\";\n }\n\n if (EP_MORE_PICS_6_SUPPORT == true) { \n $ep_additional_fields .= 'products_subimage1,products_subimage2,products_subimage3,products_subimage4,products_subimage5,products_subimage6,';\n $ep_additional_data .= \"'$v_products_subimage1','$v_products_subimage2','$v_products_subimage3','$v_products_subimage4','$v_products_subimage5','$v_products_subimage6',\";\n } \n \n if (EP_ULTRPICS_SUPPORT == true) { \n $ep_additional_fields .= 'products_image_med,products_image_lrg,products_image_sm_1,products_image_xl_1,products_image_sm_2,products_image_xl_2,products_image_sm_3,products_image_xl_3,products_image_sm_4,products_image_xl_4,products_image_sm_5,products_image_xl_5,products_image_sm_6,products_image_xl_6,';\n $ep_additional_data .= \"'$v_products_image_med','$v_products_image_lrg','$v_products_image_sm_1','$v_products_image_xl_1','$v_products_image_sm_2','$v_products_image_xl_2','$v_products_image_sm_3','$v_products_image_xl_3','$v_products_image_sm_4','$v_products_image_xl_4','$v_products_image_sm_5','$v_products_image_xl_5','$v_products_image_sm_6','$v_products_image_xl_6',\";\n }\n\t\t\t\t\t\n if (EP_PDF_UPLOAD_SUPPORT == true) { \n $ep_additional_fields .= 'products_pdfupload,products_fileupload,';\n $ep_additional_data .= \"'$v_products_pdfupload','$v_products_fileupload',\";\n }\n\t\t\t\t\t\n if (EP_MVS_SUPPORT == true) {\n $ep_additional_fields .= 'vendors_id,';\n $ep_additional_data .= \"'$v_vendor_id',\";\n }\n\t\t\t\n if (MASTER_PRODUCTS_SUPPORT == true) {\n $ep_additional_fields .= 'products_master, products_master_status,';\n $ep_additional_data .= \"'$v_products_master','$v_products_master_status',\";\n }\n\n // /////////////////////////////////////////////////////////////////////\n // End: Support for other contributions\n // /////////////////////////////////////////////////////////////////////\n \n $query = \"INSERT INTO \".TABLE_PRODUCTS.\" (\n products_image,\n $ep_additional_fields\n products_model,\n products_price,\n products_status,\n products_last_modified,\n products_date_added,\n products_date_available,\n products_tax_class_id,\n products_weight,\n products_quantity,\n manufacturers_id )\n VALUES (\n \".(!empty($v_products_image)?\"'\".$v_products_image.\"'\":'NULL').\",\n $ep_additional_data\n '$v_products_model',\n '$v_products_price',\n '$v_db_status',\n '\".date(\"Y-m-d H:i:s\").\"',\n \".$v_date_added.\",\n \".$v_date_avail.\",\n '$v_tax_class_id',\n '$v_products_weight',\n '$v_products_quantity',\n \".(!empty($v_manufacturer_id)?$v_manufacturer_id:'NULL').\")\n \";\n $result = tep_db_query($query);\n \n $v_products_id = tep_db_insert_id();\n \n } else {\n \n // existing product(s), get the id from the query\n // and update the product data\n while ($row = tep_db_fetch_array($result)) {\n \n $v_products_id = $row['products_id'];\n echo \"<font color='black'> Updated</font><br />\";\n \n // /////////////////////////////////////////////////////////////////////\n //\n // Start: Support for other contributions\n //\n // /////////////////////////////////////////////////////////////////////\n $ep_additional_updates = '';\n\n foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { \n $tmp_var = 'v_' . $key;\n $ep_additional_updates .= $key . \"='\" . $$tmp_var . \"',\";\n }\n\n if (EP_ADDITIONAL_IMAGES == true && isset($v_products_image_description)) { \n $ep_additional_updates .= \"products_image_description='\".tep_db_input($v_products_image_description).\"',\";\n } \n\n if (EP_MORE_PICS_6_SUPPORT == true) { \n $ep_additional_updates .= \"products_subimage1='$v_products_subimage1',products_subimage2='$v_products_subimage2',products_subimage3='$v_products_subimage3',products_subimage4='$v_products_subimage4',products_subimage5='$v_products_subimage5',products_subimage6='$v_products_subimage6',\";\n } \n\n if (EP_ULTRPICS_SUPPORT == true) { \n $ep_additional_updates .= \"products_image_med='$v_products_image_med',products_image_lrg='$v_products_image_lrg',products_image_sm_1='$v_products_image_sm_1',products_image_xl_1='$v_products_image_xl_1',products_image_sm_2='$v_products_image_sm_2',products_image_xl_2='$v_products_image_xl_2',products_image_sm_3='$v_products_image_sm_3',products_image_xl_3='$v_products_image_xl_3',products_image_sm_4='$v_products_image_sm_4',products_image_xl_4='$v_products_image_xl_4',products_image_sm_5='$v_products_image_sm_5',products_image_xl_5='$v_products_image_xl_5',products_image_sm_6='$v_products_image_sm_6',products_image_xl_6='$v_products_image_xl_6',\";\n }\n\n if (EP_PDF_UPLOAD_SUPPORT == true) {\n $ep_additional_updates .= \"products_pdfupload='$v_products_pdfupload',products_fileupload='$v_products_fileupload',\";\n }\n\n if (EP_MVS_SUPPORT == true) {\n $ep_additional_updates .= \"vendors_id='$v_vendor_id',\";\n }\n\n if (MASTER_PRODUCTS_SUPPORT == true) {\n $ep_additional_updates .= \"products_master='$v_products_master',products_master_status='$v_products_master_status',\";\n }\n \n // /////////////////////////////////////////////////////////////////////\n // End: Support for other contributions\n // /////////////////////////////////////////////////////////////////////\n // only include the products image if it has been included in the spreadsheet\n $tmp_products_image_update = '';\n if (isset($v_products_image)) {\n $tmp_products_image_update = \"products_image=\".(!empty($v_products_image)?\"'\".$v_products_image.\"'\":'NULL').\", \n\t\t\t\t\t\t\t\t\t\t \";\n if (EP_ADDITIONAL_IMAGES == true && isset($filelayout['v_products_image'])) { \n $tmp_products_image_update .= \"products_image_med=NULL, \n products_image_pop=NULL, \";\n }\n }\n\t\t\t\n $query = \"UPDATE \".TABLE_PRODUCTS.\"\n SET\n products_price='$v_products_price', \n $tmp_products_image_update \n $ep_additional_updates\n products_weight='$v_products_weight', \n products_tax_class_id='$v_tax_class_id', \n products_date_available=\".$v_date_avail.\", \n products_date_added=\".$v_date_added.\", \n products_last_modified='\".date(\"Y-m-d H:i:s\").\"', \n products_quantity = $v_products_quantity, \n manufacturers_id = \".(!empty($v_manufacturer_id)?$v_manufacturer_id:'NULL').\", \n products_status = $v_db_status\n WHERE\n (products_id = $v_products_id)\n LIMIT 1\";\n \n tep_db_query($query);\n }\n }\n\t\t\n\t\t if (isset($v_products_specials_price)) {\n\t\t if (EP_SPPC_SUPPORT == true) { $SPPC_extra_query = ' and customers_group_id = 0'; } else { $SPPC_extra_query = ''; }\n\t\t\t $result = tep_db_query('select * from '.TABLE_SPECIALS.' WHERE products_id = ' . $v_products_id . $SPPC_extra_query );\n\n\t\t\t if ($v_products_specials_price == '') {\n\t\t\t \n\t\t\t\t $result = tep_db_query('DELETE FROM '.TABLE_SPECIALS.' WHERE products_id = ' . $v_products_id . $SPPC_extra_query );\n\t\t\t if (EP_SPPC_SUPPORT == true) { \n\t\t\t\t $result = tep_db_query('DELETE FROM specials_retail_prices WHERE products_id = ' . $v_products_id );\n\t\t\t }\n\n\t\t\t } else {\n\t\t\t\t if ($specials = tep_db_fetch_array($result)) {\n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_products_specials_price,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_last_modified' => 'now()'\n\t\t\t\t\t );\n\t\t\t\t\t tep_db_perform(TABLE_SPECIALS, $sql_data_array, 'update', 'specials_id = '.$specials['specials_id']);\n\t\t\t\t\t \n\t\t\t if (EP_SPPC_SUPPORT == true) { \n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_products_specials_price\n\t\t\t\t\t );\n\t\t\t\t\t tep_db_perform('specials_retail_prices', $sql_data_array, 'update', 'products_id = '.$v_products_id);\n\t\t\t\t }\n\t\t\t\t } else {\n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_products_specials_price,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_date_added' => 'now()',\n\t\t\t\t\t\t\t\t\t\t\t 'status' => '1'\n\t\t\t\t\t );\n\t\t if (EP_SPPC_SUPPORT == true) { $sql_data_array = array_merge($sql_data_array,array('customers_group_id' => '0')); }\n\t\t\t\t\t tep_db_perform(TABLE_SPECIALS, $sql_data_array, 'insert');\n\t\t\t\t\t \n\t\t\t if (EP_SPPC_SUPPORT == true) { \n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_products_specials_price,\n\t\t\t\t\t\t\t\t\t\t\t 'status' => '1',\n\t\t\t\t\t\t\t\t\t\t\t 'customers_group_id' => '0'\n\t\t\t\t\t );\n\t\t\t\t\t tep_db_perform('specials_retail_prices', $sql_data_array, 'insert');\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n }\n\t\t\t\n\t\t\t// upgrade method only. Note: if you upgrades more and more the id number will be hihger. I suggest that picture upgrades use last\n\t\t\t// or delete always v_products_images_image_1 column to prevent effect\n\t\t\tif (EP_PRODUCTS_IMAGES == true) { \n\t\t\t\tif (isset($filelayout['v_products_images_image_1'])) {\n\t\t\t\t\ttep_db_query(\"delete from \" . TABLE_PRODUCTS_IMAGES . \" where products_id = '\" . (int)$v_products_id . \"'\");\n\t\t\t\t\tfor ($i=1;$i<=EP_PRODUCTS_IMAGES_MAX;$i++) {\n\t\t\t\t\t\t$pi_htmlcontent_var = 'v_products_images_htmlcontent_'.$i;\n\t\t\t\t\t\t$pi_image_var = 'v_products_images_image_'.$i;\n\t\t\t\t\t\tif (!empty($$pi_image_var) || !empty($$pi_htmlcontent_var)) {\n\t\t\t\t\t\t\ttep_db_query(\"insert into \" . TABLE_PRODUCTS_IMAGES . \" (products_id, image, htmlcontent, sort_order) values ('\" . (int)$v_products_id . \"', '\" . tep_db_input($$pi_image_var) . \"', '\" . tep_db_input($$pi_htmlcontent_var) . \"', '\" . tep_db_input($$i) . \"')\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \n\t\t\tif (EP_QPBP == true) { \n\t\t\t\tif (isset($filelayout['v_products_qpbp_price_1'])) {\n\t\t\t\t\ttep_db_query(\"delete from \" . TABLE_PRODUCTS_PRICE_BREAK . \" where products_id = '\" . (int)$v_products_id . \"'\");\n\t\t\t\t\tfor ($i=1;$i<=EP_QPBP_MAX;$i++) {\n\t\t\t\t\t\t$pi_htmlcontent_var = 'v_products_qpbp_price_'.$i;\n\t\t\t\t\t\t$pi_image_var = 'v_products_qpbp_qty_'.$i;\n\t\t\t\t\t\tif (!empty($$pi_image_var) || !empty($$pi_htmlcontent_var)) {\n\t\t\t\t\t\t\ttep_db_query(\"insert into \" . TABLE_PRODUCTS_PRICE_BREAK . \" (products_id, products_price, products_qty) values ('\" . (int)$v_products_id . \"', '\" . tep_db_input($$pi_image_var) . \"', '\" . tep_db_input($$pi_htmlcontent_var) . \"')\");\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\n\t\t\tif (EP_ADDITIONAL_IMAGES == true) { \n\t\t\t if (isset($filelayout['v_products_image_2'])) {\n\t\t\t\t tep_db_query(\"delete from \" . TABLE_ADDITIONAL_IMAGES . \" where products_id = '\" . (int)$v_products_id . \"'\");\n\t\t\t\t for ($i=2;$i<=EP_ADDITIONAL_IMAGES_MAX+1;$i++) {\n\t\t\t\t\t$ai_description_var = 'v_products_image_description_'.$i;\n\t\t\t\t\t$ai_image_var = 'v_products_image_'.$i;\n\t\t\t\t\tif (!empty($$ai_image_var) || !empty($$ai_description_var)) {\n\t\t\t\t\t tep_db_query(\"insert into \" . TABLE_ADDITIONAL_IMAGES . \" (products_id, images_description, thumb_images) values ('\" . (int)$v_products_id . \"', '\" . tep_db_input($$ai_description_var) . \"', '\" . tep_db_input($$ai_image_var) . \"')\");\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n // process the PRODUCTS_DESCRIPTION table\n foreach ($languages as $tkey => $lang){\n\n $doit = false;\n foreach ($custom_fields[TABLE_PRODUCTS_DESCRIPTION] as $key => $name) { \n if (isset($filelayout['v_' . $key . '_'.$lang['id']])) { $doit = true; }\n }\n\n if ( isset($filelayout['v_products_name_'.$lang['id']]) || isset($filelayout['v_products_description_'.$lang['id']]) || isset($filelayout['v_products_url_'.$lang['id']]) || isset($filelayout['v_products_head_title_tag_'.$lang['id']]) || $doit == true ) {\n \n $sql = \"SELECT * FROM \".TABLE_PRODUCTS_DESCRIPTION.\" WHERE\n products_id = $v_products_id AND\n language_id = \" . $lang['id'];\n $result = tep_db_query($sql);\n \n $products_var = 'v_products_name_'.$lang['id'];\n $description_var = 'v_products_description_'.$lang['id'];\n $url_var = 'v_products_url_'.$lang['id'];\n\n // /////////////////////////////////////////////////////////////////////\n //\n // Start: Support for other contributions\n //\n // /////////////////////////////////////////////////////////////////////\n $ep_additional_updates = '';\n $ep_additional_fields = '';\n $ep_additional_data = '';\n\n foreach ($custom_fields[TABLE_PRODUCTS_DESCRIPTION] as $key => $name) { \n $tmp_var = 'v_' . $key . '_' . $lang['id'];\n $ep_additional_updates .= $key . \" = '\" . tep_db_input($$tmp_var) .\"',\";\n $ep_additional_fields .= $key . \",\";\n $ep_additional_data .= \"'\". tep_db_input($$tmp_var) . \"',\";\n }\n\n // header tags controller support\n if (isset($filelayout['v_products_head_title_tag_'.$lang['id']])){\n $head_title_tag_var = 'v_products_head_title_tag_'.$lang['id'];\n $head_desc_tag_var = 'v_products_head_desc_tag_'.$lang['id'];\n $head_keywords_tag_var = 'v_products_head_keywords_tag_'.$lang['id'];\n \n $ep_additional_updates .= \"products_head_title_tag = '\" . tep_db_input($$head_title_tag_var) .\"', products_head_desc_tag = '\" . tep_db_input($$head_desc_tag_var) .\"', products_head_keywords_tag = '\" . tep_db_input($$head_keywords_tag_var) .\"',\";\n $ep_additional_fields .= \"products_head_title_tag,products_head_desc_tag,products_head_keywords_tag,\";\n $ep_additional_data .= \"'\". tep_db_input($$head_title_tag_var) . \"','\". tep_db_input($$head_desc_tag_var) . \"','\". tep_db_input($$head_keywords_tag_var) . \"',\";\n }\n // end: header tags controller support\n \n // /////////////////////////////////////////////////////////////////////\n // End: Support for other contributions\n // /////////////////////////////////////////////////////////////////////\n \n \n // existing product?\n if (tep_db_num_rows($result) > 0) {\n // already in the description, let's just update it\n $sql =\n \"UPDATE \".TABLE_PRODUCTS_DESCRIPTION.\" \n SET\n products_name='\" . tep_db_input($$products_var) . \"',\n products_description='\" . tep_db_input($$description_var) . \"',\n $ep_additional_updates\n products_url='\" . $$url_var . \"'\n WHERE\n products_id = '$v_products_id' AND\n language_id = '\".$lang['id'].\"'\n LIMIT 1\";\n $result = tep_db_query($sql);\n \n } else {\n \n // nope, this is a new product description\n $result = tep_db_query($sql);\n $sql =\n \"INSERT INTO \".TABLE_PRODUCTS_DESCRIPTION.\"\n ( products_id,\n language_id,\n products_name,\n products_description,\n $ep_additional_fields\n products_url\n )\n VALUES (\n '\" . $v_products_id . \"',\n \" . $lang['id'] . \",\n '\". tep_db_input($$products_var) . \"',\n '\". tep_db_input($$description_var) . \"',\n $ep_additional_data\n '\". $$url_var . \"'\n )\";\n $result = tep_db_query($sql);\n }\n }\n }\n \n \n \n if (isset($v_categories_id)){\n //find out if this product is listed in the category given\n $result_incategory = tep_db_query('SELECT\n '.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id,\n '.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id\n FROM\n '.TABLE_PRODUCTS_TO_CATEGORIES.'\n WHERE\n '.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id='.$v_products_id.' AND\n '.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id='.$v_categories_id);\n \n if (tep_db_num_rows($result_incategory) == 0) {\n // nope, this is a new category for this product\n $res1 = tep_db_query('INSERT INTO '.TABLE_PRODUCTS_TO_CATEGORIES.' (products_id, categories_id)\n VALUES (\"' . $v_products_id . '\", \"' . $v_categories_id . '\")');\n } else {\n // already in this category, nothing to do!\n }\n }\n \n // this is for the cross sell contribution\n if (isset($v_cross_sell)){\n tep_db_query(\"delete from \".TABLE_PRODUCTS_XSELL.\" where products_id = \" . $v_products_id . \" or xsell_id = \" . $v_products_id . \"\");\n if (!empty($v_cross_sell)){\n $xsells_array = explode(',',$v_cross_sell);\n foreach ($xsells_array as $xs_key => $xs_model ) {\n $cross_sell_sql = \"select products_id from \".TABLE_PRODUCTS.\" where products_model = '\" . trim($xs_model) . \"' limit 1\";\n $cross_sell_result = tep_db_query($cross_sell_sql);\n $cross_sell_row = tep_db_fetch_array($cross_sell_result);\n \n tep_db_query(\"insert into \".TABLE_PRODUCTS_XSELL.\" (products_id, xsell_id, sort_order) \n values ( \".$v_products_id.\", \".$cross_sell_row['products_id'].\", 1)\");\n tep_db_query(\"insert into \".TABLE_PRODUCTS_XSELL.\" (products_id, xsell_id, sort_order) \n\t\t\t\t\t\t\t\t values ( \".$cross_sell_row['products_id'].\", \".$v_products_id.\", 1)\");\n }\n }\n\t\t}\n\n // for the separate prices per customer (SPPC) module\n $ll=1;\n if (isset($v_customer_price_1)){\n \n if (($v_customer_group_id_1 == '') AND ($v_customer_price_1 != '')) {\n echo \"<font color=red>ERROR - v_customer_group_id and v_customer_price must occur in pairs</font>\";\n die();\n }\n // they spec'd some prices, so clear all existing entries\n $result = tep_db_query('\n DELETE\n FROM\n '.TABLE_PRODUCTS_GROUPS.'\n WHERE\n products_id = ' . $v_products_id\n );\n // and insert the new record\n if ($v_customer_price_1 != ''){ \n $result = tep_db_query(\" INSERT INTO \" .TABLE_PRODUCTS_GROUPS . \" (customers_group_id, customers_group_price, products_id)\n VALUES\n ('\"\n . $v_customer_group_id_1 . \"', '\"\n . $v_customer_price_1 . \"', '\"\n . $v_products_id\n . \"')\");\n }\n if ($v_customer_price_2 != ''){\n $result = tep_db_query(\" INSERT INTO \" .TABLE_PRODUCTS_GROUPS . \" (customers_group_id, customers_group_price, products_id)\n VALUES\n ('\"\n . $v_customer_group_id_2 . \"', '\"\n . $v_customer_price_2 . \"', '\"\n . $v_products_id\n . \"')\");\n }\n if ($v_customer_price_3 != ''){\n $result = tep_db_query(\" INSERT INTO \" .TABLE_PRODUCTS_GROUPS . \" (customers_group_id, customers_group_price, products_id)\n VALUES\n ('\"\n . $v_customer_group_id_3 . \"', '\"\n . $v_customer_price_3 . \"', '\"\n . $v_products_id\n . \"')\");\n }\n if ($v_customer_price_4 != ''){\n $result = tep_db_query(\" INSERT INTO \" .TABLE_PRODUCTS_GROUPS . \" (customers_group_id, customers_group_price, products_id)\n VALUES\n ('\"\n . $v_customer_group_id_4 . \"', '\"\n . $v_customer_price_4 . \"', '\"\n . $v_products_id\n . \"')\");\n }\n\n\n\n if (isset($v_customer_specials_price_1)) {\n $result = tep_db_query('select * from '.TABLE_SPECIALS.' WHERE products_id = ' . $v_products_id . ' and customers_group_id = 1' );\n\n if ($v_customer_specials_price_1 == '') {\n\t\t\t \n $result = tep_db_query('DELETE FROM '.TABLE_SPECIALS.' WHERE products_id = ' . $v_products_id . ' and customers_group_id = 1' );\n\n } else {\n if ($specials = tep_db_fetch_array($result)) {\n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_customer_specials_price_1,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_last_modified' => 'now()'\n\t\t\t\t\t );\n\t\t\t\t\t tep_db_perform(TABLE_SPECIALS, $sql_data_array, 'update', 'specials_id = '.$specials['specials_id']);\n } else {\n\t\t\t\t\t $sql_data_array = array('products_id' => $v_products_id,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_new_products_price' => $v_customer_specials_price_1,\n\t\t\t\t\t\t\t\t\t\t\t 'specials_date_added' => 'now()',\n\t\t\t\t\t\t\t\t\t\t\t 'status' => '1',\n\t\t\t\t\t\t\t\t\t\t\t 'customers_group_id' => '1'\n\t\t\t\t\t );\n\t\t\t\t\t tep_db_perform(TABLE_SPECIALS, $sql_data_array, 'insert');\n }\n }\n }\n\t\t\t\n }\n // end: separate prices per customer (SPPC) module\n \n \n // VJ product attribs begin\n if (isset($v_attribute_options_id_1)){\n $attribute_rows = 1; // master row count\n \n // product options count\n $attribute_options_count = 1;\n $v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count;\n \n while (isset($$v_attribute_options_id_var) && !empty($$v_attribute_options_id_var)) {\n // remove product attribute options linked to this product before proceeding further\n // this is useful for removing attributes linked to a product\n $attributes_clean_query = \"delete from \" . TABLE_PRODUCTS_ATTRIBUTES . \" where products_id = '\" . (int)$v_products_id . \"' and options_id = '\" . (int)$$v_attribute_options_id_var . \"'\";\n \n tep_db_query($attributes_clean_query);\n \n $attribute_options_query = \"select products_options_name from \" . TABLE_PRODUCTS_OPTIONS . \" where products_options_id = '\" . (int)$$v_attribute_options_id_var . \"'\";\n \n $attribute_options_values = tep_db_query($attribute_options_query);\n \n // option table update begin\n if ($attribute_rows == 1) {\n // insert into options table if no option exists\n if (tep_db_num_rows($attribute_options_values) <= 0) {\n for ($i=0, $n=sizeof($languages); $i<$n; $i++) {\n $lid = $languages[$i]['id'];\n \n $v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid;\n \n if (isset($$v_attribute_options_name_var)) {\n $attribute_options_insert_query = \"insert into \" . TABLE_PRODUCTS_OPTIONS . \" (products_options_id, language_id, products_options_name) values ('\" . (int)$$v_attribute_options_id_var . \"', '\" . (int)$lid . \"', '\" . $$v_attribute_options_name_var . \"')\";\n \n $attribute_options_insert = tep_db_query($attribute_options_insert_query);\n }\n }\n } else { // update options table, if options already exists\n for ($i=0, $n=sizeof($languages); $i<$n; $i++) {\n $lid = $languages[$i]['id'];\n \n $v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid;\n \n if (isset($$v_attribute_options_name_var)) {\n $attribute_options_update_lang_query = \"select products_options_name from \" . TABLE_PRODUCTS_OPTIONS . \" where products_options_id = '\" . (int)$$v_attribute_options_id_var . \"' and language_id ='\" . (int)$lid . \"'\";\n \n $attribute_options_update_lang_values = tep_db_query($attribute_options_update_lang_query);\n \n // if option name doesn't exist for particular language, insert value\n if (tep_db_num_rows($attribute_options_update_lang_values) <= 0) {\n $attribute_options_lang_insert_query = \"insert into \" . TABLE_PRODUCTS_OPTIONS . \" (products_options_id, language_id, products_options_name) values ('\" . (int)$$v_attribute_options_id_var . \"', '\" . (int)$lid . \"', '\" . $$v_attribute_options_name_var . \"')\";\n \n $attribute_options_lang_insert = tep_db_query($attribute_options_lang_insert_query);\n } else { // if option name exists for particular language, update table\n $attribute_options_update_query = \"update \" . TABLE_PRODUCTS_OPTIONS . \" set products_options_name = '\" . $$v_attribute_options_name_var . \"' where products_options_id ='\" . (int)$$v_attribute_options_id_var . \"' and language_id = '\" . (int)$lid . \"'\";\n \n $attribute_options_update = tep_db_query($attribute_options_update_query);\n }\n }\n }\n }\n }\n // option table update end\n \n // product option values count\n $attribute_values_count = 1;\n $v_attribute_values_id_var = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count;\n \n while (isset($$v_attribute_values_id_var) && !empty($$v_attribute_values_id_var)) {\n $attribute_values_query = \"select products_options_values_name from \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" where products_options_values_id = '\" . (int)$$v_attribute_values_id_var . \"'\";\n \n $attribute_values_values = tep_db_query($attribute_values_query);\n \n // options_values table update begin\n if ($attribute_rows == 1) {\n // insert into options_values table if no option exists\n if (tep_db_num_rows($attribute_values_values) <= 0) {\n for ($i=0, $n=sizeof($languages); $i<$n; $i++) {\n $lid = $languages[$i]['id'];\n \n $v_attribute_values_name_var = 'v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $lid;\n \n if (isset($$v_attribute_values_name_var)) {\n $attribute_values_insert_query = \"insert into \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" (products_options_values_id, language_id, products_options_values_name) values ('\" . (int)$$v_attribute_values_id_var . \"', '\" . (int)$lid . \"', '\" . tep_db_input($$v_attribute_values_name_var) . \"')\";\n \n $attribute_values_insert = tep_db_query($attribute_values_insert_query);\n }\n }\n \n \n // insert values to pov2po table\n $attribute_values_pov2po_query = \"insert into \" . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . \" (products_options_id, products_options_values_id) values ('\" . (int)$$v_attribute_options_id_var . \"', '\" . (int)$$v_attribute_values_id_var . \"')\";\n \n $attribute_values_pov2po = tep_db_query($attribute_values_pov2po_query);\n } else { // update options table, if options already exists\n for ($i=0, $n=sizeof($languages); $i<$n; $i++) {\n $lid = $languages[$i]['id'];\n \n $v_attribute_values_name_var = 'v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $lid;\n \n if (isset($$v_attribute_values_name_var)) {\n $attribute_values_update_lang_query = \"select products_options_values_name from \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" where products_options_values_id = '\" . (int)$$v_attribute_values_id_var . \"' and language_id ='\" . (int)$lid . \"'\";\n \n $attribute_values_update_lang_values = tep_db_query($attribute_values_update_lang_query);\n \n // if options_values name doesn't exist for particular language, insert value\n if (tep_db_num_rows($attribute_values_update_lang_values) <= 0) {\n $attribute_values_lang_insert_query = \"insert into \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" (products_options_values_id, language_id, products_options_values_name) values ('\" . (int)$$v_attribute_values_id_var . \"', '\" . (int)$lid . \"', '\" . tep_db_input($$v_attribute_values_name_var) . \"')\";\n \n $attribute_values_lang_insert = tep_db_query($attribute_values_lang_insert_query);\n } else { // if options_values name exists for particular language, update table\n $attribute_values_update_query = \"update \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" set products_options_values_name = '\" . tep_db_input($$v_attribute_values_name_var) . \"' where products_options_values_id ='\" . (int)$$v_attribute_values_id_var . \"' and language_id = '\" . (int)$lid . \"'\";\n \n $attribute_values_update = tep_db_query($attribute_values_update_query);\n }\n }\n }\n }\n }\n // options_values table update end\n \n // options_values price update begin\n $v_attribute_values_price_var = 'v_attribute_values_price_' . $attribute_options_count . '_' . $attribute_values_count;\n \n if (isset($$v_attribute_values_price_var) && ($$v_attribute_values_price_var != '')) {\n $attribute_prices_query = \"select options_values_price, price_prefix from \" . TABLE_PRODUCTS_ATTRIBUTES . \" where products_id = '\" . (int)$v_products_id . \"' and options_id ='\" . (int)$$v_attribute_options_id_var . \"' and options_values_id = '\" . (int)$$v_attribute_values_id_var . \"'\";\n \n $attribute_prices_values = tep_db_query($attribute_prices_query);\n \n $attribute_values_price_prefix = ($$v_attribute_values_price_var < 0) ? '-' : '+';\n // if negative, remove the negative sign for storing since the prefix is stored in another field.\n if ( $$v_attribute_values_price_var < 0 ) $$v_attribute_values_price_var = strval(-((float)$$v_attribute_values_price_var));\n \n // options_values_prices table update begin\n // insert into options_values_prices table if no price exists\n if (tep_db_num_rows($attribute_prices_values) <= 0) {\n $attribute_prices_insert_query = \"insert into \" . TABLE_PRODUCTS_ATTRIBUTES . \" (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('\" . (int)$v_products_id . \"', '\" . (int)$$v_attribute_options_id_var . \"', '\" . (int)$$v_attribute_values_id_var . \"', '\" . (float)$$v_attribute_values_price_var . \"', '\" . $attribute_values_price_prefix . \"')\";\n \n $attribute_prices_insert = tep_db_query($attribute_prices_insert_query);\n } else { // update options table, if options already exists\n $attribute_prices_update_query = \"update \" . TABLE_PRODUCTS_ATTRIBUTES . \" set options_values_price = '\" . $$v_attribute_values_price_var . \"', price_prefix = '\" . $attribute_values_price_prefix . \"' where products_id = '\" . (int)$v_products_id . \"' and options_id = '\" . (int)$$v_attribute_options_id_var . \"' and options_values_id ='\" . (int)$$v_attribute_values_id_var . \"'\";\n \n $attribute_prices_update = tep_db_query($attribute_prices_update_query);\n }\n }\n // options_values price update end\n \n //////// attributes stock add start\n $v_attribute_values_stock_var = 'v_attribute_values_stock_' . $attribute_options_count . '_' . $attribute_values_count;\n \n if (isset($$v_attribute_values_stock_var) && ($$v_attribute_values_stock_var != '')) {\n \n $stock_attributes = $$v_attribute_options_id_var.'-'.$$v_attribute_values_id_var;\n $attribute_stock_query = tep_db_query(\"select products_stock_quantity from \" . TABLE_PRODUCTS_STOCK . \" where products_id = '\" . (int)$v_products_id . \"' and products_stock_attributes ='\" . $stock_attributes . \"'\"); \n \n // insert into products_stock_quantity table if no stock exists\n if (tep_db_num_rows($attribute_stock_query) <= 0) {\n $attribute_stock_insert_query =tep_db_query(\"insert into \" . TABLE_PRODUCTS_STOCK . \" (products_id, products_stock_attributes, products_stock_quantity) values ('\" . (int)$v_products_id . \"', '\" . $stock_attributes . \"', '\" . (int)$$v_attribute_values_stock_var . \"')\");\n \n } else { // update options table, if options already exists\n $attribute_stock_insert_query = tep_db_query(\"update \" . TABLE_PRODUCTS_STOCK. \" set products_stock_quantity = '\" . (int)$$v_attribute_values_stock_var . \"' where products_id = '\" . (int)$v_products_id . \"' and products_stock_attributes = '\" . $stock_attributes . \"'\");\n \n // turn on stock tracking on products_options table\n $stock_tracking_query = tep_db_query(\"update \" . TABLE_PRODUCTS_OPTIONS . \" set products_options_track_stock = '1' where products_options_id = '\" . (int)$$v_attribute_options_id_var . \"'\");\n \n }\n }\n //////// attributes stock add end \n \n $attribute_values_count++;\n $v_attribute_values_id_var = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count;\n }\n \n $attribute_options_count++;\n $v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count;\n }\n \n $attribute_rows++;\n }\n // VJ product attribs end\n \n } else {\n // this record was missing the product_model\n echo \"<p class=smallText>No products_model field in record. This line was not imported: \";\n foreach ($items as $tkey => $item) {\n print_el($item);\n }\n echo \"<br /><br /></p>\";\n }\n // end of row insertion code\n \n }\n\n // EP for product extra fields Contrib by minhmaster DEVSOFTVN ==========\n }\n // end (EP for product extra fields Contrib by minhmt DEVSOFTVN) ============\n\n}",
"public function filter($values)\n\t{\n\t\treturn $this->returnValues($this->filterValues($this->prepareValues($values)));\n\t}",
"abstract public function prepareFilters();",
"function scrub_row (&$row) {\n\t\t//\twith people filling in fields with things like\n\t\t//\t\"N/A\" or \"XX\".\n\t\t//\n\t\t//\tFix this\n\t\tforeach ($row as &$value) {\n\t\t\n\t\t\tif (is_null($value)) continue;\n\t\t\n\t\t\tif (\n\t\t\t\t//\tMatch \"N/A\" and variants\n\t\t\t\t(preg_match(\n\t\t\t\t\t'/^\\\\s*n\\/?a\\\\s*$/ui',\n\t\t\t\t\t$value\n\t\t\t\t)!==0) ||\n\t\t\t\t//\tAt least one column in one\n\t\t\t\t//\trow just has the content\n\t\t\t\t//\t\"a\"\n\t\t\t\t(preg_match(\n\t\t\t\t\t'/^\\\\s*a\\\\s*$/ui',\n\t\t\t\t\t$value\n\t\t\t\t)!==0) ||\n\t\t\t\t//\tThere are rows in columns with\n\t\t\t\t//\t\"XX\" or \"xx\" or \"xxcx\".\n\t\t\t\t(preg_match(\n\t\t\t\t\t'/^\\\\s*(?:x|c)+\\\\s*$/ui',\n\t\t\t\t\t$value\n\t\t\t\t)!==0) ||\n\t\t\t\t//\tWhile we're at it let's clobber\n\t\t\t\t//\tentries that are just whitespace\n\t\t\t\t(preg_match(\n\t\t\t\t\t'/^\\\\s*$/u',\n\t\t\t\t\t$value\n\t\t\t\t)!==0)\n\t\t\t) $value=null;\t//\tThe proper way to do things\n\t\t\t//\tFor sanity's sake let's just make\n\t\t\t//\tsure all the data is trimmed\n\t\t\telse $value=preg_replace(\n\t\t\t\t'/^\\\\s+|\\\\s+$/u',\n\t\t\t\t'',\n\t\t\t\t$value\n\t\t\t);\n\t\t\n\t\t}\n\t\n\t}",
"public function dtPerformGlobalFilter($columns, $search = '');",
"public function appendFilterSql($_select, $_backend)\r\n {\r\n \tif($this->_value){\r\n \t $db = Tinebase_Core::getDb();\r\n \t foreach($this->_value as $value){\r\n\t \t $correlationName = Tinebase_Record_Abstract::generateUID() . $value['cfId'] . 'cf';\r\n\t\r\n\t \t $_select->joinLeft(\r\n\t /* what */ array($correlationName => SQL_TABLE_PREFIX . 'customfield'), \r\n\t /* on */ $db->quoteIdentifier(\"{$correlationName}.record_id\") . \" = co.id AND \" \r\n\t . $db->quoteIdentifier(\"{$correlationName}.customfield_id\") . \" = \" . $db->quote($value['cfId']),\r\n\t /* select */ array());\r\n\t $_select->where($db->quoteInto($db->quoteIdentifier(\"{$correlationName}.value\") . $this->_opSqlMap[$this->_operator]['sqlop'], $value['value']));\r\n \t }\r\n \t\r\n // \techo $_select->assemble();\r\n// \t$filter = new Membership_Model_SoMemberFilter(array(), 'AND');\r\n//\t \t\r\n//\t \t$contactFilter = new Addressbook_Model_ContactFilter(array(\r\n//\t array('field' => 'customfield', 'operator' => 'equals', 'value' => $this->_value),\r\n//\t ));\r\n//\t $contactIds = Addressbook_Controller_Contact::getInstance()->search($contactFilter, NULL, FALSE, TRUE);\r\n//\t \r\n//\t $filter->addFilter(new Tinebase_Model_Filter_Id('contact_id', 'in', $contactIds));\r\n//\t \tTinebase_Backend_Sql_Filter_FilterGroup::appendFilters($_select, $filter, $_backend);\r\n \t}\r\n }",
"function wp_plugin_update_rows()\n {\n }",
"public function filter(Builder $dataSource)\r\n {\r\n $model = $dataSource->getModel();\r\n $filters = [];\r\n\r\n if ($this->_separated) {\r\n foreach ($this->_fields as $field => $criteria) {\r\n if ($field === self::COLUMN_ID) {\r\n $value = (int) $this->_value;\r\n if (!is_numeric($this->_value)) {\r\n continue;\r\n }\r\n $field = $model->getPrimary();\r\n } elseif ($field === self::COLUMN_NAME) {\r\n $field = $model->getNameExpr();\r\n }\r\n if (null === $this->_value) {\r\n $filter = new \\Elastica\\Query\\Filtered();\r\n $filterMissing = new \\Elastica\\Filter\\Missing($field);\r\n //$filterMissing->addParam(\"existence\", true);\r\n //$filterMissing->addParam(\"null_value\", true);\r\n $filter->setFilter($filterMissing);\r\n\r\n $filters[] = $filter;\r\n } else {\r\n if ($criteria === self::CRITERIA_EQ) {\r\n $filter = new \\Elastica\\Query\\Term();\r\n $filter->setTerm($field, $this->_value);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_NOTEQ) {\r\n $filter = new \\Elastica\\Query\\Term();\r\n $filter->setTerm($field, $this->_value);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_LIKE) {\r\n $filter = new \\Elastica\\Query\\Match();\r\n $filter->setField($field, $this->_value);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_BEGINS) {\r\n //$filter = new \\Elastica\\Query\\Prefix();\r\n //$filter->setPrefix($field, $this->_value);\r\n //$filters[] = $filter;\r\n $filter = new \\Elastica\\Query\\QueryString();\r\n $filter->setQuery($this->_value);\r\n $filter->setDefaultField($field);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_MORE) {\r\n $filter = new \\Elastica\\Query\\Range($field, ['gt' => $this->_value]);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_LESS) {\r\n $filter = new \\Elastica\\Query\\Range($field, ['lt' => $this->_value]);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_MORER) {\r\n $filter = new \\Elastica\\Query\\Range($field, ['gte' => $this->_value]);\r\n $filters[] = $filter;\r\n } elseif ($criteria === self::CRITERIA_LESSER) {\r\n $filter = new \\Elastica\\Query\\Range($field, ['lte' => $this->_value]);\r\n $filters[] = $filter;\r\n }\r\n }\r\n }\r\n } else {\r\n $filters = new \\Elastica\\Query\\MultiMatch();\r\n $fields = [];\r\n foreach ($this->_fields as $field => $criteria) {\r\n if ($field === self::COLUMN_ID) {\r\n $value = (int) $this->_value;\r\n if (!is_numeric($this->_value)) {\r\n continue;\r\n }\r\n $field = $model->getPrimary();\r\n } elseif ($field === self::COLUMN_NAME) {\r\n $field = $model->getNameExpr();\r\n }\r\n $fields[] = $field;\r\n }\r\n\r\n $filters->setFields($fields);\r\n $filters->setTieBreaker(0.3);\r\n $filters->setType($filters::TYPE_BEST_FIELDS);\r\n //$filter->setType($filter::TYPE_MOST_FIELDS);\r\n $filters->setQuery($this->_value);\r\n }\r\n\r\n\r\n return $filters;\r\n }",
"protected function moreFilterCells( $i, &$j, &$worksheet, &$filter ) {\n\t\treturn;\n\t}",
"function GetExtendedFilterValues() {\n\t\tglobal $dealers_reports;\n\n\t\t// Field StartDate\n\t\t$sSelect = \"SELECT DISTINCT agree.StartDate FROM \" . $dealers_reports->SqlFrom();\n\t\t$sOrderBy = \"agree.StartDate ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $dealers_reports->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$dealers_reports->StartDate->DropDownList = ewrpt_GetDistinctValues($dealers_reports->StartDate->DateFilter, $wrkSql);\n\t}",
"protected function validateFilterColumns( &$reader ) {\n\t\t$ok = true;\n\t\t$export_import_settings_use_filter_group_id = $this->config->get('export_import_settings_use_filter_group_id');\n\t\t$export_import_settings_use_filter_id = $this->config->get('export_import_settings_use_filter_id');\n\t\t$language_id = $this->getDefaultLanguageId();\n\t\t$sql = \"SELECT fgd.filter_group_id, fgd.name AS filter_group_name, fd.filter_id, fd.name AS filter_name \";\n\t\t$sql .= \"FROM `\".DB_PREFIX.\"filter_group_description` fgd \";\n\t\t$sql .= \"LEFT JOIN `\".DB_PREFIX.\"filter` f ON f.filter_group_id=fgd.filter_group_id \";\n\t\t$sql .= \"LEFT JOIN `\".DB_PREFIX.\"filter_description` fd ON fd.filter_id=f.filter_id AND fd.language_id='\".(int)$language_id.\"' \";\n\t\t$sql .= \"WHERE fgd.language_id='\".(int)$language_id.\"'\";\n\t\t$query = $this->db->query( $sql );\n\t\t$filter_groups = array();\n\t\tforeach ($query->rows as $row) {\n\t\t\tif ($export_import_settings_use_filter_group_id) {\n\t\t\t\t$filter_group_id = $row['filter_group_id'];\n\t\t\t\tif (!isset($filter_groups[$filter_group_id])) {\n\t\t\t\t\t$filter_groups[$filter_group_id] = array();\n\t\t\t\t}\n\t\t\t\tif ($export_import_settings_use_filter_id) {\n\t\t\t\t\t$filter_id = $row['filter_id'];\n\t\t\t\t\tif (!is_null($filter_id)) {\n\t\t\t\t\t\t$filter_groups[$filter_group_id][$filter_id] = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$filter_name = htmlspecialchars_decode($row['filter_name']);\n\t\t\t\t\tif (!is_null($filter_name)) {\n\t\t\t\t\t\t$filter_groups[$filter_group_id][$filter_name] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filter_group_name = htmlspecialchars_decode($row['filter_group_name']);\n\t\t\t\tif (!isset($filter_groups[$filter_group_name])) {\n\t\t\t\t\t$filter_groups[$filter_group_name] = array();\n\t\t\t\t}\n\t\t\t\tif ($export_import_settings_use_filter_id) {\n\t\t\t\t\t$filter_id = $row['filter_id'];\n\t\t\t\t\tif (!is_null($filter_id)) {\n\t\t\t\t\t\t$filter_groups[$filter_group_name][$filter_id] = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$filter_name = htmlspecialchars_decode($row['filter_name']);\n\t\t\t\t\tif (!is_null($filter_name)) {\n\t\t\t\t\t\t$filter_groups[$filter_group_name][$filter_name] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// only existing filter_groups and filters can be used in the 'InstrumentFilters' and 'CategoryFilters' worksheets\n\t\t$worksheet_names = array('InstrumentFilters','CategoryFilters');\n\t\tforeach ($worksheet_names as $worksheet_name) {\n\t\t\t$data = $reader->getSheetByName( 'InstrumentFilters' );\n\t\t\tif ($data==null) {\n\t\t\t\treturn $ok;\n\t\t\t}\n\t\t\t$has_missing_filter_groups = false;\n\t\t\t$has_missing_filters = false;\n\t\t\t$i = 0;\n\t\t\t$k = $data->getHighestRow();\n\t\t\tfor ($i=1; $i<$k; $i+=1) {\n\t\t\t\t$id = trim($this->getCell($data,$i,1));\n\t\t\t\tif ($id==\"\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ($export_import_settings_use_filter_group_id) {\n\t\t\t\t\t$filter_group_id = trim($this->getCell($data,$i,2));\n\t\t\t\t\tif ($filter_group_id==\"\") {\n\t\t\t\t\t\tif (!$has_missing_filter_groups) {\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_group_id' ) );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$has_missing_filter_groups = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isset($filter_groups[$filter_group_id])) {\n\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_id' );\n\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_id, $msg );\n\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($export_import_settings_use_filter_id) {\n\t\t\t\t\t\t$filter_id = trim($this->getCell($data,$i,3));\n\t\t\t\t\t\tif ($filter_id==\"\") {\n\t\t\t\t\t\t\tif (!$has_missing_filters) {\n\t\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_id' ) );\n\t\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t\t$has_missing_filters = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isset($filter_groups[$filter_group_id][$filter_id])) {\n\t\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_id_filter_id' );\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_id, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%3', $filter_id, $msg );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_name = trim($this->getCell($data,$i,3));\n\t\t\t\t\t\tif ($filter_name==\"\") {\n\t\t\t\t\t\t\tif (!$has_missing_filters) {\n\t\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_name' ) );\n\t\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t\t$has_missing_filters = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isset($filter_groups[$filter_group_id][$filter_name])) {\n\t\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_id_filter_name' );\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_id, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%3', $filter_name, $msg );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$filter_group_name = trim($this->getCell($data,$i,2));\n\t\t\t\t\tif ($filter_group_name==\"\") {\n\t\t\t\t\t\tif (!$has_missing_filter_groups) {\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_group_name' ) );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$has_missing_filter_groups = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isset($filter_groups[$filter_group_name])) {\n\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_name' );\n\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_name, $msg );\n\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t$ok= false;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($export_import_settings_use_filter_id) {\n\t\t\t\t\t\t$filter_id = trim($this->getCell($data,$i,3));\n\t\t\t\t\t\tif ($filter_id==\"\") {\n\t\t\t\t\t\t\tif (!$has_missing_filters) {\n\t\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_id' ) );\n\t\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t\t$has_missing_filters = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isset($filter_groups[$filter_group_name][$filter_id])) {\n\t\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_name_filter_id' );\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%3', $filter_id, $msg );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_name = trim($this->getCell($data,$i,3));\n\t\t\t\t\t\tif ($filter_name==\"\") {\n\t\t\t\t\t\t\tif (!$has_missing_filters) {\n\t\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $this->language->get( 'error_missing_filter_name' ) );\n\t\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t\t$has_missing_filters = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isset($filter_groups[$filter_group_name][$filter_name])) {\n\t\t\t\t\t\t\t$msg = $this->language->get( 'error_invalid_filter_group_name_filter_name' );\n\t\t\t\t\t\t\t$msg = str_replace( '%1', $worksheet_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%2', $filter_group_name, $msg );\n\t\t\t\t\t\t\t$msg = str_replace( '%3', $filter_name, $msg );\n\t\t\t\t\t\t\t$this->log->write( $msg );\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ok;\n\t}",
"function notimportantcolumnstablesearchresults(){\n\t\treturn 3;\n\t}",
"function change_order_columns_filter( $columns ) {\n unset($columns['shipping_address']);\n unset($columns['customer_message']);\n unset($columns['order_total']);\n return $columns;\n}",
"function rovoko_archive_grid_col(){\n return apply_filters('rovoko_archive_grid_col','8');\n}",
"private function get_rowsAllItems( $rows_wiHits )\n {\n $arr_return = array();\n\n // RETURN IF : hits should counted\n if ( $this->ts_countHits() )\n {\n $arr_return[ 'data' ][ 'rows' ] = $rows_wiHits;\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }\n // RETURN IF : hits should counted\n // Get SQL ressource for all filter items\n $arr_return = $this->sql_resAllItems();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n return $arr_return;\n }\n $res = $arr_return[ 'data' ][ 'res' ];\n unset( $arr_return );\n // Get SQL ressource for all filter items\n // Get rows\n $rows = $this->sql_resToRows_allItemsWiHits( $res, $rows_wiHits );\n\n // RETURN rows\n $arr_return[ 'data' ][ 'rows' ] = $rows;\n return $arr_return;\n }",
"function class_arrayFilter($array, $field, $value, $condition)\n{\n //equal\n if ($condition == '=') {\n $condition_1 = true;\n $condition_2 = false;\n $condition_3 = false;\n $condition_4 = false;\n }\n //mayor igual que\n if ($condition == '>=') {\n $condition_1 = false;\n $condition_2 = false;\n $condition_3 = true;\n $condition_4 = false;\n }\n\n //special all\n if ($condition == 'all') {\n $condition_1 = true;\n $condition_2 = true;\n $condition_3 = false;\n $condition_4 = false;\n }\n //special all\n if ($condition == 'contains') {\n $condition_1 = false;\n $condition_2 = false;\n $condition_3 = false;\n $condition_4 = true;\n }\n\n if ($array) {\n $array_filter = array();\n foreach ($array as $row) {\n //Condition 1\n if ($condition_1) {\n if ($row[$field] == $value) {\n $array_filter[] = $row;\n }\n }\n //Condition 2\n if ($condition_2) {\n if ($row[$field] == 0) {\n $array_filter[] = $row;\n }\n }\n //Condition 3\n if ($condition_3) {\n if ($row[$field] >= $value) {\n $array_filter[] = $row;\n }\n }\n //Condition 4\n if ($condition_4) {\n foreach ($row as $key_condition => $row_condition) {\n if (preg_match(\"/\" . $value . \"(.*)/i\", $row[$key_condition])) {\n //if ((@preg_match(\"^\" . $value . \"\", $row[$key_condition],PCRE_CASELESS))) {\n $array_filter[] = $row;\n }\n }\n }\n }\n $debug = 0;\n\n $results = class_array($array_filter, $debug);\n } else {\n $results = null;\n }\n\n return $results;\n}",
"public function changeRowData(&$row){}",
"public function ReporterFilterData($value)\n {\n $em = $this->getEntityManager();\n if ($value == 'Display All') {\n $qb1 = $em->createQueryBuilder();\n $qb1->select('u.id,up.name,up.employeeId,up.email');\n $qb1->from('Vlreleases\\UserBundle\\Entity\\User', 'u');\n $qb1->innerJoin('u.personalProfile', 'up');\n $result1 = $qb1->getQuery()->getResult();\n return $result1;\n } \n else {\n $qb = $em->createQueryBuilder();\n $qb->select('DISTINCT ur.id');\n $qb->from('Vlreleases\\UserBundle\\Entity\\User', 'u');\n $qb->innerJoin('u.reportingPersons', 'ur');\n if ($value == 'Non Jyo')\n $qb->where(\"u.id !='14'\");\n elseif ($value == 'Jyo')\n $qb->where(\"u.id = '14'\");\n $result = $qb->getQuery()->getResult();\n\n for ($i = '0'; $i < sizeof($result); $i++) {\n $id = $result[$i]['id'];\n $qb1 = $em->createQueryBuilder();\n $qb1->select('u.id,up.name,up.employeeId,up.email');\n $qb1->from('Vlreleases\\UserBundle\\Entity\\User', 'u');\n $qb1->innerJoin('u.personalProfile', 'up');\n $qb1->where(\"u.id='$id'\");\n $finalResult[$i] = $qb1->getQuery()->getResult();\n }\n \n return $finalResult;\n }\n }",
"private function sql_resAllItemsFilterWiRelation()\n {\n // Don't count hits\n $bool_count = false;\n\n // Query for all filter items\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereAllItems();\n $groupBy = $this->curr_tableField;\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//$this->pObj->dev_var_dump( $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }",
"public function dtPerformColumnFilter($columns);",
"function filter_search_columns($columns, $search, $WP_User_Query)\n {\n }",
"public function getDefaultFilterColumns();",
"function getFilterRecordUn($limit,$column_name,$order,$pofno,$dor,$jobtitle,$company,$location,$grade,$salary,$posstatus,$consul){\n\t \n\t $sql = \"SELECT *,SUM(stage='288') As sum1, SUM(stage='289') As sum2, SUM(stage='291') As sum3, SUM(stage='293') As sum4, COUNT(DISTINCT cand_id) As count2, synonym.parentname As compa, a1.parentname As loca FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id WHERE pof.is_allocated='0' AND pof.not_pursue='0' AND pof.jobtitle LIKE '%\".$jobtitle.\"%' AND synonym.parentname LIKE '%\".$company.\"%' AND pof.grade LIKE '%\".$grade.\"%' AND pof.sal_t LIKE '%\".$salary.\"%' AND pof.pos_status LIKE '%\".$posstatus.\"%' GROUP BY pof.pof_id ;\";\n\t \t\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t}",
"public function getFilterValues()\n {\n return $this->filter_values;\n }",
"private function get_filterItemValueStdWrap( $conf_name, $conf_array, $uid, $value )\n {\n static $firstLoop = true;\n\n // Get the stdWrap for the value\n // SWITCH first item\n switch ( true )\n {\n case( $uid == $conf_array[ 'first_item.' ][ 'option_value' ] ):\n $stdWrap = $conf_array[ 'first_item.' ][ 'value_stdWrap.' ];\n break;\n default:\n $stdWrap = $conf_array[ 'wrap.' ][ 'item.' ][ 'wraps.' ][ 'value.' ][ 'stdWrap.' ];\n break;\n }\n // SWITCH first item\n // Get the stdWrap for the value\n // stdWrap the current value\n $item = $this->pObj->local_cObj->stdWrap( $value, $stdWrap );\n\n // Prepend or append hits\n $item = $this->set_hits( $uid, $item, $this->rows[ $uid ] );\n\n // stdWrap the current item\n $stdWrap = $conf_array[ 'wrap.' ][ 'item.' ][ 'wraps.' ][ 'item.' ][ 'stdWrap.' ];\n $item = $this->pObj->local_cObj->stdWrap( $item, $stdWrap );\n // stdWrap the current item\n // DRS :TODO:\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'Check maxItemsPerRow!';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n\n $item = $this->get_maxItemsTagEndBegin( $item );\n\n // Item class\n // #41753.01, 121010, dwildt, 4-\n// if($conf_name == 'CATEGORY_MENU')\n// {\n// $conf_array = $this->pObj->objJss->class_onchange($conf_name, $conf_array, $this->row_number);\n// }\n // #41753.01, 121010, dwildt, 10+\n switch ( true )\n {\n case( $conf_name == 'CATEGORY_MENU' ):\n case( $conf_name == 'TREEVIEW' ):\n $conf_array = $this->pObj->objJss->class_onchange( $conf_name, $conf_array, $this->row_number );\n break;\n default:\n // Follow the workflow\n break;\n }\n\n // DRS :TODO:\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'Check AJAX ###ONCHANGE###';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n $item = $this->replace_itemClass( $conf_array, $item );\n // Item class\n // Item style\n $item = $this->replace_itemStyle( $conf_array, $item );\n // Item title\n $item = $this->replace_itemTitle( $item );\n // Item uid\n $item = $this->replace_itemUid( $uid, $item );\n // Item URL\n $item = $this->replace_itemUrl( $conf_array, $uid, $item );\n // Item selected\n $item = $this->replace_itemSelected( $conf_array, $uid, $value, $item );\n\n // Workaround: remove ###ONCHANGE###\n $item = str_replace( ' class=\" ###ONCHANGE###\"', null, $item );\n if ( $firstLoop && $this->pObj->b_drs_devTodo )\n {\n $prompt = 'class=\" ###ONCHANGE###\" is removed. Check the code!';\n t3lib_div::devlog( '[WARN/TODO] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // Workaround: remove ###ONCHANGE###\n\n $firstLoop = false;\n\n return $item;\n }"
] | [
"0.6786167",
"0.66917896",
"0.62202233",
"0.6012041",
"0.5958116",
"0.5958116",
"0.5958116",
"0.5958116",
"0.56704456",
"0.56704456",
"0.5609677",
"0.5607713",
"0.55783933",
"0.5556022",
"0.5550583",
"0.55172926",
"0.5465594",
"0.54653746",
"0.54415244",
"0.5439634",
"0.5436956",
"0.54158115",
"0.537964",
"0.5363759",
"0.5362094",
"0.5349234",
"0.5338297",
"0.53335553",
"0.5327757",
"0.5303114",
"0.5284525",
"0.52727365",
"0.525134",
"0.52418727",
"0.52400935",
"0.5202517",
"0.5167008",
"0.51520944",
"0.514229",
"0.5139012",
"0.5127632",
"0.5098794",
"0.5094635",
"0.5090831",
"0.50783175",
"0.5076587",
"0.5073412",
"0.507247",
"0.50613767",
"0.50613767",
"0.5057617",
"0.504276",
"0.50351375",
"0.50293213",
"0.50292665",
"0.5028758",
"0.5028371",
"0.5026703",
"0.50206095",
"0.5005743",
"0.49835867",
"0.4980045",
"0.497773",
"0.4975053",
"0.4972176",
"0.49603966",
"0.4951338",
"0.49501035",
"0.49410877",
"0.49395388",
"0.49159983",
"0.4909145",
"0.49079773",
"0.48950794",
"0.48949856",
"0.4893823",
"0.48883188",
"0.4886833",
"0.48822168",
"0.48808154",
"0.48733863",
"0.48634425",
"0.48625588",
"0.48581064",
"0.48564652",
"0.48556376",
"0.48466963",
"0.4845739",
"0.48457086",
"0.4844296",
"0.48422745",
"0.4841341",
"0.48370916",
"0.4832758",
"0.48323604",
"0.48308432",
"0.48287037",
"0.48173463",
"0.48113635",
"0.48107356"
] | 0.5172029 | 36 |
main() : Display a single item from the database | public function main()
{
// Set mode
$mode = $this->getMode();
if ( $mode < 1 )
{
return false;
}
$this->init();
$arr_result = $this->initSql();
if ( $arr_result[ 'error' ][ 'status' ] )
{
$template = $arr_result[ 'error' ][ 'header' ] . $arr_result[ 'error' ][ 'prompt' ];
return $template;
}
$arr_result = $this->getRows( $arr_result );
if ( $arr_result[ 'error' ] )
{
return $arr_result[ 'error' ];
}
$rows = $arr_result[ 'rows' ];
unset( $arr_result );
$this->pObj->rows = $rows;
// #59669, dwildt, 1+
$this->pObj->rowsLocalised = $rows;
$rows = $this->getRowsConsolidated( $rows );
$this->pObj->rows = $rows;
$this->pObj->objConsolidate->children_relation();
$rows = $this->pObj->rows;
$this->hook_afterConsolidatetRows();
// var_dump( __METHOD__, __LINE__, $rows );
// die( ' :( ' );
// Prompt status of rows to the DRS
$this->mainRowsDRS( $rows );
$template = $this->template( $rows );
$this->mainStatistics();
// var_dump( __METHOD__, __LINE__, $template );
//die( ':(' );
return $template;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }",
"public function showSingle($id);",
"public function show($id)\n {\n return $this->commandBus->execute(new \\Sailr\\Item\\GetSingleItemCommand($id));\n }",
"public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }",
"public function show1($id)\n {\n // https://laravel.com/docs/5.5/eloquent\n //dump ($id);\n //dump($item = Item::find($id));\n //if ($item == null) abort(404);\n //try{\n //$item = Item::findOrFail($id);\n //}catch(\\Exception $e){\n //abort(404);\n //}\n //$item = Item::findOrFail($id);\n //dump($item->name);\n //return $item;\n }",
"public function show($id)\n {\n $item = $this->itemCRUD->find_item($id);\n\n\n $this->load->view('theme/header');\n $this->load->view('itemCRUD/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }",
"public function viewhouse($itemid){\n \n $itemid = mysql_real_escape_string( $itemid);\n $sql2 = \"SELECT * from house \n WHERE itemid = '$itemid'\";\n $housearray = mysql_fetch_array(mysql_query($sql2));\n $house = $housearray[0];\n return $house; \n }",
"function show() {\n echo $this->fetch();\n }",
"function show(int $id);",
"public function show(int $id): string\n {\n $itemManager = new ItemManager();\n $item = $itemManager->selectOneById($id);\n\n return $this->twig->render('Item/show.html.twig', ['item' => $item]);\n }",
"public function show($id){\r\n\t\t$this->template->id = $id;\r\n\t\t\r\n\t\t//Get the recipe from the database\r\n\t\t$recipes = Recipe::retrieve(array(\"RecipeID\"=>$id));\r\n\t\t//If successful and the count is equal to one (as desired)\r\n\t\t//set the recipe object in the template to be displayed\r\n\t\tif(count($recipes) == 1){\r\n\t\t\t$this->template->recipe = $recipes;\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->display('show.html.php');\r\n\t}",
"function show($dbname=null, $type=null){\n //\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Get the involved database\n sql::get_dbase($dbname);\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Execute this sql \n $array= $this->get_sql_data($dbname);\n //\n //Ouptut a table\n echo \"<table name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //The id should be the primary value \n $id=$this->entity->name;\n //\n echo \"<tr onclick='record.select(this)' id='$row[$id]'>\";\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo $field->show($value);\n \n }\n \n echo \"</tr>\";\n }\n echo \"</table>\";\n \n \n }",
"function show() {\n $item = DB::select('select * from item');\n return view('catalogue',['item'=>$item]);\n }",
"public function display()\n\t{\n\t $sql = \"SELECT * FROM address WHERE name = ?\";\n\t \n\t}",
"public function show(Item $item)\n {\n \n }",
"public function detail(){\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$record = $this->modelGetRecord($id);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsDetailView.php\";\n\t\t}",
"public function show($id)\n\t{\n \n\t}",
"public function index()\n {\n $data['row'] = $this->items_m->get();\n $this->template->load('template', 'product/item/item_data', $data);\n }",
"public function show($id)\n {\n $item = $this->itemCRUD->find($id);\n\n $this->load->view('theme/header');\n $this->load->view('items/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }",
"public function show(Item $item)\n {\n }",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t\n\t}",
"public function display_item() {\n\n\t\t$id = $this->input->post('id');\n\t\t$event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT id, item_name, item_qty, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n\t\t\t\t\t\t\t\t\t\t WHERE event_id = \" . $event_id . \"\n\t\t\t\t\t\t\t\t\t\t AND master_id = \" . $id);\n\n\t\t$attr = array(\n\t\t\t\t\t\t'count_events_hpp' \t=> $result->num_rows(),\n\t\t\t\t\t\t'events_master'\t=> $this->db->query(\"SELECT id, hpp_category, hpp_subcategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM events_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = \" . $id)->row_array(),\n\t\t\t\t\t\t'event_id'\t\t=> $event_id\n\t\t\t\t\t);\n\n\t\t$this->load->view('analisa/display-item', $attr);\n\n\t}",
"public function show(Item $item)\n {\n //\n }",
"public function show(Item $item)\n {\n //\n }",
"public function show($id) {}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($id)\n\t{ \n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function read_single() {\n \n //create query and prepare\n $query = \"SELECT * FROM $this->table WHERE id = ?\";\n $stmt = $this->conn->prepare($query);\n\n //bind params\n $stmt->bind_param('i', $id);\n\n //set parameter and execute\n $id = $this->id;\n $stmt->execute();\n\n //get result\n $result = $stmt->get_result();\n\n //fetch resulting as array\n $product = mysqli_fetch_assoc($result);\n\n //set product properties\n $this->id = $product['id'];\n $this->name = $product['name'];\n $this->price = $product['price'];\n $this->created_at = $product['created_at'];\n\n }",
"public function show($id)\n {\n //$this->_DetailItem();\n }",
"public function indexAction() : object\n {\n $title = \"Visar allt innehåll i databasen\";\n $db = $this->app->db;\n\n // Deal with incoming variables\n $route = [\n \"orderBy\" => esc(getGet(\"orderby\", \"created\")),\n \"order\" => esc(getGet(\"order\", \"desc\")),\n \"hits\" => esc(getGet(\"hits\", 10)),\n \"page\" => esc(getGet(\"page\", 1))\n ];\n\n // Get max number of pages\n $max = getMax($db, \"content\");\n $max = ceil($max->max / $route[\"hits\"]);\n\n // Prepare and execute sql-statement\n $res = getAll($db, $route, $max, \"content\");\n\n $data = [\n \"res\" => $res,\n \"heading\" => $title,\n \"max\" => $max\n ];\n\n // Add and render page to display database\n $this->app->page->add(\"content/index\", $data);\n return $this->app->page->render([\"title\" => $title,]);\n }",
"public function show($id)\n\t{\t\n\n\t}",
"public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }",
"public function display(){}",
"public function show($id){\n\t\t//\n\t}",
"public function show($id){\n\t\t//\n\t}",
"public function show($id)\n\t {\n\t //\n\t }",
"public function show($id)\n {\n return Item::find($id);\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"function show ($id) {\n\n\tglobal $conn;\n\n\t$object = array();\n\t// Query to select the object.\n\t$sql = 'SELECT * FROM request WHERE id =' . $id;\n\n\tif(!$r = $conn->prepare($sql)){\n\t\techo 'Prepare statement failed';\n\t\tdie();\n\t}\n\n\tif(!$r->execute()) {\n\t\techo 'Execute failed.';\n\t\tdie();\n\t}\n\n\t$r = $r->get_result();\n\n\tif(!$r->num_rows) {\n\t\techo 'No data found.';\n\t\tdie();\n\t}\n\n\t$object = $r->fetch_assoc();\n\n\t// while ($d = $r->fetch_assoc()) {\n\t// \t$object[] = $d;\n\t// }\n\n\t$r->free();\n\t// echo '<pre>';\n\t// print_r($object);\n\t// echo '</pre>';\n\n\t// Load the view file.\n\n\tinclude 'request-show-view.php';\n}",
"public function index ()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n //objekte in ein array\n $list = $dbHandler->getRestaurants();\n $view = new View\\ShowRestaurant();\n $view->setVars($list);\n //echo $view->render();\n $view->show($view);\n }",
"public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }",
"public function read_single()\n {\n // Create query\n $query = \"\n SELECT\n id,\n name\n FROM\n $this->table\n WHERE \n id = ?\n LIMIT 1;\";\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n \n // Bind ID\n $stmt->bindParam(1, $this->id);\n \n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set properties\n $this->id = $row['id'];\n $this->name = $row['name'];\n }",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\t}",
"public function show($id)\n\t{\n\t\t// \n\t}",
"public function single_row($item)\n {\n }",
"public function single_row($item)\n {\n }",
"public function single_row($item)\n {\n }",
"public function show($id)\n {\n \t//\n }",
"public function show($id)\n {\n \t//\n }",
"function readOne(){\r\n //Query to read single record\r\n $query = \"SELECT text, author, category FROM quotes WHERE id = ?\";\r\n \r\n // Query statement\r\n $statement = $this->conn->prepare( $query );\r\n \r\n //Bind id of product to be updated\r\n $statement->bindParam(1, $this->id);\r\n \r\n // execute query\r\n $statement->execute();\r\n \r\n //Get retrieved row\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n \r\n //If there is text at the given id, then we will display the quote information\r\n if (isset($row['text'])) {\r\n //Set values to object properties\r\n $this->text = $row['text'];\r\n $this->author = $row['author'];\r\n $this->category = $row['category'];\r\n } else {\r\n //Does nothing if nothing exists for the given id\r\n }\r\n\r\n }",
"public function viewAction()\n {\n $blogpostId = $this->_registry->args[0];\n $blogpost = new Rwtt_Entity_BlogPost();\n $blogpost->loadById($blogpostId);\n $this->view->title = $blogpost->title;\n $this->view->content = $blogpost->content;\n }",
"public function show($id)\n\t{\n\n\t\t\n\t}",
"public function show($id)\n\t{\n\n\t\t\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.65929663",
"0.65698856",
"0.65380996",
"0.64348406",
"0.64250404",
"0.63928664",
"0.63859946",
"0.63669646",
"0.635552",
"0.6335626",
"0.63166726",
"0.6281439",
"0.6265734",
"0.62485045",
"0.6215338",
"0.6210536",
"0.614904",
"0.6142465",
"0.61373246",
"0.61248904",
"0.61233884",
"0.61233884",
"0.61233884",
"0.6113941",
"0.6106876",
"0.6106876",
"0.6102542",
"0.6099973",
"0.609824",
"0.60939616",
"0.60937804",
"0.6092693",
"0.6092693",
"0.60847634",
"0.6082901",
"0.60787284",
"0.607556",
"0.6061057",
"0.6050786",
"0.6048749",
"0.60470754",
"0.60470754",
"0.6045506",
"0.60429",
"0.6040505",
"0.6040505",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.603793",
"0.6035768",
"0.60167515",
"0.60151756",
"0.6011218",
"0.6010674",
"0.6008857",
"0.6008857",
"0.6008111",
"0.60045564",
"0.6003021",
"0.6003021",
"0.60022575",
"0.60022575",
"0.6001651",
"0.59850615",
"0.598313",
"0.598313",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716",
"0.5981716"
] | 0.0 | -1 |
generate random string and return it. | public static function randomString($len = 10, $type = 1, $prefixType = 0, $prefixConnection = ''){
$string = '';
$prefix = '';
for ($i = 0; $i<$len; $i++){
if ($type == 1) {
$t = rand(0, 2);
if ($t==0) {
$string .= rand(0, 9);
}
if ($t==1) {
$string .= chr(rand(65, 90));
}
if ($t==2) {
$string .= chr(rand(97, 122));
}
}//only letter + number
if ($type == 2) {
$string .= chr(rand(33, 126));
}//full chars
}
if ($prefixType == 1) {
$prefix = date('Y-m-d H:i:s');
}
if ($prefixType == 2) {
$prefix = time();
}
if ($prefixType == 3) {
$prefix = date('Ymd');
}
if (!empty($prefix)) {
$prefix .= $prefixConnection;
}
return $prefix.$string;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function randomString() {\r\n\t\t\t$rand=md5(microtime(true));\r\n\t\t\treturn $rand;\r\n\t\t}",
"private function createRandomString() {\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$res = '';\n\t\tfor ($i = 0; $i < 20; $i++) {\n\t\t\t$res .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\t\treturn $res;\n\t}",
"public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}",
"function genRandomString() {\n //credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n\n return $string;\n }",
"public function createRandString(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $char_list .= \"abcdefghijklmnopqrstuvwxyz\";\n $char_list .= \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }",
"public function getRandomString()\n {\n if (! $this->random_string) {\n $this->random_string = bin2hex(openssl_random_pseudo_bytes(16));\n }\n return $this->random_string;\n }",
"protected static function randomString()\n {\n $chars = \"abcdefghijklmnopqrstuvwxyz\";\n $str = \"\";\n for ($i = 0; $i < 10; $i++) {\n $str .= $chars[rand(0, strlen($chars)-1)];\n }\n return $str;\n }",
"protected function generateRandomString()\n {\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $length = strlen($chars);\n $result = '';\n\n for ($i = 0; $i < 10; $i++) {\n $result .= $chars[rand(0, $length - 1)];\n }\n return $result;\n }",
"function gen_rand_string($num_chars = 8)\n{\n\t$rand_str = unique_id();\n\t$rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));\n\n\treturn substr($rand_str, 0, $num_chars);\n}",
"public function randomString(){\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\n $alpha_upper = strtoupper($alpha);\n $numeric = \"0123456789\";\n $special = \".-+=_,!@$#*%<>[]{}\";\n $chars = $alpha . $alpha_upper . $numeric; \n $pw = ''; \n $chars = str_shuffle($chars);\n $pw = substr($chars, 8,8);\n return $pw;\n }",
"public static function generateRandomString()\n {\n if (PHP_VERSION_ID >= 70000) {\n // phpcs:ignore\n $bytes = random_bytes(16);\n $result = bin2hex($bytes);\n } elseif (function_exists('openssl_random_pseudo_bytes')) {\n $bytes = openssl_random_pseudo_bytes(16, $cstrong);\n $result = bin2hex($bytes);\n } else {\n $generated = array();\n for ($i = 0; $i < 100; $i++) {\n $generated[] = mt_rand();\n }\n shuffle($generated);\n\n $result = md5(serialize($generated));\n }\n\n return $result;\n }",
"function RandomString($num) {\r\r\n mt_srand((double)microtime()*1000000);\r\r\n while (strlen($pass) < $num) {\r\r\n $i = chr(mt_rand (48,57)); \r\r\n $pass = $pass.$i; \r\r\n }\r\r\n return ($pass); \r\r\n}",
"function generate_random_str($no_of_chars) \n{\n return substr(md5(microtime()),rand(0,26),$no_of_chars);\n}",
"function RandomString(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n}",
"private static function GenerateUniqueString(): string\n {\n $returnString = \"\";\n $characterString = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n $characterStringLength = strlen($characterString) - 1;\n for ($i = 0; $i < 6; $i++) {\n $randomNumber = rand(0, $characterStringLength);\n $returnString .= substr($characterString, $randomNumber, 1);\n }\n return $returnString;\n }",
"protected function generateRandomToken(): string\n {\n return Str::random(32);\n }",
"function random_string()\n\t{\n\t\t$character_set_array = array();\n\t\t$character_set_array[] = array('count' => 10, 'characters' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');\n\t\t$character_set_array[] = array('count' => 10, 'characters' => '0123456789');\n\t\t$temp_array = array();\n\t\tforeach ($character_set_array as $character_set) {\n\t\t\tfor ($i = 0; $i < $character_set['count']; $i++) {\n\t\t\t\t$temp_array[] = $character_set['characters'][rand(0, strlen($character_set['characters']) - 1)];\n\t\t\t}\n\t\t}\n\t\tshuffle($temp_array);\n\t\treturn implode('', $temp_array);\n\t}",
"protected function random_string()\n {\n $key = '';\n $keys = array_merge( range('a','z'), range(0,9) );\n\n for($i=0; $i<10; $i++)\n {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n }",
"public static function getRandomString($length) \n{\n$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nreturn substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n}",
"function generate_random_string($name_length = 8) \n\t{\n\t\t$alpha_numeric = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\treturn substr(str_shuffle($alpha_numeric), 0, $name_length);\n\t}",
"function generate_random_string($name_length = 8) {\n $alpha_numeric = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n return substr(str_shuffle($alpha_numeric), 0, $name_length);\n }",
"function generateRandomString($len=32)\n{\nreturn substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',$len)),0,$len);\n}",
"function str_random($length = 16)\n {\n return Str::random($length);\n }",
"function random_string( )\n {\n $character_set_array = array( );\n $character_set_array[ ] = array( 'count' => 7, 'characters' => 'abcdefghijklmnopqrstuvwxyz' );\n $character_set_array[ ] = array( 'count' => 1, 'characters' => '0123456789' );\n $temp_array = array( );\n foreach ( $character_set_array as $character_set )\n {\n for ( $i = 0; $i < $character_set[ 'count' ]; $i++ )\n {\n $temp_array[ ] = $character_set[ 'characters' ][ rand( 0, strlen( $character_set[ 'characters' ] ) - 1 ) ];\n }\n }\n shuffle( $temp_array );\n return implode( '', $temp_array );\n }",
"function rand_string_gen ($n) {\n\t $output_string = '';\n\t $ascii = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t for ($i = 0; $i < $n; $i++) {\n\t $output_string .= $ascii[rand(0, strlen($ascii) - 1)];\n\t }\n\t return $output_string;\n \t}",
"public function generate(): string;",
"public function generate(): string;",
"function string_random_string($length)\r\n\t{\r\n\t\t$string = \"\";\r\n\t\t$chaine = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789\";\r\n\t\tsrand((double)microtime()*1000000);\r\n\t\tfor ($i=0; $i<$length; $i++)\r\n\t\t{\r\n\t\t\t$string .= $chaine[rand()%strlen($chaine)];\r\n\t\t}\r\n\t\treturn $string;\r\n\t}",
"function random_string($length = 6) {\n\t$text = '';\n\t$characters = '0123456789abcdefghijkmnopqrstuvwxyz';\n\t$nro = 0;\n\twhile ($nro < $length) {\n\t\t$caracter = substr($characters, mt_rand(0, strlen($characters)-1), 1);\n\t\t$text .= $caracter;\n\t\t$nro++;\n\t}\n\treturn $text;\n}",
"public static function generateResetString(){\n return base_convert(md5(mt_rand()), 16, 36);\n }",
"function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}",
"private function generateToken(): string\n {\n return Random::alphanum(self::TOKEN_LENGTH);\n }",
"public function generate()\n {\n return $this->_string;\n }",
"function random_string($length,$char_set) {\n\t//parameter of generate_password func\n\t$temp = '';\n\tfor($i=0; $i < $length ; $i++)\n\t{\n\t\t$temp .= random_char($char_set);\n\t}\n\treturn $temp;\n}",
"function str_random($length = 16)\n\t{\n\t\treturn Illuminate\\Support\\Str::random($length);\n\t}",
"public function generateRandomToken():string;",
"function RandomString($length)\n{\n $string = md5(microtime());\n $highest_startpoint = 32-$length;\n $randomString = substr($string,rand(0,$highest_startpoint),$length);\n return $randomString;\n\n}",
"public function randomFunc() {\n return \"RANDOM\";\n }",
"static public function generate()\n {\n return base64_encode(microtime().uniqid().rand());\n }",
"public static function randToken(): string\n {\n return base64_encode(openssl_random_pseudo_bytes(random_int(32, 256)));\n }",
"function generateRandomString($length = 15) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n \t for ($i = 0; $i < $length; $i++) {\n \t $randomString .= $characters[rand(0, strlen($characters) - 1)];\n \t }\n \t\t return $randomString;\n\t\t }",
"function generateRandomString($length = 8) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\r\n }\r\n return $randomString;\r\n}",
"function getRandStr($length) {\r\n $str = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randString = '';\r\n $len = strlen($str)-1;\r\n for($i = 0;$i < $length;$i ++){\r\n $num = mt_rand(0, $len);\r\n $randString .= $str[$num];\r\n }\r\n return $randString ;\r\n}",
"function generateRandomString($length = 6)\r\r\n{\r\r\n return substr(str_shuffle(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") , 0, $length);\r\r\n}",
"function generateRandomString($length = 32)\n {\n return Str::random($length);\n }",
"function genString($len) {\n global $alphabet;\n\n $finale = \"\";\n \n for ($curChar = 0; $curChar < $len; $curChar++)\n $finale .= $alphabet[rand(0, (strlen($alphabet) - 1))];\n\n return $finale;\n}",
"public static function generateCode()\n {\n return Str::random(10);\n }",
"function random_str($length){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function get_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }",
"function RandomStringGenerator($n) \r\n{ \r\n // Variable which store final string \r\n $generated_string = \"\"; \r\n \r\n // Create a string with the help of \r\n // small letters, capital letters and \r\n // digits. \r\n $domain = \"abcdefghijklmnopqrstuvwxyz1234567890\"; \r\n \r\n // Find the lenght of created string \r\n $len = strlen($domain); \r\n \r\n // Loop to create random string \r\n for ($i = 0; $i < $n; $i++) \r\n { \r\n // Generate a random index to pick \r\n // characters \r\n $index = rand(0, $len - 1); \r\n \r\n // Concatenating the character \r\n // in resultant string \r\n $generated_string = $generated_string . $domain[$index]; \r\n } \r\n \r\n // Return the random generated string \r\n return $generated_string; \r\n}",
"public function get_rand_str($length = '5') {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}",
"function generateRandomString($length = 8) { \n\t$string = \"\";\n\t$possible = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\tfor($i=0;$i < $length;$i++) {\n\t\t$char = substr($possible, rand(0, strlen($possible)-1), 1);\n\t\tif (!strstr($string, $char)) {\n\t\t\t$string .= $char;\n\t\t}\n\t}\n\treturn $string;\n}",
"function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}",
"function generateRandomString($length = 8)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function randomString($length = 8)\n {\n srand((double) microtime(true) * 1000000);\n \n $chars = array(\n 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'p',\n 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5',\n '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\n 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n '1', '2', '3', '4', '5', '6', '7', '8', '9');\n \n $randstr = null;\n\n for ($rand = 0; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n\n return $randstr;\n }",
"function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}",
"function getRandomString($length = 8) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $string = '';\n\n for ($i = 0; $i < $length; $i++) {\n $string .= $characters[mt_rand(0, strlen($characters) - 1)];\n }\n\n return $string;\n}",
"function genRandomString($length) {\n $characters = '0123456789';\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n}",
"function random_string($type = 'basic', $len = 8, $string = '0123456789') {\n if($type=='basic') {\n return mt_rand();\n } elseif($type=='md5') {\n return md5(uniqid(mt_rand()));\n } elseif($type=='sha1') {\n return sha1(uniqid(mt_rand(), TRUE));\n } elseif($type=='diy') {\n return substr(str_shuffle(str_repeat($string, ceil($len / strlen($string)))), 0, $len);\n }\n}",
"function randomStr($length = 3) {\n $string = md5(uniqid(rand(), true));\n return substr($string, 0, $length);\n}",
"public function createRandInt(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }",
"function random_string($max = 8)\n {\n $rtn = \"\";\n $chars = explode(\" \", \"a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9\");\n for ($i = 0; $i < $max; $i++) {\n $rnd = array_rand($chars);\n $rtn .= base64_encode(md5($chars[$rnd]));\n }\n return substr(str_shuffle(strtolower($rtn)), 0, $max);\n }",
"function generateRandomString($length = 10) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $charactersLength = strlen($characters);\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, $charactersLength - 1)];\r\n }\r\n return $randomString;\r\n }",
"private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }",
"function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }",
"function generateRandomString($length = 4) \n{\n\t//function to generate random strings\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"public static function string( $length ) {\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\t\n $str = '';\n\t$size = strlen( $chars );\n\tfor( $i = 0; $i < $length; $i++ ) {\n\t\t$str .= $chars[ rand( 0, $size - 1 ) ];\n\t}\n\n\treturn $str;\n }",
"function str_random($length)\n {\n return str_generate($length, '0123456789ABCDEDFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }",
"function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}",
"function generateRandomString($length = 10) {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$characterLength = strlen($characters);\n\t\t$randomString = '';\n\n\t\tfor($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $characterLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}",
"function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }",
"protected function generateCode(): string {\n return (string)rand(100000, 999999);\n }",
"function randstr($length = 10)\n{\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t$string = \"\";\n\t\n\tfor ($i=0; $i < $length; $i++) {\n\t\tstr_shuffle($chars);\n\t\t$string .= $chars[mt_rand(0, strlen($chars))];\n\t}\n\t\t\n\treturn $string;\n}",
"function randomString($n) {\n\n\t$generated_string = \"\";\n\n\t$domain = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n\n\t$len = strlen($domain);\n\n\t// Loop to create random string\n\tfor ($i = 0; $i < $n; $i++) {\n\t\t// Generate a random index to pick characters\n\t\t$index = rand(0, $len - 1);\n\n\t\t// Concatenating the character\n\t\t// in resultant string\n\t\t$generated_string = $generated_string . $domain[$index];\n\t}\n\n\treturn $generated_string;\n}",
"public function get_rand_str($length = 6) {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}",
"public static function str_random($length = 16)\n\t{\n\t $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n\t return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n\t}",
"function rand_string($len, $chr = null)\n{\n\tif(!is_string($chr)) $chr = 'abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ023456789';\n\tsrand((double)microtime()*1000000);\n\t$str = '';\n\tfor($i = 0; $i <= $len; $i++) {\n\t\t$num = rand() % 33;\n\t\t$str .= substr($chr, $num, 1);\n\t}\n\treturn $str;\n}",
"public static function generateRandomString($length = 6) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function genRandomMasterCode(){\n\t\t$characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n\t\t$string=\"\";\n\t\tfor($p=0;$p<17;$p++){\n\t\t\t$string.=$characters[mt_rand(0, strlen($characters))];\n\t\t}\n\t\treturn $string;\n\t}",
"function generateRandomString($n) { \n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $randomString = ''; \n\n for ($i = 0; $i < $n; $i++) { \n $index = rand(0, strlen($characters) - 1); \n $randomString .= $characters[$index]; \n } \n\n return $randomString; \n}",
"private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }",
"function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"function generate_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) :\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n endfor;\n\n return $randomString;\n}",
"function generateRandomString($length) {\n //$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}",
"protected function rand(){\n\n return Str::random(25);\n\n }",
"function randomString($length = 1) {\n $str = \"\";\n $characters = array_merge(range('A','Z'), range('a','z') );\n $max = count($characters) - 1;\n for ($i = 0; $i < $length; $i++) {\n $rand = mt_rand(0, $max);\n $str .= $characters[$rand];\n }\n return $str;\n }",
"function generateRandomString($length) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n //cuenta la cantidad de caracteres\n $charactersLength = strlen($characters);\n //inicial random string\n $randomString = '';\n //ciclo que arma el codigo random\n for ($i = 0; $i < $length; $i++) {\n //concatenando al azar un caracter de todas las opciones\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n //devolviendo el codigo random\n return $randomString;\n }",
"public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }",
"function generateRandomString($n) { \n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n\t\t$randomString = '';\n \n\t\tfor ($i = 0; $i < $n; $i++) { \n\t\t\t$index = rand(0, strlen($characters) - 1); \n\t\t\t$randomString .= $characters[$index]; \n\t\t} \n \n \treturn $randomString; \n\t}",
"public function getRandomAlphaNumStr(): string\n {\n $string = '';\n\n while (($len = \\strlen($string)) < 20) {\n $size = 20 - $len;\n\n $bytes = \\random_bytes($size);\n\n $string .= \\substr(\n \\str_replace(['/', '+', '='], '', \\base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }",
"function r(){\n\t\t\n\t\t$chars = '0123456789';\n\t\t$s = substr(str_shuffle(str_repeat($chars, 5)), 0, 5);\n\t\treturn $s;\t\t\t\n\t\t}",
"public static function generateRandomString($length=20) {\n $haystack = '012345678'\n . 'abcdefghijklmnopqrstuvwxyz'\n . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $iLen = strlen($haystack);\n $result = '';\n\n mt_srand((double) microtime() * 1000000);\n for ( $i=0; $i<$length; $i++ ) {\n $result .= substr($haystack, (mt_rand() % ($iLen)), 1);\n }\n return($result);\n }",
"abstract public function generate() : string;",
"function create_token(): string\n {\n $strs = \"QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm\";\n $str = substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),12);\n return md5($str);\n }",
"function generateRandomString($length = 32) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }",
"function attendance_random_string($length=6) {\n $randombytes = random_bytes_emulate($length);\n $pool = 'abcdefghijklmnopqrstuvwxyz';\n $pool .= '0123456789';\n $poollen = strlen($pool);\n $string = '';\n for ($i = 0; $i < $length; $i++) {\n $rand = ord($randombytes[$i]);\n $string .= substr($pool, ($rand % ($poollen)), 1);\n }\n return $string;\n}",
"private function createUniqueId() {\n\t\t\t// pool\n\t\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n\t\t\t$length =rand(10, 30);\n\t\t\t// start creation\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0; \n\t\t\t$rndStr = \"\";\n\t\t\twhile ($i < $length) { \n\t\t\t\t\t$num = rand() % strlen($chars);\n\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\t\t\t$rndStr = $rndStr . $tmp;\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $rndStr;\n\t\t}",
"function generateRandomString($length) {\n return strtoupper(substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length));\n }"
] | [
"0.85796714",
"0.84142613",
"0.8373132",
"0.8358501",
"0.83148146",
"0.82727355",
"0.8246858",
"0.81015354",
"0.801373",
"0.79320097",
"0.78795356",
"0.7848304",
"0.7827705",
"0.781005",
"0.7778028",
"0.7740162",
"0.77271163",
"0.77207345",
"0.76824623",
"0.76506037",
"0.7638333",
"0.76309615",
"0.76193374",
"0.75918",
"0.75628215",
"0.75591916",
"0.75591916",
"0.7556692",
"0.752382",
"0.75196815",
"0.75191224",
"0.751477",
"0.7508652",
"0.7504616",
"0.75032103",
"0.75005716",
"0.7499482",
"0.7491773",
"0.74902123",
"0.7480196",
"0.74742395",
"0.74701697",
"0.74525034",
"0.74465156",
"0.74261695",
"0.7424813",
"0.74229676",
"0.741395",
"0.74103177",
"0.74058557",
"0.73978746",
"0.7388003",
"0.7387128",
"0.7380786",
"0.7371176",
"0.73693854",
"0.73689634",
"0.73651916",
"0.735856",
"0.73572683",
"0.73560846",
"0.73533493",
"0.73496705",
"0.7349028",
"0.73454225",
"0.73451656",
"0.73449177",
"0.7343072",
"0.7333289",
"0.7330179",
"0.7327076",
"0.7325927",
"0.73171103",
"0.73143685",
"0.73113394",
"0.73112",
"0.7310795",
"0.730391",
"0.7301057",
"0.72975415",
"0.7294918",
"0.72940433",
"0.72940433",
"0.72940433",
"0.72940433",
"0.7293249",
"0.72924817",
"0.728076",
"0.7280558",
"0.72797173",
"0.7273112",
"0.72708887",
"0.7267695",
"0.72554785",
"0.72514313",
"0.72477484",
"0.7242727",
"0.72356415",
"0.7232603",
"0.72275156",
"0.7222852"
] | 0.0 | -1 |
load dynamic const values | public static function loadConstValue($key, $prefix, $constClass = 'common\models\CommonConst') {
$constValue = '';
$constName = "$constClass::$prefix$key";
if (defined($constName)) {
$constValue = constant($constName);
}
return $constValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function load_constant($term) \n{\n\tglobal $dbf;\n\n\t$sql_slct_const = \"SELECT * FROM base_constant WHERE const_term='$term'\";\n\t$sql_cons = $dbf;\n\t$sql_cons->query($sql_slct_const);\n\t$sql_cons->next_record();\n\t\t\n\t$rows = $sql_cons->rowdata();\n\tif($term != $rows['const_term']) \n\t{\n\t\texit(\"Constant not exist! Please check load_constant() spelling!\");\n\t} else {\n\t $value = $rows['const_value']; \n\t return $value;\n\t}\n}",
"abstract public function processConstant ($const);",
"function runkit_constant_add($constname, $value)\n{\n}",
"public static function loadConstants(): void\n {\n AppConstant::defineConstant('USER_UNIQUE_ENTITY_ERROR', self::UNIQUE_ENTITY_ERROR);\n AppConstant::defineConstant('USER_USERNAME_EMPTY_ERROR', self::USERNAME_EMPTY_ERROR);\n AppConstant::defineConstant('USER_USERNAME_MIN_LENGTH_ERROR', self::USERNAME_MIN_LENGTH_ERROR);\n AppConstant::defineConstant('USER_USERNAME_MAX_LENGTH_ERROR', self::USERNAME_MAX_LENGTH_ERROR);\n AppConstant::defineConstant('USER_PASSWORD_EMPTY_ERROR', self::PASSWORD_EMPTY_ERROR);\n AppConstant::defineConstant('USER_PASSWORD_MIN_LENGTH_ERROR', self::PASSWORD_MIN_LENGTH_ERROR);\n AppConstant::defineConstant('USER_PASSWORD_MAX_LENGTH_ERROR', self::PASSWORD_MAX_LENGTH_ERROR);\n AppConstant::defineConstant('USER_CREATED_BY_EMPTY_ERROR', self::CREATED_BY_EMPTY_ERROR);\n\n //Constants for Annotations in App\\Controller\\Api\\Admin\\RoleController\n AppConstant::defineConstant('USER_GET_USERS_SECURITY_ERROR', self::GET_USERS_SECURITY_ERROR);\n AppConstant::defineConstant('USER_GET_USER_SECURITY_ERROR', self::GET_USER_SECURITY_ERROR);\n AppConstant::defineConstant('USER_CREATE_USER_SECURITY_ERROR', self::CREATE_USER_SECURITY_ERROR);\n AppConstant::defineConstant('USER_UPDATE_USER_SECURITY_ERROR', self::UPDATE_USER_SECURITY_ERROR);\n AppConstant::defineConstant('USER_DELETE_USER_SECURITY_ERROR', self::DELETE_USER_SECURITY_ERROR);\n }",
"public function defineConstants ()\n {\n foreach ($this->data as $key => $value) {\n define(strtoupper($key), $value);\n }\n }",
"protected function _initSetConstants() {\n // Them file cau hinh cac hang so su dung trong project\n $config = parse_ini_file(APPLICATION_PATH . '/configs/constant.ini');\n foreach($config as $key=>$value){\n // neu chua dinh nghia thi moi dinh nghia lai\n if(!defined($key)){\n define($key, $value);\n }\n }\n }",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"function module_styleLoad($val, $data)\n{\n\tif (!$data) return;\n\tsetCacheData(\"styleLoad\", $data);\n\n\t$store\t= config::get(':styles', array());\n\tif ($store[$data]) return;\n\t\n\t$store[$data] = $data;\n\tconfig::set(':styles', $store);\n}",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"function runkit_constant_redefine($constname, $newvalue)\n{\n}",
"function set_const($const)\r\n\t{\r\n\t\tif (defined($const)) \r\n\t\t{\r\n\t\t\t$this->set_var($const, constant($const));\r\n\t\t}\r\n\t}",
"public function defined_constant() {\n define( 'TS_VERSION', self::version );\n define( 'TS_FILE', __FILE__ );\n define( 'TS_PATH', __DIR__ );\n define( 'TS_URL', plugins_url( '', TS_FILE ) );\n define( 'TS_ASSETS', TS_URL .'/assets' );\n }",
"function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}",
"abstract public function load();",
"abstract public function load();",
"function foo()\n{\n // const CONSTANT = \"Hello, World!\";\n\n define(\"CONSTANT\", \"Hello, World!\");\n}",
"protected static function defineBaseConstants() {}",
"function module_scriptLoad($val, $data)\n{\n\tif (!$data) return;\n\tsetCacheData(\"scriptLoad\", $data);\n\t\n\t$store\t= config::get(':scripts', array());\n\tif ($store[$data]) return;\n\n\t$store[$data] = $data;\n\tconfig::set(':scripts', $store);\n}",
"private function LoadConstants()\r\n\t{\r\n\t\t$data_config = $this->LoadData('application/data/appconfig.xml','config');\r\n\t\t\r\n\t\tif(!defined(\"NEW_LINE\"))\r\n\t\t\tdefine(\"NEW_LINE\",\"\\n\");\r\n\t\t\t\r\n\t\tforeach ($data_config AS $elem)\r\n\t\t{\r\n\t\t\tif(!defined(strtoupper('sitename')))\r\n\t\t\t\tdefine(strtoupper('sitename'),$elem->getElementsByTagName('sitename')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('tagline')))\r\n\t\t\t\tdefine(strtoupper('tagline'),$elem->getElementsByTagName('tagline')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('ownername')))\t\r\n\t\t\t\tdefine(strtoupper('ownername'),$elem->getElementsByTagName('ownername')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('owneremail')))\t\r\n\t\t\t\tdefine(strtoupper('owneremail'),$elem->getElementsByTagName('owneremail')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('appversion')))\r\n\t\t\t\tdefine(strtoupper('appversion'),$elem->getElementsByTagName('appversion')->item(0)->nodeValue);\r\n\t\t\t\r\n\t\t\t$path = $elem->getElementsByTagName('paths');\r\n\t\t\tif($path->length > 0)\r\n\t\t\t{\r\n\t\t\t\tforeach ($path AS $nested)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!defined(strtoupper('application')))\r\n\t\t\t\t\t\tdefine(strtoupper('application'),$nested->getElementsByTagName('application')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('controls')))\r\n\t\t\t\t\t\tdefine(strtoupper('controls'),$nested->getElementsByTagName('controls')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('data')))\r\n\t\t\t\t\t\tdefine(strtoupper('data'),$nested->getElementsByTagName('data')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('templates')))\r\n\t\t\t\t\t\tdefine(strtoupper('templates'),$nested->getElementsByTagName('templates')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('navigation')))\n\t\t\t\t\t\tdefine(strtoupper('navigation'),$nested->getElementsByTagName('navigation')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('navigationdata')))\n\t\t\t\t\t\tdefine(strtoupper('navigationdata'),$nested->getElementsByTagName('navigationdata')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('modules')))\r\n\t\t\t\t\t\tdefine(strtoupper('modules'),$nested->getElementsByTagName('modules')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('pages')))\r\n\t\t\t\t\t\tdefine(strtoupper('pages'),$nested->getElementsByTagName('pages')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('public')))\r\n\t\t\t\t\t\tdefine(strtoupper('public'),$nested->getElementsByTagName('public')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('logs')))\r\n\t\t\t\t\t\tdefine(strtoupper('logs'),$nested->getElementsByTagName('logs')->item(0)->nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tunset($data_config);\r\n\t}",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }",
"function wp_initial_constants()\n {\n }",
"private function getFromConst($line)\n {\n $eq_pos = strpos($line, '=');\n $semicolon_pos = strrpos($line, ';');\n\n $constant_name = trim(substr($line, 6, $eq_pos - 6));\n $value = trim(substr($line, $eq_pos + 1, $semicolon_pos - $eq_pos - 1));\n\n return [$constant_name, $this->getNativeValueFromDefinition($value)];\n }",
"public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}",
"public function register() {\n\n return [ T_CONST ];\n\n }",
"public function testConstantWithValue()\n {\n $attribute = new HaxeConstant();\n $attribute\n ->setName('test')\n ->setValue('\"5\"')\n ;\n\n $this->assertEquals('public static var test = \"5\";', $attribute->transpile());\n }",
"public abstract function load();",
"public static function getValues()\n {\n return Hash::extract(self::getConstants(), '{s}.value');\n }",
"function runkit_constant_add(string $constname, $value, int $visibility = RUNKIT_ACC_PUBLIC) : bool {\n}",
"public function loadInit() {}",
"function pre_load_value($value, $post_id, $field)\n {\n }",
"private function define_constants()\n {\n define('FI_KILONKIPINAT_TODOS_TODOITEM_STATUS_NEW', 1000);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_STATUS_PENDING', 1100);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_STATUS_ACKNOWLEDGED', 1200);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_STATUS_RESOLVED', 1400);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_STATUS_CLOSED', 2000);\n\n define('FI_KILONKIPINAT_TODOS_TODOITEM_RELATED_LINKTYPE_PENDING', 1000);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_RELATED_LINKTYPE_DUPLICATE', 1100);\n \n define('FI_KILONKIPINAT_TODOS_TODOITEM_WEIGHT_ULTRALIGHT', 1000);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_WEIGHT_LIGHT', 1100);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_WEIGHT_MEDIUM', 1200);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_WEIGHT_HEAVY', 1300);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_WEIGHT_SUPERHEAVY', 1400);\n \n define('FI_KILONKIPINAT_TODOS_TODOITEM_VISIBILITY_PUBLIC', 1000);\n define('FI_KILONKIPINAT_TODOS_TODOITEM_VISIBILITY_SECURE', 1100);\n }",
"abstract public function loadData();",
"public function load()\n {\n $data = array(\n 'get' => (isset($_GET)) ? $_GET : null, \n 'post' => (isset($_POST)) ? $_POST : null,\n 'request' => (isset($_REQUEST)) ? $_REQUEST : null,\n 'files' => (isset($_FILES)) ? $_FILES : null,\n 'server' => (isset($_SERVER)) ? $_SERVER : null,\n 'session' => (isset($_SESSION)) ? $_SESSION : null\n );\n\n foreach ($data as $name => $value) {\n if ($value !== null) {\n $this->$name = $value;\n $global = strtoupper($name);\n unset($$global);\n }\n }\n }",
"abstract protected function loadDefinition();",
"public function getConsts() {\n $const = $this->get('const');\n return null !== $const ? $const : array();\n }",
"function LoadBasicSearchValues() {\n\t\tglobal $t_tinbai_mainsite;\n\t\t$t_tinbai_mainsite->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];\n\t\t$t_tinbai_mainsite->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];\n\t}",
"abstract protected function loadDefaults();",
"public function initVarfromDefs() {\n foreach ($this->extconfigs->getextConfig('sccpDefaults') as $key => $value) {\n if (empty($this->sccpvalues[$key])) {\n $this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');\n }\n }\n }",
"abstract protected function load(): array;",
"private function _define($const, $value = null)\n {\n if (defined($const)) {\n return;\n\n }\n define($const, is_null($value) ? $const : $value);\n }",
"private static function loadItems()\n\t{\n\t\tself::$_items=array();\t\t\t\t\t\t//FIXME Сделать критерию с селект где не будет лишних полей\n\t\t$models=self::model()->findAll();\n\t\tforeach($models as $model)\n\t\t\tself::$_items[$model->code]=$model->value;\n\t}",
"protected function loadFromVariableHandlers()\n {\n foreach ($this->workflow->getVariableHandlers() as $variableName => $className) {\n $object = new $className;\n $this->setVariable($variableName, $object->load($this, $variableName));\n }\n }",
"function LoadBasicSearchValues() {\n\t\tglobal $tbl_slide;\n\t\t$tbl_slide->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];\n\t\t$tbl_slide->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];\n\t}",
"private function _constant(EntityConstant $constant) {\n\n $flags = \", CONST_CS | CONST_PERSISTENT\";\n if($constant->class) {\n $prefix = 'REGISTER_CLASS';\n $name = 'ce_'.$constant->class->cname.', \"'.addslashes($constant->short).'\"';\n $flags = '';\n } elseif($constant->ns) {\n $name = '\"'.addslashes($constant->ns).'\", \"'.addslashes($constant->short).'\"';\n $prefix = 'REGISTER_NS';\n\n } else {\n $name = '\"'.addslashes($constant->name).'\"';\n $prefix = 'REGISTER';\n }\n switch($constant->type) {\n case Types::INT:\n return \"{$prefix}_LONG_CONSTANT({$name}, {$constant->value}{$flags});\";\n case Types::STRING:\n return \"{$prefix}_STRING_CONSTANT({$name}, \\\"\".addslashes($constant->value).\"\\\"{$flags});\";\n case Types::BOOLEAN:\n return \"{$prefix}_BOOL_CONSTANT({$name}, \".intval($constant->value).\"{$flags});\";\n case Types::NIL:\n return \"{$prefix}_NULL_CONSTANT({$name}{$flags});\";\n case Types::DOUBLE:\n return \"{$prefix}_DOUBLE_CONSTANT({$name}, {$constant->value}{$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $constant\");\n }\n }",
"protected function defineLegacyConstants() {}",
"protected function defineLegacyConstants() {}",
"protected function defineLegacyConstants() {}",
"private function loadConstants()\n {\n // config.ini globale\n $configurationFileName = (!empty($_SERVER['DOCUMENT_ROOT']) ? dirname($_SERVER['DOCUMENT_ROOT']) : getcwd()) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.ini';\n if(!file_exists($configurationFileName))\n {\n throw new \\Exception(sprintf('File di configurazione \"%s\" non trovato', $configurationFileName));\n }\n Config::add(parse_ini_file($configurationFileName, true));\n \n Config::set('application.dir', $this->getRootDir());\n \n if(!Config::get('MAIN/document_root'))\n {\n Config::set('MAIN/document_root', $this->getRootDir() . DIRECTORY_SEPARATOR . 'public');\n }\n \n if(!Config::get('MAIN/cache_path'))\n {\n Config::set('MAIN/cache_path', $this->getRootDir() . DIRECTORY_SEPARATOR . 'cache');\n }\n\n $coreDir = $this->getCoreDir();\n }",
"function LoadBasicSearchValues() {\r\n\t\tglobal $fs_multijoin_v;\r\n\t\t$fs_multijoin_v->BasicSearchKeyword = @$_GET[EW_TABLE_BASIC_SEARCH];\r\n\t\t$fs_multijoin_v->BasicSearchType = @$_GET[EW_TABLE_BASIC_SEARCH_TYPE];\r\n\t}",
"private function consts()\n\t{\n\t\tif (!defined('WP_PARSI_ROOT'))\n\t\t\tdefine('WP_PARSI_ROOT', __FILE__);\n\n\t\tif (!defined('WP_PARSI_DIR'))\n\t\t\tdefine('WP_PARSI_DIR', plugin_dir_path(WP_PARSI_ROOT));\n\n\t\tif (!defined('WP_PARSI_URL'))\n\t\t\tdefine('WP_PARSI_URL', plugin_dir_url(WP_PARSI_ROOT));\n\n\t\tif (!defined('WP_PARSI_VER'))\n\t\t\tdefine('WP_PARSI_VER', '2.2');\n\t}",
"protected function _define_constants() {\n\t\t\tdefine( 'LP_ADDON_STRIPE_ADVANCED_PAYMENT_PATH', dirname( LP_ADDON_STRIPE_ADVANCED_PAYMENT_FILE ) );\n\t\t\tdefine( 'LP_ADDON_STRIPE_ADVANCED_PAYMENT_INC', LP_ADDON_STRIPE_ADVANCED_PAYMENT_PATH . '/inc/' );\n\t\t\tdefine( 'LP_ADDON_STRIPE_ADVANCED_PAYMENT_URL', plugin_dir_url( LP_ADDON_STRIPE_ADVANCED_PAYMENT_FILE ) );\n\t\t\tdefine( 'LP_ADDON_STRIPE_ADVANCED_PAYMENT_TEMPLATE', LP_ADDON_STRIPE_ADVANCED_PAYMENT_PATH . '/templates/' );\n\t\t}",
"protected function initVars() {\n\n\t\t}",
"private function parseConstants(): void\n {\n $constants = $this->extractConstants();\n foreach ($constants as $constant)\n {\n if ($constant['docblock']===null)\n {\n $docId = null;\n }\n else\n {\n $docId = PhpAutoDoc::$dl->padDocblockInsertDocblock($constant['docblock']['doc_line_start'],\n $constant['docblock']['doc_line_end'],\n $constant['docblock']['doc_docblock']);\n }\n\n PhpAutoDoc::$dl->padClassInsertConstant($this->clsId,\n $docId,\n $constant['name'],\n $constant['visibility'],\n $constant['value'],\n $constant['start'],\n $constant['end']);\n }\n }",
"protected function _define_constants() {\r\n\t\t\tdefine( 'LP_ADDON_PAYIR_PAYMENT_PATH', dirname( LP_ADDON_PAYIR_PAYMENT_FILE ) );\r\n\t\t\tdefine( 'LP_ADDON_PAYIR_PAYMENT_INC', LP_ADDON_PAYIR_PAYMENT_PATH . '/inc/' );\r\n\t\t\tdefine( 'LP_ADDON_PAYIR_PAYMENT_URL', plugin_dir_url( LP_ADDON_PAYIR_PAYMENT_FILE ) );\r\n\t\t\tdefine( 'LP_ADDON_PAYIR_PAYMENT_TEMPLATE', LP_ADDON_PAYIR_PAYMENT_PATH . '/templates/' );\r\n\t\t}",
"public static function get_values()\n {\n }",
"public static function get_values()\n {\n }",
"public static function get_values()\n {\n }",
"function load_value( $value, $post_id, $field )\n\t{\n\t\t// Note: This function can be removed if not used\n\t\treturn $value;\n\t}",
"public function load( $values ) {\n\t\t$values = $this->load_data( $values );\n\t\t$this->regex = isset( $values['regex'] ) ? $values['regex'] : false;\n\t\t$this->agent = isset( $values['agent'] ) ? $values['agent'] : '';\n\t}",
"private function loadParams() {\r\n foreach ($this->_param_names as $param_name)\r\n\t{\r\n\t\t$funcname = 'set'.$param_name;\r\n\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name)));\r\n\t\telse\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t}\r\n }",
"public function load() {\n // Load settings\n\t $this->lookup_title = $this->getProjectSetting('lookup-title');\n\t $this->lookup_header = $this->getProjectSetting('lookup-header');\n\t $this->lookup_field = $this->getProjectSetting('lookup-field');\n\t $this->lookup_event_id = $this->getProjectSetting('lookup-event-id');\n\t $this->validate_mrn = $this->getProjectSetting('validate-mrn');\n\t $this->found_action = $this->getProjectSetting('found-action');\n\t $this->repeating_event_id = $this->getProjectSetting('repeating-event-id');\n\t $this->repeating_form_name = $this->getProjectSetting('repeating-form-name');\n\t $this->is_loaded = true;\n }",
"function olc_constant($constant) {\n\tif (function_exists('constant')) {\n\t\t$temp = constant($constant);\n\t} else {\n\t\teval(\"\\$temp=$constant;\");\n\t}\n\treturn $temp;\n}",
"public function __load();",
"abstract protected function loadSettings();",
"public static function provideOnResourceLoaderGetConfigVars() {\n\t}",
"function module_fileLoad($val, $data)\n{\n\t$ext\t= explode('.', $data);\n\t$ext\t= end($ext);\n\t$ext\t= strtolower($ext);\n\tswitch($ext){\n\tcase 'js':\treturn module_scriptLoad($val, $data);\n\tcase 'css':\treturn module_styleLoad($val, $data);\n\t}\n}",
"abstract protected function loadFields();",
"protected function loadHash()\n {\n $this->valueHash = $this->calculateHash();\n }",
"private function assign_i2vals() {\n\t\tglobal $I2_USER,$I2_ROOT,$I2_SELF,$I2_ARGS,$module;\n\t\t$this->smarty->assign('I2_ROOT', $I2_ROOT);\n\t\t$this->smarty->assign('I2_SELF', $I2_SELF);\n\t\t$this->smarty->assign('I2_ARGSTRING', implode('/',$I2_ARGS));\n\t\t$this->smarty->assign('I2_MODNAME', $module);\n\t\tif( isset($I2_USER) ) {\n\t\t\t$this->smarty->assign('I2_UID', $I2_USER->uid);\n\t\t\t$this->smarty->assign('I2_USER', $I2_USER);\n\t\t\t$this->smarty->assign('I2_CSS', \"{$I2_ROOT}css/\".self::$style.'.css/'.$I2_USER->uid);\n\t\t\t$this->smarty->assign('I2_JS', \"{$I2_ROOT}js/\".self::$style.'.js');\n\t\t}\n\t\telse {\n\t\t\t$this->smarty->assign('I2_CSS', \"{$I2_ROOT}css/default.css\");\n\t\t}\n\t}",
"function getConfigurationValues() ;",
"public function _static(){\n\t\t$data['base'] = $this->base;\n\t\t$data['css'] = $this->css;\n\t\t$data['js'] = $this->js;\n\t\t$data['img'] = $this->img;\n\t\t$data['less'] = $this->less;\n\t\n\t\treturn $data;\n\t}",
"protected function __construct()\n {\n // Define the constants\n define('VALIB_CONFIG', $this->loadConfig());\n }",
"public function import_constant( array $data, $parent_post_id = 0, $import_ignored = false ) {\n\t\t/**\n\t\t * Exclude some Constants for various reasons\n\t\t */\n\t\tif ( apply_filters( 'sublime_import_exclude_constant', false, $data['name'] ) )\n\t\t\treturn false;\n\n\t\t$data = wp_parse_args( $data, array(\n\t\t\t'arguments' => isset( $data['value'] ) ? $data['value'] : array(),\n\t\t\t'line' => '',\n\t\t) );\n\n\t\t$data['end_line'] = isset( $data['end_line'] ) ? $data['end_line'] : $data['line'];\n\n\t\t$constant_id = $this->import_item( $data, $parent_post_id, $import_ignored, array( 'post_type' => $this->post_type_constant ) );\n\n\t\treturn $constant_id;\n\t}",
"public function loadParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'set'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\t$this->$funcname(Configuration::get('CERTISSIM_'.Tools::strtoupper($param_name)));\r\n\t\t\telse\r\n\t\t\t\t$this->$funcname(Configuration::get('CERTISSIM_'.Tools::strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t\t}\r\n\t}",
"function constants() {\r\n\r\n\t\t\t/**\r\n\t\t\t * Set constant name for the post type name.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_NAME', 'rv-portfolio' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the slug of the plugin.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_SLUG', basename( dirname( __FILE__ ) ) );\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the name for the 'meta_key' value in the 'wp_postmeta' table.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_POSTMETA', 'rv_portfolio' );\r\n\r\n\t\t\t/**\r\n\t\t\t * Set constant path to the plugin directory.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );\r\n\r\n\t\t\t/**\r\n\t\t\t * Set constant path to the plugin URI.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );\r\n\r\n\t\t\t/**\r\n\t\t\t * Set constant DB option field.\r\n\t\t\t *\r\n\t\t\t * @since 1.0.0\r\n\t\t\t */\r\n\t\t\tdefine( 'RV_PORTFOLIO_OPTIONS_NAME', 'rv_portfolio_options' );\r\n\r\n\t\t}",
"public static function values()\n {\n $class = get_called_class();\n\n if (!isset(self::$cache[$class])) {\n $reflected = new \\ReflectionClass($class);\n self::$cache[$class] = $reflected->getConstants();\n }\n\n return self::$cache[$class];\n }",
"static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}",
"public function test_constants($constant, $value)\n {\n }",
"function tep_constant($constant) {\n if (function_exists('constant')) {\n $temp = constant($constant);\n } else {\n eval(\"\\$temp=$constant;\");\n }\n return $temp;\n}",
"function _loadCustom($f_name, $localename)\r\n\t{\r\n\t\t/* custom language file */\r\n\t\t$f = $this->_getFileName();\r\n\t\t$f_custom = str_replace($this->pathFile, $f_name, $f);\r\n\t\t$f_custom = str_replace($this->pathLocale , $localename, $f_custom);\r\n\t\t$f_name = $this->varName.'_'.$f_name;\r\n\t\tif (file_exists($f_custom))\r\n\t\t{\r\n\t\t\tinclude($f_custom);\r\n\t\t\tif (isset(${$this->varName}))\r\n\t\t\t{\r\n\t\t\t\t$this->$f_name = ${$this->varName};\r\n\t\t\t}\r\n# asort($this->$f_name);\r\n\t\t}\r\n\t}",
"public static function getStaticData(){\n\n return array ('weiner', 'pug', 'beast', 'furry');\n }",
"function ms_file_constants()\n {\n }",
"function public_load() {\n\n\t}",
"function loadAsVar($inc) {\n\t$src = PHP_EOL;\n\t\n\tforeach ($inc as $var => $f) {\n\t\tif (!file_exists($f)) throw new Exception('File doesn\\'t exist: '.$f);\n\t\t$fSrc = file_get_contents($f);\n\t\t$addVar = '$'.$var.' = \\''.str_replace('\\'', '\\\\\\'', $fSrc).'\\';';\n\t\t$src .= $addVar.PHP_EOL;\n\t}\n\t\n\treturn $src;\n}",
"private static function getConstants() {\n if (self::$constCacheArray == NULL) {\n self::$constCacheArray = [];\n }\n\n $calledClass = get_called_class();\n \n if (!array_key_exists($calledClass, self::$constCacheArray)) {\n $reflect = new ReflectionClass($calledClass);\n self::$constCacheArray[$calledClass] = $reflect->getConstants();\n }\n\n return self::$constCacheArray[$calledClass];\n }",
"public function isConst();",
"public function load();",
"public function load();",
"public function load();"
] | [
"0.63095534",
"0.6238769",
"0.6179823",
"0.6077702",
"0.5909709",
"0.58986384",
"0.5630229",
"0.56218773",
"0.5448326",
"0.5448326",
"0.5448326",
"0.5448326",
"0.5437693",
"0.54044896",
"0.53656316",
"0.5349921",
"0.53486496",
"0.53486496",
"0.5336277",
"0.5296317",
"0.52891654",
"0.527573",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5264792",
"0.5259641",
"0.52468425",
"0.52195215",
"0.5213808",
"0.5194951",
"0.51919097",
"0.5190004",
"0.5182852",
"0.51799273",
"0.5177816",
"0.5168152",
"0.51538914",
"0.5153165",
"0.51233906",
"0.51066506",
"0.5098696",
"0.5084356",
"0.5078813",
"0.50760156",
"0.5071141",
"0.50686127",
"0.5067189",
"0.50584924",
"0.50485677",
"0.5045795",
"0.50406414",
"0.5039957",
"0.5039296",
"0.503856",
"0.5037272",
"0.50316477",
"0.5030478",
"0.50175995",
"0.50151753",
"0.5009644",
"0.5009581",
"0.5009581",
"0.5009581",
"0.5009461",
"0.50018364",
"0.4989147",
"0.49830604",
"0.49684262",
"0.49667573",
"0.49639928",
"0.49619126",
"0.49510655",
"0.49484587",
"0.49461272",
"0.49427783",
"0.49320439",
"0.49281067",
"0.4913328",
"0.49110577",
"0.49098",
"0.49075326",
"0.4894453",
"0.48937035",
"0.48729292",
"0.48716986",
"0.4867066",
"0.4856513",
"0.4847426",
"0.48462158",
"0.48449796",
"0.48351887",
"0.48185885",
"0.4817266",
"0.4817266",
"0.4817266"
] | 0.5471481 | 8 |
encode id to hash string | public static function hashEncodeInt($id) {
$salt = \Yii::$app->params['hashid.salt'];
$minLength = \Yii::$app->params['hashid.minLength'];
$encodeString = '';
$ha = new Hashids($salt, $minLength);
$encodeString = $ha->encode($id);
return $encodeString;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIdHash() {\n return encrypt( [ 'id' => $this->id ] );\n }",
"private function encode_id( $id ) {\n\t\treturn base64_encode( $id );\n\t}",
"function hashid_encode($data, $name = null)\n {\n return hashid($name)->encode($data);\n }",
"public static function encodeIdAction($id) {\n return base64_encode($id . '#' . Carbon::now());\n }",
"function encode_id (int $id) {\n return base64_encode(config('secure.tokenNumber') * $id);\n }",
"function encodeID($var) {\n\treturn chevereto_id($var, \"encode\");\n}",
"function getHashCode($id) {\n\t\treturn \"x\" . base_convert($id, 10, 36);\n\t}",
"public function hashID()\n {\n return $this->getCleanString(self::$_hash_id_clean);\n }",
"public function getHashAttribute()\n {\n return Hashids::encode($this->attributes['id']);\n }",
"public function encode($id)\n {\n $suff = 0;\n if ($this->PADDING > 0 && !empty($this->SALT)) {\n $suff = $this->getSeed($id, $this->SALT, $this->PADDING);\n\n $id = (int)($suff . $id);\n }\n return $this->numToAlpha($id, $this->CHARSET);\n\n }",
"public static function api_encode_id($id)\n\t{\n\t\t$sid = ($id & 0x0000ff00)<< 16;\n\t\t$sid += (($id & 0xff000000)>> 8)& 0x00ff0000;\n\t\t$sid += ($id & 0x000000ff)<< 8;\n\t\t$sid += ($id & 0x00ff0000)>> 16;\n\t\t$sid ^= 282335;\t//该值定了就不能再改了,否则就出问题了\n\t\treturn $sid;\n\t}",
"public function getHashId()\n {\n $prefixColumn = static::getHashIdPrefixColumn();\n $prefix = $prefixColumn ? $this->model->attributes[$prefixColumn] : null;\n $hashId = app(HashidGenerator::class)->encode($this->model->getKey());\n\n return ($prefix ? $prefix.'-' : '').$hashId;\n }",
"public function getHashIdAttribute($value)\n {\n return Hashids::encode($this->id);\n }",
"function getId($hash) {\n\t\treturn base_convert($hash, 36, 10);\n\t}",
"public function getHashIdentifier() : string;",
"public function encode(string $type, int|string $id): string;",
"public function hashString(){ return $this->ulA->db->ID . \"_\" . $this->ulA->ID . \"_\" . $this->ulB->db->ID . \"_\" . $this->ulB->ID; }",
"public function hash(): string;",
"public function encodeById($id, $settings)\n\t{\n\t\t\n\t\tif ( $settings['length'] ) \n\t\t{\n\t\t\t$length = $settings['length'];\n\t\t\t$this->encoder = new \\Hashids\\Hashids($this->salt, $length, $this->alphabet);\n\t\t}\n\t\t$encodedId = $this->encoder->encode($id);\n\t\treturn $encodedId;\n\t}",
"function chevereto_id($var, $action='encode') {\n\t$base_chars = \"abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"; // DON'T REPEAT A SINGLE CHAR!\n\t\n\tfor ($n = 0; $n<strlen($base_chars); $n++) {\n\t\t$i[] = substr( $base_chars,$n ,1);\n }\n \n $passhash = hash('sha256',__CHV_CRYPT_SALT__);\n $passhash = (strlen($passhash) < strlen($base_chars)) ? hash('sha512',__CHV_CRYPT_SALT__) : $passhash;\n \n for ($n=0; $n < strlen($base_chars); $n++) {\n\t\t$p[] = substr($passhash, $n ,1);\n }\n \n array_multisort($p, SORT_DESC, $i);\n $base_chars = implode($i);\n\t\n\tswitch($action) {\n\t\tcase 'encode':\n\t\t\t$string = '';\n\t\t\t$len = strlen($base_chars);\n\t\t\twhile($var >= $len) {\n\t\t\t\t$mod = bcmod($var, $len);\n\t\t\t\t$var = bcdiv($var, $len);\n\t\t\t\t$string = $base_chars[$mod].$string;\n\t\t\t}\n\t\t\treturn $base_chars[$var] . $string;\n\t\tbreak;\n\t\tcase 'decode':\n\t\t\t$integer = 0;\n\t\t\t$var = strrev($var );\n\t\t\t$baselen = strlen( $base_chars );\n\t\t\t$inputlen = strlen( $var );\n\t\t\tfor ($i = 0; $i < $inputlen; $i++) {\n\t\t\t\t$index = strpos($base_chars, $var[$i] );\n\t\t\t\t$integer = bcadd($integer, bcmul($index, bcpow($baselen, $i)));\n\t\t\t}\n\t\t\treturn $integer;\n\t\tbreak;\n\t}\n}",
"function id_gen($str=''){\n\t$pats = array('/','+');\n\t$subs = array('_','-');\n\treturn str_replace($pats,$subs,substr(base64_encode(md5($str,true)),0,22));\n}",
"public function encode($r_id){\n return $this->cryptomute->encrypt((string) $r_id, 10, true, $this->getPass(), $this->getIV());\n }",
"public function getHashSignedById(): string;",
"private function make_id () {\n // http://sourceforge.net/projects/phunction/\n return sprintf('%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n }",
"public function getHashedId()\n {\n return md5($this->part->id);\n }",
"public function encode($id, $padAfter = 4) {\n $hash = \"\";\n $id = intval(str_pad($id, strlen($id) + $padAfter, '0', STR_PAD_RIGHT));\n\n while($id > 0) {\n $hash = $this->codeSet[$id % $this->base] . $hash;\n $id = floor($id / $this->base);\n }\n\n return $hash;\n }",
"function getHashedId($newId){\r\n return $newId;\r\n}",
"public function hashCode() : string;",
"private static function _build_hash($urtak_id, $question_id) {\r\n\t\t\t$urtak_id = is_null($urtak_id) || !is_numeric($urtak_id) ? 0 : intval($urtak_id);\r\n\t\t\t$question_id = is_null($question_id) || !is_numeric($question_id) ? 0 : intval($question_id);\r\n\r\n\t\t\treturn empty($urtak_id) ? '' : sprintf('#%d-%d', $urtak_id, $question_id);\r\n\t\t}",
"public function getHash(): string;",
"public function getHash(): string;",
"public function getHash(): string;",
"public function getHash(): string;",
"function newTokenEncode($userName,$id)\n\t{\n\t\t$newTokenNum =base64_encode($userName.\"/\".$id);\n\t\treturn $newTokenNum;\n\t}",
"public function hashCode(): string;",
"public function hash();",
"public static function hashObject($obj) : string\n {\n return sodium_bin2hex(sodium_crypto_generichash($obj));\n }",
"public function generarCustomID(){\n return md5(\"$this->id $this->updated_at\");\n }",
"private function computeId(): void\n {\n /** @noinspection JsonEncodingApiUsageInspection */\n $this->id = md5(\n json_encode(\n [\n $this->simulation->id,\n $this->fn,\n $this->useEndpoints,\n $this->usePerturbation,\n collect($this->findByTags)->map(fn($t) => strtolower($t))->sort()->toArray(),\n $this->searchMode\n ]\n )\n );\n }",
"function get_short_id()\n {\n // E.g. 04622F2089E037A5 => 89E037A5\n return enigma_key::format_id($this->id);\n }",
"public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }",
"public function getStrId();",
"abstract public function encode();",
"public static function codeFromId($id)\n\t{\n\n\t\treturn base64_encode(openssl_encrypt($id, \"AES-128-CBC\", User::SECRET, 0, User::SECRET_IV));\n\n\t}",
"public function id()\n {\n if (!$this->_id)\n {\n $id = NULL;\n foreach ($this->assets AS $asset)\n {\n $id .= $asset->get('hash');\n }\n $this->_id = md5($id);\n }\n\n return $this->_id;\n }",
"public function getEncryptedIdAttribute()\n {\n return encrypt_id($this->id);\n }",
"public static function encodIdBit($id, $str = '')\n\t{\n\t\t$strChars = '0123456789abcdef';\n\t\t$arrValue = self::reinterpret_cast($id);\n\t\t\n\t\t$strCode = $strChars[$arrValue[0] >> 4] . $strChars[$arrValue[0] & 15];\n\t\t$strCode .= $strChars[$arrValue[1] >> 4] . $strChars[$arrValue[1] & 15];\n\t\t\n\t\t$intLen = strlen($str);\n\t\tfor ($i = 0; $i < $intLen; ++$i) {\n\t\t\t$intValue = ord($str[$i]);\n\t\t\t$strCode .= $strChars[($intValue >> 4)] . $strChars[($intValue & 15)];\n\t\t}\n\t\t\n\t\t$strCode .= $strChars[$arrValue[2] >> 4] . $strChars[$arrValue[2] & 15];\n\t\t$strCode .= $strChars[$arrValue[3] >> 4] . $strChars[$arrValue[3] & 15];\n\t\t\n\t\treturn $strCode;\n\t}",
"private function keyToId($key) {\n return (int) hexdec(substr(md5($key), 0, 7)) + strlen($key);\n }",
"function make_id($base) {\n\treturn substr(hash('md5', $base . microtime()), 0, 6);\n}",
"function hash_decode($id) {\n $decode = Hashids::decode($id);\n return $decode ? $decode[0] : false;\n}",
"private function hashing() {\n\t\t$data = md5($this->name.$this->date);\n\t\t$data = md5($data);\n\t\t$data = strrev($data);\n\t\t//$data = md5($data);\n\t\t$data = strtoupper($data);\n\t\t//$data = strrev($data);\n\n\t\t$datatemp = NULL;\n\t\tfor($i=0; $i<=strlen($data); $i++) {\n\t\t\t$arr = substr($data, $i, 1);\n\t\t\tif($i == '4' || $i == '8' || $i == '12' || $i == '16' || $i == '20' || $i == '24' || $i == '28' || $i == '32') {\n\t\t\t\t$datatemp .= substr($this->strfinger, ($i/4)-1, 1);\t\n\t\t\t}\n\t\t\t$datatemp .= \"/%\".$this->combine[$arr];\n\t\t}\n\n\t\t$this->resulthashcode = substr($datatemp, 1, strlen($datatemp)-6);\n\t\t$this->result = true;\n\t}",
"protected function _getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\n\t\treturn md5($id);\n\t}",
"public function getPrefixedHashIdAttribute()\n {\n return 'product-' . $this->getHashIdAttribute();\n }",
"public function encode(UuidInterface $uuid): string;",
"protected function fetchIdHash()\n {\n return md5($this->request->server('HTTP_USER_AGENT') . $this->fetchIp());\n }",
"function helperJsKey($table, $id) {\n\t\t$key = substr(hexdec(substr (md5($table) , 0 , 7)), 0, 3).$id;\n\t\treturn $key;\n\t}",
"public function getId()\n {\n return md5(serialize([\n $this->no,\n $this->price,\n $this->weight\n ]));\n }",
"public static function hashCode($_str) {\n\t\treturn str_pad(\n\t\t\tbase_convert(sprintf('%u',crc32($_str)),10,36),7,'0',\n\t\t\t\tSTR_PAD_LEFT\n\t\t);\n\t}",
"public static function generateJournalId() {\n $value = random_bytes(24);\n\n $data = substr(base64_encode($value), 0, 32);\n $data = str_replace(array('+','/','='), array('-','_',''), $data);\n return $data;\n }",
"final public function getHash(): string\n {\n return serialize([\n \\get_class($this),\n $this->acceptedExtension(),\n $this->getJsModule(),\n ]);\n }",
"public function rpIdHash(): string\n {\n return $this->rpIdHash;\n }",
"public function shortHashID($id, $salt = self::SHORT_HASH_SALT)\n {\n require_once(dirname(__FILE__) . '/../vendor/hashids/hashids/lib/Hashids/HashGenerator.php');\n require_once(dirname(__FILE__) . '/../vendor/hashids/hashids/lib/Hashids/Hashids.php');\n\n $hashid = new \\Hashids\\Hashids($salt);\n return $hashid->encode($id);\n }",
"function recordNumberToHashID($newRecordNum) {\n\t// http://www.hashids.org/ \n\t$hashids = new Hashids\\Hashids(theSalt());\n\treturn $hashids->encrypt($newRecordNum);\n}",
"public function encodeBinary(UuidInterface $uuid): string;",
"public static function _awesomeHash($a) {\n $b = 16909125; for ($c=0; $c<strlen($a); $c++) {\n $b ^= (GTB_Helper::charCodeAt(self::HASH_SEED, ($c%87))) ^ (GTB_Helper::charCodeAt($a, $c));\n $b = GTB_Helper::unsignedRightShift($b, 23) | $b << 9;\n }\n return '8'. GTB_Helper::hexEncodeU32($b);\n }",
"public function getHash();",
"public function getCodeHash() {\n $date = new \\DateTime();\n return hexdec($date->format('d-m-y his'));\n }",
"public function keyIdentifier64(): string\n {\n $id = substr($this->keyIdentifier(), -8);\n $c = (ord($id[0]) & 0x0f) | 0x40;\n $id[0] = chr($c);\n return $id;\n }",
"public function __toString(): string\n {\n return $this->getHash();\n }",
"function idfy($name=false){\n if(!$name) $name = uniqid(false, true);\n return 'id'.substr(md5($name),20);\n}",
"protected function getHashKey()\n {\n if (!isset($this->options['prefix'])) {\n return $this->getId();\n }\n\n return $this->options['prefix'] . ':' . $this->getId();\n }",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function decode_id ($id_encoded) {\n return base64_decode($id_encoded) / config('secure.tokenNumber');\n }",
"public function id($hash = true)\r\n {\r\n if (null === $this->id) {\r\n $this->id = uniqid();\r\n\r\n if ($hash) {\r\n $this->id = sha1($this->id);\r\n }\r\n }\r\n\r\n return $this->id;\r\n }",
"public function __toString(): string\n {\n return (string) $this->getHash();\n }",
"public function serialize(){\n return serialize($this->id);\n }",
"protected function calculateKey($id)\n {\n return $this->keyPrefix . md5($id);\n }",
"private function id($length = 10) {\n $key = '';\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for ($i = 0; $i < $length; $i++)\n $key .= $chars[rand(0, strlen($chars) - 1)];\n return $key;\n }",
"public function uniqueId(): string\n {\n return strval($this->user->id);\n }",
"function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\n{\n// Building binary data.\n$bin = sprintf(\n \"%s%s%s%s\",\n pack('N', $timestamp),\n substr(md5($hostname), 0, 3),\n pack('n', $processId),\n substr(pack('N', $id), 1, 3)\n);\n\n// Convert binary to hex.\n$result = '';\nfor ($i = 0; $i < 12; $i++) {\n $result .= sprintf(\"%02x\", ord($bin[$i]));\n}\nreturn $result;\n}",
"public function getId() {\n if ($this->id) {\n return $this->id;\n }\n\n $id = serialize($this->callback->__toString());\n $id .= serialize($this->second);\n $id .= serialize($this->minute);\n $id .= serialize($this->hour);\n $id .= serialize($this->day);\n $id .= serialize($this->month);\n $id .= serialize($this->dayOfWeek);\n $this->id = md5($id);\n\n return $this->id;\n }",
"private function hash($key)\n {\n $const_hash = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';\n\n return base64_encode(pack('H*', sha1($key . $const_hash)));\n }",
"public function keyIdentifier(): string\n {\n return sha1($this->_publicKey->string(), true);\n }",
"function keymaker($id = ''){\n\t\t//look up of info unique to the user or id. It could include date/time to timeout keys.\n\t\t$secretkey='1RuL1HutysK98UuuhDasdfafdCrackThisBeeeeaaaatchkHgjsheIHFH44fheo1FhHEfo2oe6fifhkhs';\n\t\t$key=md5($id.$secretkey);\n\t\treturn $key;\n\t}",
"function generate_unique_id() {\n\t/*\n\tGenerates random binary ID. \n\tReturns the ID.\n\t*/\n\t$onetwo = [\"‍\", \"‌\"];\n\t$uniqueid = '';\n\tfor ($i = 0; $i < 8; $i++) {\n\t\t$uniqueid .= $onetwo[rand(0, 1)];\n\t}\n\n\treturn $uniqueid;\n}",
"public function encode($int)\n {\n if (0 === $int) {\n return $this->alphabet[0];\n }\n\n $str = '';\n while (0 < $int) {\n $remainder = $int % $this->base;\n $str = $str . $this->alphabet[$remainder];\n $int = ($int - $remainder) / $this->base;\n }\n\n return strrev($str);\n }",
"function rockIdString($id) \n { //{{{\n if (is_object($id) && $id instanceof MongoId) {\n return \"rid_object:\" . $id->__toString();\n }\n if (is_object($id)) {\n return \"rid_\" . get_class($id) . \":\" . $id->__toString();\n }\n if (is_scalar($id)) {\n return \"rid_\" . gettype($id) . \":\" . $id;\n }\n return \"rid_mixed:\" . base64_encode(var_export($id, true));\n }",
"public function serialize(){\n return serialize($this->id);\n }",
"public function getUniqueObjectIdentifier();",
"function encode_int($int)\r\n {\r\n return 'i' . $int . 'e';\r\n }",
"public function getHash() {}",
"private static function get_unique_id(){\n\t\tself::$u_id+=1;\n\t\treturn (string) self::$u_id;\n\t}",
"public static function EncodeSHA1($string, $key) {\n $key = sha1($key);\n $strLen = strlen($string);\n $keyLen = strlen($key);\n for ($i = 0; $i < $strLen; $i++) {\n $ordStr = ord(substr($string,$i,1));\n if ($j == $keyLen) { $j = 0; }\n $ordKey = ord(substr($key,$j,1));\n $j++;\n $hash .= strrev(base_convert(dechex($ordStr + $ordKey),16,36));\n }\n return $hash;\n }",
"public function getUniquePublicId() {\r\n\r\n\t\t\t//Seed the random generator\r\n\t\t\tmt_srand($this->makeSeed());\r\n\r\n\t\t\t//Alphanumeric upper/lower array\r\n\t\t\t$alfa = \"1234567890qwrtypsdfghjklzxcvbnm\";\r\n\t\t\t$id = \"\";\r\n\r\n\t\t\t//Loop through and generate the random public id\r\n\t\t\tfor($i = 0; $i < 32; $i ++) {\r\n\t\t\t $id .= $alfa[mt_rand(0, strlen($alfa)-1)];\r\n\t\t\t}\r\n\r\n\t\t\t//If there is a duplicate, run this function recursively\r\n\t\t\tif(!$this->isPublicIdUnique($id)) {\r\n\t\t\t\t$id = $this->getUniquePublicId();\r\n\t\t\t}\r\n\r\n\t\t\t//Return the hash\r\n\t\t\treturn $id;\r\n\t\t}",
"public function encode(array $data): array\n {\n $fields = ['id'];\n foreach($fields as $key) {\n if(isset($data[$key])) {\n $data[$key] = $this->hashids->encode($data[$key]);\n }\n }\n return $data;\n }",
"public static function anchorify(string $id): string {\n\t\treturn SwissKnife::stringToID($id);\n\t}",
"private static function hash($object)\n\t{\n\t\treturn '#' . substr(md5(spl_object_hash($object)), 0, 4);\n\t}",
"public function encode($id, $maxdigits = 8, $grows = false){\n if(!$grows && $id>$max = $this->maxId($maxdigits))\n throw new \\Exception(\"Limit id($id) for $maxdigits digits($max) in JaitecAliasBundle->encode, possible lost of information\");\n $ret = '';\n $aux = $id;\n $bit = 0;\n while(($grows && $aux) || $maxdigits>$bit){\n $a = $aux % $this->n;\n $ret .= substr($this->base[$bit % $this->l],$a,1);\n $aux = ($aux-$a)/$this->n;\n $bit++;\n }\n return $ret;\n }",
"public function generateTicketCode()\n {\n return uniqid($this->ID);\n }",
"public function getUnregisterHash($id) {\n\t\t$salt = Configure::write('unregistration_hash_salt');\n\n \treturn md5($id . $salt);\n }"
] | [
"0.7730453",
"0.772805",
"0.7471882",
"0.7462594",
"0.7402388",
"0.7264607",
"0.7242917",
"0.7193168",
"0.7179232",
"0.7132763",
"0.7087553",
"0.69910973",
"0.69087344",
"0.6888903",
"0.6871193",
"0.67771757",
"0.67180806",
"0.6675878",
"0.6599424",
"0.65475595",
"0.65045196",
"0.64665264",
"0.64514846",
"0.6443208",
"0.64411944",
"0.64274925",
"0.6392448",
"0.6373918",
"0.6360641",
"0.63486415",
"0.63486415",
"0.63486415",
"0.63486415",
"0.6329965",
"0.6325443",
"0.6279652",
"0.6242073",
"0.62293607",
"0.61782867",
"0.61568516",
"0.6122829",
"0.6114926",
"0.61046153",
"0.60838914",
"0.60811526",
"0.6074884",
"0.60689974",
"0.60526145",
"0.6042907",
"0.6031805",
"0.6022225",
"0.601701",
"0.6005461",
"0.5990276",
"0.5985762",
"0.59788126",
"0.5963207",
"0.59627485",
"0.59594715",
"0.5951399",
"0.5934219",
"0.59329283",
"0.59294206",
"0.5923355",
"0.5914676",
"0.59041375",
"0.58956355",
"0.58911693",
"0.58832085",
"0.5880634",
"0.5856406",
"0.5852313",
"0.5847905",
"0.5837202",
"0.581973",
"0.5818934",
"0.58146966",
"0.5813891",
"0.58095664",
"0.58068806",
"0.5805519",
"0.5799234",
"0.5797969",
"0.57882106",
"0.5782684",
"0.578073",
"0.57791877",
"0.57707685",
"0.5770654",
"0.5767058",
"0.5757976",
"0.57459843",
"0.5715395",
"0.57079875",
"0.5707768",
"0.5706619",
"0.5702618",
"0.56915057",
"0.56893027",
"0.5678435"
] | 0.7815603 | 0 |
string split for all encode | function mb_str_split($str){
return preg_split('/(?<!^)(?!$)/u', $str );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function strSplit($string, $encoding = 'UTF-8') {}",
"private function multi_byte_string_to_array()\n {\n $this->strings = array_values(\n array_filter(\n preg_split(\"//u\",$this->string),\n \"strlen\"\n )\n );\n }",
"public function splitCharCodes($charCodes);",
"public function splitCharCodes($charCodes) {}",
"public function splitCharCodes($charCodes) {}",
"public static function splitStrUtf8($str,$l = 0) \r\n {\r\n if($l > 0) {\r\n $ret = array();\r\n $len = mb_strlen($str, \"UTF-8\");\r\n for ($i = 0; $i < $len; $i += $l) {\r\n $ret[] = mb_substr($str, $i, $l, \"UTF-8\");\r\n }\r\n return $ret;\r\n }\r\n return preg_split(\"//u\", $str, -1, PREG_SPLIT_NO_EMPTY);\r\n }",
"function mb_str_split( $string ) {\n # and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string );\n }",
"function str_split_unicode($str, $l = 0) {\r\n if ($l > 0) {\r\n $ret = array();\r\n $len = mb_strlen($str, \"UTF-8\");\r\n for ($i = 0; $i < $len; $i += $l) {\r\n $ret[] = mb_substr($str, $i, $l, \"UTF-8\");\r\n }\r\n return $ret;\r\n }\r\n return preg_split(\"//u\", $str, -1, PREG_SPLIT_NO_EMPTY);\r\n }",
"function mb_str_split( $string ) {\n # and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string );\n}",
"function mb_str_split($string) {\n // and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string);\n}",
"public static function mb_str_split($str,$split_length=1,$charset=\"UTF-8\"){\n if(func_num_args()==1){\n return preg_split('/(?<!^)(?!$)/u', $str);\n }\n if($split_length<1)return false;\n $len = mb_strlen($str, $charset);\n $arr = array();\n for($i=0;$i<$len;$i+=$split_length){\n $s = mb_substr($str, $i, $split_length, $charset);\n $arr[] = $s;\n }\n return $arr;\n }",
"function l10n_feedback_unpack_string($string) {\n return explode(\"\\0\", $string);\n}",
"function text_split($in) {\r\n\t$len = count($in);\r\n\t$a = substr($in,0,$len/2);\r\n\t$b = substr($in,0,(0-($len/2)));\r\n\treturn array($a,$b);\r\n}",
"protected function explode()\n {\n $this->checkJMBG();\n\n $arr = str_split($this->jmbg);\n return array('A' => $arr[0], 'B' => $arr[1], 'C' => $arr[2], 'D' => $arr[3], 'E' => $arr[4], 'F' => $arr[5], 'G' => $arr[6], 'H' => $arr[7], 'I' => $arr[8], 'J' => $arr[9], 'K' => $arr[10], 'L' => $arr[11], 'M' => $arr[12]);\n }",
"private function mb_str_split( $string )\n {\n # and not before the end: $\n return preg_split('/(?<!^)(?!$)/u', $string );\n }",
"function qr_split($qr){\n\t$arr = array();\n\n\t$acc = NULL;\n\tfor($i = 0; $i < strlen($qr); $i++){\n\t\t$ch = $qr[$i];\n\n\t\tif(is_separator($ch)){\n\t\t\t// pokud je to separator, je nutno oddelit\n\t\t\tif(!empty($acc)){\n\t\t\t\tarray_push($arr, $acc);\n\t\t\t\t$acc = NULL;\n\t\t\t}\n\n\t\t\tif(is_operator($ch))\n\t\t\t\tarray_push($arr, $ch);\n\t\t\telse if($ch == '\"'){\n\t\t\t\t$str = $ch;\n\t\t\t\tfor($i = $i+1; $i < strlen($qr); $i++){\n\t\t\t\t\t$ch = $qr[$i];\n\n\t\t\t\t\tif($ch != '\"'){\n\t\t\t\t\t\t$str .= $ch;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$str .= $ch;\n\t\t\t\t\t\tarray_push($arr, $str);\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}\n\t\telse {\n\t\t\t$acc .= $ch;\n\t\t}\n\t}\n\tif(!empty($acc))\n\t\tarray_push($arr, $acc);\n\treturn $arr;\n}",
"function utf8_split($str, $split_length = 1) {\n if ($split_length < 1) {\n return FALSE;\n }\n $chunks = array();\n $chunk = '';\n $chunkLength = 0;\n $bytesNeeded = 0;\n $bytesSeen = 0;\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $char = '';\n for ($pos = 0, $length = strlen($str); $pos < $length; $pos++) {\n $byte = ord($str[$pos]);\n if ($bytesNeeded == 0) {\n if ($byte >= 0x00 and $byte <= 0x7F) {\n $chunk .= $str[$pos];\n $chunkLength++;\n } elseif ($byte >= 0xC2 and $byte <= 0xDF) {\n $bytesNeeded = 1;\n } elseif ($byte >= 0xE0 and $byte <= 0xEF) {\n if ($byte == 0xE0) {\n $lowerBoundary = 0xA0;\n }\n if ($byte == 0xED) {\n $upperBoundary = 0x9F;\n }\n $bytesNeeded = 2;\n } elseif ($byte >= 0xF0 and $byte <= 0xF4) {\n if ($byte == 0xF0) {\n $lowerBoundary = 0x90;\n }\n if ($byte == 0xF4) {\n $upperBoundary = 0x8F;\n }\n $bytesNeeded = 3;\n } else {\n $utf8 .= UTF8_REPLACEMENT_CHARACTER;\n }\n $char = $str[$pos];\n } elseif ($byte < $lowerBoundary or $byte > $upperBoundary) {\n $char = '';\n $codepoint = 0;\n $bytesNeeded = 0;\n $bytesSeen = 0;\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $chunk .= UTF8_REPLACEMENT_CHARACTER;\n $chunkLength++;\n if ($errors !== null) $errors[] = $pos;\n $pos--;\n } else {\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $bytesSeen++;\n $char .= $str[$pos];\n if ($bytesSeen == $bytesNeeded) {\n $chunk .= $char;\n $chunkLength++;\n $char = '';\n $bytesNeeded = 0;\n $bytesSeen = 0;\n }\n }\n if ($chunkLength === $split_length) {\n $chunks[] = $chunk;\n $chunkLength = 0;\n $chunk = '';\n }\n }\n if ($bytesNeeded > 0) {\n $chunk .= UTF8_REPLACEMENT_CHARACTER;\n $chunkLength++;\n if ($errors !== null) $errors[] = $length;\n }\n if ($chunkLength > 0) {\n $chunks[] = $chunk;\n }\n return $chunks;\n}",
"function chars($options = array()){\n\t\t$options += array(\n\t\t\t\"stringify\" => false,\n\t\t);\n\n\t\tif($this->length()===0){ return array(); }\n\n\t\t$u = $this->getEncoding(true)===\"utf8\" ? \"u\" : \"\";\n\t\t$chars = preg_split(\"//s$u\",$this->_String4,-1,PREG_SPLIT_NO_EMPTY);\n\t\tif($chars === false){\n\t\t\t$chars = str_split($this->_String4);\n\t\t}\n\n\t\tif($options[\"stringify\"]){\n\t\t\treturn $chars;\n\t\t}\n\n\t\t$out = array();\n\t\tforeach($chars as $ch){\n\t\t\t$out[] = $this->_copy($ch);\n\t\t}\n\t\treturn $out;\n\t}",
"function arr_split_zh($tempaddtext = ''){\n //$tempaddtext = iconv(\"UTF-8\", \"gb2312\", $tempaddtext);\n $cind = 0;\n $arr_cont=array();\n $tmp_en='';\n for($i=0;$i<strlen($tempaddtext);$i++)\n {\n if(strlen(substr($tempaddtext,$cind,1)) > 0){\n if(ord(substr($tempaddtext,$cind,1)) < 0xA1 ){ //如果为英文则取1个字节\n $tmp_en.=substr($tempaddtext,$cind,1);\n if((strlen(substr($tempaddtext,$cind+1,1)) <= 0) || (ord(substr($tempaddtext,$cind+1,1)) > 0xA1)){\n array_push($arr_cont,$tmp_en);\n $tmp_en='';\n }\n $cind++;\n }else{\n array_push($arr_cont,substr($tempaddtext,$cind,2));\n $cind+=2;\n }\n }\n }\n return $arr_cont;\n }",
"public static function _split($input)\n {\n $plit = preg_split('#\\\\e[[][A-Za-z0-9];?[0-9]*m(*SKIP)(*F)|#u', $input, -1, PREG_SPLIT_NO_EMPTY);\n\n if (false === $plit) {\n return mb_str_split($input);\n }\n\n return $plit;\n }",
"function uri_safe_batch_decode($str, $delimiter = '|', $hexify = TRUE)\n{\n\t$str = uri_safe_decode($str, $hexify);\n\t$tmp = explode($delimiter, $str);\n\t$params = array();\n\tforeach($tmp as $val)\n\t{\n\t\t$key_val = explode('/', $val);\n\t\tif (count($key_val) >= 2)\n\t\t{\n\t\t\tif (strncmp($key_val[1], '??', 2) === 0)\n\t\t\t{\n\t\t\t\t$key_val[1] = unserialize(substr($key_val[1], 2));\n\t\t\t}\n\t\t\t$params[$key_val[0]] = $key_val[1];\n\t\t}\n\t}\n\treturn $params;\n}",
"public function testSplit2()\n {\n $this->assertEquals(Str::split('', '1,2,3,4,5'), '1,2,3,4,5');\n }",
"function separate($str)\n\t{\n\t\t$arr = array();\n\t\t$flag = 0;\n\t\tfor($i = 0; $i < strlen($str)-3; ++$i)\n\t\t{\n\t\t\tif(substr($str, $i, 5) == \"<br/>\")\n\t\t\t{\n\t\t\t\t//echo \"fuck\";\n\t\t\t\t$arrData1 = substr($str, 0, $i);\n\t\t\t\t$arrData2 = substr($str, $i + 5, strlen($str) - $i - 4);\n\t\t\t\tif($arrData2 == null)continue;\n\t\t\t\tarray_push($arr, $arrData1);\n\t\t\t\tarray_push($arr, $arrData2);\n\t\t\t\t$flag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ($flag ? $arr : $str);\n\t}",
"abstract public static function decode($string): array;",
"function wp_kses_split($content, $allowed_html, $allowed_protocols)\n {\n }",
"public function getEncoded();",
"private static function goodSplit($str, $split) {\n $arr = array_map('trim', explode($split, $str));\n $retVal = array();\n\n $opened_brackets = 0;\n $total = '';\n foreach( $arr as $el ) {\n $total .= $el . $split;\n $opened_brackets += substr_count($el, '<');\n $opened_brackets -= substr_count($el, '>');\n if ( $opened_brackets == 0 ) {\n $retVal[] = rtrim($total, $split);\n $total = '';\n }\n }\n\n return $retVal;\n }",
"function get_html_split_regex()\n {\n }",
"public static function splitStringToCourseCode($str) {\n $str = trim($str);\n $parent = \"\";\n $child = \"\";\n $arr = [];\n preg_match('/^[a-zA-Z]+/',$str, $arr);\n if(sizeof($arr)>0){\n $parent = $arr[0];\n }else{\n $arr[0] = \"\";\n }\n $child = substr($str, strlen($parent));\n $arr[1] = $child;\n return $arr;\n }",
"private function str2charArray($str) {\n\t\treturn preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);\n\t}",
"public function asArray() : array\n {\n return str_split($this->string);\n }",
"function wp_kses_split2($content, $allowed_html, $allowed_protocols)\n {\n }",
"function normalizeParameters( $input, $delimiter, $count ) {\n # Split the parameters into an array\n $params = explode( $delimiter, $input );\n $output = array();\n for ( $i = 0 ; $i < $count ; $i++ ) {\n $output[] = str_replace(\"\\x07\", $delimiter, ($i < count($params)) ? trim($params[$i]) : '');\n }\n return $output ;\n}",
"public function split($raw)\n {\n // real dirty, hrhr but works\n $raw = ' '.$raw;\n\n // clean old tokens\n $this->tokens = [];\n $this->tokens[] = array(1,'');\n\n $regex = '/(' .\n implode(')|(', $this->catchablePatterns) . ')|'.\n implode('|', $this->nonCatchablePatterns) . '/i';\n\n $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;\n // PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE\n\n $this->rawMatches = preg_split($regex, $raw, -1, $flags);\n\n $this->createTokens();\n\n //if (DEBUG)\n // Debug::console('raw input: ' , $raw);\n\n //if (DEBUG)\n // Debug::console('created tokens: ' , $this->tokens);\n\n }",
"function splitString($str, $partition)\n{\n /**\n * This would look better with simple foreach\n **/\n return array_reduce($partition, function($c, $p)\n {\n return [\n 'l' => array_merge($c['l'], [substr($c['s'], 0, $p)]),\n 's' => substr($c['s'], $p)\n ];\n },\n [\n 'l' => [],\n 's' => $str\n ]\n )['l'];\n}",
"public static function mbStrSplit(string $string)\n {\n return \\preg_split('/(?<!^)(?!$)/u', $string);\n }",
"private static function strToArray($nvp)\r\n\t {\r\n\t\t $temp_array = array();\r\n\t\t $nvp = explode('&' , trim($nvp , '&'));\r\n\t\t foreach($nvp as $value)\r\n\t\t {\r\n if (empty($value)) continue;\r\n\t\t\t $temp_array2 = explode('=' , $value);\r\n\t\t\t if (empty($temp_array2[1])) continue;\r\n\t\t\t $temp_array[$temp_array2[0]] = $temp_array2[1];\r\n\t\t }\r\n\t\t return $temp_array;\r\n\t }",
"function multiexplode($data)\n{\n $delimiters=array(\",\",\"-\",\"()\",\"(\",\")\",\",\",\"{\",\"}\",\"|\",\">\",\"'\",\" \",\"=\",\"%\",\">\",\"<\",\"'\",\" /\",\";\",\".\",\""\");\n $data=str_replace('\"', ',', $data);\n $data=stripslashes($data);\n $quotedata=str_replace('\"',\"\", $data);\n\t$MakeReady = str_replace($delimiters, $delimiters[0], $quotedata);\n\t$Return = explode($delimiters[0], $MakeReady);\n\treturn $Return;\n}",
"static function chunkSplitUnicode($str, $l = 76, $e = \"\\r\\n\")\n {\n $tmp = array_chunk(\n preg_split(\"//u\", $str, -1, PREG_SPLIT_NO_EMPTY), $l\n );\n $str = \"\";\n foreach ($tmp as $t) {\n $str .= join(\"\", $t) . $e;\n }\n return $str;\n }",
"public static function decode($data)\n {\n return explode(\"\\x00\", base64_decode($data), 2);\n }",
"protected static function utf8Encoding($text)\n {\n $encoding = array();\n\n $chars = str_split($text);\n\n $countChars = count($chars);\n\n for ($i = 0; $i < $countChars; ++$i) {\n $temp = $chars[$i];\n\n $ord = ord($chars[$i]);\n\n switch (true) {\n case $ord > 251:\n $temp .= $chars[++$i];\n // no break\n case $ord > 247:\n $temp .= $chars[++$i];\n // no break\n case $ord > 239:\n $temp .= $chars[++$i];\n // no break\n case $ord > 223:\n $temp .= $chars[++$i];\n // no break\n case $ord > 191:\n $temp .= $chars[++$i];\n // no break\n }\n\n $encoding[] = $temp;\n }\n\n return $encoding;\n }",
"protected function _decode($encoded)\n {\n $decoded = array();\n // find the Punycode prefix\n if(!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded))\n {\n $this->_error('This is not a punycode string');\n return false;\n }\n $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded);\n // If nothing left after removing the prefix, it is hopeless\n if(!$encode_test)\n {\n $this->_error('The given encoded string was empty');\n return false;\n }\n // Find last occurence of the delimiter\n $delim_pos = strrpos($encoded, '-');\n if($delim_pos > strlen($this->_punycode_prefix))\n {\n for($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k)\n {\n $decoded[] = ord($encoded{$k});\n }\n }\n $deco_len = count($decoded);\n $enco_len = strlen($encoded);\n \n // Wandering through the strings; init\n $is_first = true;\n $bias = $this->_initial_bias;\n $idx = 0;\n $char = $this->_initial_n;\n \n for($enco_idx = ($delim_pos)? ($delim_pos + 1) :0; $enco_idx < $enco_len; ++$deco_len)\n {\n for($old_idx = $idx, $w = 1, $k = $this->_base; 1; $k += $this->_base)\n {\n $digit = $this->_decode_digit($encoded{$enco_idx ++});\n $idx += $digit * $w;\n $t = ($k <= $bias)? $this->_tmin :(($k >= $bias + $this->_tmax)? $this->_tmax :($k - $bias));\n if($digit < $t)\n break;\n $w = (int)($w * ($this->_base - $t));\n }\n $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first);\n $is_first = false;\n $char += (int)($idx / ($deco_len + 1));\n $idx %= ($deco_len + 1);\n if($deco_len > 0)\n {\n // Make room for the decoded char\n for($i = $deco_len; $i > $idx; $i --)\n $decoded[$i] = $decoded[($i - 1)];\n }\n $decoded[$idx ++] = $char;\n }\n return $this->_ucs4_to_utf8($decoded);\n }",
"protected static function __split(string $on, string $str): array\n\t{\n\t\tif ($on === '') {\n\t\t\treturn str_split($str);\n\t\t}\n\t\treturn array_filter(explode($on, $str));\n\t}",
"public function split()\n {\n return preg_split('/(?=[A-Z])/', $this->className);\n }",
"function splitvalues($str)\n{\n\t$arr=array();\n\tif($str==\"\")\n\t{\n\t\t$arr[] = \"\";\n\t\treturn $arr;\n\t}\n\t$start=0;\n\t$i=0;\n\t$inquot=false;\n\twhile($i<=strlen($str))\n\t{\n\t\tif($i<strlen($str) && substr($str,$i,1)=='\"')\n\t\t\t$inquot=!$inquot;\n\t\telse if($i==strlen($str) || !$inquot && substr($str,$i,1)==',')\n\t\t{\n\t\t\t$val=substr($str,$start,$i-$start);\n\t\t\t$start=$i+1;\n\t\t\tif(strlen($val) && substr($val,0,1)=='\"')\n\t\t\t{\n\t\t\t\t$val=substr($val,1,strlen($val)-2);\n\t\t\t\t$val=str_replace('\"\"','\"',$val);\n\t\t\t}\n\t\t\t\n\t\t\tif( $val !== FALSE )\n\t\t\t$arr[]=$val;\n\t\t}\n\t\t$i++;\n\t}\n\treturn $arr;\n}",
"function explodeCaps(string $string):string\n{\n $pieces = preg_split('/(?=[A-Z])/',$string);\n return $pieces;\n}",
"function str_to_array($str,$key){\n\t\t//remove the . from last line\n\t\t$str = trim($str,'.');\n\t\treturn explode($key,$str);\n\t}",
"public function str_split_unicode($str, $length = 1) {\n\n $tmp = preg_split('~~u', $str, -1, PREG_SPLIT_NO_EMPTY);\n\n if ($length > 1) {\n $chunks = array_chunk($tmp, $length);\n foreach ($chunks as $i => $chunk) {\n $chunks[$i] = join('', (array) $chunk);\n }\n $tmp = $chunks;\n }\n\n return $tmp;\n\n }",
"function splitPhrase(){\n $split = array();\n if(strpos($this->text, ' ')!= false){\n $split[0] = substr($this->text, 0, strpos($this->text, ' '));\n $split[1] = substr($this->text, strpos($this->text, ' '));\n }else{\n $split[0] = $this->text;\n $split[1] = \"\";\n }\n return $split;\n }",
"function tuti_fexplode($args)\n{\n\t$str=$args[\"str\"];\t\t//строка\n\t$sep=$args[\"sep\"];\t\t//разделитель\n\t$lim=$args[\"lim\"];\t\t//ограничитель в рамках которого не действует разделитель\n\t\n\t$state_1=true;\n\t$state_2=false;\n\t$state_1_new=true;\n\t$state_2_new=false;\n\t\n\t$i=0;\n\t$str_len=strlen($str);\n\t$ch='';\n\t$ch_prev='';\n\t$ch_prev_prev='';\n\t$ch_next='';\n\t$ch_next_next='';\n\t\n\t$str_part_arr=Array();\n\t$str_part=\"\";\n\t\n\t//pj_deb_flog3(__LINE__, __FILE__, $str_len, \"tkvl3_explode\");\n\t\n\twhile($i<$str_len)\n\t{\n\t\t\n\t\t$ch=$str[$i];\n\t\t$ch_prev=$i>0?$str[$i-1]:'';\n\t\t$ch_prev_prev=$i>1?$str[$i-2]:'';\n\t\t$ch_next=$i<$str_len?$str[$i+1]:'';\n\t\t$ch_next_next=$i+1<$str_len?$str[$i+2]:'';\n\t\t\n\t\t//pj_deb_flog3(__LINE__, __FILE__, $ch, \"tkvl3_explode\");\n\t\t//pj_deb_flog3(__LINE__, __FILE__, $str_part, \"tkvl3_explode\");\n\t\t//pj_deb_flog3(__LINE__, __FILE__, $str_part_arr, \"tkvl3_explode\");\n\t\t\n\t\t\n\t\tif ($state_1&&$ch==$sep)\n\t\t{\n\t\t\t//pj_deb_flog3(__LINE__, __FILE__, $sep, \"tkvl3_explode\");\n\t\t\tif (strlen($str_part)>0)\n\t\t\t{\n\t\t\t\tarray_push($str_part_arr, $str_part);\n\t\t\t\t$str_part=\"\";\n\t\t\t}\n\t\t}\n\t\tif ($ch==$lim&&$state_1)//&&!$state_2)\n\t\t{\n\t\t\t//pj_deb_flog3(__LINE__, __FILE__, $str_part, \"tkvl3_explode\");\n\t\t\t$state_1_new=false;\n\t\t\t//$state_2_new=true;\n\t\t}\n\t\tif (!$state_1&&$ch==$lim)//&&!$state_2)\n\t\t{\n\t\t\t//pj_deb_flog3(__LINE__, __FILE__, $str_part, \"tkvl3_explode\");\n\t\t\t$state_1_new=true;\n\t\t}\n\t\t//if ($ch==\"\\\\\"&&!$state_1)\n\t\t//{\n\t\t//\t$state_2_new=true;\n\t\t//}\n\t\t//if ($state_2)\n\t\t//{\n\t\t//\t$state_2_new=false;\n\t\t//}\n\t\t\n\t\tif ($ch!=$sep)//&&!$state_2_new)\n\t\t{\n\t\t\t//pj_deb_flog3(__LINE__, __FILE__, \"df\".$str_part, \"tkvl3_explode\");\n\t\t\t$str_part.=$ch;\n\t\t}\n\t\tif (!$state_1&&$ch==$sep)//&&!$state_2_new)\n\t\t{\n\t\t\t//pj_deb_flog3(__LINE__, __FILE__, \"123\".$str_part, \"tkvl3_explode\");\n\t\t\t$str_part.=$ch;\n\t\t}\n\t\t\n\t\t$state_1=$state_1_new;\n\t\t$state_2=$state_2_new;\n\t\t\n\t\t$i++;\n\t}\n\t\n\t//pj_deb_flog3(__LINE__, __FILE__, $str_part, \"tkvl3_explode\");\n\t//pj_deb_flog3(__LINE__, __FILE__, $str_part_arr, \"tkvl3_explode\");\n\t\n\tif (strlen($str_part)>0)\n\t{\n\t\tarray_push($str_part_arr, $str_part);\n\t}\n\t//pj_deb_flog3(__LINE__, __FILE__, $str_part_arr, \"tkvl3_explode\");\n\t\n\treturn $str_part_arr;\n\t\n}",
"public function getArrSplit(){ //true\r\n\r\n\t\t$arrSplit = array(\r\n\t\t\t\"none\" => \"No Split\",\r\n\t\t\t\"chars\" => \"Char Based\",\r\n\t\t\t\"words\" => \"Word Based\",\r\n\t\t\t\"lines\" => \"Line Based\"\r\n\t\t);\r\n\r\n\t\treturn($arrSplit);\r\n\t}",
"function split_number_str($string)\n{\n return (array) preg_split('/(?<=\\d)(?=[a-z])|(?<=[a-z])(?=\\d)/i', $string);\n}",
"function arrayLetras($texto){\n $texto = strtolower($texto); \n return str_split($texto);\n}",
"function mbStringToArray($string) {\n $strlen = mb_strlen($string);\n while ($strlen) {\n $array[] = mb_substr($string, 0, 1, \"UTF-8\");\n $string = mb_substr($string, 1, $strlen, \"UTF-8\");\n $strlen = mb_strlen($string);\n }\n return $array;\n}",
"function superExplode($s, $sep)\n\t{\t$i = 0;\n\t\t$arr[$i++] = strtok($s, $sep);\n\t\twhile (($token = strtok($sep)) !== FALSE)\n\t\t\t$arr[$i++] = $token;\n\t\treturn $arr;\n\t}",
"function split_tracking_codes($donation){\t\t\n\t\t$conversions = array(\n\t\t\t'gl' => 'gl',\n\t\t\t'campaign' => 'campaign',\t\n\t\t\t'sol' => 'solicit_code',\n\t\t\t'source' => 'solicit_code',\n\t\t\t'solicit_code' => 'solicit_code',\n\t\t\t'sub_sol' => 'sub_solicit_code',\n\t\t\t'sub_solicit_code' => 'sub_solicit_code'\n\t\t);\n\t\t$tracking_codes = array();\n\t\t$split_tracking_codes = explode('&', urldecode($donation->dump));\n\t\tforeach($split_tracking_codes as $postvar){\n\t\t\t$code = explode('=', $postvar);\n\t\t\tif( isset($conversions[strtolower($code[0])]) ){\n\t\t\t\t$tracking_codes[$conversions[strtolower($code[0])]] = (isset($code[1]) ? $this->clean_string($code[1]) : '');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tracking_codes[$this->clean_string($code[0])] = (isset($code[1]) ? $this->clean_string($code[1]) : '');\n\t\t\t}\n\t\t}\n\t\treturn $tracking_codes;\n\t}",
"abstract function encode($s);",
"public static function split($str)\r\n {\r\n return array_map('trim', preg_split('/[,;|]/',$str,0,PREG_SPLIT_NO_EMPTY));\r\n }",
"public function splitUri()\n\t{\n\t\tif ($this->uriString != '')\n\t\t{\n\t\t\tif (getConfigItem('switchToQueryString') == FALSE)\n\t\t\t{\n\t\t\t\t$_tempVal = explode('/', $this->uriString);\n\n\t\t\t\tforeach ($_tempVal as $val)\n\t\t\t\t{\n\t\t\t\t\t$val = $this->validateUri($val);\n\t\t\t\t\t\n\t\t\t\t\tif ($val != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->splittedUriString[] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}",
"function fusion_string_to_array( $string ) {\n\n\t// If already an array, return early.\n\tif ( is_array( $string ) ) {\n\t\treturn $string;\n\t}\n\n\t$string = stripslashes( $string );\n\n\tif ( empty( $string ) ) {\n\t\treturn false;\n\t}\n\n\t$result = [];\n\t$pairs = explode( '&', $string );\n\n\tforeach ( $pairs as $key => $pair ) {\n\t\t// Use the original parse_str() on each element.\n\t\tparse_str( $pair, $params );\n\n\t\t$k = key( $params );\n\n\t\tif ( ! isset( $result[ $k ] ) ) {\n\t\t\t$result += $params;\n\t\t} else {\n\t\t\t$result[ $k ] = fusion_array_merge_recursive( $result[ $k ], $params[ $k ] );\n\t\t}\n\t}\n\n\treturn $result;\n}",
"public static function split_str($input, $delimiter = ',', $enclosure = '\"', $escape = '\\\\', $eol = '\\n') {\n\t\tif (function_exists('str_getcsv')) {\n\t\t\treturn str_getcsv($input, $delimiter, $enclosure, $escape);\n\t\t}\n\t\t$output = array();\n\t\t$tmp = preg_split(\"/\".$eol.\"/\", $input);\n\t\tif (is_array($tmp) && !empty($tmp)) {\n\t\t\twhile (list($line_num, $line) = each($tmp)) {\n\t\t\t\tif (preg_match(\"/\".$escape.$enclosure.\"/\", $line)) {\n\t\t\t\t\twhile ($strlen = strlen($line)) {\n\t\t\t\t\t\t$pos_delimiter = strpos($line, $delimiter);\n\t\t\t\t\t\t$pos_enclosure_start = strpos($line, $enclosure);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tis_int($pos_delimiter) && is_int($pos_enclosure_start)\n\t\t\t\t\t\t\t\t&& ($pos_enclosure_start < $pos_delimiter)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$enclosed_str = substr($line,1);\n\t\t\t\t\t\t\t$pos_enclosure_end = strpos($enclosed_str, $enclosure);\n\t\t\t\t\t\t\t$enclosed_str = substr($enclosed_str, 0, $pos_enclosure_end);\n\t\t\t\t\t\t\t$output[$line_num][] = $enclosed_str;\n\t\t\t\t\t\t\t$offset = $pos_enclosure_end + 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (empty($pos_delimiter) && empty($pos_enclosure_start)) {\n\t\t\t\t\t\t\t\t$output[$line_num][] = substr($line, 0);\n\t\t\t\t\t\t\t\t$offset = strlen($line);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$output[$line_num][] = substr($line, 0, $pos_delimiter);\n\t\t\t\t\t\t\t\t$offset = (\n\t\t\t\t\t\t\t\t\t\t!empty($pos_enclosure_start)\n\t\t\t\t\t\t\t\t\t\t&& ($pos_enclosure_start < $pos_delimiter)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t? $pos_enclosure_start\n\t\t\t\t\t\t\t\t: $pos_delimiter + 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$line = substr($line, $offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$line = preg_split(\"/\".$delimiter.\"/\", $line);\n\t\t\t\t\t// Validating against pesky extra line breaks creating false rows.\n\t\t\t\t\tif (is_array($line) && !empty($line[0])) {\n\t\t\t\t\t\t$output[$line_num] = $line;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $output;\n\t\t}\n\t\treturn false;\n\t}",
"public function provideCharacterSetStrings() {\n yield ['Iñtërnâtiônàlizætiøn', 20];\n yield ['ABC 123', 7];\n yield ['', 0];\n }",
"public function splitText($text)\n\t{\n\t\treturn preg_split('@([<\\[]\\/?[a-zA-Z0-9]+[\\]>])@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);\n\t}",
"function strToArray(&$string, &$array){\r\n $array = explode(\"\\n\", $string);\r\n }",
"function newTokenDecode($token)\n\t{\n\t\t$newTokenNum =base64_decode($token);\n\t\t$userArray = explode(\"/\",$newTokenNum);\n\t\treturn $userArray;\n\t}",
"public static function strOrds($a) {\n $b = array();\n $a = mb_convert_encoding($a,\"UCS-4BE\",\"UTF-8\");\n for ($i=0; $i<mb_strlen($a,\"UCS-4BE\"); $i++) {\n // Now we have 4 bytes. Find their total numeric value.\n $c = unpack(\"N\", mb_substr($a,$i,1,\"UCS-4BE\"));\n $b[] = $c[1]; }\n return $b;\n }",
"public function deHSCentitiesReturnsDecodedStringDataProvider() {}",
"function decode($string);",
"protected final function _explodeString8($value, $limit = null)\n {\n return preg_split(\"/\\\\x00/\", $value, $limit);\n }",
"public function deformatNVP($smsstr){ \n \n $intial=0; \n $smsArray = array(); \n \n \n while(strlen($smsstr)){ \n //postion of Key \n $keypos= strpos($smsstr,'='); \n //position of value \n $valuepos = strpos($smsstr,'&') ? strpos($smsstr,'&'): strlen($smsstr); \n \n /*getting the Key and Value values and storing in a Associative Array*/ \n $keyval=substr($smsstr,$intial,$keypos); \n $valval=substr($smsstr,$keypos+1,$valuepos-$keypos-1); \n //decoding the respose \n $smsArray[urldecode($keyval)] =urldecode( $valval); \n $smsstr=substr($smsstr,$valuepos+1,strlen($smsstr)); \n } \n return $smsArray; \n }",
"private function parseKey($key)\n {\n return preg_split('/\\./', $key, 2);\n }",
"function convert_basic_array($string, $delimitor, $separator)\n{\n\t$the_array = array();\n\t$row = explode($delimitor, $string);\n\tforeach($row AS $item)\n\t{\n\t\t$the_value = htmlentities(trim(strstr($item, $separator), $separator));\n\t\t\n\t\t$check_array = explode('**',$the_value);\n\t\tif(in_array('drillevent', $check_array))\n\t\t{\n\t\t\t$check_array[array_search('drillevent',$check_array)] = 'drillevent=';\n\t\t\t$the_value = implode('**', $check_array);\n\t\t}\n\t\t\n\t\tif($the_value == '_')\n\t\t{\n\t\t\t$the_value = '';\n\t\t}\n\t\t\n\t\t$the_array[strstr($item, $separator, TRUE)] = $the_value;\n\t}\n\t\n\treturn $the_array;\n}",
"protected function boundrySplit($input, $boundary) {\n $parts = [];\n $bs_possible = Unicode::substr($boundary, 2, -2);\n $bs_check = '\\\"' . $bs_possible . '\\\"';\n\n if ($boundary == $bs_check) {\n $boundary = $bs_possible;\n }\n\n $tmp = explode('--' . $boundary, $input);\n\n for ($i = 1; $i < count($tmp); $i++) {\n if (trim($tmp[$i])) {\n $parts[] = $tmp[$i];\n }\n }\n\n return $parts;\n }",
"function decode($string){ \n $nopermitidos = array(\"'\",'\\\\','<','>',\"\\\"\",\"%\");\n $string = str_replace(\" \",\"\",$string);\n $string = str_replace($nopermitidos, \"\", $string);\n return $string;\n}",
"public function splitTitle()\n {\n $bits = explode(' ' . $this->host . ' ' , $this->windowInfo);\n\n return $bits;\n\n }",
"function str_split($string, $split_length = 1)\n\t{\n\t\tif ($split_length < 1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if ($split_length >= strlen($string))\n\t\t{\n\t\t\treturn array($string);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match_all('#.{1,' . $split_length . '}#s', $string, $matches);\n\t\t\treturn $matches[0];\n\t\t}\n\t}",
"public function fragment($str = '') {\n $tokenized = array();\n\tfor($digit = 0; $digit < $this->utf8_strlen($str); $digit++ ) {\n $code = $this->utf8_ord($this->utf8_charAt($str, $digit)) - 44032;\n \t if ($code > -1 && $code < 11172) { \n\t \t $i_idx = $code / 588; \n \t \t $m_idx = $code % 588 / 28; \n \t $e_idx = $code % 28;\n \t //$tokenized .= $this->ini[$i_idx].$this->mid[$m_idx].$this->end[$e_idx];\n\t\t $tokenized = array(\n\t\t 'b' => $this->ini[$i_idx],\n\t\t 'm' => $this->mid[$m_idx],\n\t\t 'e' => $this->end[$e_idx],\n\t\t );\n \t } else {\n \t //$tokenized .= $this->utf8_charAt($str, $digit);\n\t\t $tokenized = array('n' => $this->utf8_charAt($str, $digit));\n }\n\t}\n return $tokenized;\n }",
"function hitung($string_data)\n {\n $pattern = \"/[*\\s:\\s%\\s\\-\\s]/\";\n $angka = preg_split($pattern, $string_data);\n $oprt = strpos($string_data, \"+\");\n\n }",
"function tidy_repair_string($data, $config = null, $encoding = null) {}",
"function COM_string_decode($string,$length=-1) {\r\n\t$value = trim(preg_replace('/[^\\w\\d\\.\\,\\-\\& ]/', '', html_entity_decode($string)));\r\n\tif ($length > 0) {\r\n\t\t$value = substr($value,0,$length);\r\n\t}\r\n\treturn $value;\r\n}",
"function splitPhrase($texte){\r\n //le regex signifie tt ce qui commence par une lettre minuscule ou majuscule suivi\r\n //de tt autre caractere different de . ? et ! ou de . suivi de chiffre 0 ou plusieurs fois\r\n //termine par . ! ou ?\r\n $tableau = [];\r\n preg_match_all('#[A-Za-z]([^.!?]|[.][0-9])*[.!?]#',$texte,$texteCoup);\r\n $lesPhrases = $texteCoup[0];\r\n foreach($lesPhrases as $phrase){\r\n $phrase=trim($phrase);\r\n //les expessions qu'on doit remplacer\r\n $regex=['#[ ]+#', '#[ ]?[\\'][ ]?#', '#[ ]?[,]#', '#[ ]?[;][ ]?#', '#[(][ ]+#','#[ ]+[)]#',\r\n '#[ ]+[.]#', '#[ ][?]#', '#[ ][!]#'];\r\n //leurs remplacants\r\n $remplace=[' ', \"'\", \", \", \"; \",\"(\", \")\", \".\", \"?\", \"!\"];\r\n for($j=0;$j<laTaille($regex);$j++){\r\n $phrase = preg_replace($regex[$j],$remplace[$j],$phrase);\r\n }\r\n $phrase=ucfirst($phrase);\r\n if(laTaille($phrase)<=200){\r\n $tableau[]=$phrase;\r\n } \r\n }\r\n return $tableau;\r\n}",
"private static function stringToArray( $inarray, $sep ) {\n\t\tif ( $sep === \"\" ) {\n\t\t\t$outarray = str_split( preg_replace( \"/[\\s]+/\", \"\", $inarray ) );\n\t\t} else {\n\t\t\t$outarray = preg_split( \"/[\\s]*\" . preg_quote( $sep ) . \"[\\s]*/\", $inarray );\n\t\t}\n\t\treturn $outarray;\n\t}",
"public function getDecodedContent();",
"public static function split(string $text): array {\n return str_split($text);\n }",
"function qa_lang_html_sub_split($identifier, $htmlparam, $symbol = '^')\n{\n\t$html = qa_lang_html($identifier);\n\n\t$symbolpos = strpos($html, $symbol);\n\tif (!is_numeric($symbolpos))\n\t\tqa_fatal_error('Missing ' . $symbol . ' in language string ' . $identifier);\n\n\treturn array(\n\t\t'prefix' => substr($html, 0, $symbolpos),\n\t\t'data' => $htmlparam,\n\t\t'suffix' => substr($html, $symbolpos + 1),\n\t);\n}",
"private function _parseEncoded()\n {\n @parse_str( $this->input, $data );\n\n if( is_array( $data ) )\n {\n $_REQUEST = array_merge( $_GET, $data );\n return true;\n }\n return false;\n }",
"function testFinalNomCoureur($str) {\n // ##### Test charactère par charactère ######\n $str = str_split($str);\n foreach($str as $char) {\n if(!preg_match(\"#[A-Z]|'|-|\\040#\", $char)) {\n //echo \"Charactère interdit : \" . utf8_encode($char) . \"<br>\";\n return false;\n }\n }\n $str = implode($str);\n // ##### Fin test charactère #####\n \n // ##### Test cas bizarre #####\n if(preg_match(\"#^'*$|''+|^' '$|' '$|^' '|^\\\"*$#\", $str) || preg_match(\"#(\\040\\\"\\040)|(\\040''\\040)|(\\040'\\040)#\", $str) || preg_match(\"#--.*--#\", $str)) {\n //echo \"Cas bizarre : \" . utf8_encode($str) . \"<br>\";\n return false;\n }\n // ##### Fin test cas bizarre\n return $str;\n }",
"function parse_response_array($string) {\n $response_string_array = explode(\"&\", $string);\n\n $proper_array = array();\n\n foreach ($response_string_array as $value) {\n list($key, $val) = explode(\"=\", $value);\n\n $val = urldecode($val);\n\n $proper_array[\"$key\"] = $val;\n }\n unset($key);\n unset($val);\n\n return $proper_array;\n }",
"public function parse_str_raw($str, &$array=array()) {\n\t\t$str = rawurldecode($str);\n\t\t$str = trim($str, $sep1.' ');\n\t\t$arr = explode($sep1, $str);\n\t\t\n\t\t$result = array();\n\t\tif (count($arr)) {\n\t\t\tforeach ($arr AS $_str) {\n\t\t\t\t$_arr = explode($sep2, $_str);\n\t\t\t\t$_arr[0] = trim($_arr[0]);\n\t\t\t\tif ($_arr[0] !== '') {\n\t\t\t\t\t$result[$_arr[0]] = isset($_arr[1])?trim($_arr[1]):'';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$array = $result;\n\t}",
"protected function splitColors($str)\n {\n return explode('/', $str);\n }",
"function url_decode($str)\n{\n parse_str($str, $output);\n return $output;\n}",
"function getFormattedDataArray($str) {\n $replaced_str = str_replace(\"\\,\", \"&888;\", $str);\n $data_array = explode(\"\\n\", $replaced_str);\n array_pop($data_array);\n return $data_array;\n }",
"public static function unescape($som) {}",
"function deformatNVP($nvpstr){\n\t\n\t\t$intial=0;\n\t\t$nvpArray = array();\n\t\n\t\n\t\twhile(strlen($nvpstr)){\n\t\t\t//postion of Key\n\t\t\t$keypos= strpos($nvpstr,'=');\n\t\t\t//position of value\n\t\t\t$valuepos = strpos($nvpstr,'&') ? strpos($nvpstr,'&'): strlen($nvpstr);\n\t\n\t\t\t/*getting the Key and Value values and storing in a Associative Array*/\n\t\t\t$keyval=substr($nvpstr,$intial,$keypos);\n\t\t\t$valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1);\n\t\t\t//decoding the respose\n\t\t\t$nvpArray[urldecode($keyval)] =urldecode( $valval);\n\t\t\t$nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr));\n\t\t}\n\t\treturn $nvpArray;\n\t}",
"abstract protected function getTokenSeparators() : array;",
"function encode_subject($in_str, $charset) { \n $out_str = $in_str; \n if ($out_str && $charset) { \n\n // define start delimimter, end delimiter and spacer \n $end = \"?=\"; \n $start = \"=?\" . $charset . \"?B?\"; \n $spacer = $end . \"\\r\\n \" . $start; \n\n // determine length of encoded text within chunks \n // and ensure length is even \n $length = 75 - strlen($start) - strlen($end); \n\n /* \n [EDIT BY danbrown AT php DOT net: The following \n is a bugfix provided by (gardan AT gmx DOT de) \n on 31-MAR-2005 with the following note: \n \"This means: $length should not be even, \n but divisible by 4. The reason is that in \n base64-encoding 3 8-bit-chars are represented \n by 4 6-bit-chars. These 4 chars must not be \n split between two encoded words, according \n to RFC-2047. \n */ \n $length = $length - ($length % 4); \n\n // encode the string and split it into chunks \n // with spacers after each chunk \n $out_str = base64_encode($out_str); \n $out_str = chunk_split($out_str, $length, $spacer); \n\n // remove trailing spacer and \n // add start and end delimiters \n $spacer = preg_quote($spacer); \n $out_str = preg_replace(\"/\" . $spacer . \"$/\", \"\", $out_str); \n $out_str = $start . $out_str . $end; \n } \n return $out_str; \n}",
"function string_to_finalmessage($message) {\n $finalmessage = \"\";\n $sss = \"\";\n for ($i = 0; $i < mb_strlen($message, \"UTF-8\"); $i++) {\n $sss = mb_substr($message, $i, 1, \"utf-8\");\n $a = 0;\n $abc = \"&#\" . ordutf8($sss, $a) . \";\";\n $finalmessage .= $abc;\n }\n return $finalmessage;\n}",
"private static function separate_char($val)\n\t\t{\n\t\t\t$val=addcslashes($val,'0..z');\n\t\t\t$val=explode('\\\\',$val);\n\t\t\tarray_shift($val);\n\t\t\treturn $val;\n\t\t}",
"public function testWordsSplitByLetter()\n {\n $str = new Str($this->testString);\n $result = $str->words('/o/');\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The quick br');\n }",
"public static function instrument_split($pair) {\n\t\t\t$currencies = array();\n\t\t\t$dividerPos = strpos($pair, '_');\n\t\t\t//Failire\n\t\t\tif ($dividerPos === FALSE) return FALSE;\n\t\t\t//Building array\n\t\t\tarray_push($currencies, substr($pair, 0, $dividerPos));\n\t\t\tarray_push($currencies, substr($pair, $dividerPos+1));\n\t\t\treturn $currencies;\n\t\t}"
] | [
"0.6531202",
"0.634297",
"0.63323504",
"0.6319958",
"0.631937",
"0.6087709",
"0.60465986",
"0.60049385",
"0.59139836",
"0.5901888",
"0.5886274",
"0.5856758",
"0.582313",
"0.5772213",
"0.57547086",
"0.57099015",
"0.5675601",
"0.56172425",
"0.5610562",
"0.5527461",
"0.5456433",
"0.5440443",
"0.53765965",
"0.53350216",
"0.5334607",
"0.53042406",
"0.5299931",
"0.5298672",
"0.52746844",
"0.5236526",
"0.52110213",
"0.5198281",
"0.51806694",
"0.5167783",
"0.51601297",
"0.51580125",
"0.51439023",
"0.5131477",
"0.5124759",
"0.5104898",
"0.5099957",
"0.5098501",
"0.50973904",
"0.5086809",
"0.50731957",
"0.5051231",
"0.5046266",
"0.50454825",
"0.5042917",
"0.5038072",
"0.5026328",
"0.5011851",
"0.4991536",
"0.49837235",
"0.49830213",
"0.4980703",
"0.49789712",
"0.49712858",
"0.49603054",
"0.49553487",
"0.4944135",
"0.49394032",
"0.49366373",
"0.49324426",
"0.49187765",
"0.491698",
"0.4916157",
"0.49127847",
"0.490904",
"0.4905957",
"0.49013633",
"0.48996064",
"0.4892162",
"0.48825303",
"0.487817",
"0.4872129",
"0.4870551",
"0.48680764",
"0.4859245",
"0.48539558",
"0.48517045",
"0.4844841",
"0.48445132",
"0.48438114",
"0.48304507",
"0.48268387",
"0.4825238",
"0.4821314",
"0.48064855",
"0.48059216",
"0.4796198",
"0.4795014",
"0.47939473",
"0.47933426",
"0.47891986",
"0.4788041",
"0.4781669",
"0.47788516",
"0.47775286",
"0.47768608"
] | 0.6400987 | 1 |
Plugin Name: TruongTuyen_Toolkit Plugin URI: Description: Toolkit work with Unyson Framework Version: 1.0.0 Author: TruongTuyen Author URI: License: GPL2+ Text Domain: truongtuyen plugin language file | function yourextension_lang(){
load_plugin_textdomain('yourextension', false, basename( dirname( __FILE__ ) ) . '/languages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function i18n() {\n load_plugin_textdomain( 'elementor-lightx-widgets' );\n }",
"function sec_init() {\n\tload_plugin_textdomain(EVNT_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) );\n}",
"function add_butns_tinymce_plugin($plugin_array) {\n $plugin_array['butnsbutton'] = WP_PLUGIN_URL.'/butns/tinymce/editor_plugin.js';\n return $plugin_array;\n}",
"public function i18n() {\n load_plugin_textdomain( 'elementor-hubspot-bulb' );\n }",
"function wpbm_plugin_text_domain(){\n load_plugin_textdomain( 'wp-blog-manager', false, basename( dirname( __FILE__ ) ) . '/languages/' );\n }",
"function localize_plugin()\r\n{\r\n load_plugin_textdomain( 'favicon', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/');\r\n}",
"function translation() {\n\t\t\n\t\t// only use, if we have it...\n\t\tif( function_exists('load_plugin_textdomain') ) {\n\t\t\n\t\t\t// load it\n\t\t\tload_plugin_textdomain( \n\t\t\t\n\t\t\t\t// unique name\n\t\t\t\t'cp-multisite', \n\t\t\t\t\n\t\t\t\t// deprecated argument\n\t\t\t\tfalse,\n\t\t\t\t\n\t\t\t\t// path to directory containing translation files\n\t\t\t\tplugin_dir_path( CPMU_PLUGIN_FILE ) . 'languages/'\n\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"function kw_filter_mce_plugin( $plugins ) {\r\n\t$plugins['artefact'] = TINYWOW_DIR . 'js/artefact.js';\r\n\t$plugins['legend'] = TINYWOW_DIR . 'js/legend.js';\r\n\t$plugins['epic'] = TINYWOW_DIR . 'js/epic.js';\r\n\t$plugins['rare'] = TINYWOW_DIR . 'js/rare.js';\r\n\t$plugins['commun'] = TINYWOW_DIR . 'js/commun.js';\r\n\t$plugins['normal'] = TINYWOW_DIR . 'js/normal.js';\r\n\t$plugins['poor'] = TINYWOW_DIR . 'js/poor.js';\r\n\t$plugins['youtubeblack'] = TINYWOW_DIR . 'js/youtube.js';\r\n\t$plugins['youtubeborder'] = TINYWOW_DIR . 'js/kwyoutube.js';\r\n\treturn $plugins;\r\n}",
"function wtmds_init() {\n\t\t$plugin_dir = basename(dirname(__FILE__));\n\t\tload_plugin_textdomain( 'wtmds', null, $plugin_dir.'/languages/' );\n\t}",
"function nicdark_shortcodes_load_textdomain()\r\n{\r\n\tload_plugin_textdomain(\"nicdark-shortcodes\", false, dirname(plugin_basename(__FILE__)) . '/languages');\r\n}",
"public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'wc_name_your_price' , false , dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}",
"public function getPluginName(): string\n {\n return \"MumieTask\";\n }",
"function filter_mce_plugin( $plugins ) {\n\t\t$plugins['thundercodes'] = get_template_directory_uri() . '/functions/thundercodes/thundercodes_plugin.js?dir='.urlencode(get_template_directory_uri());\n\t\treturn $plugins;\n\t}",
"function lang() {\r\n\t\t\tload_plugin_textdomain( 'rv-portfolio', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\r\n\t\t}",
"public function load_plugin_textdomain() {\n\t\t\tload_plugin_textdomain( 'gfirem-webcam-field-locale', false, basename( dirname( __FILE__ ) ) . '/languages' );\n\t\t}",
"function i18n_plugin_test() {\n\treturn __( 'This is a dummy plugin', 'internationalized-plugin' );\n}",
"function load_plugin_textdomain($domain, $deprecated = \\false, $plugin_rel_path = \\false)\n {\n }",
"function EWD_URP_localization_setup() {\n\t\tload_plugin_textdomain('ultimate-reviews', false, dirname(plugin_basename(__FILE__)) . '/lang/');\n}",
"function wonster_mce_plugin( $array ) {\r\n\t$array['wonster_mce'] = PLUGIN_MCE_URI .'js/plugin.js';\r\n\treturn $array;\r\n}",
"public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'genesis-simple-hooks', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}",
"function cs_bible_lesson_load_plugin_textdomain() {\r\n load_plugin_textdomain( 'christian-science-bible-lesson-subjects', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\r\n}",
"public function i18n() {\r\n load_plugin_textdomain( 'woolentor-pro', false, dirname( plugin_basename( WOOLENTOR_ADDONS_PL_ROOT_PRO ) ) . '/languages/' );\r\n }",
"function add_tinymce_plugin($plugin_array) {\n\t\t\t/*print( \"\\n<!-- Preparing to add the umw_widget_short MCE plugin. -->\\n\" );\n\t\t\tprint( \"\\n<!-- The current plugin array looks like:\\n\" . print_r( $plugin_array, true ) . \"\\n-->\\n\" );*/\n\t\t\t$plugin_array['umw_widget_short'] = plugins_url( '/tinymce/editor_plugin_src.js', dirname( __FILE__ ) );\n\t\t\t/*print( \"\\n<!-- The updated plugin array looks like:\\n\" . print_r( $plugin_array, true ) . \"\\n-->\\n\" );*/\n\t\t\treturn $plugin_array;\n\t\t}",
"public function plugin_textdomain() {\n load_plugin_textdomain( CUSTOM_LOGIN_DIRNAME, false, CUSTOM_LOGIN_DIRNAME . '/languages/' );\n }",
"function install_plugin_information()\n {\n }",
"public function getPluginName() : string\n {\n return \"CryptPad\";\n }",
"public function load_plugin_textdomain() {\n\n\t\t\t$domain = 'wolf-woocommerce-quickview';\n\t\t\t$locale = apply_filters( 'wolf-woocommerce-quickview', get_locale(), $domain );\n\t\t\tload_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}",
"public function plugin_textdomain() {\n\t\tload_plugin_textdomain( 'wp-jquery-date-picker', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\t}",
"public function setup_plugin_url()\n {\n }",
"function sl_access_load_textdomain() {\n load_plugin_textdomain( 'sl-accessibility-button', false, dirname( plugin_basename( __FILE__ ) ) . '/language' );\n}",
"function init() {\n\t\t\tload_plugin_textdomain( $this->text_domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}",
"public function getPluginLabels() {}",
"public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}",
"function localization() {\n load_plugin_textdomain( 'cynetique-labels', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' );\n}",
"public function getPluginName() {}",
"function add_ind_script($plugins) {\n\t$dir_name = '/wp-content/plugins/indizar';\n\t$url=get_bloginfo('wpurl');\n\t$pluginURL = $url.$dir_name.'/tinymce/editor_plugin.js?ver='.INDIZAR_HEADER_V;\n\t$plugins['Indizar'] = $pluginURL;\n\treturn $plugins;\n}",
"public function get_plugin_name()\n {\n }",
"function plugin_version_itilcategorygroups() {\n return array('name' => __('ItilCategory Groups', 'itilcategorygroups'),\n 'version' => '0.90+1.0.3',\n 'author' => \"<a href='http://www.teclib.com'>TECLIB'</a>\",\n 'homepage' => 'http://www.teclib.com');\n}",
"function load_muplugin_textdomain($domain, $mu_plugin_rel_path = '')\n {\n }",
"public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( $this->plugin_slug, false, MODULA_LIGHTBOXES_PATH . '/languages/' );\n\t}",
"function getName() {\r\n\t\treturn 'markupplugin';\r\n\t}",
"function tb_addTagBeepToWpAdmin() { \r\n //add in /settings manu\r\n add_options_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitor\", \"tb_load_tagBeepAdmin\"); \r\n //add in the /plugins menu\r\n add_plugins_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitorPlugin\", \"tb_load_tagBeepAdmin\"); \r\n}",
"function wp_get_mu_plugins()\n {\n }",
"function ARTEMIS_SWP_languages_init() \r\n{\r\n\t$domain = \"artemis-swp-core\";\r\n\t$locale = apply_filters( 'plugin_locale', get_locale(), $domain );\r\n\t$trans_location = trailingslashit( WP_LANG_DIR ) . \"plugins/\" . $domain . '-' . $locale . '.mo';\r\n\t/* wp-content/languages/plugins/artemis-swp-core-en_US.mo */\r\n\tif ( $loaded = load_plugin_textdomain( $domain, FALSE, $trans_location) ) {\r\n\t\treturn $loaded;\r\n\t} else {\r\n\t\t/*old location, languages dir in the plugin dir*/\r\n\t\tload_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/');\r\n\t}\r\n}",
"public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain( 'storefront-woocommerce-customiser', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}",
"function getName() {\n\t\treturn 'Plugin';\n\t}",
"function add_tinyMCE_plugin( $plugin_array ) {\n\n\t \t$plugin_array['better_blockquote'] = plugins_url( 'blockquotes.js', __FILE__ );\n\t \treturn $plugin_array;\n\n\t}",
"function wpse72394_register_tinymce_plugin($plugin_array) {\r\n $plugin_array['wpse72394_button'] = get_template_directory_uri() . '/js/callout_box.js';\r\n return $plugin_array;\r\n}",
"function mbifthen_load_textdomain() {\r\n\tload_plugin_textdomain( 'multibanco-ifthen-software-gateway-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/lang/' );\r\n}",
"function echotheme_add_shortcode_tinymce_plugin($plugin_array) {\n\tglobal $echotheme;\n\t$plugin_array['echothemeShortcodes'] = get_bloginfo('template_url') . '/js/editor_plugin.js';\n\treturn $plugin_array;\n}",
"function bulletproof_security_load_plugin_textdomain() {\n\tload_plugin_textdomain('bulletproof-security', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');\n}",
"function sn_load_text_domain() {\n\n\tload_plugin_textdomain( 'dorzki-notifications-to-slack' );\n\n}",
"function add_mce_plugin( $plugin_array ) {\n\t\t$plugin_array['infographic_mce_button'] = plugins_url( '/js/infographic-mce-plugin.js' , __FILE__ );\n\t\treturn $plugin_array;\n\t}",
"function simple_login_history_load_textdomain() {\n load_plugin_textdomain('simple-login-history', false, dirname( plugin_basename( __FILE__ )) . '/languages/');\n}",
"function get_mu_plugins()\n {\n }",
"function video_cck_tudou_info() {\n $name = t('Tudou');\n $features = array(\n array(t('Autoplay'), t('No'), ''),\n array(t('RSS Attachment'), t('No'), ''),\n array(t('Thumbnails'), t('No'), t('')),\n );\n return array(\n 'provider' => 'tudou',\n 'name' => $name,\n 'url' => VIDEO_CCK_TUDOU_MAIN_URL,\n 'settings_description' => t('These settings specifically affect videos displayed from !tudou.', array('!tudou' => l($name, VIDEO_CCK_TUDOU_MAIN_URL, array('target' => '_blank')))),\n 'supported_features' => $features,\n );\n}",
"public function localization() {\n\t\t\tload_plugin_textdomain( 'bitlive-custom-codes', false, __DIR__ . '/languages/' );\n\t\t}",
"function hmbkp_plugin_row( $plugins ) {\n\n\tif ( isset( $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php'] ) )\n\t\t$plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] = str_replace( 'Once activated you\\'ll find me under <strong>Tools → Backups</strong>', 'Find me under <strong><a href=\"' . admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG ) . '\">Tools → Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] );\n\n\treturn $plugins;\n\n}",
"public function init() {\n // Set up localisation\n $this->load_plugin_textdomain();\n }",
"function my_add_tinymce_plugin( $plugin_array ) {\n\t$plugin_array['my_mce_button'] = plugin_dir_url(__FILE__) .'/js/mce-button.js';\n\treturn $plugin_array;\n}",
"public function textdomain() {\n\t\tload_plugin_textdomain( 'global-user-password-reset', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t}",
"function joe_uah_load_textdomain() {\n\tload_plugin_textdomain( 'ultimate-admin-helpers', false, basename( __DIR__ ) . '/languages/' );\n}",
"public function init_plugin()\n {\n }",
"function poemhd_plugin() {\n\t$chosen = Poemhd_plugin_get_lyric();\n\t$lang = '';\n\tif ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) {\n\t\t$lang = ' lang=\"en\"';\n\t}\n\n\tprintf(\n\t\t'<p id=\"dolly\"><span class=\"screen-reader-text\">%s </span><span dir=\"ltr\"%s>%s</span></p>',\n\t\t__( 'Quote from Hello Dolly song, by Jerry Herman:' ),\n\t\t$lang,\n\t\t$chosen\n\t);\n}",
"function manhattan_tinymce_add_button( $plugin_array ) {\r\n\t $plugin_array['manhattan'] = plugins_url() . '/manhattan/js/manhattan-admin.js';\r\n\t return $plugin_array;\r\n\t}",
"function add_wpsc_tinymce_plugin($plugin_array) {\n\n\t$plugin_array['WPSC'] = WPSC_URL.'/js/tinymce3/editor_plugin.js';\t\n\treturn $plugin_array;\n}",
"function tb_onPluginActivate() {\r\n add_option('tagBeep_redirect_to_plugin', 'true');\r\n}",
"function init_plugin() : void {\n\n\t// CSS/JS.\n\tadd_action( 'enqueue_block_assets', __NAMESPACE__ . '\\load_block_frontend_assets' );\n\tadd_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\load_block_editor_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_full_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_messaging_assets' );\n\n\t// Admin-only CSS/JS.\n\tadd_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\Admin\\load_admin_assets' );\n\tadd_filter( 'admin_body_class', __NAMESPACE__ . '\\Admin\\add_admin_body_class' );\n\n\t// Modify output.\n\tadd_filter( 'body_class', __NAMESPACE__ . '\\add_body_class' );\n\tadd_filter( 'the_content', __NAMESPACE__ . '\\Gating\\maybe_restrict_content' );\n\tadd_filter( 'the_title', __NAMESPACE__ . '\\Gating\\maybe_add_padlock_to_title', 10, 2 );\n\tadd_action( 'wp_head', __NAMESPACE__ . '\\print_meta_tag' );\n\n\t// Admin screens and settings.\n\tadd_filter( 'plugin_action_links_coil-web-monetization/plugin.php', __NAMESPACE__ . '\\Admin\\add_plugin_action_links' );\n\tadd_filter( 'plugin_row_meta', __NAMESPACE__ . '\\Admin\\add_plugin_meta_link', 10, 2 );\n\tadd_action( 'admin_menu', __NAMESPACE__ . '\\Settings\\register_admin_menu' );\n\tadd_action( 'admin_init', __NAMESPACE__ . '\\Settings\\register_admin_content_settings' );\n\tadd_action( 'admin_notices', __NAMESPACE__ . '\\Settings\\admin_welcome_notice' );\n\tadd_action( 'wp_ajax_dismiss_welcome_notice', __NAMESPACE__ . '\\Settings\\dismiss_welcome_notice' );\n\n\t// Term meta.\n\tadd_action( 'edit_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'create_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'delete_term', __NAMESPACE__ . '\\Admin\\delete_term_monetization_meta' );\n\tadd_term_edit_save_form_meta_actions();\n\n\t// Customizer settings.\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_messaging_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_options_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_learn_more_button_settings_panel' );\n\n\t// User profile settings.\n\tadd_action( 'personal_options', __NAMESPACE__ . '\\User\\add_user_profile_payment_pointer_option' );\n\tadd_action( 'personal_options_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_action( 'edit_user_profile_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_filter( 'option_coil_payment_pointer_id', __NAMESPACE__ . '\\User\\maybe_output_user_payment_pointer' );\n\n\t// Metaboxes.\n\tadd_action( 'load-post.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'load-post-new.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\Admin\\maybe_save_post_metabox' );\n\n\t// Modal messaging\n\tadd_action( 'wp_footer', __NAMESPACE__ . '\\load_plugin_templates' );\n\n\t// Load order - important.\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_content_meta' );\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_term_meta' );\n}",
"public function load_plugin_textdomain() {\n\t\t$domain = self::PLUGIN_SLUG;\n\t\tload_plugin_textdomain( $domain, FALSE, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages' );\n\t}",
"public function load_plugin_textdomain() {\n\n\t\t\t$domain = 'wolf-photos';\n\t\t\t$locale = apply_filters( 'wolf-photos', get_locale(), $domain );\n\t\t\tload_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );\n\t\t\tload_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}",
"public function atmf_load_plugin_textdomain(){\n\n $domain = $this->plugin_slug;\n $locale = apply_filters( 'plugin_locale', get_locale(), 'atmf' );\n\n load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );\n load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );\n }",
"public function localization_setup() {\n load_plugin_textdomain( 'baseplugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n }",
"function xt_admin_notice_installing() {\n ?>\n\n <div class=\"error fade\">\n <p><?php\n printf('<strong>需要到新淘客WordPress插件平台激活初始化您的网站</strong>. <br>\n\t <ul>\n\t <li>1.注册并登录<a href=\"%1s\" target=\"_blank\">新淘客WordPress插件平台</a>(已注册的会员可直接登录),添加网站</li>\n\t <li>2.验证并添加该网站(<a href=\"' . admin_url('admin.php?page=xt_menu_sys&xt-action=tool') . '\">填写验证代码</a>)</li>', XT_API_URL)\n ?></p>\n </div>\n\n <?php\n}",
"function skudo_register_required_plugins() {\n\t\n\t\t$plugins = array(\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'Contact Form 7',\n\t\t\t\t'slug' => 'contact-form-7',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Widget Importer & Exporter',\n\t\t\t\t'slug' => 'widget-importer-exporter',\n\t\t\t\t'required' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Really Simple CAPTCHA',\n\t\t\t\t'slug' => 'really-simple-captcha',\n\t\t\t\t'required' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'WPBakery Visual Composer',\n\t\t\t\t'slug' => 'js_composer',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/js_composer.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '6.2.0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Revolution Slider',\n\t\t\t\t'slug' \t \t=> 'revslider',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/revslider.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '6.2.15'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Ultimate Addons for Visual Composer',\n\t\t\t\t'slug' => 'Ultimate_VC_Addons',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/Ultimate_VC_Addons.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '3.19.4'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Skudo Custom Post Types',\n\t\t\t\t'slug' \t \t=> 'skudo_custom_post_types',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/skudo_custom_post_types.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '2.3'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'Cube Portfolio',\n\t\t\t\t'slug' => 'cubeportfolio',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/cubeportfolio.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '4.0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Envato Market',\n\t\t\t\t'slug' \t \t=> 'envato-market',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/envato-market.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '2.0.3'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'LayerSlider WP',\n\t\t\t\t'slug' => 'LayerSlider',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/LayerSlider.zip',\n\t\t\t\t'required' => false,\n\t\t\t\t'version' => '6.9.2'\n\t\t\t)\n\t\t\t\n\t\t);\n\t\n\t\t// Change this to your theme text domain, used for internationalising strings\n\t\t$config = array(\n\t\t\t'domain' \t\t=> 'skudo', \t// Text domain - likely want to be the same as your theme.\n\t\t\t'default_path' \t\t=> '',\n\t\t\t'parent_slug' => 'themes.php', \t\t\t// Parent menu slug.\n\t\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\n\t\t\t'has_notices' \t=> true, \t// Show admin notices or not\n\t\t\t'is_automatic' \t=> false,\t\t\t\t\t \t// Automatically activate plugins after installation or not\n\t\t\t'message' \t\t\t=> '',\t\t\t\t\t\t\t// Message to output right before the plugins table\n\t\t\t'strings' \t\t=> array(\n\t\t\t\t'page_title' \t\t\t=> esc_html__( 'Install Required Plugins', 'skudo' ),\n\t\t\t\t'menu_title' \t\t\t=> esc_html__( 'Install Plugins', 'skudo' ),\n\t\t\t\t'installing' \t\t\t=> esc_html__( 'Installing Plugin: %s', 'skudo' ), // %1$s = plugin name\n\t\t\t\t'oops' \t\t\t=> esc_html__( 'Something went wrong with the plugin API.', 'skudo' ),\n\t\t\t\t'notice_can_install_required' \t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended'\t\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' \t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended'\t\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' \t\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' \t\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t\t'install_link' \t\t\t\t\t \t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'skudo' ),\n\t\t\t\t'activate_link' \t\t\t\t \t\t\t=> _n_noop( 'Activate installed plugin', 'Activate installed plugins', 'skudo' ),\n\t\t\t\t'return' \t\t\t=> esc_html__( 'Return to Required Plugins Installer', 'skudo' ),\n\t\t\t\t'plugin_activated' \t\t\t=> esc_html__( 'Plugin activated successfully.', 'skudo' ),\n\t\t\t\t'complete' \t\t\t\t\t\t\t\t\t=> esc_html__( 'All plugins installed and activated successfully. %s', 'skudo' ), // %1$s = dashboard link\n\t\t\t\t'nag_type'\t\t\t\t\t\t\t\t\t=> 'updated' // Determines admin notice type - can only be 'updated' or 'error'\n\t\t\t)\n\t\t);\n\t\n\t\ttgmpa( $plugins, $config );\n\t\n\t}",
"public function load_plugin_textdomain()\n\t{\n\n\t\tload_plugin_textdomain( 'custom-post-type-partners', false, dirname( plugin_basename( __FILE__ ) ) . '/../languages/' );\n\n\t}",
"function mrpu_plugin_init() {\n\tload_plugin_textdomain( 'multiple-roles-per-user', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n}",
"public function load_plugin_textdomain() {\n\t\tload_plugin_textdomain(\n\t\t\t'<%= pkg.name %>',\n\t\t\tfalse,\n\t\t\tdirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'\n\t\t);\n\t}",
"function cpotheme_metadata_plugin()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_title',\n 'std' => '',\n 'label' => 'Título del Producto',\n 'type' => 'text',\n 'desc' => 'Indica la etiqueta de título (H1) del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_demo_url',\n 'std' => '',\n 'label' => 'URL de la Demo',\n 'type' => 'text',\n 'desc' => 'Especifica la URL de la demo del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_url',\n 'std' => '',\n 'label' => 'External URL',\n 'type' => 'text',\n 'desc' => 'Especifica la URL del tema si es un archivo externo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_product',\n 'std' => '',\n 'label' => 'ID de Producto',\n 'type' => 'select',\n 'option' => cpotheme_metadata_productlist_optional(),\n 'desc' => 'Indica la ID del producto para enlazarlo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_changelog',\n 'std' => '',\n 'label' => 'Changelog',\n 'type' => 'textarea',\n 'desc' => 'Muestra el registro de cambios de la descarga.'\n );\n\n return $cpotheme_data;\n}",
"function ind_text_domain() {\n\tload_plugin_textdomain('indizar', false, 'indizar/lang');\n}",
"public function init() {\n // Set up localisation.\n $this->load_plugin_textdomain();\n }",
"public function load_plugin_textdomain() {\n\t\t\tload_plugin_textdomain( 'gfirem_date_time-locale', false, basename( dirname( __FILE__ ) ) . '/languages' );\n\t\t}",
"public function pluginDetails()\n {\n return [\n 'name' => 'ScaffoldTranslation',\n 'description' => 'Overrides default OctoberCMS scaffold commands to generate translation aware source files ',\n 'author' => 'B&B Web Expertise',\n 'icon' => 'icon-leaf'\n ];\n }",
"function bg_LoadBeyondGrammarMCEPlugin($plugin_array){\n global $bg_plugin_url;\n $plugin_array['BeyondGrammar'] = $bg_plugin_url;\n return $plugin_array;\n}",
"function eltd_core_text_domain() {\n load_plugin_textdomain('eltd_core', false, ELATED_CORE_REL_PATH.'/languages');\n }",
"function btn_add_tinymce_plugin( $plugin_array ) {\n\t$plugin_array['btn_mce_button'] = get_stylesheet_directory_uri() .'/js/editor/button.js';\n\treturn $plugin_array;\n}",
"function my_add_tinymce_plugin( $plugin_array ) {\n\t$plugin_array['my_mce_button'] = get_template_directory_uri() .'/js/mce-button.js';\n\treturn $plugin_array;\n}",
"public function plugin_info()\n {\n }",
"public function getPlugin();",
"public function getPlugin();",
"function wpse72394_register_tinymce_plugin($plugin_array) {\n $plugin_array['wpse72394_button'] = get_template_directory_uri() . '/js/admin/shortcodes.js';\n return $plugin_array;\n}",
"function dust_text_domain() {\n load_plugin_textdomain( 'theme-package', false, DUST_ACC_PATH . '/languages' );\n }",
"function _manually_load_plugin() {\n\trequire dirname( dirname( __FILE__ ) ) . '/tyk_dev_portal.php';\n}",
"public function pluginDetails()\n {\n return [\n 'name' => 'Тинькофф Банк',\n 'description' => 'Проведение платежей через Tinkoff EACQ.',\n 'author' => 'Sozonov Alexey',\n 'icon' => 'icon-shopping-cart',\n 'homepage' => 'https://sozonov-alexey.ru'\n ];\n }",
"function i18n() {\n\tload_theme_textdomain( 'wpd', WPDOC_HLTR_PATH . '/languages' );\n}",
"public function get_plugin_name() {\n\n\t\treturn __( 'WooCommerce Elavon Converge', 'woocommerce-gateway-elavon' );\n\t}",
"function languages() {\n load_plugin_textdomain('wcpdomain', false, dirname(plugin_basename(__FILE__)) . '/languages');\n }",
"function Yeelight() {\n $this->name=\"Yeelight\";\n $this->title=\"Устройства Yeelight\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}",
"public function plugins_loaded() {\n\t\tload_plugin_textdomain(\n\t\t\t'two-factor-authentication',\n\t\t\tfalse,\n\t\t\tdirname(plugin_basename(__FILE__)).'/languages/'\n\t\t);\n\t}",
"function fl_add_shortcode_tinymce_plugin($plugin_array) {\n $plugin_array['flshortcodes'] = PMC_DIR .'assets/js/shortcode_plugin.js';\n return $plugin_array;\n}",
"function filter_mce_external_plugins( $plugins ) {\n\t\tglobal $tinymce_version;\n\t\t\n\t\tif(version_compare($tinymce_version[0], 4, \">=\"))\n\t\t{\n\t\t\t$plugins['ShortcodeNinjaPlugin'] = $this->plugin_url() . 'tinymce/editor_plugin.js';\n\t\t}\n\t\telse\n\t\t{\n \t$plugins['ShortcodeNinjaPlugin'] = $this->plugin_url() . 'tinymce/editor_plugin_3.js';\n }\n return $plugins;\n\t}"
] | [
"0.67014587",
"0.66261137",
"0.66121066",
"0.65631706",
"0.65595835",
"0.6546077",
"0.6516016",
"0.6501919",
"0.64985013",
"0.6489037",
"0.6486619",
"0.645089",
"0.6443126",
"0.641498",
"0.64054286",
"0.64019483",
"0.6374884",
"0.6349164",
"0.6345154",
"0.63406634",
"0.6329545",
"0.63284636",
"0.63257134",
"0.6321545",
"0.6300274",
"0.6281531",
"0.6275188",
"0.62429345",
"0.62380207",
"0.6232972",
"0.62177324",
"0.62167156",
"0.62165993",
"0.62132365",
"0.62130666",
"0.62097293",
"0.62055147",
"0.6201513",
"0.6198017",
"0.6194869",
"0.61948687",
"0.61905956",
"0.6187435",
"0.6164906",
"0.6159678",
"0.6155485",
"0.61393875",
"0.6137652",
"0.612741",
"0.6126913",
"0.6124099",
"0.6121841",
"0.6116921",
"0.6116403",
"0.6110489",
"0.61103535",
"0.61076564",
"0.6105543",
"0.6103727",
"0.61025774",
"0.6100396",
"0.60934424",
"0.60930145",
"0.60902756",
"0.6088142",
"0.60806054",
"0.6076279",
"0.60758007",
"0.6071219",
"0.6068612",
"0.6067672",
"0.60649306",
"0.6064321",
"0.6062438",
"0.6051133",
"0.60505",
"0.6045426",
"0.6038781",
"0.6035815",
"0.603297",
"0.60260564",
"0.6016408",
"0.6015124",
"0.60106647",
"0.6008493",
"0.6004079",
"0.6002915",
"0.5997097",
"0.5997097",
"0.5996896",
"0.59955394",
"0.5987993",
"0.5987982",
"0.59858906",
"0.598046",
"0.59732074",
"0.59695154",
"0.59678596",
"0.5958647",
"0.5956811"
] | 0.64238036 | 13 |
parse http header response | function http_response_headers($ret_str) {
$hdrs = array();
$arr = explode("\r\n\r\n", $ret_str);
foreach ($arr as $each)
if (substr($each, 0, 4) == 'HTTP')
$hdrs[] = $each;
return $hdrs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _parseHeader() {}",
"#[Pure]\nfunction http_parse_headers($header) {}",
"function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}",
"private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }",
"function getresponseheader($header = false){\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 return $head;\n }\n }\n }",
"function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}",
"function http_response_header_lines($hdr_str) {\n\t$lines = explode(\"\\n\", $hdr_str);\n\t$hdr_arr['status_line'] = trim(array_shift($lines));\n\tforeach ($lines as $line) {\n\t\tlist($key, $val) = explode(':', $line, 2);\n\t\t$hdr_arr[trim($key)] = trim($val);\n\t}\n\treturn $hdr_arr;\n}",
"private function readHeaders() {\n $headers = $this->status->getHeaders();\n\n foreach ($headers as $key => $value) {\n switch ($key) {\n case \"Location\":\n $this->response['location'] = $value[0];\n break;\n\n case \"Content-Type\":\n $this->response['content_type'] = $value[0];\n break;\n\n case \"Content-Length\":\n $this->response['content_length'] = $value[0];\n break;\n\n default:\n break;\n }\n }\n }",
"function http_parse_headers($headers) {\n\t\t$replace = ($this->http_linebreak == \"\\n\" ? \"\\r\\n\" : \"\\n\");\n\t\t$headers = str_replace($replace, $this->http_linebreak, trim($headers));\n\t\t$headers = explode($this->http_linebreak, $headers);\n\t\t$this->http_response_headers = array();\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d (\\d{3})/', $headers[0], $matches)) {\n\t\t $this->http_response_code = intval($matches[1]);\n\t\t array_shift($headers);\n\t\t}\n\t\tif($headers):\n\t\t\tforeach ($headers as $string) {\n\t\t\t list($header, $value) = explode(': ', $string, 2);\n\t\t\t $this->http_response_headers[$header] = trim($value);\n\t\t\t}\n\t\tendif;\n\t}",
"protected function fetchHeader($response)\r\n {\r\n $headers = [];\r\n $headerSize = 0;\r\n $headerParts = explode(PHP_EOL, $response);\r\n\r\n foreach ($headerParts as $headerString) {\r\n\r\n $headerSize += strlen($headerString);\r\n\r\n $headerString = trim($headerString);\r\n if (empty($headerString)) {\r\n break;\r\n }\r\n\r\n if (strpos($headerString, ':') !== false) {\r\n $headerSize += strlen(PHP_EOL);\r\n $headerString = str_replace('\"', '', $headerString);\r\n $headerStringParts = explode(':', $headerString);\r\n $headerStringParts = array_map('trim', $headerStringParts);\r\n\r\n $headers[ $headerStringParts[ 0 ] ] = $headerStringParts[ 1 ];\r\n } elseif (preg_match(\"/(HTTP\\/[0-9].[0-9])\\s([0-9]+)\\s([a-zA-Z]+)/\", $headerString, $matches)) {\r\n $headerSize += strlen(PHP_EOL);\r\n\r\n $this->info->httpVersion = $matches[ 1 ];\r\n $this->info->httpCode = $matches[ 2 ];\r\n $this->info->httpCodeDescription = $matches[ 3 ];\r\n }\r\n }\r\n\r\n $this->headers = new Headers($headers);\r\n\r\n // Update info\r\n if ($this->headers->offsetExists('contentType')) {\r\n $this->info->contentType = $this->headers->offsetGet('contentType');\r\n }\r\n\r\n $this->info->headerSize = $headerSize;\r\n }",
"private static function http_parse_headers($header)\n {\n $headers = array();\n $key = '';\n\n foreach(explode(\"\\n\", $header) as $i => $h) {\n $h = explode(':', $h, 2);\n\n if (isset($h[1]))\n {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n }\n elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));\n }\n else {\n $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));\n }\n\n $key = $h[0];\n }\n else {\n if (substr($h[0], 0, 1) == \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\".trim($h[0]);\n }\n elseif (!$key) {\n $headers[0] = trim($h[0]);trim($h[0]);\n }\n }\n }\n\n return $headers;\n }",
"public function getHeaderValue();",
"function ParseHeader($header='')\n{\n\t$resArr = array();\n\t$headerArr = explode(\"\\n\",$header);\n\tforeach ($headerArr as $key => $value) {\n\t\t$tmpArr=explode(\": \",$value);\n\t\tif (count($tmpArr)<1) continue;\n\t\t$resArr = array_merge($resArr, array($tmpArr[0] => count($tmpArr) < 2 ? \"\" : $tmpArr[1]));\n\t}\n\treturn $resArr;\n}",
"function getResponseHeaders();",
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}",
"function _parseHeader($header) {\n\n\t\tif (is_array($header)) {\n\t\t\tforeach ($header as $field => $value) {\n\t\t\t\tunset($header[$field]);\n\t\t\t\t$field = strtolower($field);\n\t\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\n\t\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t\t}\n\t\t\t\t$header[$field] = $value;\n\t\t\t}\n\t\t\treturn $header;\n\t\t} elseif (!is_string($header)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tpreg_match_all(\"/(.+):(.+)(?:(?<![\\t ])\" . $this->line_break . \"|\\$)/Uis\", $header, $matches, PREG_SET_ORDER);\n\n\t\t$header = array();\n\t\tforeach ($matches as $match) {\n\t\t\tlist(, $field, $value) = $match;\n\n\t\t\t$value = trim($value);\n\t\t\t$value = preg_replace(\"/[\\t ]\\r\\n/\", \"\\r\\n\", $value);\n\n\t\t\t$field = $this->_unescapeToken($field);\n\n\t\t\t$field = strtolower($field);\n\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t}\n\n\t\t\tif (!isset($header[$field])) {\n\t\t\t\t$header[$field] = $value;\n\t\t\t} else {\n\t\t\t\t$header[$field] = array_merge((array) $header[$field], (array) $value);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $header;\n\t}",
"private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}",
"public function getResponseHeaders();",
"public static function parseHeader($header): array;",
"abstract public function getHeaders();",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}",
"protected function _parseHeader( $aHeader )\n\t\t{\n\t\t\tfor ( $i = 0; $i < count( $aHeader ); ++$i )\n\t\t\t\tif ( $i == 0 ) // the status reply (also starts a new array, which prevents mixing previous header info\n\t\t\t\t{\n\t\t\t\t\t$aHeaderPart = explode( \" \", $aHeader[ $i ], 3 );\n\t\t\t\t\t$this->_requestheader = Array(\n\t\t\t\t\t\t\"response\"=>$aHeader[ $i ],\n\t\t\t\t\t\t\"protocol\"=>$aHeaderPart[ 0 ],\n\t\t\t\t\t\t\"status\"=>$aHeaderPart[ 1 ],\n\t\t\t\t\t\t\"statusinfo\"=>$aHeaderPart[ 2 ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse // other headers\n\t\t\t\t{\n\t\t\t\t\t$aHeaderPart = explode( \":\", $aHeader[ $i ], 2 );\n\t\t\t\t\t$this->_requestheader[ $aHeaderPart[ 0 ] ] = trim( $aHeaderPart[ 1 ] );\n\t\t\t\t}\n\t\t}",
"public function getHeaderValue()\n {\n }",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}",
"function decodeResponseHeaders($responseXML) \n {\n \n }",
"private static function getHeaderAndBody($response) {\n\n $header = self::http_parse_headers(substr($response, 0, strrpos($response,\"\\r\\n\\r\\n\")));\n $body = substr($response, strrpos($response,\"\\r\\n\\r\\n\")+4);\n\n return array($header,$body);\n }",
"protected function read_auth_header() {\n\t\t$auth_header = isset( $_SERVER['HTTP_AUTHORIZATION'] ) ? $_SERVER['HTTP_AUTHORIZATION'] : null;\n\n\t\tif ( !is_null( $auth_header ) ) {\n\t\t\t// Grab our type\n\t\t\t$auth_header_type = explode( ' ', $auth_header )[0];\n\n\t\t\t// Grab our string, and do some string processing\n\t\t\t$auth_header_string = str_replace(\n\t\t\t\t\"\\r\\n\",\n\t\t\t\t'',\n\t\t\t\ttrim( substr( $auth_header, strlen( $auth_header_type ) ) )\n\t\t\t);\n\n\t\t\t// Process our string into params\n\t\t\t$auth_header_params = array();\n\t\t\t// Regex source: http://oauth.googlecode.com/svn/code/php/OAuth.php OAuthUtil::split_header()\n\t\t\tif ( preg_match_all( '/([a-z_-]*)=(:?\"([^\"]*)\"|([^,]*))/', $auth_header_string, $params ) ) {\n\t\t\t\tforeach( $params[1] as $key => $val ) {\n\t\t\t\t\t$auth_header_params[ $val ] = trim( $params[2][ $key ], '\"' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Combine our parts\n\t\t\t$auth_header_parts = (object) array(\n\t\t\t\t'type' => $auth_header_type,\n\t\t\t\t'string' => $auth_header_string,\n\t\t\t\t'params' => $auth_header_params,\n\t\t\t);\n\n\t\t\treturn $auth_header_parts;\n\t\t}\n\n\t\treturn false;\n\t}",
"public abstract function getHeaders();",
"private function http_parse_headers($headers) {\n\t\t$retVal = array();\n\t\t$fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $headers));\n \tforeach($fields as $field) {\n\t\t if(preg_match('/([^:]+): (.+)/m', $field, $match)) {\n\t\t\t $match[1] = preg_replace('/(?<=^|[\\x09\\x20\\x2D])./e', 'strtoupper(\"\\0\")', strtolower(trim($match[1])));\n\t\t\t if(isset($retVal[$match[1]])) {\n\t\t\t\t $retVal[$match[1]] = array($retVal[$match[1]], $match[2]);\n \t\t\t} else {\n\t\t\t\t $retVal[$match[1]] = trim($match[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retVal;\n\t}",
"protected function parseHeader($header)\n {\n if ($this->isParsed) {\n return;\n }\n\n $headerParts = explode(\"\\n\", $header);\n\n if (count($headerParts) != 2) {\n throw new ResponseException(\"Response header must contain 2 lines! Given: {$header}\");\n }\n\n // Parsing State\n $stateParts = $this->parseLine($headerParts[0]);\n\n if (!$stateParts || $stateParts[0] != \"State\") {\n throw new ResponseException(\"Cannot parse a State field in response header\");\n }\n\n $this->state = (int)substr($stateParts[1], 0, 3);\n $this->stateMessage = substr($stateParts[1], 4);\n\n // Parsing request-id\n $requestIdParts = $this->parseLine($headerParts[1]);\n\n if (!$requestIdParts || $requestIdParts[0] != \"request-id\") {\n throw new ResponseException(\"Cannot parse a reqeust-id field in response header\");\n }\n\n $this->requestId = $requestIdParts[1];\n }",
"function getHeaders($headers)\r\n\t{\r\n\t\t$array = explode(\"\\n\",$headers);\r\n\t\tfor($i=0;$i<count($array);$i++)\r\n\t\t{\r\n\t\t\tif( ereg(\"([A-Za-z]+)/([0-9]\\.[0-9]) +([0-9]+) +([A-Za-z]+)\",$array[$i],$r) )\r\n\t\t\t{\r\n\t\t\t\t$hdrs['version'] = trim($r[2]);\r\n\t\t\t\t$hdrs['status_code'] = (int)trim($r[3]);\r\n\t\t\t\t$hdrs['status_text'] = trim($r[4]);\r\n\t \t}\r\n\t \telseif(ereg(\"([^:]*): +(.*)\",$array[$i],$r))\r\n\t \t{\r\n\t\t\t\t$hdr = eregi_replace(\"-\",\"_\",trim(strtolower($r[1])));\r\n\t\t\t\t$hdrs[$hdr] = trim($r[2]);\r\n\t\t }\r\n\t\t}\r\n\t \treturn $hdrs;\r\n\t}",
"function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}",
"private function parseResponseHeaders($string) {\n $parts = explode(\"\\n\", $string);\n foreach ($parts as $part) {\n if (strpos($part, ':') !== false) {\n list($name, $value) = explode(':', $part);\n $this->responseHeaders[trim($name)] = trim($value);\n }\n }\n }",
"static public function getHeadersFromCurlResponse($response) {\n $headers = array();\n $response = str_replace(\"HTTP/1.1 100 Continue\\r\\n\\r\\n\", '', $response);\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list ($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n }",
"private function parseIncomingRaw(string $header)\n {\n $parseRes = [];\n $content = '';\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n foreach ($fields as $field) {\n if (preg_match('/([^:]+): (.+)/m', $field, $match)) {\n $match[1] = preg_replace_callback('/(?<=^|[\\x09\\x20\\x2D])./', function ($matches) {\n return strtoupper($matches[0]);\n }, strtolower(trim($match[1])));\n if (isset($parseRes[$match[1]])) {\n $parseRes[$match[1]] = [$parseRes[$match[1]], $match[2]];\n } else {\n $parseRes[$match[1]] = trim($match[2]);\n }\n } elseif (preg_match('!HTTP/1\\.\\d (\\d)* .!', $field)) {\n $parseRes['status'] = $field;\n } else {\n $content .= $field . \"\\r\\n\";\n }\n }\n $parseRes['content'] = $content;\n\n return $parseRes;\n }",
"protected function c_parseHttpHeaders($cont_header_name=null, $cont_header_value=null) {\n $response = \"\";\n\t\t\n\t\t//$headers = var_export($this->clientoutput->headers,1);\n\t\t\n\t\tforeach ($this->clientoutput->headers as $header_name=>$header_value) {\n\t\t $headers .= $header_name.\"\\r\\n\".$header_value.\"\\r\\n\";\n\t\t\n\t\t if (($cont_header_name) && ($cont_header_name==$header_name)) {\n\t\t\t if ($cont_header_value == $header_value)\n\t\t\t\t return true;\n\t\t\t}\n }\n\t\t\n\t\t//self::write2disk('client-headers.log',\"\\r\\n\".var_export($headers,1));\t\t\n\t\t\n\t\treturn false;\n\t\t\n }",
"public function parseHTTPHeaders($header)\n {\n if (function_exists('http_parse_headers')) {\n return http_parse_headers($header);\n }\n\n /**\n * Polyfill for the http_parse_headers() function\n */\n $retVal = array();\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n foreach ($fields as $field) {\n if (preg_match_all('/([^:]+): (.+)/m', $field, $match)) {\n $match[1][0] = preg_replace_callback(\n '/(?<=^|[\\x09\\x20\\x2D])./',\n function ($matches) {\n return strtolower($matches[0]);\n },\n strtolower(trim($match[1][0]))\n );\n if (isset($retVal[$match[1][0]])) {\n $retVal[$match[1][0]] = array($retVal[$match[1][0]], $match[2][0]);\n } else {\n $retVal[$match[1][0]] = trim($match[2][0]);\n }\n }\n }\n\n return $retVal;\n\n }",
"public function getHeaders ();",
"public function ParseHeader($header = '')\n\t{\n\t\t$resArr = array();\n\t\t$headerArr = explode(\"\\n\", $header);\n\t\tforeach ($headerArr as $key => $value)\n\t\t{\n\t\t\t$tmpArr = explode(\": \", $value);\n\t\t\tif (count($tmpArr) < 1) continue;\n\t\t\t$resArr = array_merge($resArr, array($tmpArr[0] => count($tmpArr) < 2 ? \"\" : $tmpArr[1]));\n\t\t}\n\t\treturn $resArr;\n\t}",
"function GetHeader() {\n return ($this->ses['response']['header']);\n }",
"public function parseResponse($response)\n {\n // Parse the response and set the last response and headers.\n $info = curl_getinfo($this->ch);\n $this->__last_response_headers = substr(\n $response,\n 0,\n $info['header_size']\n );\n $this->__last_response = substr($response, $info['header_size']);\n }",
"function &parseResponseHeaders(&$data, $headers_processed=false)\n\t{\n\t\t\tif(preg_match('/^HTTP\\/1\\.[0-1] 200 Connection established/', $data))\n\t\t\t{\n\t\t\t\t$pos = strpos($data,\"\\r\\n\\r\\n\");\n\t\t\t\tif($pos || is_int($pos))\n\t\t\t\t{\n\t\t\t\t\t$bd = $pos+4;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pos = strpos($data,\"\\n\\n\");\n\t\t\t\t\tif($pos || is_int($pos))\n\t\t\t\t\t{\n\t\t\t\t\t\t$bd = $pos+2;\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$bd = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($bd)\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data, $bd);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$r=new jmap_xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');\n\t\t\t\t\treturn $r;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile(preg_match('/^HTTP\\/1\\.1 1[0-9]{2} /', $data))\n\t\t\t{\n\t\t\t\t$pos = strpos($data, 'HTTP', 12);\n\t\t\t\tif(!$pos && !is_int($pos)) // works fine in php 3, 4 and 5\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$data = substr($data, $pos);\n\t\t\t}\n\t\t\tif(!preg_match('/^HTTP\\/[0-9.]+ 200 /', $data))\n\t\t\t{\n\t\t\t\t$errstr= substr($data, 0, strpos($data, \"\\n\")-1);\n\t\t\t\t$r=new jmap_xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')');\n\t\t\t\treturn $r;\n\t\t\t}\n\n\t\t\t$GLOBALS['_xh']['headers'] = array();\n\t\t\t$GLOBALS['_xh']['cookies'] = array();\n\n\t\t\t$pos = strpos($data,\"\\r\\n\\r\\n\");\n\t\t\tif($pos || is_int($pos))\n\t\t\t{\n\t\t\t\t$bd = $pos+4;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pos = strpos($data,\"\\n\\n\");\n\t\t\t\tif($pos || is_int($pos))\n\t\t\t\t{\n\t\t\t\t\t$bd = $pos+2;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bd = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ar = preg_split(\"/\\r?\\n/\", trim(substr($data, 0, $pos)));\n\t\t\twhile(list(,$line) = @jmap_xmlrpc_each($ar))\n\t\t\t{\n\t\t\t\t// take care of multi-line headers and cookies\n\t\t\t\t$arr = explode(':',$line,2);\n\t\t\t\tif(count($arr) > 1)\n\t\t\t\t{\n\t\t\t\t\t$header_name = strtolower(trim($arr[0]));\n\t\t\t\t\tif ($header_name == 'set-cookie' || $header_name == 'set-cookie2')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($header_name == 'set-cookie2')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cookies = explode(',', $arr[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cookies = array($arr[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($cookies as $cookie)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// glue together all received cookies, using a comma to separate them\n\t\t\t\t\t\t\t// (same as php does with getallheaders())\n\t\t\t\t\t\t\tif (isset($GLOBALS['_xh']['headers'][$header_name]))\n\t\t\t\t\t\t\t\t$GLOBALS['_xh']['headers'][$header_name] .= ', ' . trim($cookie);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$GLOBALS['_xh']['headers'][$header_name] = trim($cookie);\n\t\t\t\t\t\t\t$cookie = explode(';', $cookie);\n\t\t\t\t\t\t\tforeach ($cookie as $pos => $val)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$val = explode('=', $val, 2);\n\t\t\t\t\t\t\t\t$tag = trim($val[0]);\n\t\t\t\t\t\t\t\t$val = trim(@$val[1]);\n\t\t\t\t\t\t\t\tif ($pos == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$cookiename = $tag;\n\t\t\t\t\t\t\t\t\t$GLOBALS['_xh']['cookies'][$tag] = array();\n\t\t\t\t\t\t\t\t\t$GLOBALS['_xh']['cookies'][$cookiename]['value'] = urldecode($val);\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{\n\t\t\t\t\t\t\t\t\tif ($tag != 'value')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t $GLOBALS['_xh']['cookies'][$cookiename][$tag] = $val;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$GLOBALS['_xh']['headers'][$header_name] = trim($arr[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif(isset($header_name))\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['_xh']['headers'][$header_name] .= ' ' . trim($line);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data = substr($data, $bd);\n\n\t\t\tif(!$headers_processed)\n\t\t\t{\n\t\t\t\t// Decode chunked encoding sent by http 1.1 servers\n\t\t\t\tif(isset($GLOBALS['_xh']['headers']['transfer-encoding']) && $GLOBALS['_xh']['headers']['transfer-encoding'] == 'chunked')\n\t\t\t\t{\n\t\t\t\t\tif(!$data = jmap_decode_chunked($data))\n\t\t\t\t\t{\n\t\t\t\t\t\t$r = new jmap_xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);\n\t\t\t\t\t\treturn $r;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isset($GLOBALS['_xh']['headers']['content-encoding']))\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['_xh']['headers']['content-encoding'] = str_replace('x-', '', $GLOBALS['_xh']['headers']['content-encoding']);\n\t\t\t\t\tif($GLOBALS['_xh']['headers']['content-encoding'] == 'deflate' || $GLOBALS['_xh']['headers']['content-encoding'] == 'gzip')\n\t\t\t\t\t{\n\t\t\t\t\t\t// if decoding works, use it. else assume data wasn't gzencoded\n\t\t\t\t\t\tif(function_exists('gzinflate'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($GLOBALS['_xh']['headers']['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$data = $degzdata;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($GLOBALS['_xh']['headers']['content-encoding'] == 'gzip' && $degzdata = @gzinflate(substr($data, 10)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$data = $degzdata;\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\t$r = new jmap_xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);\n\t\t\t\t\t\t\t\treturn $r;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$r = new jmap_xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);\n\t\t\t\t\t\t\treturn $r;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // end of 'if needed, de-chunk, re-inflate response'\n\n\t\t\t$r = null;\n\t\t\t$r = $r;\n\t\t\treturn $r;\n\t}",
"private function parseHeader($raw_headers){\n $headers = [];\n\n foreach( explode(\"\\n\", $raw_headers) as $i => $h ){\n $h = explode(':', $h, 2);\n\n if (isset($h[1])) {\n $headers[$h[0]] = trim($h[1]);\n }\n }\n\n return $headers;\n }",
"public function getHeaders() {}",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }",
"protected function parseResponse($response)\n {\n do {\n $parts = preg_split('|(?:\\r?\\n){2}|m', $response, 2);\n $again = false;\n\n if (isset($parts[1]) && preg_match(\"|^HTTP/1\\.[01](.*?)\\r\\n|mi\", $parts[1])) {\n $response = $parts[1];\n $again = true;\n }\n } while ($again);\n\n // remove rewrite's proxy headers\n if (stripos($response, self::PROXY_REWRITE_HEADER) !== false) {\n $response = str_ireplace(self::PROXY_REWRITE_HEADER, '', $response);\n }\n\n return $response;\n }",
"protected function _parseResponse($response) {\n\t\t$headers = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\t\t$body = substr($response, strlen($headers));\n\t\t\n\t\t//split up the headers\n\t\t$parts = preg_split(\"/\\r?\\n/\", $headers, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$heads = array();\n\t\tfor ($i = 1, $total = sizeof($parts); $i < $total; $i++ ) {\n\t\t\tlist($name, $value) = explode(': ', $parts[$i]);\n\t\t\t$heads[$name] = $value;\n\t\t}\n\t\tif (array_key_exists('Set-Cookie', $heads)) {\n\t\t\t$this->setCookie($heads['Set-Cookie']);\n\t\t}\n\t\t$this->__setInfo('responseHeaders', $heads);\n\t\t\n\t\t$this->response['headers'] = $heads;\n\t\t$this->response['body'] = trim($body);\t\t\n\t}",
"function getHeader($ch, $header) {\r\n\t\t$i = strpos($header, ':');\r\n\t\tif (!empty($i)) {\r\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n\t\t\t$value = trim(substr($header, $i + 2));\r\n\t\t\t$this->http_header[$key] = $value;\r\n\t\t}\t\t\r\n\t\treturn strlen($header);\r\n\t}",
"private function _status_parse( $header, $code ) {\n\t\tif ( $code == 201 ) {\n\t\t\treturn 'H';\n\t\t}\n\n\t\tif ( stripos( $header, 'X-Litespeed-Cache-Control: no-cache' ) !== false ) {\n\t\t\treturn 'N'; // Blacklist\n\t\t}\n\n\t\t$_cache_headers = array(\n\t\t\t'x-litespeed-cache',\n\t\t\t'x-lsadc-cache',\n\t\t\t'x-qc-cache',\n\t\t);\n\n\t\tforeach ( $_cache_headers as $_header ) {\n\t\t\tif ( stripos( $header, $_header ) !== false ) {\n\t\t\t\tif ( stripos( $header, $_header . ': miss' ) !== false ) {\n\t\t\t\t\treturn 'M'; // Miss\n\t\t\t\t}\n\t\t\t\treturn 'H'; // Hit\n\t\t\t}\n\t\t}\n\n\t\treturn 'B'; // Blacklist\n\t}",
"private function readHeader($ch, $header) {\r\n\t\t\t$len = strlen($header);\r\n\t\t\t$pair = explode(':',trim($header),2);\r\n\t\t\tif ( count($pair) !=2) return $len;\r\n\t\t\t$this ->responseHeader[$pair[0]] = $pair[1];\r\n\t\t\treturn $len;\r\n\t\t}",
"protected function fetchHeaders() \n {\n\n $authHeader = $this->request->getHeader(\"Authorization\");\n\n // exist if no Auth token is present in request\n if(!$authHeader) {\n \n // set API response via helper\n $response = setAPIresponse(['Success'=>'Authorization token required'], 400);\n \n returnJson($response);\n\n }\n\n // get token value from header\n $token = $authHeader->getValue();\n\n return $this->decodeToken($token);\n\n }",
"protected function parseHeaders( $headers )\n {\n $head = array();\n foreach ($headers as $k => $v) {\n $t = explode(':', $v, 2);\n if (isset($t[1]))\n $head[trim($t[0])] = trim($t[1]);\n else {\n $head[] = $v;\n if (preg_match(\"#HTTP/[0-9\\.]+\\s+([0-9]+)#\", $v, $out))\n $head['reponse_code'] = intval($out[1]);\n }\n }\n return $head;\n }",
"private function parseHeaders($raw)\n {\n $statusLine = null;\n $headers = array();\n foreach (preg_split('|(\\\\r?\\\\n)|', $raw) as $header) {\n if (!$statusLine) {\n $statusLine = $header;\n continue;\n }\n list($name, $value) = preg_split('|: |', $header);\n $headers[$name][] = $value;\n }\n\n return [$statusLine, $headers];\n }",
"protected function getLastResponseHeaders()\n {\n return ParserRegistry::getInstance()->getParser('message')\n ->parseResponse($this->client->__getLastResponseHeaders());\n }",
"abstract function parse_api_response();",
"function processHeader( $lastLine = CRLF )\r\n\t{\r\n\t\tif( $this->debug & DBGLOW ) echo \"processHeader( [lastLine] )\\n\";\r\n\t\t$headers = array();\r\n\t\t$finished = false;\r\n\t\t\r\n\t\twhile ( ( ! $finished ) && ( ! feof($this->socket)) ) {\r\n\t\t\t$str = fgets( $this->socket, 1024 );\r\n\t\t\tif( $this->debug & DBGINDATA ) echo \"HEADER : $str\";\r\n\t\t\t$finished = ( $str == $lastLine );\r\n\t\t\tif ( !$finished ) {\r\n\t\t\t\tlist( $hdr, $value ) = split( \": \", $str, 2 );\r\n\t\t\t\t// nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME \r\n\t\t\t\tif( isset( $headers[$hdr]) )\r\n\t\t\t\t\t$headers[$hdr] .= \"; \" . trim($value);\r\n\t\t\t\telse\r\n\t\t\t\t\t$headers[$hdr] = trim($value);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $headers;\r\n\t}",
"private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}",
"function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }",
"public function headerHandle()\n\t{\t\n\t\t$headers = array();\n\t\tif(is_array($this->server->all()))\n\t\t{\n\t\t\tforeach($this->server->all() as $key=>$val)\n\t\t\t{\n\t\t\t\tif('http_' == strtolower(substr($key,0,5)))\n\t\t\t\t{\n\t\t\t\t\t$headers[substr($key,5)] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}",
"private function parse_curl_response()\n {\n $this->status_code = curl_getinfo($this->curl_handle, CURLINFO_HTTP_CODE);\n #$this->http_info = array_merge($this->http_info, curl_getinfo($this->curl_handle));\n\n $header_size = curl_getinfo($this->curl_handle, CURLINFO_HEADER_SIZE);\n\n // Capture the HTTP response headers\n $this->http_response_headers = substr($this->curl_response, 0, $header_size);\n\n // Capture the HTTP response body\n $this->http_body = substr($this->curl_response, $header_size);\n\n if(!$this->do_not_exit)\n {\n $this->_check_valid_response($this->http_body);\n }\n //close connection\n curl_close($this->curl_handle);\n }",
"function getHeader($ch, $header) {\r\n $i = strpos($header, ':');\r\n if (!empty($i)) {\r\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n $value = trim(substr($header, $i + 2));\r\n $this->http_header[$key] = $value;\r\n }\r\n return strlen($header);\r\n }",
"protected static function get_response_headers()\n {\n }",
"public function getHeaderData() {}",
"public function getHeader($name);",
"protected function parseResponse($response)\n\t{\n\t\t$this->params = array();\n\t\t\n\t\tif (empty($response)) {\n\t\t\tthrow new OAuthException('Some error occurred when do http request', -1);\n\t\t}\n\t\t\n\t\t$pos = strpos($response, \"\\r\\n\\r\\n\");\n\t\t$header = substr($response, 0, $pos);\n\t\t$body = trim(substr($response, $pos + 4));\n\t\t\n\t\t$status = substr($header, 0, strpos($header, \"\\r\\n\"));\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d\\s([\\d]+)\\s(.*)$/', $status, $matches)) {\n\t\t\t$code = intval($matches[1]);\n\t\t\t$status = $matches[2];\n\t\t\tif ($code == 400 || $code == 401 || $code == 500) {\n\t\t\t\tthrow new OAuthException($body, $code);\n\t\t\t} elseif ($code == 200) {\n\t\t\t\tparse_str($body, $this->params);\n\t\t\t} else {\n\t\t\t\tthrow new OAuthException($status, $code);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new OAuthException('Invalid http response', -1);\n\t\t}\n\t}",
"private function read_header($ch, $string) {\r\n if (preg_match('/^(.*): (.*?)\\s?$/', $string, $result)) {\r\n if (!$this->out_total && $result[1] == 'Content-Length') {\r\n $this->out_total = intval($result[2]);\r\n if ($this->out_total != $this->content_length)\r\n $this->content_length = $this->out_total;\r\n }\r\n\r\n if (!$this->finish_write_headers && in_array($result[1], $this->proxy_headers))\r\n header(\"{$result[1]}: {$result[2]}\");\r\n }\r\n else if (preg_match('/^HTTP\\/1\\.[01] (\\d+) (.*)\\s?$/', $string, $result)) {\r\n $this->code = intval($result[1]);\r\n if ($this->code == 200 || $this->code == 302) {\r\n // OK, write response\r\n if (!$this->finish_write_headers) {\r\n header(\"Content-Type: {$this->content_type}\");\r\n\r\n foreach ($this->headers as $key => $value) {\r\n header(\"$key: $value\");\r\n }\r\n }\r\n } else {\r\n // Error\r\n return 0;\r\n }\r\n }\r\n return strlen($string);\r\n }",
"public function getHeaders() {\n if (!isset($this->rawHeaders) && isset($this->query['opts'][CURLOPT_WRITEHEADER])) {\n rewind($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headersRaw = stream_get_contents($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headers = explode(\"\\n\", rtrim($headersRaw));\n $this->rawHeaders['result'] = trim(array_shift($headers));\n\n foreach ($headers AS $header) {\n \t\t$parts = array_map('trim', explode(':', $header, 2));\n $name = $parts[0];\n $value = '';\n if (!empty($parts[1])) {\n $value = $parts[1];\n }\n $name = strtolower($name);\n $this->rawHeaders[$name] = $value;\n }\n }\n return $this->rawHeaders;\n }",
"private function parseHeaders($httpData)\n\t{\n\t\t$this->headers = new Collection( http_parse_headers($httpData) );\n\t}",
"function getHeader($ch, $header) {\n\t\t\t$i = strpos($header, ':');\n\t\t\tif (!empty($i)) {\n\t\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t\t$this->http_header[$key] = $value;\n\t\t\t}\n\t\t\treturn strlen($header);\n\t\t}",
"function urlResponse($url) {\n $headers = get_headers($url);\n return substr($headers[0],9, 3);\n }",
"function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\treturn strlen($header);\n\t}",
"private function header_handler($ch, $header) {\r\n\t\t$line = trim($header);\r\n\t\tif (!empty($line)) {\r\n\t\t\tif (count($this->log[\"response\"]) == 0) { $this->location_idx++; }\t\t\t\t\t\t\t\t# first location\r\n\t\t\tif (!isset($this->log[\"response\"][$this->location_idx])) {\t\t\t\t\t\t\t\t\t\t# initialize array for each location\r\n\t\t\t\t$this->log[\"response\"][$this->location_idx] = $this->log[\"set-cookie\"][$this->location_idx] = $this->header_vars[$this->location_idx] = array();\r\n\t\t\t}\r\n\t\t\t$this->log[\"response\"][$this->location_idx][] = $line;\r\n\t\t\t# inspect name / value pair\r\n\t\t\t$pair = explode(\":\", $header, 2);\r\n\t\t\tif (count($pair) == 2) {\r\n\t\t\t\t$pair[0] = strtolower(trim($pair[0]));\r\n\t\t\t\t$pair[1] = trim($pair[1]);\r\n\t\t\t\tif ($pair[0] == \"set-cookie\") { $this->cookie_handler($pair[1]); }\t\t\t\t\t\t\t# received cookie headers will still be processed as read-only variables even when no cookie handling is enabled\r\n\t\t\t\telse {\r\n\t\t\t\t\t# store name / value pair, and additionally an array of valid ip extracted from value that may be useful sometimes\r\n\t\t\t\t\t$this->header_vars[$this->location_idx][$pair[0]] = $pair[1];\r\n\t\t\t\t\t$extracted_ips = $this->extract_ips($pair[1]);\r\n\t\t\t\t\tif (!empty($extracted_ips)) { $this->header_vars[$this->location_idx][$pair[0].\":ip\"] = $extracted_ips; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { $this->location_idx++; }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# next header is related to a redirected location\r\n\t\treturn strlen($header);\r\n\t}",
"public function getHeader(string $name);",
"function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\t\n\t\treturn strlen($header);\n\t}",
"protected function parse_header($ch, $header)\n\t{\n\t\t$result = array();\n\n\t\tif (preg_match_all('/(\\w[^\\s:]*):[ ]*([^\\r\\n]*(?:\\r\\n[ \\t][^\\r\\n]*)*)/', $header, $matches))\n\t\t{\n\t\t\tforeach ($matches[0] as $key => $value)\n\t\t\t\t$result[$matches[1][$key]] = $matches[2][$key];\n\t\t}\n\n\t\tif ($result)\n\t\t\t$this->header += $result;\n\n\t\treturn strlen($header);\n\t}",
"public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }",
"abstract protected function parseResponse($response);",
"function _parseResponse($res) {\n\n\t\t// set defaults\n\t\t$response = $this->response;\n\t\t$response['raw']['response'] = $res;\n\n\t\t// parse header\n\t\tif (preg_match(\"/^(.+\\r\\n)(.*)(?<=\\r\\n)\\r\\n/Us\", $res, $match)) {\n\t\t\t\n\t\t\tlist($null, $response['raw']['status-line'], $response['raw']['header']) = $match;\n\t\t\t$response['raw']['body'] = substr($res, strlen($match[0]));\n\n\t\t\tif (preg_match(\"/(.+) ([0-9]{3}) (.+)\\r\\n/DU\", $response['raw']['status-line'], $match)) {\n\t\t\t\t$response['status']['http-version'] = $match[1];\n\t\t\t\t$response['status']['code'] = (int) $match[2];\n\t\t\t\t$response['status']['reason-phrase'] = $match[3];\n\t\t\t}\n\n\t\t\t$response['header'] = $this->_parseHeader($response['raw']['header']);\n\t\t\t$response['body'] = $response['raw']['body'];\n\n\t\t\tif (!empty($response['header'])) {\n\t\t\t\t$response['cookies'] = $this->parseCookies($response['header']);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$response['body'] = $res;\n\t\t\t$response['raw']['body'] = $res;\n\t\t}\n\n\t\tif (isset($response['header']['Transfer-Encoding']) && $response['header']['Transfer-Encoding'] == 'chunked') {\n\t\t\t$response['body'] = $this->_decodeChunkedBody($response['body']);\n\t\t}\n\n\t\tforeach ($response['raw'] as $field => $val) {\n\t\t\tif ($val === '') {\n\t\t\t\t$response['raw'][$field] = null;\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}",
"private function api_get_headers($fp) {\n $data = stream_get_meta_data($fp);\n return $data['wrapper_data'];\n }",
"function getHeaders($string)\n{\n if (strpos($string, ':') == false) {\n return null;\n }\n\n $string = stristr($string, \"\\n\", false);\n $string = stristr($string, \"\\n\\r\", true);\n $string = removeFirstChar($string);\n\n $result = array();\n\n while (strpos($string, ':') != false) {\n if (strpos($string, \"\\n\") != false) {\n $substring = stristr($string, \"\\n\", true);\n $substring = removeUnnecessaryCharas($substring);\n $string = stristr($string, \"\\n\", false);\n $string = removeFirstChar($string);\n } else {\n $substring = $string;\n }\n\n $key = stristr($substring, ':', true);\n $value = stristr($substring, ' ', false);\n $value = removeUnnecessaryCharas($value);\n $result[$key] = $value;\n if ($string == $substring) {\n break;\n }\n }\n return $result;\n}",
"function read_header($curl, $string) {\n print \"Received header: $string\\n\\n\";\n return strlen($string);\n}",
"protected function curl_parse ( $response )\r\n\t{\r\n\t\tif (empty($response))\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\r\n\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$response,2);\r\n\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +100@', $lines[0]))\r\n\t\t{\r\n\t\t\t/* HTTP/1.x 100 Continue\r\n\t\t\t * the real data is on the next line\r\n\t\t\t*/\r\n\t\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$body,2);\r\n\t\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\t}\r\n\t\r\n\t\t// first line of headers is the HTTP response code\r\n\t\t$http_line = array_shift($lines);\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +([0-9]{3})@', $http_line, $matches))\r\n\t\t{\r\n\t\t\t$code = $matches[1];\r\n\t\t}\r\n\t\r\n\t\t// put the rest of the headers in an array\r\n\t\t$headers = array();\r\n\t\tforeach ($lines as $l)\r\n\t\t{\r\n\t\t\tlist($k, $v) = explode(': ', $l, 2);\r\n\t\t\t$headers[strtolower($k)] = $v;\r\n\t\t}\r\n\t\r\n\t\treturn array( 'code' => $code, 'headers' => $headers, 'body' => $body);\r\n\t}",
"protected function parseHeaders($header = \"\")\n {\n $this->headers = array();\n\n foreach (explode(\"\\r\\n\", $header) as $i => $line)\n if ($i === 0) {\n $this->code = $line;\n } else {\n $temp = explode(': ', $line);\n if (empty($temp[0]) || empty($temp[1])) {\n continue;\n }\n $this->headers[strtolower($temp[0])] = $temp[1];\n }\n\n return $this;\n }",
"public function get_headers()\n {\n }",
"public function get_headers()\n {\n }"
] | [
"0.83169067",
"0.7487907",
"0.7127702",
"0.7112591",
"0.70451623",
"0.7016287",
"0.6985608",
"0.6967405",
"0.6958488",
"0.69515896",
"0.68509287",
"0.6840427",
"0.68246156",
"0.6816638",
"0.678077",
"0.678077",
"0.678077",
"0.676847",
"0.67633003",
"0.66776305",
"0.6643737",
"0.66404575",
"0.65958744",
"0.6590799",
"0.6590799",
"0.6579386",
"0.65488833",
"0.6542621",
"0.6537559",
"0.6527941",
"0.65278715",
"0.6514254",
"0.6495516",
"0.64671963",
"0.64601696",
"0.6455625",
"0.6424176",
"0.6424049",
"0.6377687",
"0.63672435",
"0.6366659",
"0.6366639",
"0.63455045",
"0.63389724",
"0.6327289",
"0.63179106",
"0.6287608",
"0.6276996",
"0.62511814",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.6247225",
"0.62367177",
"0.62172866",
"0.6206966",
"0.6202391",
"0.61924756",
"0.6174353",
"0.6172842",
"0.61539674",
"0.615225",
"0.6149625",
"0.61437726",
"0.61241615",
"0.61141187",
"0.61068434",
"0.61064345",
"0.6105217",
"0.61022234",
"0.6093423",
"0.60769045",
"0.6076199",
"0.60742724",
"0.6073284",
"0.60701936",
"0.6068704",
"0.60438323",
"0.6041196",
"0.6031061",
"0.6022654",
"0.60154223",
"0.6012882",
"0.600913",
"0.5997503",
"0.599325",
"0.5986543",
"0.5985274",
"0.59852296",
"0.5984216",
"0.5967853",
"0.5953404",
"0.59528613",
"0.59527105"
] | 0.7015261 | 6 |
split http header response into array | function http_response_header_lines($hdr_str) {
$lines = explode("\n", $hdr_str);
$hdr_arr['status_line'] = trim(array_shift($lines));
foreach ($lines as $line) {
list($key, $val) = explode(':', $line, 2);
$hdr_arr[trim($key)] = trim($val);
}
return $hdr_arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}",
"function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}",
"public function headers()\r\n\t\t\t {\r\n return self::headersToArray(explode( \"\\r\\n\", $this->headers ));\r\n\t\t\t }",
"private function headersToArray( $headers )\r\n\t\t\t {\r\n\t\t\t $return = array();\r\n\t\t\t foreach ( $headers as $item ) {\r\n\t\t\t if ( preg_match( '#HTTP/1\\.\\d (?P<code>\\d{3}) (?P<text>.*)#', $item, $matches ) ) {\r\n\t\t\t $return['Http'][$matches[1]] = $matches[0];\r\n\t\t\t } else {\r\n\t\t\t $split = strpos( $item, ':' );\r\n\t\t\t $key = substr( $item, 0, $split );\r\n\t\t\t $value = trim( substr( $item, $split + 1 ) );\r\n\t\t\t $return[$key] = $value;\r\n \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t return $return;\r\n\t\t\t }",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"private static function http_parse_headers($header)\n {\n $headers = array();\n $key = '';\n\n foreach(explode(\"\\n\", $header) as $i => $h) {\n $h = explode(':', $h, 2);\n\n if (isset($h[1]))\n {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n }\n elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));\n }\n else {\n $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));\n }\n\n $key = $h[0];\n }\n else {\n if (substr($h[0], 0, 1) == \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\".trim($h[0]);\n }\n elseif (!$key) {\n $headers[0] = trim($h[0]);trim($h[0]);\n }\n }\n }\n\n return $headers;\n }",
"public abstract function getHeaders();",
"abstract public function getHeaders();",
"function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}",
"public function getHeadersRaw(): array;",
"private static function getHeaderAndBody($response) {\n\n $header = self::http_parse_headers(substr($response, 0, strrpos($response,\"\\r\\n\\r\\n\")));\n $body = substr($response, strrpos($response,\"\\r\\n\\r\\n\")+4);\n\n return array($header,$body);\n }",
"public function getHeaders ();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"private function header2Array($str)\n {\n if (is_array($str)) return $str;\n \n $result = [];\n $array = explode(\"\\n\", trim(str_replace(\"\\r\\n\", \"\\n\", $str), \"\\n\"));\n foreach($array as $i => $line) {\n if ($i === 0) {\n $result['Http-Status'] = $line; // \"HTTP/1.1 200 OK\"\n } else {\n $header = explode(':', $line, 2);\n if (!$header[0]) continue;\n \n if (isset($header[1])) {\n $result[trim($header[0])] = trim($header[1]);\n } else {\n $result[] = trim($header[0]);\n }\n }\n }\n return $result;\n }",
"public function getHeaderLines()\n {\n $headers = [];\n foreach ($this->headers as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $v) {\n $headers[] = $key . ': ' . $v;\n }\n } else {\n $headers[] = $key . ': ' . $value;\n }\n }\n\n return $headers;\n }",
"public function headerHandle()\n\t{\t\n\t\t$headers = array();\n\t\tif(is_array($this->server->all()))\n\t\t{\n\t\t\tforeach($this->server->all() as $key=>$val)\n\t\t\t{\n\t\t\t\tif('http_' == strtolower(substr($key,0,5)))\n\t\t\t\t{\n\t\t\t\t\t$headers[substr($key,5)] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}",
"protected function headerToArray($header)\n\t{\n\t\t$headers = [];\n\t\t$parts = explode(\"\\r\\n\", $header);\n\t\tforeach ($parts as $singleHeader) {\n\t\t\t$delimiter = strpos($singleHeader, ': ');\n\t\t\tif ($delimiter !== false) {\n\t\t\t\t$key = substr($singleHeader, 0, $delimiter);\n\t\t\t\t$val = substr($singleHeader, $delimiter + 2);\n\t\t\t\t$headers[$key] = $val;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$delimiter = strpos($singleHeader, ' ');\n\t\t\t\tif ($delimiter !== false) {\n\t\t\t\t\t$key = substr($singleHeader, 0, $delimiter);\n\t\t\t\t\t$val = substr($singleHeader, $delimiter + 1);\n\t\t\t\t\t$headers[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}",
"private function readHeaders() {\n $headers = $this->status->getHeaders();\n\n foreach ($headers as $key => $value) {\n switch ($key) {\n case \"Location\":\n $this->response['location'] = $value[0];\n break;\n\n case \"Content-Type\":\n $this->response['content_type'] = $value[0];\n break;\n\n case \"Content-Length\":\n $this->response['content_length'] = $value[0];\n break;\n\n default:\n break;\n }\n }\n }",
"public function getResponseHeaders();",
"public static function extractHeaders($arr): array\n {\n $result = [];\n\n foreach ($arr as $key => $value) {\n $key = strtoupper($key);\n if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$specialHeaders)) {\n if ($key === 'HTTP_CONTENT_TYPE' || $key === 'HTTP_CONTENT_LENGTH') {\n continue;\n }\n $result[$key] = $value;\n }\n }\n\n return $result;\n }",
"public function getHeaders() {}",
"protected static function getHeaderToken()\n {\n return [];\n }",
"protected static function getHeaderToken()\n {\n return [];\n }",
"function getHeaders($headers)\r\n\t{\r\n\t\t$array = explode(\"\\n\",$headers);\r\n\t\tfor($i=0;$i<count($array);$i++)\r\n\t\t{\r\n\t\t\tif( ereg(\"([A-Za-z]+)/([0-9]\\.[0-9]) +([0-9]+) +([A-Za-z]+)\",$array[$i],$r) )\r\n\t\t\t{\r\n\t\t\t\t$hdrs['version'] = trim($r[2]);\r\n\t\t\t\t$hdrs['status_code'] = (int)trim($r[3]);\r\n\t\t\t\t$hdrs['status_text'] = trim($r[4]);\r\n\t \t}\r\n\t \telseif(ereg(\"([^:]*): +(.*)\",$array[$i],$r))\r\n\t \t{\r\n\t\t\t\t$hdr = eregi_replace(\"-\",\"_\",trim(strtolower($r[1])));\r\n\t\t\t\t$hdrs[$hdr] = trim($r[2]);\r\n\t\t }\r\n\t\t}\r\n\t \treturn $hdrs;\r\n\t}",
"public function getHeaders(): array\n {\n }",
"public static function parseHeader($header): array;",
"protected function _parseHeader() {}",
"private function http_parse_headers($headers) {\n\t\t$retVal = array();\n\t\t$fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $headers));\n \tforeach($fields as $field) {\n\t\t if(preg_match('/([^:]+): (.+)/m', $field, $match)) {\n\t\t\t $match[1] = preg_replace('/(?<=^|[\\x09\\x20\\x2D])./e', 'strtoupper(\"\\0\")', strtolower(trim($match[1])));\n\t\t\t if(isset($retVal[$match[1]])) {\n\t\t\t\t $retVal[$match[1]] = array($retVal[$match[1]], $match[2]);\n \t\t\t} else {\n\t\t\t\t $retVal[$match[1]] = trim($match[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retVal;\n\t}",
"public function getHeaders(): array\n {\n $result = [];\n\n foreach ($this->env as $key => $value) {\n if (stripos($key, 'HTTP_') === 0 && !Text::strEnds($key, '_RAW')) {\n $headerKey = static::normalizeHeaderName(substr($key, 5));\n $result[$headerKey][] = $value;\n }\n }\n\n return $result;\n }",
"private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}",
"public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }",
"function http_parse_headers($headers) {\n\t\t$replace = ($this->http_linebreak == \"\\n\" ? \"\\r\\n\" : \"\\n\");\n\t\t$headers = str_replace($replace, $this->http_linebreak, trim($headers));\n\t\t$headers = explode($this->http_linebreak, $headers);\n\t\t$this->http_response_headers = array();\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d (\\d{3})/', $headers[0], $matches)) {\n\t\t $this->http_response_code = intval($matches[1]);\n\t\t array_shift($headers);\n\t\t}\n\t\tif($headers):\n\t\t\tforeach ($headers as $string) {\n\t\t\t list($header, $value) = explode(': ', $string, 2);\n\t\t\t $this->http_response_headers[$header] = trim($value);\n\t\t\t}\n\t\tendif;\n\t}",
"private function parseHeaders($raw)\n {\n $statusLine = null;\n $headers = array();\n foreach (preg_split('|(\\\\r?\\\\n)|', $raw) as $header) {\n if (!$statusLine) {\n $statusLine = $header;\n continue;\n }\n list($name, $value) = preg_split('|: |', $header);\n $headers[$name][] = $value;\n }\n\n return [$statusLine, $headers];\n }",
"function getResponseHeaders();",
"private static function split_header($header)\n {\n $pattern = '/(([-_a-z]*)=(\"([^\"]*)\"|([^,]*)),?)/';\n $offset = 0;\n $params = array();\n while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0)\n {\n $match = $matches[0];\n $header_name = $matches[2][0];\n $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];\n $params[$header_name] = OAuthUtil::urldecode_rfc3986( $header_content );\n $offset = $match[1] + strlen($match[0]);\n }\n\n if (isset($params['realm']))\n unset($params['realm']);\n\n return $params;\n }",
"protected function fetchHeader($response)\r\n {\r\n $headers = [];\r\n $headerSize = 0;\r\n $headerParts = explode(PHP_EOL, $response);\r\n\r\n foreach ($headerParts as $headerString) {\r\n\r\n $headerSize += strlen($headerString);\r\n\r\n $headerString = trim($headerString);\r\n if (empty($headerString)) {\r\n break;\r\n }\r\n\r\n if (strpos($headerString, ':') !== false) {\r\n $headerSize += strlen(PHP_EOL);\r\n $headerString = str_replace('\"', '', $headerString);\r\n $headerStringParts = explode(':', $headerString);\r\n $headerStringParts = array_map('trim', $headerStringParts);\r\n\r\n $headers[ $headerStringParts[ 0 ] ] = $headerStringParts[ 1 ];\r\n } elseif (preg_match(\"/(HTTP\\/[0-9].[0-9])\\s([0-9]+)\\s([a-zA-Z]+)/\", $headerString, $matches)) {\r\n $headerSize += strlen(PHP_EOL);\r\n\r\n $this->info->httpVersion = $matches[ 1 ];\r\n $this->info->httpCode = $matches[ 2 ];\r\n $this->info->httpCodeDescription = $matches[ 3 ];\r\n }\r\n }\r\n\r\n $this->headers = new Headers($headers);\r\n\r\n // Update info\r\n if ($this->headers->offsetExists('contentType')) {\r\n $this->info->contentType = $this->headers->offsetGet('contentType');\r\n }\r\n\r\n $this->info->headerSize = $headerSize;\r\n }",
"static public function getHeadersFromCurlResponse($response) {\n $headers = array();\n $response = str_replace(\"HTTP/1.1 100 Continue\\r\\n\\r\\n\", '', $response);\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list ($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n }",
"private function parseHeader($raw_headers){\n $headers = [];\n\n foreach( explode(\"\\n\", $raw_headers) as $i => $h ){\n $h = explode(':', $h, 2);\n\n if (isset($h[1])) {\n $headers[$h[0]] = trim($h[1]);\n }\n }\n\n return $headers;\n }",
"public function toHeaders(): array;",
"function ParseHeader($header='')\n{\n\t$resArr = array();\n\t$headerArr = explode(\"\\n\",$header);\n\tforeach ($headerArr as $key => $value) {\n\t\t$tmpArr=explode(\": \",$value);\n\t\tif (count($tmpArr)<1) continue;\n\t\t$resArr = array_merge($resArr, array($tmpArr[0] => count($tmpArr) < 2 ? \"\" : $tmpArr[1]));\n\t}\n\treturn $resArr;\n}",
"function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}",
"public function getHeaders() {\n if (!isset($this->rawHeaders) && isset($this->query['opts'][CURLOPT_WRITEHEADER])) {\n rewind($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headersRaw = stream_get_contents($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headers = explode(\"\\n\", rtrim($headersRaw));\n $this->rawHeaders['result'] = trim(array_shift($headers));\n\n foreach ($headers AS $header) {\n \t\t$parts = array_map('trim', explode(':', $header, 2));\n $name = $parts[0];\n $value = '';\n if (!empty($parts[1])) {\n $value = $parts[1];\n }\n $name = strtolower($name);\n $this->rawHeaders[$name] = $value;\n }\n }\n return $this->rawHeaders;\n }",
"public function getHeadersArray() { return $this->headers; }",
"protected function parseHeaders( $headers )\n {\n $head = array();\n foreach ($headers as $k => $v) {\n $t = explode(':', $v, 2);\n if (isset($t[1]))\n $head[trim($t[0])] = trim($t[1]);\n else {\n $head[] = $v;\n if (preg_match(\"#HTTP/[0-9\\.]+\\s+([0-9]+)#\", $v, $out))\n $head['reponse_code'] = intval($out[1]);\n }\n }\n return $head;\n }",
"private function setHeaders($result)\n {\n $headers = [];\n $resultsRaw = explode(PHP_EOL, $result);\n $mainInformation = explode(' ', array_shift($resultsRaw), 3);\n $version = explode('/', $mainInformation[0])[1];\n $code = $mainInformation[1];\n foreach ($resultsRaw as $row) {\n $parts = explode(':', $row);\n if (count($parts) === 2)\n {\n $headers[trim($parts[0])] = trim($parts[1]);\n }\n }\n return [$headers, $code, $version];\n }",
"public function getHeaders(): array {\n $result = [];\n\n foreach ($this->headers as $key => $lines) {\n $name = $this->headerNames[$key];\n $result[$name] = $lines;\n }\n\n return $result;\n }",
"private function getHttpHeaders()\n {\n $ret = [];\n foreach ($this->httpConfig->getHeaders() as $k => $v) {\n $ret[] = \"$k: $v\";\n }\n return $ret;\n }",
"protected static function parseHeaders(ResponseInterface $response)\n {\n $headers = [];\n\n foreach ($response->getHeaders() as $name => $values) {\n $headers[static::normalizeHeaderName($name)] = $values;\n }\n\n if (! isset($headers['Content-Type']) || empty($headers['Content-Type'])) {\n $headers['Content-Type'] = ['text/html'];\n }\n\n return $headers;\n }",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}",
"#[Pure]\nfunction http_parse_headers($header) {}",
"private function parseHeaders($headers): array {\n if (is_string($headers)) {\n $headers = explode(\"\\r\\n\", $headers);\n }\n\n if (empty($headers)) {\n return [];\n }\n\n $result = [];\n foreach ($headers as $key => $line) {\n if (is_numeric($key)) {\n if (strpos($line, 'HTTP/') === 0) {\n // Strip the status line and restart.\n $result = [];\n continue;\n } elseif (strstr($line, ': ')) {\n list($key, $line) = explode(': ', $line);\n } else {\n continue;\n }\n }\n if (is_array($line)) {\n $result[$key] = array_merge($result[$key] ?? [], $line);\n } else {\n $result[$key][] = $line;\n }\n }\n\n return $result;\n }",
"public static function prepareHeaders(ResponseInterface $response): array\n {\n $preparedHeaders = [];\n $statusHeader = rtrim(self::generateStatusLine($response), \"\\r\\n\");\n\n $preparedHeaders[] = $statusHeader;\n $headers = $response->getHeaders();\n if ($headers instanceof Headers) {\n $preparedHeaders = array_merge($preparedHeaders, $headers->getPreparedValues());\n } else {\n foreach (array_keys($headers) as $name) {\n $preparedHeaders[] = $response->getHeaderLine($name);\n }\n }\n\n return $preparedHeaders;\n }",
"public static function formatHeadersToArray(array $rawHeaders)\r\r\n {\r\r\n $headers = array();\r\r\n\r\r\n foreach ($rawHeaders as $line) {\r\r\n if (strpos($line, ':') === false) {\r\r\n $headers['http_code'] = $line;\r\r\n } else {\r\r\n list ($key, $value) = explode(': ', $line);\r\r\n $headers[$key] = $value;\r\r\n }\r\r\n }\r\r\n\r\r\n return $headers;\r\r\n }",
"private function make_response_array($response) {\n $myarray = array();\n $data = explode(\"\\n\", $response);\n if (strpos($data[0], 'HTTP') === 0) {\n // the first line is a status code\n $myarray['status'] = $data[0];\n array_shift($data);\n }\n foreach ($data as $part) {\n if (json_decode($part)) {\n $myarray[] = json_decode($part);\n continue;\n }\n $middle = explode(\": \", $part, 2);\n $myarray[trim($middle[0])] = trim($middle[1]);\n }\n return $myarray;\n }",
"private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}",
"private function returnImapHeadersArr(){\n\t\treturn imap_headers($this->stream);\n\t}",
"public function getHeaders()\n {\n }",
"public function getHeaders()\n {\n }",
"public function ParseHeader($header = '')\n\t{\n\t\t$resArr = array();\n\t\t$headerArr = explode(\"\\n\", $header);\n\t\tforeach ($headerArr as $key => $value)\n\t\t{\n\t\t\t$tmpArr = explode(\": \", $value);\n\t\t\tif (count($tmpArr) < 1) continue;\n\t\t\t$resArr = array_merge($resArr, array($tmpArr[0] => count($tmpArr) < 2 ? \"\" : $tmpArr[1]));\n\t\t}\n\t\treturn $resArr;\n\t}",
"public static function processHeaders($xRawHeader)\n {\n $aRawHeader = is_array($xRawHeader) ? $xRawHeader : explode(\"\\n\", $xRawHeader);\n $hHeaders = [];\n $sPrevMatch = '';\n\n foreach ($aRawHeader as $sLine)\n {\n if (preg_match('/^([a-z][a-z0-9-_]+):/is', $sLine, $aMatch))\n {\n $sHeaderName = strtolower($aMatch[1]);\n $sPrevMatch = $sHeaderName;\n $hHeaders[$sHeaderName] = trim(substr($sLine, strlen($sHeaderName) + 1));\n }\n else\n {\n if (!empty($sPrevMatch))\n {\n $hHeaders[$sPrevMatch] .= ' ' . $sLine;\n }\n }\n }\n\n return $hHeaders;\n }",
"private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }",
"protected function readHeaders()\n {\n $ret = [];\n foreach ($this->environment as $key => $value) {\n # Note: the content-type and content-length headers always come\n # after the `CONTENT_TYPE` and `CONTENT_LENGTH` values in the\n # $_SERVER superglobal; if you use the values for the non `HTTP_...`\n # version, they will just be overwritten by the `HTTP_` version.\n if (strpos($key, \"HTTP_\") === 0) {\n $key = substr($key, 5);\n $key = strtolower($key);\n $key = str_replace(\"_\", \"-\", $key);\n $ret[$key] = $value;\n }\n }\n return $ret;\n }",
"public function headers(): Collection;",
"function getHeaders($string)\n{\n if (strpos($string, ':') == false) {\n return null;\n }\n\n $string = stristr($string, \"\\n\", false);\n $string = stristr($string, \"\\n\\r\", true);\n $string = removeFirstChar($string);\n\n $result = array();\n\n while (strpos($string, ':') != false) {\n if (strpos($string, \"\\n\") != false) {\n $substring = stristr($string, \"\\n\", true);\n $substring = removeUnnecessaryCharas($substring);\n $string = stristr($string, \"\\n\", false);\n $string = removeFirstChar($string);\n } else {\n $substring = $string;\n }\n\n $key = stristr($substring, ':', true);\n $value = stristr($substring, ' ', false);\n $value = removeUnnecessaryCharas($value);\n $result[$key] = $value;\n if ($string == $substring) {\n break;\n }\n }\n return $result;\n}",
"public function getHeaders()\n {\n $headers = array();\n foreach ($this->headers as $name => $content) {\n if (is_numeric($name) === false) {\n $content = ucwords($name) . ': ' . $content;\n }\n $headers[] = $content;\n }\n\n return $headers;\n }",
"private function getHeaders(string $content): array\n {\n return [\n 'Accept: application/json',\n 'Content-Type: application/json',\n 'Connection: close',\n 'Content-Length: ' . strlen($content),\n ];\n }",
"protected function parseHeaders($content)\n {\n $headers = [];\n $rawHeaders = preg_split('/\\\\r\\\\n/', $content);\n\n foreach ($rawHeaders as $rawHeader) {\n if (strpos($rawHeader, ':') === false) {\n continue;\n }\n\n list($name, $value) = explode(':', $rawHeader, 2);\n $headers[trim($name)] = trim($value);\n }\n\n return $headers;\n }",
"private function parseRequestHeaders(array $array)\n {\n $headers = [];\n\n foreach ($array as $header) {\n preg_match('#(.*?)\\:\\s(.*)#', $header, $matches);\n\n if (count($matches) > 2) {\n $headers[$matches[1]] = $matches[2];\n } else {\n preg_match('#(.*?)\\s\\/\\sHTTP\\/(.*)#', $header, $matches);\n\n if(count($matches) > 2) {\n $headers['Http-Version'] = $matches[2];\n $headers['Request_Method'] = $matches[1];\n }\n }\n }\n\n return $headers;\n }",
"public function getResponseHeaders() {\n $requestHeaders = [];\n\n if ($this->headers instanceof \\ArrayAccess) {\n while ($this->headers->valid()) {\n $requestHeaders[$this->headers->key()] = $this->headers->current();\n $this->headers->next();\n }\n }\n\n return $requestHeaders;\n }",
"private function composeFirstHeader(string $header): array\n {\n preg_match('/http\\/(.+) (\\d+) (.*)/i', $header, $matches);\n return $matches;\n }",
"private function __splitEmailHeaders($headers) {\n\t\t$arrayHeaders = array();\n\t\tforeach (explode(\"\\r\\n\", $headers) as $header) {\n\t\t\t$headerParts = explode(':', $header);\n\t\t\t$arrayHeaders[$headerParts[0]] = trim($headerParts[1]);\n\t\t}\n\n\t\treturn $arrayHeaders;\n\t}",
"public static function http__get_headers(){\n\n $headers = array();\n foreach($_SERVER as $key => $val){\n if( 0 === stripos( $key, 'http_' ) ){\n $server_key = preg_replace('/^http_/i', '', $key);\n $key_parts = explode('_', $server_key);\n if(count($key_parts) > 0 and strlen($server_key) > 2){\n foreach($key_parts as $part_index => $part){\n $key_parts[$part_index] = function_exists('mb_strtolower') ? mb_strtolower($part) : strtolower($part);\n if(!empty($key_parts[$part_index][0])) {\n\t\t\t\t\t\t\t$key_parts[$part_index][0] = strtoupper($key_parts[$part_index][0]);\n\t\t\t\t\t\t}\n }\n $server_key = implode('-', $key_parts);\n }\n $headers[$server_key] = $val;\n }\n }\n return $headers;\n }",
"function getHTTPHeaders(Server $server) {\n\n return [];\n\n }",
"protected function _getHeaders()\n {\n $out = [];\n foreach ($this->headers as $key => $values) {\n $out[$key] = implode(',', $values);\n }\n\n return $out;\n }",
"private function parseHeaders(array $server)\n {\n $headers = [];\n\n foreach ($server as $header => $val) {\n if (strpos($header, 'HTTP_') === 0) {\n $key = ucwords(str_replace('_', '-', strtolower(substr($header, 5))), '-');\n $headers[$key] = $val;\n }\n }\n\n return $headers;\n }",
"private function parseResponseHeaders($headers)\n {\n $result = array();\n // create an array containing headers.\n if (is_string($headers)) {\n // store each line as a header.\n $headers = explode(\"\\r\\n\", $headers);\n } else if($headers instanceof \\Traversable) {\n // copy the iterator into an array.\n if ($headers instanceof \\Traversable) {\n if (version_compare(PHP_VERSION, '5.1.0', '>=')) {\n $headers = iterator_to_array($headers);\n } else {\n $headers = Arrays::iteratorToArray($headers);\n }\n }\n }\n\n // parse each header line.\n $lines = (array) $headers;\n foreach ($lines as $line) {\n if ($line && strpos($line, ':') !== false) {\n // separate line into key and value.\n list($key, $value) = explode(': ', $line, 2);\n if (isset($result[$key])) {\n // allow the existence of duplicate keys.\n if (!is_array($result[$key])) {\n $result[$key] = array($result[$key]);\n }\n // add value to existing array.\n $result[$key][] = $value;\n } else {\n // add value.\n $result[$key] = $value;\n }\n }\n } \n return $result;\n }",
"public function getHeaders(): array\n {\n if ($this->headers === null) {\n foreach ($_SERVER as $name => $value) {\n if (strncmp($name, 'HTTP_', 5) === 0) {\n $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));\n $this->headers[$name] = $value;\n }\n }\n\n return $this->headers;\n }\n\n return $this->headers;\n }",
"private function getheaders($req) {\n $res = preg_match(\"/GET (.*) HTTP/i\" , $req, $match) ? $match[1] : \"???\";\n $host = preg_match(\"/Host: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $ori = preg_match(\"/Origin: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $key = preg_match(\"/Sec-WebSocket-Key: (.*)\\r\\n/i\", $req, $match) ? $match[1] : \"???\";\n\n return array($res, $host, $ori, $key);\n }",
"private function get_response_headers(array $response)\n {\n if (!isset($response['headers']) || !is_array($response['headers'])) {\n return array();\n }\n\n return $response['headers'];\n }",
"function processHeaders($headers) {\n\t\tif ( is_string($headers) )\n\t\t\t$headers = explode(\"\\n\", str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $headers) );\n\n\t\t$response = array('code' => 0, 'message' => '');\n\n\t\t$cookies = array();\n\t\t$newheaders = array();\n\n // first, process the HTTP status line\n if ( false === strpos($headers[0], ':') ) {\n $tempheader = array_shift($headers);\n list( , $iResponseCode, $strResponseMsg) = explode(' ', $tempheader, 3);\n $response['code'] = $iResponseCode;\n $response['message'] = $strResponseMsg;\n } \n\n // combine any headers split over multiple lines\n for ( $i=(sizeof($headers)-1); $i>=0; $i-- ) {\n $c = substr($headers[$i], 0, 1);\n if ($c == ' ' || $c == \"\\t\") {\n $headers[$i-1] = rtrim($headers[$i-1]) . ' ' . ltrim($headers[$i]);\n unset($headers[$i]);\n } \n } \n\n\t\tforeach ( $headers as $tempheader ) {\n\t\t\tif ( empty($tempheader) )\n\t\t\t\tcontinue;\n\n\t\t\tlist($key, $value) = explode(':', $tempheader, 2);\n\n\t\t\tif ( !empty( $value ) ) {\n\t\t\t\t$key = strtolower( $key );\n\t\t\t\tif ( isset( $newheaders[$key] ) ) {\n\t\t\t\t\t$newheaders[$key] = array( $newheaders[$key], trim( $value ) );\n\t\t\t\t} else {\n\t\t\t\t\t$newheaders[$key] = trim( $value );\n\t\t\t\t}\n\t\t\t\tif ( 'set-cookie' == strtolower( $key ) )\n\t\t\t\t\t$cookies[] = new WP_Http_Cookie( $value );\n\t\t\t}\n\t\t}\n\n\t\treturn array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies);\n\t}",
"function getallheaders()\n {\n $headers = [];\n if (isset($_SERVER)) {\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(\n ' ',\n '-',\n ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))\n )] = $value;\n }\n }\n\n }\n\n return $headers;\n }",
"public static function getHeaders()\n {\n if (!isset(self::$_data[self::KEY_HEADERS]))\n {\n $_listHeaders = array();\n foreach ($_SERVER as $_key => $_value)\n {\n if (substr($_key, 0, 5) == \"HTTP_\")\n {\n $_key = str_replace('_', ' ', substr($_key, 5));\n $_key = str_replace(' ', '-', ucwords(strtolower($_key)));\n $_listHeaders[$_key] = $_value;\n }\n }\n self::$_data[self::KEY_HEADERS] = $_listHeaders;\n }\n return self::$_data[self::KEY_HEADERS];\n }",
"public function readHeaders(): ?array;",
"function _parseHeader($header) {\n\n\t\tif (is_array($header)) {\n\t\t\tforeach ($header as $field => $value) {\n\t\t\t\tunset($header[$field]);\n\t\t\t\t$field = strtolower($field);\n\t\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\n\t\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t\t}\n\t\t\t\t$header[$field] = $value;\n\t\t\t}\n\t\t\treturn $header;\n\t\t} elseif (!is_string($header)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tpreg_match_all(\"/(.+):(.+)(?:(?<![\\t ])\" . $this->line_break . \"|\\$)/Uis\", $header, $matches, PREG_SET_ORDER);\n\n\t\t$header = array();\n\t\tforeach ($matches as $match) {\n\t\t\tlist(, $field, $value) = $match;\n\n\t\t\t$value = trim($value);\n\t\t\t$value = preg_replace(\"/[\\t ]\\r\\n/\", \"\\r\\n\", $value);\n\n\t\t\t$field = $this->_unescapeToken($field);\n\n\t\t\t$field = strtolower($field);\n\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t}\n\n\t\t\tif (!isset($header[$field])) {\n\t\t\t\t$header[$field] = $value;\n\t\t\t} else {\n\t\t\t\t$header[$field] = array_merge((array) $header[$field], (array) $value);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $header;\n\t}",
"private static function parse(string $headers): array\n {\n $header = [];\n $matches = [];\n preg_match_all(\n '=^(.[^: ]+): ([^\\r\\n]*)=m',\n $headers,\n $matches,\n PREG_SET_ORDER\n );\n foreach ($matches as $line) {\n $header[(string) $line[1]] = $line[2];\n }\n\n return $header;\n }"
] | [
"0.73479515",
"0.72186905",
"0.7212431",
"0.71825874",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.7142414",
"0.70838654",
"0.704647",
"0.7034281",
"0.7026964",
"0.6987525",
"0.69862616",
"0.6935225",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.69257486",
"0.6873041",
"0.68668",
"0.68450564",
"0.68441075",
"0.68276936",
"0.6817539",
"0.68094283",
"0.67985076",
"0.67879736",
"0.67879736",
"0.67830485",
"0.67603505",
"0.6756485",
"0.67561126",
"0.67478824",
"0.6741327",
"0.6740227",
"0.67400956",
"0.6734035",
"0.6730494",
"0.67145437",
"0.6691488",
"0.6687936",
"0.6687004",
"0.6659106",
"0.66507214",
"0.6642266",
"0.6637612",
"0.65752214",
"0.6573946",
"0.6546712",
"0.6519127",
"0.65152717",
"0.6506421",
"0.64818466",
"0.64775",
"0.6460747",
"0.6446101",
"0.64414704",
"0.6439218",
"0.643907",
"0.6427671",
"0.64258707",
"0.6420539",
"0.6420539",
"0.6418448",
"0.64118654",
"0.6398944",
"0.63960624",
"0.6389483",
"0.6384287",
"0.63808405",
"0.63796717",
"0.636912",
"0.63512087",
"0.63388336",
"0.63190615",
"0.63179326",
"0.6305243",
"0.62943935",
"0.62883097",
"0.62860066",
"0.6274299",
"0.6263096",
"0.62621844",
"0.6261413",
"0.6259702",
"0.62574714",
"0.625694",
"0.62567186",
"0.62514",
"0.62499756"
] | 0.7586716 | 0 |
retrieve html content from modem | function file_get_contents_curl($mURL, $mACCESS) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $mURL);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$mACCESS");
curl_setopt($ch, CURLOPT_PORT, 80);
$data = curl_exec($ch);
curl_close($ch);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getcontent($server, $port, $file) {\r\n\t\t$cont = \"\";\r\n\t\t$ip = gethostbyname($server);\r\n\t\t$fp = fsockopen($ip, $port);\r\n\t\tif (!$fp) {\r\n\t\t\t return \"Unknown\";\r\n\t\t} else {\r\n\t\t\t $com = \"GET $file HTTP/1.1\\r\\nAccept: */*\\r\\nAccept-Language: de-ch\\r\\nAccept-Encoding: gzip, deflate\\r\\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\\r\\nHost: $server:$port\\r\\nConnection: Keep-Alive\\r\\n\\r\\n\";\r\n\t\t\t fputs($fp, $com);\r\n\t\t\t while (!feof($fp)) {\r\n\t\t\t\t $cont .= fread($fp, 500);\r\n\t\t\t }\r\n\t\t\t fclose($fp);\r\n\t\t\t $cont = substr($cont, strpos($cont, \"\\r\\n\\r\\n\") + 4);\r\n\t\t\t return $cont;\r\n\t\t}\r\n\t}",
"public function getHTML();",
"public function getReturn()\n\t{\n\t\t\t$this->_addLog('Chargement fichier HTML', 4);\n\t\t\t$f = DIR_APP . '/common/resources/html/accueil.html';\n\t\t\treturn file_get_contents($f);\n\t\t/*\tFIN DU TEST */\n\t}",
"function getContents() ;",
"public abstract function get_html();",
"abstract function get_html();",
"function get_remote_html($url) {\r\n\r\n\t$ch = curl_init($url);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\tcurl_setopt($ch, CURLOPT_VERBOSE, true); \r\n\tcurl_setopt($ch, CURLOPT_HEADER, true);\r\n\r\n\t$response = curl_exec($ch);\r\n\r\n\tlist($header, $body) = explode(\"\\r\\n\\r\\n\", $response, 2);\r\n\r\n\treturn array( 'header' => $header, 'body' => $body );\r\n\r\n}",
"private function getHtmlResponse() {\r\n\t\t\r\n\t\t\t// check if a request has been made, else skip!\r\n\t\t\t$cmd = @$_POST['request'];\r\n\t\t\tif (!$cmd) {return '';}\r\n\t\t\t\r\n\t\t\t// get the connection\r\n\t\t\t$con = Factory::getVdrConnection();\r\n\t\t\t$resp = $con->request($cmd);\r\n\t\t\t\r\n\t\t\t// create the template\r\n\t\t\t$tpl = new Template('svdrp_response');\r\n\t\t\t$tpl->set('HEADER', LANG_SVDRP_RESPONSE_HEADER);\r\n\t\t\t$tpl->set('CONTENT', $resp->getLinesAsString());\r\n\t\t\treturn $tpl->get();\r\n\t\t\t\r\n\t\t}",
"function getContents();",
"function getresp()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = \"\";\r\n\t\t$res = fread($this->_socket, 8000);\r\n\t\t preg_match_all('/^\\d{3}/m', $res, $response);\r\n\t\t/*do {\r\n \t\t$res = fgets($this->_socket, 512);\r\n \t\t$response .= $res;\r\n \t} while (substr($res, 3, 1) != \" \");\r\n \t*/\r\n\t\t\r\n \t//$this->debug(str_replace(\"\\r\\n\", \"\\n\", $response));\r\n \t$this->debug(str_replace(\"\\r\\n\", \"\\n\", $res));\r\n \treturn $response[0];\r\n }",
"private function DownloadParsePage() {\n $this->Log(\"Debridage du lien : \".$this->url);\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, DOWNLOAD_STATION_USER_AGENT);\n\t\tcurl_setopt($curl, CURLOPT_COOKIEFILE, $this->TOUTDEBRID_COOKIE);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_URL, $this->TOUTDEBRID_DEBRID_URL);\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, 'urllist='.urlencode($this->url).'&captcha=none&');\n\t\t$ret = curl_exec($curl);\n\t\t$this->Log(\"Reponse tout-debrid : \".$ret);\n\t\tcurl_close($curl);\n\t\treturn $ret;\n\t}",
"public function fetchHTML()\n {\n return $this->fetch();\n }",
"private function getContent()\n {\n return file_get_contents($this->category_dir.'/'.$this->htmlfile);\n }",
"public function urlGetContent($aURL){\n\t\t$tmp=file_get_contents($aURL);\n\t\t$this->regHtml=$tmp;\n\t}",
"public function fetch() {\n return $this->html;\n }",
"abstract public function getHtml();",
"public function fetchHTML($url) {\n\t\t$contents = '';\n\t\t\n\t\tini_set('user_agent', 'User-Agent: ' . self::$agent_name);\n\t\t\n\t\tif(($fp = @fopen($url, 'r'))) {\n\t\t\twhile($data = fread($fp, 1024)) $contents .= $data;\n\t\t\t\n\t\t\tfclose($fp);\n\t\t} elseif($url_info = parse_url($url)) {\n\t\t\t$port = isset($url_info['port']) ? $url_info['port'] : 80;\n\t\t\t\n\t\t\tif($url_info['scheme'] == 'https') {\n\t\t\t\t$fp = fsockopen('ssl://' . $url_info['host'], 443, $errno, $errstr, 30);\n\t\t\t} else {\n\t\t\t\t$fp = fsockopen($url_info['host'], $port, $errno, $errstr, 30);\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fp) {\n\t\t\t\techo \"$errstr ($errno)\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$out = 'HEAD ' . (isset($url_info['path']) ? $url_info['path'] : '/') .\n\t\t\t\t\t(isset($url_info['query']) ? '?' . $url_info['query']: '') .\n\t\t\t\t\t\" HTTP/1.1\\r\\n\";\n\t\t\t\t\n\t\t\t\t$out .= 'Host: ' . $url_info['host'] . \"\\r\\n\";\n\t\t\t\t$out .= 'User-Agent: ' . self::$agent_name . \"\\r\\n\";\n\t\t\t\t$out .= \"Connection: Close\\r\\n\\r\\n\";\n\t\t\t\t\n\t\t\t\tfwrite($fp, $out);\n\t\t\t\t\n\t\t\t\twhile(!feof($fp)) $contents .= fgets($fp, 128);\n\t\t\t\t\n\t\t\t\tfclose($fp);\n\t\t\t\t\n\t\t\t\tlist($headers, $content) = explode(\"\\r\\n\\r\\n\", $contents, 2);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $contents;\n\t}",
"function getHTML($url,$timeout)\n{\n $ch = curl_init($url); // initialize curl with given url\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[\"HTTP_USER_AGENT\"]); // set useragent\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // write the response to a variable\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // follow redirects if any\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); // max. seconds to execute\n curl_setopt($ch, CURLOPT_FAILONERROR, 1); // stop when it encounters an error\n return @curl_exec($ch);\n}",
"protected function loadHtml()\n {\n $this->html = $this->fsio->get($this->page->getTarget());\n }",
"public function loadHTML();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getHtml();",
"public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }",
"public function readerGetContent();",
"public function getContent()\r\n\t{\r\n\t\t$return = $this->response !== false ? preg_replace('#.+(\\r\\n){2}(.+)$#s', '$2', $this->response) : false;\r\n\t\treturn $return;\r\n\t}",
"public function content() {\n try {\n $r= '';\n while ($this->stream->available()) {\n $r.= $this->stream->read();\n }\n return $r;\n } finally {\n $this->stream->close();\n }\n }",
"public function fetch()\n\t{\t\t\n\t\tob_start();\t\t\n\t\t$this->display();\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}",
"protected function getContents() {\n $opts = array(\n 'http' => array(\n 'method' => \"GET\",\n 'header' => $this->user_agent . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n return file_get_contents($this->query, false, $context);\n }",
"public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }",
"public function getHTML($data);",
"abstract protected function getHtmlBody();",
"public function get_output_content();",
"function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}",
"public function connectAndGetHTML($url)\r\n\t{\r\n\t\t$this->setURL($url);\r\n\r\n\t\t$html = $this->executeRequest();\r\n\r\n\t\treturn $html;\r\n\t}",
"public function getHTML ( $page ) {\r\n $filename = \"../\" . $page . \".html\";\r\n\t\treturn file_get_contents ($filename);\r\n\t}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"function bacaHTML($url) {\r\n $ip = $url;\r\n $data = curl_init();\r\n // setting CURL\r\n curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($data, CURLOPT_URL, $ip);\r\n\r\n // menjalankan CURL untuk membaca isi file\r\n $hasil = curl_exec($data);\r\n curl_close($data);\r\n return $hasil;\r\n}",
"function grabHTML($function_host_name, $url)\n{\n\n $ch = curl_init();\n $header=array('GET /1575051 HTTP/1.1',\n \"Host: $function_host_name\",\n 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language:en-US,en;q=0.8',\n 'Cache-Control:max-age=0',\n 'Connection:keep-alive',\n 'User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36',\n );\n\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,0);\n curl_setopt( $ch, CURLOPT_COOKIESESSION, true );\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch,CURLOPT_COOKIEFILE,'cookies.txt');\n curl_setopt($ch,CURLOPT_COOKIEJAR,'cookies.txt');\n curl_setopt($ch,CURLOPT_HTTPHEADER,$header);\n\n $returnHTML = curl_exec($ch); \n return $returnHTML; \n curl_close($ch);\n\n}",
"protected function get_html_from_url($url){\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); \r\n\t\t// curl_setopt($ch, CURLOPT_HEADER, false); \r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\r\n \t\t'Content-Type: text/html; charset=UTF-8',\r\n \t\t'Accept-Language: en-US,en;q=0.5'\r\n \t));\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //echo if 0 \r\n\t\t$html = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $html;\r\n\t\r\n\t}",
"protected function getCurrentHTML($url) {\n\t\treturn file_get_contents($url);\n\t}",
"public function getContent()\n {\n return file_get_contents($this->fullPath);\n }",
"protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }",
"private function executeRequest()\r\n\t{\r\n\t\ttry {\r\n\t\t\t$html = curl_exec($this->getConnection());\r\n\t\t\tif (curl_error($this->getConnection())) {\r\n\t\t\t\tthrow new Exception(curl_error($this->getConnection()));\r\n\t\t\t}\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo 'Error: ' . $e->getMessage();\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}",
"public function getContent()\n {\n $this->html .= $this->displayCssfile();\n \n if (Tools::getValue('smswelcome') != null && Tools::getValue('smswelcome') != '') {\n $this->getactiveTab = 'smswelcome';\n } elseif (Tools::getValue('configuration') != null && Tools::getValue('configuration') != '') {\n $this->getactiveTab = 'configuration';\n } elseif (Tools::getValue('smsrulesets') != null && Tools::getValue('smsrulesets') != '') {\n $this->getactiveTab = 'smsrulesets';\n } elseif (Tools::getValue('smscampaign') != null && Tools::getValue('smscampaign') != '') {\n $this->getactiveTab = 'smscampaign';\n } elseif (Tools::getValue('smstemplates') != null && Tools::getValue('smstemplates') != '') {\n $this->getactiveTab = 'smstemplates';\n } else {\n $this->getactiveTab = 'smswelcome';\n }\n \n $token = Tools::getAdminTokenLite('AdminModules');\n $WelVar = \"controller=AdminModules&configure=onehopsmsservice\";\n $this->btnurlLink = $_SERVER['PHP_SELF'] . \"?\" . $WelVar . \"&token=\" . $token;\n \n $this->context->smarty->assign('SMSMenuLink', $this->btnurlLink);\n $this->context->smarty->assign('SMSGetTab', $this->getactiveTab);\n $this->context->smarty->assign('SMSIsAPIKey', $this->smsAPI);\n \n if (_PS_VERSION_ > 1.5) {\n $this->html .= $this->display(__FILE__, 'menu_tabs.tpl');\n } else {\n $this->html .= $this->display(dirname(__FILE__), '/views/templates/front/menu_tabs.tpl');\n }\n \n if (Tools::isSubmit('btnSubmit')) {\n $this->postValidation();\n if (!count($this->postErrors)) {\n $this->postProcess();\n } else {\n foreach ($this->postErrors as $err) :\n $this->html .= $this->displayError($err);\n endforeach;\n }\n }\n if ((Tools::getValue('smswelcome') != null && Tools::getValue('smswelcome') != '')\n || (Tools::getValue('smswelcome') == null\n && Tools::getValue('configuration') == null\n && Tools::getValue('smscampaign') == null\n && Tools::getValue('smsrulesets') == null\n && Tools::getValue('smstemplates') == null)) {\n $this->html .= $this->screenMagicDetails();\n }\n \n if (Tools::getValue('smscampaign') != null && Tools::getValue('smscampaign') != '') {\n $this->context->smarty->assign('SMSTemplateslist', array());\n $this->context->smarty->assign('SMSLabellist', array());\n \n $allSMSTemplates = $this->getAllSMSTemplates();\n $allSMSLabel = $this->getSMSLabels();\n if ($allSMSTemplates) :\n $this->context->smarty->assign('SMSTemplateslist', $allSMSTemplates);\n endif;\n if ($allSMSLabel) :\n $this->context->smarty->assign('SMSLabellist', $allSMSLabel['labellist']);\n endif;\n if (Tools::getValue('MessageBody')) {\n $temp_ID = Tools::getValue('tempId');\n if ($temp_ID) {\n $SelTemplateBody = 'SELECT temp_body FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $SelTemplateBody .= ' WHERE md5(temp_id) = \"' . pSQL($temp_ID) . '\"';\n if ($ViewTemplatesBody = Db::getInstance()->ExecuteS($SelTemplateBody)) {\n echo Tools::jsonEncode($ViewTemplatesBody);\n exit;\n }\n }\n }\n if (Tools::isSubmit('sendSingleSMS')) {\n $ErrorMsg = $this->postSendSMSTempValidation();\n $this->context->smarty->assign('smsMobileNo', Tools::getValue('SEND_SINGLE_SMS_MOBILE'));\n $this->context->smarty->assign('smsSenderid', Tools::getValue('SEND_SINGLE_SENDER_ID'));\n $this->context->smarty->assign('smsLabel', Tools::getValue('SEND_SINGLE_SMS_LABEL'));\n $this->context->smarty->assign('smsTemplate', Tools::getValue('SEND_SINGLE_SMS_TEMPLATE'));\n $this->context->smarty->assign('templateBody', Tools::getValue('SEND_SIGNLE_SMS_BODY'));\n \n if (!count($this->postSendSMSTempError)) {\n //use send SMS API to send SMS from here\n $body = Tools::getValue('SEND_SIGNLE_SMS_BODY');\n $body = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $body);\n $postdata = array(\n 'label' => Tools::getValue('SEND_SINGLE_SMS_LABEL'),\n 'sms_text' => $body,\n 'source' => '21000',\n 'sender_id' => Tools::getValue('SEND_SINGLE_SENDER_ID'),\n 'mobile_number' => Tools::getValue('SEND_SINGLE_SMS_MOBILE')\n );\n $isSendSMS = $this->sendSMSByAPI($postdata);\n if ($isSendSMS && isset($isSendSMS->status) && $isSendSMS->status == 'submitted') {\n Onehopsmsservice::onehopSaveLog('SendSMS', $body, Tools::getValue('SEND_SINGLE_SMS_MOBILE'));\n $this->context->smarty->assign('smsMobileNo', '');\n $this->context->smarty->assign('smsSenderid', '');\n $this->context->smarty->assign('smsTemplate', '');\n $this->context->smarty->assign('smsLabel', '');\n $this->context->smarty->assign('templateBody', '');\n $this->context->smarty->assign('SuccessMsg', 'SMS sent successfully.');\n } else {\n $this->context->smarty->assign('ErrorMsg', 'Error while sending the SMS.');\n }\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n $this->html .= $this->displaySendSingleSMS();\n }\n \n if (Tools::getValue('smsrulesets') != '' && Tools::getValue('smsrulesets') != null) {\n if (Tools::isSubmit('orderConfirmBtn')\n || Tools::isSubmit('shipmentConfirmBtn')\n || Tools::isSubmit('onDeliveryBtn')\n || Tools::isSubmit('OutStockBtn')\n || Tools::isSubmit('BackStockBtn')) {\n $this->postSMSRulesetsValidation();\n if (!count($this->postsmsRulesetsErrors)) {\n if (Tools::isSubmit('orderConfirmBtn')) {\n $activateFeature = Tools::getValue('ORDER_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"order_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateVars = ' active=\"' . (int)$activeRuleset . '\",';\n $updateVars .= ' template=\"' . pSQL(Tools::getValue('ORDER_SMS_TEMPLATE')) . '\",';\n $updateVars .= ' label=\"' . pSQL(Tools::getValue('ORDER_SMS_LABEL')) . '\",';\n $updateVars .= ' senderid = \"' . pSQL(Tools::getValue('ORDER_SENDER_ID')) . '\"';\n $updateQuery .= $updateVars;\n $updateQuery .= ' WHERE rule_name=\"order_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertVars = '\"order_confirmation\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SMS_TEMPLATE')) . '\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SMS_LABEL')) . '\",';\n $insertVars .= ' \"' . pSQL(Tools::getValue('ORDER_SENDER_ID')) . '\",';\n $insertVars .= ' \"' . (int)$activeRuleset . '\"';\n \n $insertQuery .= ' VALUES (' . $insertVars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $confMsg = $this->l('Rule set saved successfully for order confirmation.');\n $this->html .= $this->displayConfirmation($confMsg);\n }\n if (Tools::isSubmit('shipmentConfirmBtn')) {\n $activateFeature = Tools::getValue('SHIPMENT_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $sql .= ' WHERE rule_name = \"shipment_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateVars = ' active=\"' . (int)$activeRuleset . '\",';\n $updateVars .= ' template=\"' . pSQL(Tools::getValue('SHIPMENT_SMS_TEMPLATE')) . '\",';\n $updateVars .= ' label=\"' . pSQL(Tools::getValue('SHIPMENT_SMS_LABEL')) . '\",';\n $updateVars .= ' senderid = \"' . pSQL(Tools::getValue('SHIPMENT_SENDER_ID')) . '\"';\n $updateQuery .= $updateVars;\n $updateQuery .= ' WHERE rule_name=\"shipment_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"shipment_confirmation\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('SHIPMENT_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n \n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $shipconfmsg = $this->l('Rule set saved successfully for shipment confirmation.');\n $this->html .= $this->displayConfirmation($shipconfmsg);\n }\n if (Tools::isSubmit('onDeliveryBtn')) {\n $activateFeature = Tools::getValue('ON_DELIVERY_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $sql .= ' WHERE rule_name = \"on_delivery_confirmation\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updatevars = ' active=\"' . (int)$activeRuleset . '\",';\n $updatevars .= ' template=\"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_TEMPLATE')) . '\",';\n $updatevars .= ' label=\"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_LABEL')) . '\",';\n $updatevars .= ' senderid = \"' . pSQL(Tools::getValue('ON_DELIVERY_SENDER_ID')) . '\"';\n $updateQuery .= $updatevars;\n $updateQuery .= ' WHERE rule_name=\"on_delivery_confirmation\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"on_delivery_confirmation\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('ON_DELIVERY_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n \n Db::getInstance()->execute($insertQuery);\n }\n $deliveryconfmsg = $this->l('Rule set saved successfully for Delivery Confirmation.');\n $this->html .= $this->displayConfirmation($deliveryconfmsg);\n }\n if (Tools::isSubmit('OutStockBtn')) {\n $activateFeature = Tools::getValue('OUTSTOCK_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql = 'SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"out_of_stock_alerts\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateQuery .= ' active=\"' . (int)$activeRuleset . '\",';\n $updateQuery .= ' template=\"' . pSQL(Tools::getValue('OUTSTOCK_SMS_TEMPLATE')) . '\",';\n $updateQuery .= ' label=\"' . pSQL(Tools::getValue('OUTSTOCK_SMS_LABEL')) . '\",';\n $updateQuery .= ' senderid = \"' . pSQL(Tools::getValue('OUTSTOCK_SENDER_ID')) . '\"';\n $updateQuery .= ' WHERE rule_name=\"out_of_stock_alerts\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"out_of_stock_alerts\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('OUTSTOCK_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $outStockmsg = $this->l('Rule set saved successfully for Out of Stock Alerts.');\n $this->html .= $this->displayConfirmation($outStockmsg);\n }\n if (Tools::isSubmit('BackStockBtn')) {\n $activateFeature = Tools::getValue('BACKSTOCK_FEATURE_1');\n if ($activateFeature != '' && $activateFeature != null) :\n $activeRuleset = '1';\n else :\n $activeRuleset = '0';\n endif;\n $sql='SELECT * FROM '._DB_PREFIX_.'onehop_sms_rulesets WHERE rule_name=\"back_of_stock_alerts\"';\n if (Db::getInstance()->ExecuteS($sql)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_rulesets SET';\n $updateQuery .= ' active=\"' . (int)$activeRuleset . '\",';\n $updateQuery .= ' template=\"' . pSQL(Tools::getValue('BACKSTOCK_SMS_TEMPLATE')) . '\",';\n $updateQuery .= ' label=\"' . pSQL(Tools::getValue('BACKSTOCK_SMS_LABEL')) . '\",';\n $updateQuery .= ' senderid = \"' . pSQL(Tools::getValue('BACKSTOCK_SENDER_ID')) . '\"';\n $updateQuery .= ' WHERE rule_name=\"back_of_stock_alerts\"';\n Db::getInstance()->execute($updateQuery);\n } else {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $insertQuery .= ' (rule_name,template,label,senderid,active)';\n $insertvars = '\"back_of_stock_alerts\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SMS_TEMPLATE')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SMS_LABEL')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('BACKSTOCK_SENDER_ID')) . '\",';\n $insertvars .= ' \"' . (int)$activeRuleset . '\"';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n Db::getInstance()->execute($insertQuery);\n }\n $backStockmsg = $this->l('Rule set saved successfully for Back in Stock Alerts.');\n $this->html .= $this->displayConfirmation($backStockmsg);\n }\n } else {\n foreach ($this->postsmsRulesetsErrors as $err) :\n $this->html .= $this->displayError($err);\n endforeach;\n }\n }\n $getAllRulesetTemplates = $this->getAllSMSTemplates();\n $Template = array();\n if ($getAllRulesetTemplates) {\n $Template[] = array(\n 'id_option' => '',\n 'name' => 'Select template'\n );\n foreach ($getAllRulesetTemplates as $tempVal) {\n $Template[] = array(\n 'id_option' => $tempVal['temp_id'],\n 'name' => $tempVal['temp_name']\n );\n }\n } else {\n $Template[] = array(\n 'id_option' => '',\n 'name' => 'No template available'\n );\n }\n $this->html .= $this->orderConfirmationRuleset($Template);\n $this->html .= $this->shipmentConfirmationRuleset($Template);\n $this->html .= $this->onDeliveryConfirmationRuleset($Template);\n $this->html .= $this->outStockAlertsRuleset($Template);\n $this->html .= $this->backStockAlertsRuleset($Template);\n }\n if (Tools::getValue('smstemplates') != '' && Tools::getValue('smstemplates') != null) {\n if (Tools::getValue('TemplateType') || Tools::getValue('TemplateType')) {\n $templateType = Tools::getValue('Temptype');\n $templatePlaceholder = array();\n switch ($templateType) {\n case 'customer':\n $templatePlaceholder = array(\n 'First name',\n 'Last name',\n 'Email',\n 'Mobile'\n );\n break;\n case 'order':\n $templatePlaceholder = array(\n 'Order ID',\n 'Transaction ID',\n 'Tracking Id',\n 'Invoice',\n 'Price',\n 'Discount',\n 'Shipping_Address'\n );\n break;\n case 'product':\n $templatePlaceholder = array(\n 'Product Id',\n 'Product name'\n );\n break;\n }\n if ($templatePlaceholder) {\n foreach ($templatePlaceholder as $val) {\n $this->options[] = array('name'=>$val,'value'=>Tools::strtoupper(str_replace(' ', '', $val)));\n }\n }\n echo Tools::jsonEncode($this->options);\n exit;\n }\n if (Tools::isSubmit('addTemplateBtn') || Tools::isSubmit('saveTemplate')) {\n $this->context->smarty->assign('isAddTemp', 'addTemplate');\n if (Tools::getValue('TEMPLATE_NAME') == null) {\n $this->context->smarty->assign('templateName', '');\n } else {\n $this->context->smarty->assign('templateName', Tools::getValue('TEMPLATE_NAME'));\n }\n if (Tools::getValue('TEMPLATE_BODY') == null) {\n $this->context->smarty->assign('templateBody', '');\n } else {\n $this->context->smarty->assign('templateBody', Tools::getValue('TEMPLATE_BODY'));\n }\n $this->context->smarty->assign('templateID', 0);\n }\n if (Tools::isSubmit('editTemplateBtn') || Tools::isSubmit('editTemplate')) {\n $this->context->smarty->assign('isAddTemp', 'editTemplate');\n }\n \n if (Tools::isSubmit('saveTemplate')) {\n $ErrorMsg = $this->postSMSTemplateValidation();\n if (!count($this->postsmsTemplateErrors)) {\n $insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $insertQuery .= ' (temp_name,temp_body,submitdate)';\n $insertvars = '\"' . pSQL(Tools::getValue('TEMPLATE_NAME')) . '\",';\n $insertvars .= ' \"' . pSQL(Tools::getValue('TEMPLATE_BODY')) . '\",';\n $insertvars .= ' Now()';\n $insertQuery .= ' VALUES (' . $insertvars . ')';\n $saveTemplate = Db::getInstance()->execute($insertQuery);\n if ($saveTemplate) :\n $this->context->smarty->assign('isAddTemp', '');\n $this->redirectTemplate();\n endif;\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n \n if (Tools::isSubmit('editTemplateBtn')) {\n if (Tools::getValue('editTemplateBtn')) {\n $SelTemplate = 'SELECT temp_id, temp_name, temp_body';\n $SelTemplate .= ' FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $SelTemplate .= ' WHERE md5(temp_id) = \"' . pSQL(Tools::getValue('editTemplateBtn')) . '\"';\n if ($ViewTemplates = Db::getInstance()->ExecuteS($SelTemplate)) {\n $this->context->smarty->assign('templateName', $ViewTemplates[0]['temp_name']);\n $this->context->smarty->assign('templateBody', $ViewTemplates[0]['temp_body']);\n $this->context->smarty->assign('templateID', (int)$ViewTemplates[0]['temp_id']);\n } else {\n $this->context->smarty->assign('isAddTemp', '');\n }\n }\n }\n if (Tools::isSubmit('editTemplate')) {\n $ErrorMsg = $this->postSMSTemplateValidation();\n \n $this->context->smarty->assign('templateName', Tools::getValue('TEMPLATE_NAME'));\n $this->context->smarty->assign('templateBody', Tools::getValue('TEMPLATE_BODY'));\n $this->context->smarty->assign('templateID', Tools::getValue('TEMPLATE_ID'));\n \n if (!count($this->postsmsTemplateErrors)) {\n $updateQuery = 'UPDATE ' . _DB_PREFIX_ . 'onehop_sms_templates SET';\n $updateQuery .= ' temp_name = \"' . pSQL(Tools::getValue('TEMPLATE_NAME')) . '\",';\n $updateQuery .= ' temp_body = \"' . pSQL(Tools::getValue('TEMPLATE_BODY')) . '\",';\n $updateQuery .= ' submitdate = Now()';\n $updateQuery .= ' WHERE md5(temp_id) = \"' . pSQL(Tools::getValue('TEMPLATE_ID')) . '\"';\n $updateTemplate = Db::getInstance()->execute($updateQuery);\n if ($updateTemplate) :\n $this->context->smarty->assign('isAddTemp', '');\n $this->redirectTemplate();\n endif;\n } else {\n $this->context->smarty->assign('ErrorMsg', $ErrorMsg[0]);\n }\n }\n \n if (Tools::getValue('deleteTemplate')) {\n $tempID = Tools::getValue('tempID');\n \n $SelTemplate = 'SELECT ruleid FROM ' . _DB_PREFIX_ . 'onehop_sms_rulesets';\n $SelTemplate .= ' WHERE md5(template) = \"' . pSQL($tempID) . '\"';\n if (Db::getInstance()->ExecuteS($SelTemplate)) {\n $jsonRes = array(\n 'Error' => 'You can not delete this template because its already set in SMS automation.'\n );\n } else {\n $deleteQuery = 'DELETE FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $deleteQuery .= ' WHERE md5(temp_id) = \"' . pSQL($tempID) . '\"';\n $deleteTemplate = Db::getInstance()->execute($deleteQuery);\n if ($deleteTemplate) :\n $jsonRes = array(\n 'Success' => '1'\n );\n else :\n $jsonRes = array(\n 'Error' => 'Unknown error occurred. Please try again.'\n );\n endif;\n }\n \n echo Tools::jsonEncode($jsonRes);\n exit;\n }\n \n $allTemplatesList = $this->getAllSMSTemplates();\n if ($allTemplatesList) :\n $this->context->smarty->assign('Templateslist', $allTemplatesList);\n endif;\n $this->html .= $this->displaySMSTemplates();\n }\n if (Tools::getValue('configuration') != '' && Tools::getValue('configuration') != null) {\n $this->html .= $this->renderForm();\n }\n \n return $this->html;\n }",
"function getHTML()\n\t{\n\t\tswitch ($this->cmd) {\n\t\t\tcase \"updateSiteImportTable\" :\n\t\t\t\treturn $this->_updateSiteImportTable();\n\t\t\t\tbreak;\n\t\t\tcase \"createWePageSettings\" :\n\t\t\t\treturn $this->_getCreateWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"saveWePageSettings\" :\n\t\t\t\treturn $this->_getSaveWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"content\" :\n\t\t\t\treturn $this->_getContentHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\" :\n\t\t\t\treturn $this->_getButtonsHTML();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn $this->_getFrameset();\n\t\t}\n\t}",
"public function getLrcData()\n\t{\n\t\t$link=$this->getLrc();\n\t\t$data=self::curl_get_contents($link);\n\t\treturn $data;\n\t}",
"private function getHtmlRequest() {\r\n\t\t\t$tpl = new Template('svdrp_request');\r\n\t\t\treturn $tpl->get();\r\n\t\t}",
"public function getWebContent($url) {\r\n\t\tsleep(rand(3,7));\r\n\t\tif(function_exists('curl_init')) {\r\n\t\t\t$ch = curl_init();\r\n\t\t\t$userAgent = \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)\";\r\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 300);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\t$contents = curl_exec($ch);\r\n\t\t\tcurl_close($ch);\r\n\t\t} else {\r\n\t\t\t$contents = file_get_contents($url);\r\n\t\t}\r\n\t\t\r\n\t\treturn $contents;\r\n\t}",
"protected function getContents() {\n return file_get_contents($this->query);\n }",
"public function readBuffer() {\n\t\treturn ob_get_clean();\n\t}",
"public function show(){\r\n if($this->html){\r\n echo $this->html;\r\n }\r\n else{\r\n echo \"Not Available\";\r\n }\r\n }",
"function getURLContent($url){\r\n $doc = new DOMDocument;\r\n $doc->preserveWhiteSpace = FALSE;\r\n @$doc->loadHTMLFile($url);\r\n return $doc->saveHTML();\r\n}",
"function get_url_content($url) {\n \t\t$ch = curl_init();\n \t\t$timeout = 5;\n \t\tcurl_setopt($ch, CURLOPT_URL, $url);\n \t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n \t\t$data = curl_exec($ch);\n \t\tcurl_close($ch);\n \t\treturn $data;\n\t}",
"public function getContents()\n {\n }",
"public function getTextContent();",
"public function sendContent()\n {\n echo $this->content;\n }",
"function get_html()\n\t{\n\n\t// incrase views\n\n\t}",
"public function getContents(): string;",
"public function getContents(): string;",
"function getsrc($url)\n{\n $c = curl_init();\n $user_agent = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36\";\n curl_setopt($c, CURLOPT_URL, $url);\n curl_setopt($c, CURLOPT_USERAGENT, $user_agent);\n curl_setopt($c, CURLOPT_POST, 0);\n curl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($c, CURLOPT_FRESH_CONNECT, true);\n $html = curl_exec($c);\n\tcurl_close($c);\n \n return $html;\n}",
"function getContent() ;",
"public function get_request_content();",
"public static function\n download_html_page(\n $page_url\n )\n {\n $cookie = tempnam (\"/tmp\", \"CURLCOOKIE\");\n $timeout = 5;\n $curl_handle=curl_init();\n curl_setopt($curl_handle,CURLOPT_URL, $page_url);\n ////curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\n\n curl_setopt( $curl_handle, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1\" );\n curl_setopt( $curl_handle, CURLOPT_COOKIEJAR, $cookie );\n curl_setopt( $curl_handle, CURLOPT_FOLLOWLOCATION, true );\n curl_setopt( $curl_handle, CURLOPT_ENCODING, \"\" );\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\n curl_setopt( $curl_handle, CURLOPT_AUTOREFERER, true );\n curl_setopt( $curl_handle, CURLOPT_CONNECTTIMEOUT, $timeout );\n curl_setopt( $curl_handle, CURLOPT_TIMEOUT, $timeout );\n curl_setopt( $curl_handle, CURLOPT_MAXREDIRS, 10 );\n\n\n $buffer = curl_exec($curl_handle);\n curl_close($curl_handle);\n // print_r($page_url);exit;\n // print_r($buffer);exit;\n\n\n if (empty($buffer)) {\n throw new VideoLibrary_DownloadUnsuccessfulException();\n } else {\n return $buffer;\n }\n }",
"public function get_contents(): string\n\t{\n\t\t/**\n\t\t * Stats require a non-empty dataset.\n\t\t */\n\t\tif (db::query_single_col('SELECT EXISTS (SELECT 1 FROM channel_activity)') === 0) {\n\t\t\treturn '<!DOCTYPE html>'.\"\\n\\n\".'<html lang=\"en\"><head><meta charset=\"utf-8\"><title>seriously?</title><link rel=\"stylesheet\" href=\"'.$this->htmlify($this->stylesheet).'\"></head><body><div id=\"container\"><div id=\"error\">There is not enough data to create statistics, yet.</div></div></body></html>'.\"\\n\";\n\t\t}\n\n\t\t/**\n\t\t * Collect all details for this channel.\n\t\t */\n\t\t$result = db::query_single_row('SELECT COUNT(*) AS days_logged, MIN(date) AS date_first_log_parsed, MAX(date) AS date_last_log_parsed FROM parse_history');\n\t\t$days_logged = $result['days_logged'];\n\t\t$date_first_log_parsed = $result['date_first_log_parsed'];\n\t\t$date_last_log_parsed = $result['date_last_log_parsed'];\n\t\t$this->now = $date_last_log_parsed;\n\t\t$result = db::query_single_row('SELECT date, l_total FROM channel_activity ORDER BY l_total DESC, date ASC LIMIT 1');\n\t\t$high_date = $result['date'];\n\t\t$high_lines = $result['l_total'];\n\t\t$l_total = db::query_single_col('SELECT SUM(l_total) FROM channel_activity');\n\t\t$l_avg = (int) round($l_total / $days_logged);\n\n\t\t/**\n\t\t * HEAD\n\t\t */\n\t\t$contents = '<!DOCTYPE html>'.\"\\n\\n\"\n\t\t\t. '<html lang=\"en\">'.\"\\n\\n\"\n\t\t\t. '<head>'.\"\\n\"\n\t\t\t. '<meta charset=\"utf-8\">'.\"\\n\"\n\t\t\t. '<meta name=\"referrer\" content=\"no-referrer\">'.\"\\n\"\n\t\t\t. '<title>'.$this->htmlify($this->channel).', seriously.</title>'.\"\\n\"\n\t\t\t. '<link rel=\"icon\" href=\"'.$this->htmlify($this->favicon).'\">'.\"\\n\"\n\t\t\t. '<link rel=\"stylesheet\" href=\"'.$this->htmlify($this->stylesheet).'\">'.\"\\n\"\n\t\t\t. '</head>'.\"\\n\\n\"\n\t\t\t. '<body><div id=\"container\">'.\"\\n\"\n\t\t\t. ($this->show_banner ? '<div id=\"bannerbg-top\"></div><div id=\"bannerbg-bottom\"></div><svg id=\"banner\" viewBox=\"0 0 818 50\"><path id=\"banner-text\" d=\"M0 0h48v4h-46v21h46v25h-48v-2h46v-21h-46zm51 0h2v48h44v-48h2v50h-48zm51 0h48v27h-46v-2h44v-21h-44v46h-2zm51 0h48v27h-46v-2h44v-21h-44v44h46v2h-48zm51 0h46v25h2v25h-2v-23h-44v-2h42v-21h-42v46h-2zm51 0h48v4h-46v21h46v25h-48v-2h46v-21h-46zm51 0h48v27h-46v-2h44v-21h-44v44h46v2h-48zm51 0h46v25h2v25h-2v-23h-44v-2h42v-21h-42v46h-2zm51 0h10v4h-4v44h4v2h-10v-2h4v-44h-4zm13 0h48v50h-46v-2h44v-44h-44v46h-2zm51 0h2v48h44v-48h2v50h-48zm51 0h48v4h-46v21h46v25h-48v-2h46v-21h-46zm51 0h48v4h-46v21h46v25h-48v-2h46v-21h-46zm51 0h44v4h-21v46h-2v-46h-21zm47 0h48v50h-2v-23h-44v-2h44v-21h-44v46h-2zm51 0h44v4h-21v46h-2v-46h-21zm47 0h48v4h-46v21h46v25h-48v-2h46v-21h-46z\"/><path class=\"banner-graph\" style=\"fill:#7697cb\" d=\"M428 19h8v25h-8z\"/><path class=\"banner-graph\" style=\"fill:#6c8fc2\" d=\"M428 19h4v25h-4z\"/><path class=\"banner-graph\" style=\"fill:#416d9c\" d=\"M428 19h8v25h-6v-2h4v-21h-4v23h-2z\"/><path class=\"banner-graph\" style=\"fill:#e17677\" d=\"M441 27h8v17h-8z\"/><path class=\"banner-graph\" style=\"fill:#dc6c6d\" d=\"M441 27h4v17h-4z\"/><path class=\"banner-graph\" style=\"fill:#c74243\" d=\"M441 27h8v17h-6v-2h4v-13h-4v15h-2z\"/><path class=\"banner-graph\" style=\"fill:#8fce90\" d=\"M454 11h8v33h-8z\"/><path class=\"banner-graph\" style=\"fill:#89c686\" d=\"M454 11h4v33h-4z\"/><path class=\"banner-graph\" style=\"fill:#70a35e\" d=\"M454 11h8v33h-6v-2h4v-29h-4v31h-2z\"/></svg>'.\"\\n\" : '')\n\t\t\t. '<div class=\"info\">'.$this->htmlify($this->channel).', seriously.<br><br>'\n\t\t\t. number_format($days_logged).' day'.($days_logged !== 1 ? 's logged from '.date('M j, Y', strtotime($date_first_log_parsed)).' to '.date('M j, Y', strtotime($date_last_log_parsed)) : ' logged on '.date('M j, Y', strtotime($date_first_log_parsed))).'.<br><br>'\n\t\t\t. 'Logs contain '.number_format($l_total).' line'.($l_total !== 1 ? 's' : '').' – an average of '.number_format($l_avg).' line'.($l_avg !== 1 ? 's' : '').' per day.<br>'\n\t\t\t. 'Most active day was '.date('M j, Y', strtotime($high_date)).' with a total of '.number_format($high_lines).' line'.($high_lines !== 1 ? 's' : '').' typed.</div>'.\"\\n\";\n\n\t\t/**\n\t\t * CONTENT\n\t\t */\n\t\t$contents .= '<div class=\"section\">Activity</div>'.\"\\n\";\n\t\t$contents .= $this->create_table_activity_distribution_hour();\n\t\t$contents .= $this->create_table_activity('day');\n\t\t$contents .= $this->create_table_activity('month');\n\t\t$contents .= $this->create_table_activity('year');\n\t\t$contents .= $this->create_table_activity_distribution_day();\n\t\t$contents .= $this->create_table_people();\n\t\t$contents .= $this->create_table_people2();\n\t\t$contents .= $this->create_table_people_timeofday();\n\n\t\t/**\n\t\t * Avoid displaying two identical tables.\n\t\t */\n\t\t$show_table_year = false;\n\t\t$show_table_month = false;\n\n\t\tif (db::query_single_col('SELECT COUNT(DISTINCT date) FROM ruid_activity_by_year') > 1) {\n\t\t\t$show_table_year = true;\n\t\t\t$contents .= $this->create_table_people('year');\n\t\t}\n\n\t\tif (db::query_single_col('SELECT COUNT(DISTINCT date) FROM ruid_activity_by_month WHERE date LIKE \\''.substr($this->now, 0, 4).'%\\'') > 1) {\n\t\t\t$show_table_month = true;\n\t\t\t$contents .= $this->create_table_people('month');\n\t\t}\n\n\t\t$contents .= $this->create_table_people_timeofday(true);\n\n\t\t/**\n\t\t * When we are generating an XXL stats page override the default table size for\n\t\t * specific generic tables below.\n\t\t */\n\t\t$rows = ($this->xxl ? 10 : 5);\n\n\t\t/**\n\t\t * Build the \"General Chat\" section.\n\t\t */\n\t\t$section = '';\n\t\t$section .= $this->create_table('Most Talkative Chatters', ['Lines/Day', 'User'], ['num1', 'str'], ['SELECT CAST(l_total AS REAL) / activedays AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND activedays >= 7 AND lasttalked >= DATETIME(\\''.$this->now.'\\', \\'-30 day\\') ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\t\t$section .= $this->create_table('Most Fluent Chatters', ['Words/Line', 'User'], ['num1', 'str'], ['SELECT CAST(words AS REAL) / l_total AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND activedays >= 7 AND lasttalked >= DATETIME(\\''.$this->now.'\\', \\'-30 day\\') ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\t\t$section .= $this->create_table('Most Tedious Chatters', ['Chars/Line', 'User'], ['num1', 'str'], ['SELECT CAST(characters AS REAL) / l_total AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND activedays >= 7 AND lasttalked >= DATETIME(\\''.$this->now.'\\', \\'-30 day\\') ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\t\t$section .= $this->create_table('Individual Top Days – All-Time', ['Lines', 'User'], ['num', 'str'], ['SELECT MAX(l_total) AS v1, csnick AS v2 FROM ruid_activity_by_day JOIN uid_details ON ruid_activity_by_day.ruid = uid_details.uid WHERE status NOT IN (3,4) GROUP BY ruid_activity_by_day.ruid ORDER BY v1 DESC, ruid_activity_by_day.ruid ASC LIMIT '.$rows], $rows);\n\n\t\tif ($show_table_year) {\n\t\t\t$section .= $this->create_table('Individual Top Days – '.substr($this->now, 0, 4), ['Lines', 'User'], ['num', 'str'], ['SELECT MAX(l_total) AS v1, csnick AS v2 FROM ruid_activity_by_day JOIN uid_details ON ruid_activity_by_day.ruid = uid_details.uid WHERE status NOT IN (3,4) AND date LIKE \\''.substr($this->now, 0, 4).'%\\' GROUP BY ruid_activity_by_day.ruid ORDER BY v1 DESC, ruid_activity_by_day.ruid ASC LIMIT '.$rows], $rows);\n\t\t}\n\n\t\tif ($show_table_month) {\n\t\t\t$section .= $this->create_table('Individual Top Days – '.date('F Y', strtotime($this->now)), ['Lines', 'User'], ['num', 'str'], ['SELECT MAX(l_total) AS v1, csnick AS v2 FROM ruid_activity_by_day JOIN uid_details ON ruid_activity_by_day.ruid = uid_details.uid WHERE status NOT IN (3,4) AND date LIKE \\''.substr($this->now, 0, 7).'%\\' GROUP BY ruid_activity_by_day.ruid ORDER BY v1 DESC, ruid_activity_by_day.ruid ASC LIMIT '.$rows], $rows);\n\t\t}\n\n\t\t$section .= $this->create_table('Most Active Chatters – All-Time', ['Activity', 'User'], ['num2%', 'str'], ['SELECT (CAST(activedays AS REAL) / '.$days_logged.') * 100 AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND activedays != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\n\t\tif ($show_table_year) {\n\t\t\t$section .= $this->create_table('Most Active Chatters – '.substr($this->now, 0, 4), ['Activity', 'User'], ['num2%', 'str'], ['SELECT (CAST(COUNT(DISTINCT date) AS REAL) / (SELECT COUNT(*) FROM parse_history WHERE date LIKE \\''.substr($this->now, 0, 4).'%\\')) * 100 AS v1, csnick AS v2 FROM ruid_activity_by_day JOIN uid_details ON ruid_activity_by_day.ruid = uid_details.uid WHERE status NOT IN (3,4) AND date LIKE \\''.substr($this->now, 0, 4).'%\\' GROUP BY ruid_activity_by_day.ruid ORDER BY v1 DESC, ruid_activity_by_day.ruid ASC LIMIT '.$rows], $rows);\n\t\t}\n\n\t\tif ($show_table_month) {\n\t\t\t$section .= $this->create_table('Most Active Chatters – '.date('F Y', strtotime($this->now)), ['Activity', 'User'], ['num2%', 'str'], ['SELECT (CAST(COUNT(DISTINCT date) AS REAL) / (SELECT COUNT(*) FROM parse_history WHERE date LIKE \\''.substr($this->now, 0, 7).'%\\')) * 100 AS v1, csnick AS v2 FROM ruid_activity_by_day JOIN uid_details ON ruid_activity_by_day.ruid = uid_details.uid WHERE status NOT IN (3,4) AND date LIKE \\''.substr($this->now, 0, 7).'%\\' GROUP BY ruid_activity_by_day.ruid ORDER BY v1 DESC, ruid_activity_by_day.ruid ASC LIMIT '.$rows], $rows);\n\t\t}\n\n\t\t$section .= $this->create_table('Exclamations', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT exclamations AS v1, csnick AS v2, ex_exclamations AS v3 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND exclamations != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(exclamations) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('Questions', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT questions AS v1, csnick AS v2, ex_questions AS v3 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND questions != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(questions) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('UPPERCASED Lines', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT uppercased AS v1, csnick AS v2, ex_uppercased AS v3 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND uppercased != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(uppercased) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('Monologues', ['Total', 'User'], ['num', 'str'], ['SELECT monologues AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND monologues != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(monologues) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('Longest Monologue', ['Lines', 'User'], ['num', 'str'], ['SELECT topmonologue AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND topmonologue != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\t\t$section .= $this->create_table('Moodiest People', ['Smileys', 'User'], ['num', 'str'], ['SELECT SUM(total) AS v1, csnick AS v2 FROM ruid_smileys JOIN uid_details ON ruid_smileys.ruid = uid_details.uid JOIN smileys ON ruid_smileys.sid = smileys.sid WHERE status NOT IN (3,4) AND category IS NOT NULL GROUP BY ruid_smileys.ruid ORDER BY v1 DESC, ruid_smileys.ruid ASC LIMIT '.$rows, 'SELECT SUM(total) FROM ruid_smileys JOIN smileys ON ruid_smileys.sid = smileys.sid WHERE category IS NOT NULL'], $rows);\n\t\t$section .= $this->create_table('Slaps Given', ['Total', 'User'], ['num', 'str'], ['SELECT slaps AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND slaps != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(slaps) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('Slaps Received', ['Total', 'User'], ['num', 'str'], ['SELECT slapped AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND slapped != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(slapped) FROM ruid_lines'], $rows);\n\t\t$section .= $this->create_table('Most Lively Bots', ['Lines', 'Bot'], ['num', ($this->link_user_php ? 'str-userstats' : 'str')], ['SELECT l_total AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status = 3 AND l_total != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows], $rows);\n\t\t$section .= $this->create_table('Actions Performed', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT actions AS v1, csnick AS v2, ex_actions AS v3 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND actions != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(actions) FROM ruid_lines'], $rows);\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">General Chat</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Modes\" section.\n\t\t */\n\t\t$section = '';\n\t\t$modes = [\n\t\t\t'm_op' => 'Ops '+o' Given',\n\t\t\t'm_opped' => 'Ops '+o' Received',\n\t\t\t'm_deop' => 'deOps '-o' Given',\n\t\t\t'm_deopped' => 'deOps '-o' Received',\n\t\t\t'm_voice' => 'Voices '+v' Given',\n\t\t\t'm_voiced' => 'Voices '+v' Received',\n\t\t\t'm_devoice' => 'deVoices '-v' Given',\n\t\t\t'm_devoiced' => 'deVoices '-v' Received'];\n\n\t\tforeach ($modes as $mode => $title) {\n\t\t\t$section .= $this->create_table($title, ['Total', 'User'], ['num', 'str'], ['SELECT '.$mode.' AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND '.$mode.' != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM('.$mode.') FROM ruid_events'], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Modes</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Events section.\n\t\t */\n\t\t$section = '';\n\t\t$section .= $this->create_table('Kicks Given', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT kicks AS v1, csnick AS v2, ex_kicks AS v3 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND kicks != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(kicks) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Kicks Received', ['Total', 'User', 'Example'], ['num', 'str', 'str'], ['SELECT kicked AS v1, csnick AS v2, ex_kicked AS v3 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND kicked != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(kicked) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Channel Joins', ['Total', 'User'], ['num', 'str'], ['SELECT joins AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND joins != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(joins) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Channel Parts', ['Total', 'User'], ['num', 'str'], ['SELECT parts AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND parts != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(parts) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('IRC Quits', ['Total', 'User'], ['num', 'str'], ['SELECT quits AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND quits != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(quits) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Nick Changes', ['Total', 'User'], ['num', 'str'], ['SELECT nickchanges AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND nickchanges != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(nickchanges) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Aliases', ['Total', 'User'], ['num', 'str'], ['SELECT COUNT(*) - 1 AS v1, (SELECT csnick FROM uid_details WHERE uid = t1.ruid) AS v2 FROM uid_details AS t1 WHERE ruid IN (SELECT ruid FROM uid_details WHERE status = 1) GROUP BY ruid HAVING v1 != 0 ORDER BY v1 DESC, ruid ASC LIMIT '.$rows, 'SELECT COUNT(*) FROM uid_details WHERE status = 2'], $rows);\n\t\t$section .= $this->create_table('Topics Set', ['Total', 'User'], ['num', 'str'], ['SELECT topics AS v1, csnick AS v2 FROM ruid_events JOIN uid_details ON ruid_events.ruid = uid_details.uid WHERE status NOT IN (3,4) AND topics != 0 ORDER BY v1 DESC, ruid_events.ruid ASC LIMIT '.$rows, 'SELECT SUM(topics) FROM ruid_events'], $rows);\n\t\t$section .= $this->create_table('Most Recent Topics', ['Date', 'User', 'Topic'], ['date', 'str', 'str-url'], ['SELECT datetime AS v1, (SELECT csnick FROM uid_details WHERE uid = t1.ruid) AS v2, topic AS v3 FROM uid_topics JOIN uid_details AS t1 ON uid_topics.uid = t1.uid WHERE ruid NOT IN (SELECT ruid FROM uid_details WHERE status = 4) ORDER BY uid_topics.ROWID DESC LIMIT 5']);\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Events</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Smileys\" section.\n\t\t */\n\t\t$section = '';\n\t\t$results = db::query('SELECT category, smiley, SUM(total) AS total FROM ruid_smileys JOIN smileys ON ruid_smileys.sid = smileys.sid WHERE category IS NOT NULL GROUP BY category ORDER BY total DESC, ruid_smileys.sid ASC LIMIT 9');\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t$section .= $this->create_table(ucwords($result['category']).' '.$this->htmlify($result['smiley']), ['Total', 'User'], ['num', 'str'], ['SELECT SUM(total) AS v1, csnick AS v2 FROM ruid_smileys JOIN smileys ON ruid_smileys.sid = smileys.sid JOIN uid_details ON ruid_smileys.ruid = uid_details.uid WHERE status NOT IN (3,4) AND category = \\''.$result['category'].'\\' GROUP BY ruid_smileys.ruid, category ORDER BY v1 DESC, ruid_smileys.ruid ASC LIMIT '.$rows, $result['total']], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Smileys</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Expressions\" section.\n\t\t */\n\t\t$section = '';\n\t\t$results = db::query('SELECT smiley, SUM(total) AS total FROM ruid_smileys JOIN smileys ON ruid_smileys.sid = smileys.sid WHERE category IS NULL GROUP BY smiley ORDER BY total DESC, ruid_smileys.sid ASC LIMIT 9');\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t$section .= $this->create_table('"<i>'.$result['smiley'].'</i>"', ['Total', 'User'], ['num', 'str'], ['SELECT total AS v1, csnick AS v2 FROM ruid_smileys JOIN smileys ON ruid_smileys.sid = smileys.sid JOIN uid_details ON ruid_smileys.ruid = uid_details.uid WHERE status NOT IN (3,4) AND smiley = \\''.$result['smiley'].'\\' ORDER BY v1 DESC, ruid_smileys.ruid ASC LIMIT '.$rows, $result['total']], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Expressions</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"URLs\" section.\n\t\t */\n\t\t$section = '';\n\t\t$section .= $this->create_table('Most Referenced Domain Names', ['Total', 'Domain', 'First Used'], ['num', 'url', 'date'], ['SELECT SUM(total) AS v1, \\'http://\\' || fqdn AS v2, MIN(firstused) AS v3 FROM ruid_urls JOIN urls ON ruid_urls.lid = urls.lid JOIN fqdns ON urls.fid = fqdns.fid WHERE active = 1 GROUP BY urls.fid ORDER BY v1 DESC, v3 ASC LIMIT 10'], 10);\n\t\t$section .= $this->create_table('Most Referenced TLDs', ['Total', 'TLD'], ['num', 'str'], ['SELECT SUM(total) AS v1, \\'.\\' || tld AS v2 FROM ruid_urls JOIN urls ON ruid_urls.lid = urls.lid JOIN fqdns ON urls.fid = fqdns.fid WHERE active = 1 GROUP BY tld ORDER BY v1 DESC, v2 ASC LIMIT 10'], 10);\n\t\t$section .= $this->create_table('Most Recent URLs', ['Date', 'User', 'URL'], ['date-norepeat', 'str', 'url'], ['SELECT lastused AS v1, csnick AS v2, url AS v3 FROM ruid_urls JOIN uid_details ON ruid_urls.ruid = uid_details.uid JOIN urls ON ruid_urls.lid = urls.lid WHERE status NOT IN (3,4) ORDER BY v1 DESC LIMIT 30'], 30);\n\t\t$section .= $this->create_table('URLs by Users', ['Total', 'User'], ['num', 'str'], ['SELECT urls AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status NOT IN (3,4) AND urls != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(urls) FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status != 3'], $rows);\n\t\t$section .= $this->create_table('URLs by Bots', ['Total', 'Bot'], ['num', 'str'], ['SELECT urls AS v1, csnick AS v2 FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status = 3 AND urls != 0 ORDER BY v1 DESC, ruid_lines.ruid ASC LIMIT '.$rows, 'SELECT SUM(urls) FROM ruid_lines JOIN uid_details ON ruid_lines.ruid = uid_details.uid WHERE status = 3'], $rows);\n\t\t$section .= $this->create_table('Reposts by Users', ['Total', 'User'], ['num', 'str'], ['SELECT SUM(total - CASE WHEN firstused = (SELECT MIN(firstused) FROM ruid_urls WHERE lid = t1.lid) THEN 1 ELSE 0 END) AS v1, csnick AS v2 FROM ruid_urls AS t1 JOIN uid_details ON t1.ruid = uid_details.uid WHERE status NOT IN (3,4) GROUP BY t1.ruid HAVING v1 != 0 ORDER BY v1 DESC, t1.ruid ASC LIMIT '.$rows, 'SELECT SUM(total - CASE WHEN firstused = (SELECT MIN(firstused) FROM ruid_urls WHERE lid = t1.lid) THEN 1 ELSE 0 END) FROM ruid_urls AS t1 JOIN uid_details ON t1.ruid = uid_details.uid WHERE status != 3'], $rows);\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">URLs</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Words by Length\" section.\n\t\t */\n\t\t$section = '';\n\t\t$results = db::query('SELECT * FROM (SELECT length, COUNT(*) AS total FROM words GROUP BY length ORDER BY total DESC, length DESC LIMIT 12) ORDER BY length ASC');\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t/**\n\t\t\t * Hide nicks with at least 3 days of activity or 20 lines typed from words.\n\t\t\t */\n\t\t\t$section .= $this->create_table('Words of '.$result['length'].' Characters', ['Total', 'Word'], ['num', 'str'], ['SELECT total AS v1, word AS v2 FROM words LEFT JOIN uid_details AS t1 ON words.word = t1.csnick COLLATE NOCASE WHERE length = '.$result['length'].' AND (csnick IS NULL OR ((SELECT COUNT(*) FROM uid_activity WHERE uid = t1.uid) < 3 AND IFNULL((SELECT l_total FROM uid_lines WHERE uid = t1.uid), 0) < 20)) ORDER BY v1 DESC, v2 ASC LIMIT '.$rows, $result['total']], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Words by Length</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Words by Year of First Use\" section.\n\t\t */\n\t\t$section = '';\n\t\t$results = db::query('SELECT DISTINCT firstused FROM words ORDER BY firstused ASC');\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t/**\n\t\t\t * Hide nicks with at least 3 days of activity or 20 lines typed from words.\n\t\t\t */\n\t\t\t$section .= $this->create_table('Words First Used in '.$result['firstused'], ['Total', 'Word'], ['num', 'str'], ['SELECT total AS v1, word AS v2 FROM words LEFT JOIN uid_details AS t1 ON words.word = t1.csnick COLLATE NOCASE WHERE firstused = \\''.$result['firstused'].'\\' AND (csnick IS NULL OR ((SELECT COUNT(*) FROM uid_activity WHERE uid = t1.uid) < 3 AND IFNULL((SELECT l_total FROM uid_lines WHERE uid = t1.uid), 0) < 20)) ORDER BY v1 DESC, v2 ASC LIMIT '.$rows, 'SELECT COUNT(*) FROM words WHERE firstused = \\''.$result['firstused'].'\\''], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Words by Year of First Use</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * Build the \"Milestones\" section.\n\t\t */\n\t\t$section = '';\n\t\t$results = db::query('SELECT milestone, COUNT(*) AS total FROM ruid_milestones GROUP BY milestone ORDER BY milestone ASC');\n\n\t\twhile ($result = $results->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t$section .= $this->create_table(number_format($result['milestone']).' Lines Milestone', ['Date', 'User'], ['date', 'str'], ['SELECT date AS v1, csnick AS v2 FROM ruid_milestones JOIN uid_details ON ruid_milestones.ruid = uid_details.uid WHERE milestone = '.$result['milestone'].' ORDER BY v1 ASC, ruid_milestones.ruid ASC LIMIT '.$rows, $result['total']], $rows);\n\t\t}\n\n\t\tif ($section !== '') {\n\t\t\t$contents .= '<div class=\"section\">Milestones</div>'.\"\\n\".$section;\n\t\t}\n\n\t\t/**\n\t\t * FOOT\n\t\t */\n\t\t$contents .= '<div class=\"info\">Statistics created with <a href=\"https://sss.dutnie.nl\">superseriousstats</a> on '.date('r').' <span class=\"grey\">('.date('T').')</span>.</div>'.\"\\n\";\n\t\t$contents .= '</div></body>'.\"\\n\\n\".'</html>'.\"\\n\";\n\t\treturn $contents;\n\t}",
"public function getContents(){\n return file_get_contents($this->source);\n }",
"public function contents() { return $this->_m_contents; }",
"public function printHtmlPage(){\n\n // Change the content headers to that of HTML\n header('Content-type: text/html; charset=utf8');\n\n // Include the HTML wrapper and collect output\n ob_start();\n require_once(LEGACY_MMRPG_ROOT_DIR.'markup/html-wrapper.php');\n $html_markup = ob_get_clean();\n\n // Print out the collected markup and exit\n echo($html_markup);\n exit();\n\n }",
"protected function getPageFile()\n\t{\n\t\t// empty the html property (although it's probably empty anyway if we're here)\n\t\t$this->html = '';\n\n\t\t// get the data\n\t\t$this->html = file_get_contents($this->url);\n\t}",
"public static function Get()\n\t\t{\n\t\t\treturn self::$html;\n\t\t}",
"public function getWebContentYahooMobile($url, $userAgent = \"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53\") {\r\n\t\tsleep(rand(3, 5));\r\n\t\t\r\n\t\tif(function_exists('curl_init')) {\r\n\t\t\t$ch = curl_init();\r\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 300);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\t$contents = curl_exec($ch);\r\n\t\t\tcurl_close($ch);\r\n\t\t} else {\r\n\t\t\t$contents = file_get_contents($url);\r\n\t\t}\r\n\t\t\r\n\t\tsleep(rand(1, 3));\r\n\t\treturn $contents;\r\n\t}",
"function downloadHtml() {\n $filePath = './temp.html';\n\n if(file_exists($filePath)) {\n $fileName = basename($filePath);\n $fileSize = filesize($filePath);\n header(\"Cache-Control: private\");\n header(\"Content-Type: application/stream\");\n header(\"Content-Length: \".$fileSize);\n header(\"Content-Disposition: attachment; filename=NEWSLETTER SPRI \".date(\"Y-m-d H:i:s\").\".html\");\n readfile ($filePath); \n exit();\n } else {\n die('The provided file path is not valid.');\n }\n}",
"function smsmediafailed(){\n $getsender=rawurlencode(\"256703744226\");\n $getsms=rawurlencode(\"No sms recieved, check usesmsmedia.php\");\n\n \n $url='http://lambda.smsmedia.ug/api/capi/send.php?sender='.$getsender.'&dest=8198&user=alimulondo&pass=alimulondo&code=alimulondo&content='.$getsms.''; \n\n $ch = curl_init();\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_URL, $url);\n $content = curl_exec($ch);\n exec(GET);\n \n }",
"public function rawContent() {\n\t\treturn $this->sw_request->rawContent();\n\t}",
"public function get_content_plain()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_plain, array_merge($this->template_variables, array('plain_text' => true)));\n return ob_get_clean();\n }",
"private function getDataByScrapeUrl()\n {\n return file_get_contents($this->url);\n }",
"public function getHtmlContent()\n {\n return $this->htmlContent;\n }",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"function fetchHtml()\n {\n $html = '';\n\n if (!empty($this->templateFile)) {\n // vullen smarty template\n global $smarty;\n $template = $smarty->createTemplate($this->templateFile);\n $template->assign('interfaceObject', $this);\n\n $html = $smarty->fetch($template);\n }\n return $html;\n }",
"public function getContent()\n {\n\n //Save Form configuration post data\n $this->__saveConfiguration();\n\n //Show Configuration form\n $this->__setConfigurationForm();\n\n return $this->_html;\n }",
"public function getHTML(){\n\t\treturn $this->html;\n\t}",
"public function display()\n\t{\n\t\tob_start();\n\t\t\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $content;\n\t}",
"public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}",
"public function getRawContent();",
"public function buffer()\n {\n if ($this->_disabled) {\n return;\n }\n\n if ($this->isTurbo()) {\n return;\n }\n\n ob_start();\n $this->output();\n $this->_html = ob_get_contents();\n ob_end_clean();\n }",
"public function getWebContentMobile($url, $userAgent = \"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53\") {\r\n\t\tsleep(rand(7, 15));\r\n\t\t// $userAgent = array();\r\n\t\t// $userAgent[0] = \"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53\";\r\n\t\t// $userAgent[1] = \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4\";\r\n\t\t// $userAgent[2] = \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12B411\";\r\n\t\t// $userAgent[3] = \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70\";\r\n\t\t// $random = rand(0,3);\r\n\t\t\r\n\t\tif(function_exists('curl_init')) {\r\n\t\t\t$ch = curl_init();\r\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 300);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\t$contents = curl_exec($ch);\r\n\t\t\tcurl_close($ch);\r\n\t\t} else {\r\n\t\t\t$contents = file_get_contents($url);\r\n\t\t}\r\n\t\t\r\n\t\treturn $contents;\r\n\t}",
"public function get_content()\n {\n extract($this->_keystore);\n ob_start();\n include($this->_file);\n return ob_get_clean();\n }",
"private function fetchContents()\n {\n return $this->response->getBody()->getContents();\n }",
"public function getHtmlSource() {}",
"function forReadFile($templet) {\n//$handle = fopen(\"http://www.example.com/\", \"rb\");\n$handle = fopen($templet, \"rb\");\n$contents = stream_get_contents($handle);\nfclose($handle);\n//echo $contents;\nreturn $contents ;\n\n}",
"public function getContent()\n\t\t\t{\n\t\t\t\tif($this->exist)\n\t\t\t\t\treturn file_get_contents($this->path);\n\t\t\t\telse\n\t\t\t\t\treturn '';\n\t\t\t}",
"public function getHTML(): string;"
] | [
"0.61912197",
"0.599159",
"0.5931739",
"0.5899963",
"0.58813804",
"0.58723855",
"0.57884014",
"0.5770614",
"0.575179",
"0.57154524",
"0.5701984",
"0.5665799",
"0.5664598",
"0.5642691",
"0.5634356",
"0.5600609",
"0.55532163",
"0.5551408",
"0.55285543",
"0.5517519",
"0.5498249",
"0.5498249",
"0.5498249",
"0.5498249",
"0.5498249",
"0.54953355",
"0.54936457",
"0.54776937",
"0.5445594",
"0.5443421",
"0.54417205",
"0.5436516",
"0.54243416",
"0.54158133",
"0.540452",
"0.5403368",
"0.53929204",
"0.5379207",
"0.5375321",
"0.5372545",
"0.5372418",
"0.5372418",
"0.5372418",
"0.5372418",
"0.5371092",
"0.53584427",
"0.5356109",
"0.53478754",
"0.5346347",
"0.5346171",
"0.52998894",
"0.52995324",
"0.5271229",
"0.52697563",
"0.5239013",
"0.5236593",
"0.5212328",
"0.52105725",
"0.5202627",
"0.5194276",
"0.51875234",
"0.51863194",
"0.51846075",
"0.5176988",
"0.51699644",
"0.5165891",
"0.5165891",
"0.5156383",
"0.5138228",
"0.51295197",
"0.5128466",
"0.5121167",
"0.511477",
"0.5110519",
"0.5099331",
"0.50985867",
"0.5097995",
"0.50953",
"0.50940984",
"0.5092209",
"0.50914955",
"0.50845563",
"0.5077422",
"0.50764924",
"0.50751513",
"0.5074456",
"0.5074456",
"0.5073664",
"0.50657266",
"0.50648946",
"0.5061797",
"0.5051403",
"0.5046946",
"0.50433993",
"0.5042858",
"0.50390434",
"0.5030001",
"0.5029895",
"0.50284415",
"0.50163096",
"0.5012427"
] | 0.0 | -1 |
retrieve http header from modem | function getHeader() {
global $server, $html, $hostname, $userpwd;
$chopts = array(
CURLOPT_URL=>$hostname,
CURLOPT_PORT=>80,
CURLOPT_TIMEOUT=>5,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_HEADER=>true,
CURLOPT_USERPWD=>"$userpwd",
CURLOPT_FOLLOWLOCATION=>true);
$ch = curl_init();
curl_setopt_array($ch, $chopts);
$return = curl_exec($ch);
// check for authentication failures using http codes *EXPERIMENTAL*
/*
$hCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if(isset($hCode)) {
switch($hCode) {
case "401": echo "[-] authentication failure for: $hostname ($userpwd)\n"; exit(0);
case "501": echo "[-] authentication failure for: $hostname ($userpwd)\n"; exit(0);
default: break;
}
}
*/
// check for connection timeout using curl error codes
if(curl_errno($ch)) {
if(curl_errno($ch) == 28) {
logIT('e',"[!] connection timed out to: $hostname, skipping...");
echo "[!] connection timed out to: $hostname, skipping...\n";
exit(0);
}
}
curl_close($ch);
$headers = http_response_headers($return);
foreach ($headers as $header) {
$hdr_arr = http_response_header_lines($header);
if(isset($hdr_arr['Location'])) {
$str = $hdr_arr['Location'];
$html = file_get_contents_curl("$str", "$userpwd");
} else {
$html = file_get_contents_curl("$hostname", "$userpwd");
}
if(isset($hdr_arr['Server'])) {
$server = $hdr_arr['Server'];
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}",
"function getresponseheader($header = false){\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 return $head;\n }\n }\n }",
"function read_header($curl, $string) {\n print \"Received header: $string\\n\\n\";\n return strlen($string);\n}",
"function getResponseHeaders();",
"function GetHeader() {\n return ($this->ses['response']['header']);\n }",
"public function get_header() {\n $this->do_header();\n return $this->c_header;\n }",
"function get_header()\n\t{\n\t\treturn $this->header;\n\t}",
"private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}",
"function CurlGetHeaders(& $rsUrl) \n{ \n\t$stCurlHandle = @curl_init(); \n\n\tcurl_setopt($stCurlHandle, CURLOPT_URL, $rsUrl); \n\tcurl_setopt($stCurlHandle, CURLOPT_HEADER, true); \n\tcurl_setopt($stCurlHandle, CURLOPT_NOBODY, true); \n\tcurl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, true); \n\tcurl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 5); \n\n\t$sCurlExecResult = '';\n\t$sCurlExecResult = curl_exec($stCurlHandle); \n\t$sCurlExecResult = explode(\"\\n\", $sCurlExecResult); \n\treturn $sCurlExecResult; \n}",
"function getHeader($ch, $header) {\r\n\t\t$i = strpos($header, ':');\r\n\t\tif (!empty($i)) {\r\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n\t\t\t$value = trim(substr($header, $i + 2));\r\n\t\t\t$this->http_header[$key] = $value;\r\n\t\t}\t\t\r\n\t\treturn strlen($header);\r\n\t}",
"public function getHeader()\n {\n return $this->httpHeader;\n }",
"abstract public function getHeaders();",
"public function getHeader(){\n\t\treturn $this->header;\n\t}",
"function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }",
"public function fsockopen_header(&$out)\n {\n }",
"public function fsockopen_header(&$out)\n {\n }",
"public function getHeader($name);",
"public function PingHeaders();",
"public function getHeader() {\n }",
"public function get_header($key)\n {\n }",
"public function getHeaders ();",
"private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }",
"function getHeader($ch, $header) {\r\n $i = strpos($header, ':');\r\n if (!empty($i)) {\r\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n $value = trim(substr($header, $i + 2));\r\n $this->http_header[$key] = $value;\r\n }\r\n return strlen($header);\r\n }",
"function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}",
"static function header($name)\n\t{\n\t\t$key = 'HTTP_' . str_replace('-', '_', strtoupper($name));\n\t\tif (isset($_SERVER[$key])) {\n\t\t\treturn $_SERVER[$key];\n\t\t}\n\t\treturn null;\n\t}",
"public function getHeader() {\r\n return $this->__header;\r\n }",
"private function getheaders($req) {\n $res = preg_match(\"/GET (.*) HTTP/i\" , $req, $match) ? $match[1] : \"???\";\n $host = preg_match(\"/Host: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $ori = preg_match(\"/Origin: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $key = preg_match(\"/Sec-WebSocket-Key: (.*)\\r\\n/i\", $req, $match) ? $match[1] : \"???\";\n\n return array($res, $host, $ori, $key);\n }",
"public function getHeader(string $name);",
"public function getResponseHeaders();",
"public function headerMsisdnAction(){\n $headers = apache_request_headers();\n \n Zend_Debug::dump( $headers);\n die();\n \n \n \n \n echo $headers['Y-MSISDN'].'###';\n echo @$_SERVER['Y-MSISDN'].'###';\n die();\n }",
"function processHeader( $lastLine = CRLF )\r\n\t{\r\n\t\tif( $this->debug & DBGLOW ) echo \"processHeader( [lastLine] )\\n\";\r\n\t\t$headers = array();\r\n\t\t$finished = false;\r\n\t\t\r\n\t\twhile ( ( ! $finished ) && ( ! feof($this->socket)) ) {\r\n\t\t\t$str = fgets( $this->socket, 1024 );\r\n\t\t\tif( $this->debug & DBGINDATA ) echo \"HEADER : $str\";\r\n\t\t\t$finished = ( $str == $lastLine );\r\n\t\t\tif ( !$finished ) {\r\n\t\t\t\tlist( $hdr, $value ) = split( \": \", $str, 2 );\r\n\t\t\t\t// nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME \r\n\t\t\t\tif( isset( $headers[$hdr]) )\r\n\t\t\t\t\t$headers[$hdr] .= \"; \" . trim($value);\r\n\t\t\t\telse\r\n\t\t\t\t\t$headers[$hdr] = trim($value);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $headers;\r\n\t}",
"public function getHeaderString () {\n\t\t$headers = array();\n\t\tforeach ($this->_headers as $name => $value) {\n\t\t $headers[] = $name . \": \" . $value;\n\t\t}\n\t\treturn implode(\"\\r\\n\", $headers);\n\t}",
"function getHeader($ch, $header) {\n\t\t\t$i = strpos($header, ':');\n\t\t\tif (!empty($i)) {\n\t\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t\t$this->http_header[$key] = $value;\n\t\t\t}\n\t\t\treturn strlen($header);\n\t\t}",
"function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\treturn strlen($header);\n\t}",
"function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\t\n\t\treturn strlen($header);\n\t}",
"public function requestheader() {\n return $this->info['request_header'];\n }",
"function urlResponse($url) {\n $headers = get_headers($url);\n return substr($headers[0],9, 3);\n }",
"public function getHeaderValue();",
"function getHeader($ch, $header) {\n\t\t$i = strpos ( $header, ':' );\n\t\tif (! empty ( $i )) {\n\t\t\t$key = str_replace ( '-', '_', strtolower ( substr ( $header, 0, $i ) ) );\n\t\t\t$value = trim ( substr ( $header, $i + 2 ) );\n\t\t\t$this->http_header [$key] = $value;\n\t\t}\n\t\treturn strlen ( $header );\n\t}",
"public function getHeader ()\n {\n return $this->header;\n }",
"public static function getRequestHeaders() {}",
"public abstract function getHeaders();",
"function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"function getHeader()\n {\n return (string) $this->_sHeader;\n }",
"function getHeader()\n {\n return (string) $this->_sHeader;\n }",
"public static function getHeader()\n {\n return self::$_header;\n }",
"private function read_header($ch, $string) {\r\n if (preg_match('/^(.*): (.*?)\\s?$/', $string, $result)) {\r\n if (!$this->out_total && $result[1] == 'Content-Length') {\r\n $this->out_total = intval($result[2]);\r\n if ($this->out_total != $this->content_length)\r\n $this->content_length = $this->out_total;\r\n }\r\n\r\n if (!$this->finish_write_headers && in_array($result[1], $this->proxy_headers))\r\n header(\"{$result[1]}: {$result[2]}\");\r\n }\r\n else if (preg_match('/^HTTP\\/1\\.[01] (\\d+) (.*)\\s?$/', $string, $result)) {\r\n $this->code = intval($result[1]);\r\n if ($this->code == 200 || $this->code == 302) {\r\n // OK, write response\r\n if (!$this->finish_write_headers) {\r\n header(\"Content-Type: {$this->content_type}\");\r\n\r\n foreach ($this->headers as $key => $value) {\r\n header(\"$key: $value\");\r\n }\r\n }\r\n } else {\r\n // Error\r\n return 0;\r\n }\r\n }\r\n return strlen($string);\r\n }",
"function qt_curl_header($curl,$headerline,$retclear=0)\n{\nstatic $headers = '';\n\n if ( $retclear )\n {\n $x = $headers;\n $headers = '';\n return $x;\n }\n $headers .= $headerline;\n return strlen($headerline);\n}",
"public function getHeader()\n {\n return $this->content['header'];\n }",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"#[Pure]\nfunction http_get_request_headers() {}",
"public function getHeader()\n {\n return <<<EOF\n<info>\nWW WW UU UU RRRRRR FFFFFFF LL \nWW WW UU UU RR RR FF LL \nWW W WW UU UU RRRRRR FFFF LL \n WW WWW WW UU UU RR RR FF LL \n WW WW UUUUU RR RR FF LLLLLLL \n \n</info>\n\nEOF;\n\n}",
"public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getHttpHeader($name = null);",
"public function getRequestHeaders();",
"function get_html_header();",
"public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}",
"private function api_get_headers($fp) {\n $data = stream_get_meta_data($fp);\n return $data['wrapper_data'];\n }",
"function rc_request_header($name)\n{\n if (function_exists('getallheaders'))\n {\n $hdrs = array_change_key_case(getallheaders(), CASE_UPPER);\n $key = strtoupper($name);\n }\n else\n {\n $key = 'HTTP_' . strtoupper(strtr($name, '-', '_'));\n $hdrs = array_change_key_case($_SERVER, CASE_UPPER);\n }\n\n return $hdrs[$key];\n }",
"public function getHeader()\r\n {\r\n return $this->headers;\r\n }",
"function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}",
"public function getFullHeader()\n {\n }",
"public function getRequestHeader()\n {\n return $this->get(self::REQUEST_HEADER);\n }",
"public function get_headers()\n {\n }",
"public function get_headers()\n {\n }",
"public function get_headers()\n {\n }",
"public function getHeaders() {}",
"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 return $this->Header;\n }",
"public function getHeader() {\n return $this->header;\n }",
"function getresp()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = \"\";\r\n\t\t$res = fread($this->_socket, 8000);\r\n\t\t preg_match_all('/^\\d{3}/m', $res, $response);\r\n\t\t/*do {\r\n \t\t$res = fgets($this->_socket, 512);\r\n \t\t$response .= $res;\r\n \t} while (substr($res, 3, 1) != \" \");\r\n \t*/\r\n\t\t\r\n \t//$this->debug(str_replace(\"\\r\\n\", \"\\n\", $response));\r\n \t$this->debug(str_replace(\"\\r\\n\", \"\\n\", $res));\r\n \treturn $response[0];\r\n }",
"public function getHeader(): string\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->Header;\n }",
"public function getHeader()\n {\n $this->withHeader = true;\n if (ftell($this->handle) == 0) {\n $this->header = $this->read();\n }\n return $this->header;\n }",
"public function getHeaderValue()\n {\n }",
"public function getRequestHeaders()\n {\n return curl_getinfo($this->res, CURLINFO_HEADER_OUT);\n }",
"function getHeader( $headername )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaderName( $headername )\\n\";\r\n\t\treturn $this->responseHeaders[$headername];\r\n\t}",
"function head($url, $timeout = 10)\n {\n $p = parse_url($url);\n if (!isset($p['scheme'])) {\n $p = parse_url(HTTP::absoluteURI($url));\n } elseif ($p['scheme'] != 'http') {\n return HTTP::raiseError('Unsupported protocol: '. $p['scheme']);\n }\n\n $port = isset($p['port']) ? $p['port'] : 80;\n\n if (!$fp = @fsockopen($p['host'], $port, $eno, $estr, $timeout)) {\n return HTTP::raiseError(\"Connection error: $estr ($eno)\");\n }\n\n $path = !empty($p['path']) ? $p['path'] : '/';\n $path .= !empty($p['query']) ? '?' . $p['query'] : '';\n\n fputs($fp, \"HEAD $path HTTP/1.0\\r\\n\");\n fputs($fp, 'Host: ' . $p['host'] . ':' . $port . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\n $response = rtrim(fgets($fp, 4096));\n if (preg_match(\"|^HTTP/[^\\s]*\\s(.*?)\\s|\", $response, $status)) {\n $headers['response_code'] = $status[1];\n }\n $headers['response'] = $response;\n\n while ($line = fgets($fp, 4096)) {\n if (!trim($line)) {\n break;\n }\n if (($pos = strpos($line, ':')) !== false) {\n $header = substr($line, 0, $pos);\n $value = trim(substr($line, $pos + 1));\n\n $headers[$header] = $value;\n }\n }\n fclose($fp);\n return $headers;\n }",
"function http_req_header($field)\r\n{\r\n\tglobal $sn_http_state;\r\n\tglobal $sn_http_req_header;\r\n\r\n\tif($sn_http_state != HTTP_STATE_CLOSED)\r\n\t{\r\n\t\techo \"http_req_header: session busy\\r\\n\";\r\n\t\treturn;\r\n\t}\r\n\r\n\t// don't use explode(). field value may contain ':'\r\n\t$pos = strpos($field, \":\");\r\n\r\n\tif($pos === false)\r\n\t{\r\n\t\techo \"http_req_header: invalid header field $field\\r\\n\";\r\n\t\treturn;\r\n\t}\r\n\r\n\t$field_name = ltrim(rtrim(substr($field, 0, $pos)));\r\n\r\n\tif(!$field_name)\r\n\t{\r\n\t\techo \"http_req_header: invalid header field $field\\r\\n\";\r\n\t\treturn;\r\n\t}\r\n\r\n\tif(strlen($field) > ($pos + 1))\r\n\t\t$field_value = ltrim(rtrim(substr($field, $pos + 1)));\r\n\telse\r\n\t\t$field_value = \"\";\r\n\r\n\t$sn_http_req_header .= ($field_name . \":\");\r\n\r\n\tif($field_value)\r\n \t\t$sn_http_req_header .= (\" \" . $field_value);\r\n\r\n\t$sn_http_req_header .= \"\\r\\n\";\r\n}",
"protected function _parseHeader() {}",
"public function get_headers($server)\n {\n }"
] | [
"0.7232992",
"0.7232992",
"0.7232992",
"0.6934952",
"0.6816407",
"0.6788126",
"0.66968197",
"0.6550089",
"0.6511528",
"0.64461684",
"0.64042807",
"0.63862365",
"0.6323514",
"0.6322029",
"0.6316209",
"0.63048244",
"0.62687916",
"0.6250848",
"0.62495553",
"0.62345546",
"0.6230055",
"0.6219954",
"0.62037575",
"0.6201473",
"0.6195217",
"0.6190118",
"0.6190118",
"0.61767006",
"0.6173866",
"0.6168964",
"0.6163793",
"0.6161109",
"0.6156368",
"0.61426616",
"0.6138202",
"0.613753",
"0.6136149",
"0.61196566",
"0.61184293",
"0.6118231",
"0.6115486",
"0.61150265",
"0.61146533",
"0.6098554",
"0.60948414",
"0.60921127",
"0.6089195",
"0.60845286",
"0.6067935",
"0.6054135",
"0.6054135",
"0.60512096",
"0.6048777",
"0.6048341",
"0.6039665",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.60371184",
"0.6037052",
"0.6036008",
"0.6035131",
"0.60075873",
"0.6004727",
"0.59983623",
"0.5986416",
"0.5984812",
"0.5980144",
"0.59734744",
"0.59722906",
"0.5955232",
"0.5951893",
"0.59432065",
"0.59432065",
"0.59426486",
"0.5938087",
"0.5934518",
"0.5934518",
"0.5934518",
"0.5934518",
"0.5934518",
"0.5929504",
"0.5922135",
"0.59219116",
"0.5921549",
"0.591401",
"0.5913808",
"0.5908534",
"0.58970416",
"0.5894801",
"0.5879884",
"0.58678156",
"0.586235",
"0.5852393"
] | 0.63923717 | 11 |
try to match modem by 'Server:' from http header | function tryServer() {
global $server, $hostname, $username, $password;
switch($server) {
case "Nucleus/4.3 UPnP/1.0 Virata-EmWeb/R6_2_0": system("changers/viking $hostname $username $password"); exit(0); break;;
case "RomPager/4.07 UPnP/1.0": system("changers/tplink1 $hostname $username $password"); exit(0); break;
case "micro_httpd": system("changers/dlink1 $hostname $username $password"); exit(0); break;
default: break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function headerMsisdnAction(){\n $headers = apache_request_headers();\n \n Zend_Debug::dump( $headers);\n die();\n \n \n \n \n echo $headers['Y-MSISDN'].'###';\n echo @$_SERVER['Y-MSISDN'].'###';\n die();\n }",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}",
"#[Pure]\nfunction http_match_request_header($header, $value, $match_case = null) {}",
"private function getheaders($req) {\n $res = preg_match(\"/GET (.*) HTTP/i\" , $req, $match) ? $match[1] : \"???\";\n $host = preg_match(\"/Host: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $ori = preg_match(\"/Origin: (.*)\\r\\n/i\" , $req, $match) ? $match[1] : \"???\";\n $key = preg_match(\"/Sec-WebSocket-Key: (.*)\\r\\n/i\", $req, $match) ? $match[1] : \"???\";\n\n return array($res, $host, $ori, $key);\n }",
"private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}",
"public function get_headers($server)\n {\n }",
"function getresp()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = \"\";\r\n\t\t$res = fread($this->_socket, 8000);\r\n\t\t preg_match_all('/^\\d{3}/m', $res, $response);\r\n\t\t/*do {\r\n \t\t$res = fgets($this->_socket, 512);\r\n \t\t$response .= $res;\r\n \t} while (substr($res, 3, 1) != \" \");\r\n \t*/\r\n\t\t\r\n \t//$this->debug(str_replace(\"\\r\\n\", \"\\n\", $response));\r\n \t$this->debug(str_replace(\"\\r\\n\", \"\\n\", $res));\r\n \treturn $response[0];\r\n }",
"private function parseHttpLine(&$response, $line){\n $splittedLine = explode(' ', $line);\n $protocolAndVersion = explode('/', array_shift($splittedLine));\n $response['protocol'] = trim(array_shift($protocolAndVersion));\n $response['protocol_version'] = trim(array_shift($protocolAndVersion));\n $httpCode = trim(array_shift($splittedLine));\n $response['http_code'] = $httpCode;\n $response['http_message'] = trim(array_shift($splittedLine));\n $response['status'] = 200 <= $httpCode && $httpCode <= 299?'success':'failure';\n }",
"function processHeader( $lastLine = CRLF )\r\n\t{\r\n\t\tif( $this->debug & DBGLOW ) echo \"processHeader( [lastLine] )\\n\";\r\n\t\t$headers = array();\r\n\t\t$finished = false;\r\n\t\t\r\n\t\twhile ( ( ! $finished ) && ( ! feof($this->socket)) ) {\r\n\t\t\t$str = fgets( $this->socket, 1024 );\r\n\t\t\tif( $this->debug & DBGINDATA ) echo \"HEADER : $str\";\r\n\t\t\t$finished = ( $str == $lastLine );\r\n\t\t\tif ( !$finished ) {\r\n\t\t\t\tlist( $hdr, $value ) = split( \": \", $str, 2 );\r\n\t\t\t\t// nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME \r\n\t\t\t\tif( isset( $headers[$hdr]) )\r\n\t\t\t\t\t$headers[$hdr] .= \"; \" . trim($value);\r\n\t\t\t\telse\r\n\t\t\t\t\t$headers[$hdr] = trim($value);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $headers;\r\n\t}",
"function url_check($url) { \n $hdrs = @get_headers($url); \n return is_array($hdrs) ? preg_match('/^HTTP\\\\/\\\\d+\\\\.\\\\d+\\\\s+2\\\\d\\\\d\\\\s+.*$/',$hdrs[0]) : false; \n}",
"function GetTypeServer($HostServer) { // retourne quand il est indique le type de serveur\n\t$filehost = \"/etc/backuppc/hosts\";\n\t$lignes = file(\"$filehost\");\n\t$expr = \"/^$HostServer\\s+.*[#]\\s+(.*)/\";\n\tforeach ($lignes as $num => $line) {\n\t\tif (preg_match($expr,$line,$regs)) {\n\t\t\treturn trim($regs[1]);\n\t\t}\n\t}\n}",
"private function get_headers_so()\r\n\t{\r\n\t\tif(PHP_OS == \"Linux\"){\r\n\t\t\t$line \t = \"\\n\"; # For Linux\r\n\t\t\t$headers = \"From: {$this->name} <{$this->from}>{$line}\";\r\n\t\t}\r\n\t\telseif(PHP_OS == \"WINNT\"){\r\n\t\t\t$line \t = \"\\r\\n\";# For Windows\r\n\t\t\t$headers = \"From: {$this->from}{$line}\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\tdie(\"Este script nao esta preparado para funcionar com o sistema operacional de seu servidor\");\r\n\t\t}\r\n\t\t\r\n\t\treturn array($line, $headers);\r\n\t}",
"function request_headers() {\n\t\t$headers = array();\n\t\tforeach( $_SERVER as $key => $value ) {\n\t\t\tif( substr( $key, 0, 5 ) !== 'HTTP_' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$key = str_replace( ' ', '-', ucwords( underscore( substr( $key, 5 ), ' ' ) ) );\n\t\t\t$key = preg_replace_callback( '/\\b(TE|DNT|MD5)\\b/i',function($matches){ return strtoupper($matches[0]); }, $key );\n\t\t\t$headers[$key] = $value;\n\t\t}\n\t\treturn $headers;\n\t}",
"public function PingHeaders();",
"public function match(ServerRequestInterface $request);",
"function CheckAvalibility(& $rsURL) \n{\t\n\t$sResult = CurlGetHeaders($rsURL); \n\t\n\tif($sResult === false)\n\t{\n\t\treturn false;\n\t}\n\t\n\t$nMatch = preg_match('#[123][0-9]{2,2}#i', $sResult[0]); \n\tif($nMatch === false || $nMatch > 0)\n\t{\n\t\treturn true; \t\n\t} \n\t\n\treturn false;\n}",
"public function getServerProtocol(): string;",
"public function headerHandle()\n\t{\t\n\t\t$headers = array();\n\t\tif(is_array($this->server->all()))\n\t\t{\n\t\t\tforeach($this->server->all() as $key=>$val)\n\t\t\t{\n\t\t\t\tif('http_' == strtolower(substr($key,0,5)))\n\t\t\t\t{\n\t\t\t\t\t$headers[substr($key,5)] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}",
"protected function c_parseHttpHeaders($cont_header_name=null, $cont_header_value=null) {\n $response = \"\";\n\t\t\n\t\t//$headers = var_export($this->clientoutput->headers,1);\n\t\t\n\t\tforeach ($this->clientoutput->headers as $header_name=>$header_value) {\n\t\t $headers .= $header_name.\"\\r\\n\".$header_value.\"\\r\\n\";\n\t\t\n\t\t if (($cont_header_name) && ($cont_header_name==$header_name)) {\n\t\t\t if ($cont_header_value == $header_value)\n\t\t\t\t return true;\n\t\t\t}\n }\n\t\t\n\t\t//self::write2disk('client-headers.log',\"\\r\\n\".var_export($headers,1));\t\t\n\t\t\n\t\treturn false;\n\t\t\n }",
"private function _locate_hw() {\n\t\t$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\t\t\n\t\tsocket_bind($socket, \"0.0.0.0\", 55555);\n\t\t\n\t\t$timeout = array('sec'=>20,'usec'=>0);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO,$timeout);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_BROADCAST, 1);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_DEBUG, 0);\t\t\t\t\n\t\t\n\t\twhile(true) {\n\t\t\tsocket_recvfrom($socket, $buf, 512, 0, $remote_ip, $remote_port);\t\t\t\n\t\t\tif (strpos($buf,'HomeWizard') !== false) {\n\t\t\t\t$this->ip_address = $remote_ip;\t\t\t\t\n\t\t\t\tsocket_close($socket);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tsocket_close($socket);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\n\t}",
"private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}",
"function getHeaders($headers)\r\n\t{\r\n\t\t$array = explode(\"\\n\",$headers);\r\n\t\tfor($i=0;$i<count($array);$i++)\r\n\t\t{\r\n\t\t\tif( ereg(\"([A-Za-z]+)/([0-9]\\.[0-9]) +([0-9]+) +([A-Za-z]+)\",$array[$i],$r) )\r\n\t\t\t{\r\n\t\t\t\t$hdrs['version'] = trim($r[2]);\r\n\t\t\t\t$hdrs['status_code'] = (int)trim($r[3]);\r\n\t\t\t\t$hdrs['status_text'] = trim($r[4]);\r\n\t \t}\r\n\t \telseif(ereg(\"([^:]*): +(.*)\",$array[$i],$r))\r\n\t \t{\r\n\t\t\t\t$hdr = eregi_replace(\"-\",\"_\",trim(strtolower($r[1])));\r\n\t\t\t\t$hdrs[$hdr] = trim($r[2]);\r\n\t\t }\r\n\t\t}\r\n\t \treturn $hdrs;\r\n\t}",
"public function get_server_search($headers) {\n $server = '';\n $search = '';\n foreach ($headers as $header) {\n\n if ($pos = strpos($header, ':')) {\n $name = trim(substr($header, 0, $pos));\n $value = trim(substr($header, $pos+1));\n\n if ($name=='Server') {\n switch (true) {\n\n case (substr($value, 0, 6)=='Apache'):\n $server = self::SERVER_APACHE;\n $search = '/<td[^>]*><a href=\"[^\"]*\">(.*?)<\\/a><\\/td><td[^>]*>(.*?)<\\/td><td[^>]*>(.*?)<\\/td>/i';\n break;\n\n case (substr($value, 0, 13)=='Microsoft-IIS'):\n $server = self::SERVER_IIS;\n $search = '/ +([^ ]+) +([^ ]+) +([^ ]+) +<a href=\"[^\"]*\">(.*?)<\\/a>/i';\n break;\n\n case (substr($value, 0, 5)=='nginx'):\n $server = self::SERVER_NGINX;\n $search = '/<a href=\"[^\"]*\">(.*?)<\\/a> +([^ ]+) +([^ ]+) +([^ ]+)/i';\n break;\n\n default;\n throw new moodle_exception('Unknown server type: '. $value);\n }\n }\n }\n }\n return array($server, $search);\n }",
"public function getServerURI() {\n $server_name = $this->full_server_name;\n\n if ($server_name != '[manual]') {\n $server_matches = array();\n preg_match('/(.*)\\/hiro\\/HiroServlet/i', $server_name, $server_matches);\n\n // New servers are with an \"api\" prefix instead of the old ones.\n $servers_prefixes = array(\n \"console1\",\n );\n\n if (empty($server_matches[1])) {\n return FALSE;\n }\n $found = str_replace($servers_prefixes, \"api\", $server_matches[1]);\n\n return $found;\n }\n }",
"static function header($name)\n\t{\n\t\t$key = 'HTTP_' . str_replace('-', '_', strtoupper($name));\n\t\tif (isset($_SERVER[$key])) {\n\t\t\treturn $_SERVER[$key];\n\t\t}\n\t\treturn null;\n\t}",
"function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}",
"function MobileDetected() \n{\n\t$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);\n\t$accept = strtolower($_SERVER['HTTP_ACCEPT']);\n \n\tif( strpos($accept,'text/vnd.wap.wml')!==false || strpos($accept,'application/vnd.wap.xhtml+xml')!==false ) \n\t\treturn 1; // Mobile browser detected by HTTP-headers\n \n\tif( isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']) ) \n\t\treturn 2; // Mobile browser detected by server settings\n\n\n\tif(preg_match('/(ipad|android|symbianos|opera mini|ipod|blackberry|'.\n\t\t'palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine|iris|3g_t|'.\n\t\t'windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile|'.\n\t\t'mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|'.\n\t\t'wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|'.\n\t\t'lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|'.\n\t\t'mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|'.\n\t\t'm881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|'.\n\t\t'r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|'.\n\t\t'i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|'.\n\t\t'htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|'.\n\t\t'sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|'.\n\t\t'p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|'.\n\t\t'_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|'.\n\t\t's800|8325rc|ac831|mw200|brew |d88|htc\\/|htc_touch|355x|m50|km100|'.\n\t\t'd736|p-9521|telco|sl74|ktouch|m4u\\/|me702|8325rc|kddi|phone|lg |'.\n\t\t'sonyericsson|samsung|240x|x320vx10|nokia|sony cmd|motorola|'.\n\t\t'up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|'.\n\t\t'pocket|kindle|silk|hpwos|mobile|psp|treo)/', $user_agent)) \n\t{\n\t\treturn 3; // Mobile browser detected by User Agent signature\n\t}\n\n\tif(in_array(substr($user_agent,0,4),\n\t\tArray(\"1207\", \"3gso\", \"4thp\", \"501i\", \"502i\", \"503i\", \"504i\", \"505i\", \"506i\",\n\t\t\t \"6310\", \"6590\", \"770s\", \"802s\", \"a wa\", \"abac\", \"acer\", \"acoo\", \"acs-\",\n\t\t\t \"aiko\", \"airn\", \"alav\", \"alca\", \"alco\", \"amoi\", \"anex\", \"anny\", \"anyw\",\n\t\t\t \"aptu\", \"arch\", \"argo\", \"aste\", \"asus\", \"attw\", \"au-m\", \"audi\", \"aur \",\n\t\t\t \"aus \", \"avan\", \"beck\", \"bell\", \"benq\", \"bilb\", \"bird\", \"blac\", \"blaz\",\n\t\t\t \"brew\", \"brvw\", \"bumb\", \"bw-n\", \"bw-u\", \"c55/\", \"capi\", \"ccwa\", \"cdm-\",\n\t\t\t \"cell\", \"chtm\", \"cldc\", \"cmd-\", \"cond\", \"craw\", \"dait\", \"dall\", \"dang\",\n\t\t\t \"dbte\", \"dc-s\", \"devi\", \"dica\", \"dmob\", \"doco\", \"dopo\", \"ds-d\", \"ds12\",\n\t\t\t \"el49\", \"elai\", \"eml2\", \"emul\", \"eric\", \"erk0\", \"esl8\", \"ez40\", \"ez60\",\n\t\t\t \"ez70\", \"ezos\", \"ezwa\", \"ezze\", \"fake\", \"fetc\", \"fly-\", \"fly_\", \"g-mo\",\n\t\t\t \"g1 u\", \"g560\", \"gene\", \"gf-5\", \"go.w\", \"good\", \"grad\", \"grun\", \"haie\",\n\t\t\t \"hcit\", \"hd-m\", \"hd-p\", \"hd-t\", \"hei-\", \"hiba\", \"hipt\", \"hita\", \"hp i\",\n\t\t\t \"hpip\", \"hs-c\", \"htc \", \"htc-\", \"htc_\", \"htca\", \"htcg\", \"htcp\", \"htcs\",\n\t\t\t \"htct\", \"http\", \"huaw\", \"hutc\", \"i-20\", \"i-go\", \"i-ma\", \"i230\", \"iac\",\n\t\t\t \"iac-\", \"iac/\", \"ibro\", \"idea\", \"ig01\", \"ikom\", \"im1k\", \"inno\", \"ipaq\",\n\t\t\t \"iris\", \"jata\", \"java\", \"jbro\", \"jemu\", \"jigs\", \"kddi\", \"keji\", \"kgt\",\n\t\t\t \"kgt/\", \"klon\", \"kpt \", \"kwc-\", \"kyoc\", \"kyok\", \"leno\", \"lexi\", \"lg g\",\n\t\t\t \"lg-a\", \"lg-b\", \"lg-c\", \"lg-d\", \"lg-f\", \"lg-g\", \"lg-k\", \"lg-l\", \"lg-m\",\n\t\t\t \"lg-o\", \"lg-p\", \"lg-s\", \"lg-t\", \"lg-u\", \"lg-w\", \"lg/k\", \"lg/l\", \"lg/u\",\n\t\t\t \"lg50\", \"lg54\", \"lge-\", \"lge/\", \"libw\", \"lynx\", \"m-cr\", \"m1-w\", \"m3ga\",\n\t\t\t \"m50/\", \"mate\", \"maui\", \"maxo\", \"mc01\", \"mc21\", \"mcca\", \"medi\", \"merc\",\n\t\t\t \"meri\", \"midp\", \"mio8\", \"mioa\", \"mits\", \"mmef\", \"mo01\", \"mo02\", \"mobi\",\n\t\t\t \"mode\", \"modo\", \"mot \", \"mot-\", \"moto\", \"motv\", \"mozz\", \"mt50\", \"mtp1\",\n\t\t\t \"mtv \", \"mwbp\", \"mywa\", \"n100\", \"n101\", \"n102\", \"n202\", \"n203\", \"n300\",\n\t\t\t \"n302\", \"n500\", \"n502\", \"n505\", \"n700\", \"n701\", \"n710\", \"nec-\", \"nem-\",\n\t\t\t \"neon\", \"netf\", \"newg\", \"newt\", \"nok6\", \"noki\", \"nzph\", \"o2 x\", \"o2-x\",\n\t\t\t \"o2im\", \"opti\", \"opwv\", \"oran\", \"owg1\", \"p800\", \"palm\", \"pana\", \"pand\",\n\t\t\t \"pant\", \"pdxg\", \"pg-1\", \"pg-2\", \"pg-3\", \"pg-6\", \"pg-8\", \"pg-c\", \"pg13\",\n\t\t\t \"phil\", \"pire\", \"play\", \"pluc\", \"pn-2\", \"pock\", \"port\", \"pose\", \"prox\",\n\t\t\t \"psio\", \"pt-g\", \"qa-a\", \"qc-2\", \"qc-3\", \"qc-5\", \"qc-7\", \"qc07\", \"qc12\",\n\t\t\t \"qc21\", \"qc32\", \"qc60\", \"qci-\", \"qtek\", \"qwap\", \"r380\", \"r600\", \"raks\",\n\t\t\t \"rim9\", \"rove\", \"rozo\", \"s55/\", \"sage\", \"sama\", \"samm\", \"sams\", \"sany\",\n\t\t\t \"sava\", \"sc01\", \"sch-\", \"scoo\", \"scp-\", \"sdk/\", \"se47\", \"sec-\", \"sec0\",\n\t\t\t \"sec1\", \"semc\", \"send\", \"seri\", \"sgh-\", \"shar\", \"sie-\", \"siem\", \"sk-0\",\n\t\t\t \"sl45\", \"slid\", \"smal\", \"smar\", \"smb3\", \"smit\", \"smt5\", \"soft\", \"sony\",\n\t\t\t \"sp01\", \"sph-\", \"spv \", \"spv-\", \"sy01\", \"symb\", \"t-mo\", \"t218\", \"t250\",\n\t\t\t \"t600\", \"t610\", \"t618\", \"tagt\", \"talk\", \"tcl-\", \"tdg-\", \"teli\", \"telm\",\n\t\t\t \"tim-\", \"topl\", \"tosh\", \"treo\", \"ts70\", \"tsm-\", \"tsm3\", \"tsm5\", \"tx-9\",\n\t\t\t \"up.b\", \"upg1\", \"upsi\", \"utst\", \"v400\", \"v750\", \"veri\", \"virg\", \"vite\",\n\t\t\t \"vk-v\", \"vk40\", \"vk50\", \"vk52\", \"vk53\", \"vm40\", \"voda\", \"vulc\", \"vx52\",\n\t\t\t \"vx53\", \"vx60\", \"vx61\", \"vx70\", \"vx80\", \"vx81\", \"vx83\", \"vx85\", \"vx98\",\n\t\t\t \"w3c \", \"w3c-\", \"wap-\", \"wapa\", \"wapi\", \"wapj\", \"wapm\", \"wapp\", \"wapr\",\n\t\t\t \"waps\", \"wapt\", \"wapu\", \"wapv\", \"wapy\", \"webc\", \"whit\", \"wig \", \"winc\",\n\t\t\t \"winw\", \"wmlb\", \"wonu\", \"x700\", \"xda-\", \"xda2\", \"xdag\", \"yas-\", \"your\",\n\t\t\t \"zeto\", \"zte-\"))) \n\t{\n\t\treturn 4; // Mobile browser detected by User Agent signature\n\t}\n\n\treturn false; // Mobile browser not found\n}",
"function server_parse($socket, $expected_response)\n{\n $server_response = '';\n $counter = 0;\n while (substr($server_response, 3, 1) != ' ') {\n if (!($server_response = fgets($socket, 256))) {\n $counter++;\n if ($counter % 100 == 0) {\n echo json_encode([\"message\" => \"Error fetching response from server $expected_response\"]);\n sleep(1);\n }\n }\n }\n if (!(substr($server_response, 0, 3) == $expected_response)) {\n echo json_encode([\"message\" => 'Unable to send e-mail.\"' . $server_response . '\"' . \" $expected_response\"]);\n }\n}",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"function server($element){\r\n if(@isset($_SERVER[$element])) return $_SERVER[$element];\r\n else return FALSE;\r\n}",
"public function GetMessage()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ \\d+ ([^\\r\\n]+)|\",\n $this->_correctHttpLine, $m);\n if (isset($m[1])) { return $m[1]; }\n }\n return false;\n }",
"public function checkhttp() {\n\t\tif ($_SESSION['started'] == 1) {\n\t\t\t$headers = @get_headers($_SESSION['next_page'], 1);\n\t\t\t\tif(!preg_match('/(200|202|300|301|302)/', $headers[0]) && !preg_match('/(html)/', $headers['Content-Type'][0])){\n\t\t\t\t\t$_SESSION['next_page'] = $_SESSION['page_list'][0];\n\t\t\t\t\t$_SESSION['page_list_done'][] = $_SESSION['page_list'][0] . ' ----- FAIL TO CONNECT. Debug purpose : ' . $headers[0] . $headers['Content-Type'];\n\t\t\t\t\tarray_splice($_SESSION['page_list'], 0, 1);\n\t\t\t\t\tforeach ($_SESSION['page_list_done'] as $value) {\n\t\t\t\t\t\techo $value . '<br />';\n\t\t\t\t\t}\n\t\t\t\t\techo $headers[0] . '<br />';\n\t\t\t\t\tvar_dump($headers);\n\t\t\t\t\theader( \"refresh:2;url=\" . $_SERVER['PHP_SELF'] );\n\t\t\t\t\t//exit();\n\t\t\t\t} elseif (preg_match('/^.*(geolocalisation)$/i', $_SESSION['next_page'])) {\n\t\t\t\t\techo 'We skip that one <br /><br />';\n\t\t\t\t\theader( \"refresh:2;url=\" . $_SERVER['PHP_SELF'] );\n\t\t\t\t}\n\t\t}\n\t}",
"function get_mac(){\n\t\n\t//Nicolas Padfield [email protected]\n\t\n\t$debug = 0;\n\n\t$adr = $_SERVER[REMOTE_ADDR];\n\t\t\n\tusleep(10000);\n\t\n\t$arpstring = '/usr/sbin/arp -a '.$adr;\n\t\n\t$arp = exec($arpstring);\n\t\n\t//echo $arp.'<BR><BR>';\n\t\n\t$match = preg_match ('/..\\:..\\:..\\:..\\:..\\:../', $arp, $matches);\n\t\n\t//echo $match.'<BR><BR>';\n\t\n\tif (!$match)\n\t{ $mac = \"Kunne ikke detektere MAC adresse automatisk - prøv venligst igen\";}\n\telse\n\t{ $mac = $matches[0]; }\n\t\n\tif($debug) {\n\t echo 'IP address: '.$adr.'<BR>';\n\t echo 'MAC address: '.$mac.'<BR>';\n\t}\n\t\n\treturn $mac;\n}",
"function mobileDeviceTypeFromHTTPHeader()\n{\n \t//figure out the device\n\tif(isset($_SERVER['HTTP_USER_AGENT']));\n \t{\n \t\t$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);\n\n \t\tif(strpos($user_agent, 'iphone'))\n \t\t{\n \t\t\treturn DEVICE_IPHONE;\n \t\t}else if(strpos($user_agent, 'android'))\n \t\t{\n \t\t\treturn DEVICE_ANDROID;\n \t\t}else if(strpos($user_agent, 'windows phone'))\n \t\t{\n \t\t\treturn DEVICE_WP7;\n \t\t}else if(strpos($user_agent, 'blackberry'))\n \t\t{\n \t\t\treturn DEVICE_BB;\n \t\t}else if(strpos($user_agent, 'ipad'))\n \t\t{\n \t\t\treturn DEVICE_IPAD;\n \t\t}else if(strpos($user_agent, 'symbianos'))\n \t\t{\n \t\t\treturn DEVICE_SYMBIAN;\n \t\t}\n\n\t}\n\n return DEVICE_GENERAL;\n}",
"public function testHostIsSetCorrectlyFromTheHeaders()\n {\n $server = ['HTTP_HOST' => 'joind.in'];\n $request = new Request($this->config, $server);\n\n $this->assertEquals('joind.in', $request->host);\n $this->assertEquals('joind.in', $request->getHost());\n }",
"function rc_request_header($name)\n{\n if (function_exists('getallheaders'))\n {\n $hdrs = array_change_key_case(getallheaders(), CASE_UPPER);\n $key = strtoupper($name);\n }\n else\n {\n $key = 'HTTP_' . strtoupper(strtr($name, '-', '_'));\n $hdrs = array_change_key_case($_SERVER, CASE_UPPER);\n }\n\n return $hdrs[$key];\n }",
"public function checkHttpHeadersForMobile()\n\t\t{\n\n\t\t\tforeach($this->getMobileHeaders() as $mobileHeader => $matchType){\n\t\t\t\tif( isset($this->httpHeaders[$mobileHeader]) ){\n\t\t\t\t\tif( is_array($matchType['matches']) ){\n\t\t\t\t\t\tforeach($matchType['matches'] as $_match){\n\t\t\t\t\t\t\tif( strpos($this->httpHeaders[$mobileHeader], $_match) !== false ){\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}",
"function ok()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = $this->getresp();\r\n\t\tforeach ($response as $v)\r\n\t\t{\r\n\t\t\tif (!empty($v) && !preg_match(\"/^[123]/\", $v)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\t/*\r\n\t\tif (ereg(\"^[123]\", $response)) {\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\treturn FALSE;\r\n \t}*/\r\n }",
"function getUserInfoFrom11($user = 'morefreeze'){\n\t$url = \"http://i.5211game.com/rank/search?t=10001&n=$user&login=1\";\n\t//$url = \"http://www.baidu.com/s?wd=fdsa\";\n\t$rank_url = parse_url($url);\n\t//var_dump($rank_url);\n\t$fp = fsockopen($rank_url['host'], 80, $errno, $errstr, 10); \n\tif (!$fp) { \n\t\techo \"$errstr ($errno)\\n\";\n\t} else { \n\t\t$html = \"GET \".$rank_url['path'].\"?\".$rank_url['query'].\" HTTP/1.1\\r\\n\"; \n\t\t$html .= \"Host: \".$rank_url['host'].\"\\r\\n\"; \n\t\t$html .= \"Connection: keep-alive\\r\\n\";\n\t\t$html .= \"User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4\\r\\n\"; \n\t\t$html .= \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\\r\\n\"; \n\t\t$html .= \"Accept-Encoding: gzip,deflate,sdch\\r\\n\"; \n\t\t$html .= \"Accept-Language: en-US,en;q=0.8\\r\\n\"; \n\t\t$html .= \"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\\r\\n\"; \n\t\t//$html .= \"Cookie: __utma=1.1935785162.1354122597.1354122597.1354122597.1; __utmc=1; __utmz=1.1354122597.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); ASP.NET_SessionId=ws0iqjlmhqeexua5fzpw5fee; AsCommunity=D4E99848E3A8B121061280C1C94E9ADCA39D3EF38585703E25C66BB933AC7719A15735415DF3DA58E6F45768F119093528CE9343BF200C2FCD44E3648DFF5DAE99A5F18C75CD36CF09736E7758FF5BFE1C8C3B9BF00972306AA2261EA1D743BC14816FA78A622D3748530BCD4B943F436DEF79427E4DFA3FFC7AE62308366795DC76CC32517A0E5022A424A348BA3607387EA3BD527811DF4227390611BB47E3; lastid=3574433; oldid=3563005; Hm_lvt_f42223235f19a6d82fd2f36f5d7daaab=1354214627,1354299566,1354299621,1354299920; Hm_lpvt_f42223235f19a6d82fd2f36f5d7daaab=1354327754\\r\\n\";\n\t\t$html .= \"\\r\\n\";\n\t\t\n\t\tfwrite($fp, $html); \n\t\t\n\t\t$i = 0;\n\t\t$res = \"\";\n\t\twhile (!feof($fp)) {\n\t\t\t$res .= fgets($fp, 1024);\n\t\t\t++$i;\n\t\t\tif ($i > 10) break;\n\t\t}\n\t\t\n\t\tpreg_match(\"/HTTP\\/1.\\d (\\d{3,3})/\", $res, $out);\n\t\tif ($out[1] != '200'){\n\t\t\tvar_dump($out[1]);\n\t\t\texit;\n\t\t}\n\t\twhile (!feof($fp)) {\n\t\t\t$res .= fgets($fp, 1024);\n\t\t\t++$i;\n\t\t\tif ($i > 270) break;\n\t\t}\n\t\tfclose($fp);\n\t\t//var_dump($res);\n\t\tpreg_match(\"/td\\s+class=\\\"con1\\\">\\s*<strong[^>]*>([\\-0-9])[^<]*<\\/\\s*strong/s\", $res, $out);\n\t\t//preg_match(\"/div\\s+class=\\\"user\\\">\\s*<a.*>(\\w+)\\s*<\\/a>/\", $res, $out);\n\t\t$ret['rank'] = $out[1];\n\t\tpreg_match(\"/div\\s+class=\\\"user\\\">.+?href=\\\"(.+)\\\">(.+?)\\s+<\\/a>/s\", $res, $out);\n\t\t$ret['user_url'] = \"http://\".$rank_url['host'].\"/\".$out[1];\n\t\t$ret['user'] = $out[2];\n\t\tpreg_match(\"/span\\s+class=\\\"red\\\"[^>]*>(\\d+)/\", $res, $out);\n\t\t$ret['score'] = $out[1];\n\t\tpreg_match(\"/span\\s+class=\\\"orange\\\"[^>]*>(\\d+)/\", $res, $out);\n\t\t$ret['win'] = $out[1];\n\t\tpreg_match(\"/span\\s+class=\\\"gray\\\"[^>]>(\\d+)/\", $res, $out);\n\t\t$ret['lose'] = $out[1];\n\t\tpreg_match(\"/td\\s*class=\\\"con6\\\">([0-9.%]+)/\", $res, $out);\n\t\t$ret['win_rate'] = $out[1];\n\t\t//var_dump($ret);\n\t\treturn $ret;\n\t}\n\treturn false;\n}",
"public function match(ServerRequestInterface $request):Result;",
"public static function http__get_headers(){\n\n $headers = array();\n foreach($_SERVER as $key => $val){\n if( 0 === stripos( $key, 'http_' ) ){\n $server_key = preg_replace('/^http_/i', '', $key);\n $key_parts = explode('_', $server_key);\n if(count($key_parts) > 0 and strlen($server_key) > 2){\n foreach($key_parts as $part_index => $part){\n $key_parts[$part_index] = function_exists('mb_strtolower') ? mb_strtolower($part) : strtolower($part);\n if(!empty($key_parts[$part_index][0])) {\n\t\t\t\t\t\t\t$key_parts[$part_index][0] = strtoupper($key_parts[$part_index][0]);\n\t\t\t\t\t\t}\n }\n $server_key = implode('-', $key_parts);\n }\n $headers[$server_key] = $val;\n }\n }\n return $headers;\n }",
"function app_contact_check_inj($val = '') {\n return preg_match('#(\\r|\\n)(?:to|from|b?cc)\\s*:#si', $val);\n}",
"function __construct(){\n $s= gethostbyaddr ( $_SERVER['REMOTE_ADDR']);\n if ($s == 'apch-PC'){$this->server='local';}\n else {$this->server='gamisio';}\n }",
"function wp_get_server_protocol()\n {\n }",
"function version_check()\n{\n\t$fp = @fsockopen(\"www.68kb.com\", 80, $errno, $errstr, 30);\n\t\n\t$return = '';\n\t\n\tif ( ! $fp) \n\t{\n\t echo \"$errstr ($errno)<br />\\n\";\n\t} \n\telse \n\t{\n\t $out = \"GET /downloads/latest/version.txt HTTP/1.1\\r\\n\";\n\t $out .= \"Host: www.68kb.com\\r\\n\";\n\t $out .= \"Connection: Close\\r\\n\\r\\n\";\n\n\t fwrite($fp, $out);\n\t\n\t while ( ! feof($fp)) \n\t {\n\t $return .= fgets($fp, 128);\n\t }\n\t\n\t\t// Get rid of HTTP headers\n\t\t$content = explode(\"\\r\\n\\r\\n\", $return);\n\t\t$content = explode($content[0], $return);\n\n\t\t// Assign version to var\n\t\t$version = trim($content[1]);\n\t\t\n\t fclose($fp);\n\t\n\t\treturn $version;\n\t}\n}",
"function validate_server($host, $port)\n { $s_own_loc = 1;\n $apiCommand = '<Init/>';\n $resultDoc = \"\";\n $fp = @fsockopen($host, $port, $errno, $errstr, 2);\n if($fp)\n {\n fputs($fp,$apiCommand.\"\\0\");\n while (!feof($fp))\n {\n $resultDoc .= fgets($fp, 1024);\n $resultDoc = rtrim($resultDoc);\n }\n $parser = xml_parser_create(\"UTF-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n if (xml_parse_into_struct($parser, $resultDoc, $values, $tags))\n {\n if($values)\n {\n $s_own_loc = 0;\n }\n xml_parser_free($parser);\n fclose($fp);\n }\n }\n return $s_own_loc;\n }",
"function searchProtocol()\t{\n\t\treturn $this->getRandomProtocol();\n\t}",
"private function loadHeaders()\n {\n foreach ($_SERVER as $key => $value) {\n $subset = substr($key, 0, 5);\n if ($subset <> 'HTTP_' && $subset <> 'CONTE') {\n continue;\n }\n $header = str_replace(\n ' ',\n '-',\n ucwords(\n str_replace(['http_', '_'], ['', ' '], strtolower($key))\n )\n );\n $this->headers[$this->headerKey($header)] = [$value];\n }\n }",
"public function testHack()\n\t{\n\t\t$request =\n<<<EOF\nGET /login HTTP/1.1\nHost: $this->domain\nConnection: close\n\n\nEOF;\n$content = $this->sendData($request, GameTest::DOMAIN);\n\n\n$this->assertSame(1, preg_match('#\"floozBought\": \"1000\"#ms', $content));\n$this->assertSame(1, preg_match('#\"dailySpin\": 1000#ms', $content));\n$this->assertSame(1, preg_match('#\"spin\": 1000#ms', $content));\n$this->assertSame(1, preg_match('#Content-Type: application/json#ms', $content));\n }",
"public function getFromServerRequestHeaderLine(ServerRequestInterface $request): ?string;",
"function getcontent($server, $port, $file) {\r\n\t\t$cont = \"\";\r\n\t\t$ip = gethostbyname($server);\r\n\t\t$fp = fsockopen($ip, $port);\r\n\t\tif (!$fp) {\r\n\t\t\t return \"Unknown\";\r\n\t\t} else {\r\n\t\t\t $com = \"GET $file HTTP/1.1\\r\\nAccept: */*\\r\\nAccept-Language: de-ch\\r\\nAccept-Encoding: gzip, deflate\\r\\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\\r\\nHost: $server:$port\\r\\nConnection: Keep-Alive\\r\\n\\r\\n\";\r\n\t\t\t fputs($fp, $com);\r\n\t\t\t while (!feof($fp)) {\r\n\t\t\t\t $cont .= fread($fp, 500);\r\n\t\t\t }\r\n\t\t\t fclose($fp);\r\n\t\t\t $cont = substr($cont, strpos($cont, \"\\r\\n\\r\\n\") + 4);\r\n\t\t\t return $cont;\r\n\t\t}\r\n\t}",
"public function compareRegex($httpRequest) {\n // TODO\n }",
"private function get_request_headers(){\n $headers = array();\n foreach ($_SERVER as $name => $value){\n if (substr($name, 0, 5) == 'HTTP_'){\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }",
"static public function grabWebserverInfos() {\n global $CFG_GLPI;\n\n $headers = false;\n $engine = '';\n $version = '';\n\n // check if host is present (do no throw php warning in contrary of get_headers)\n if (filter_var(gethostbyname(parse_url($CFG_GLPI['url_base'], PHP_URL_HOST)),\n FILTER_VALIDATE_IP)) {\n\n // Issue #3180 - disable SSL certificate validation (wildcard, self-signed)\n stream_context_set_default([\n 'ssl' => [\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n ]\n ]);\n\n $headers = get_headers($CFG_GLPI['url_base']);\n }\n\n if (is_array($headers)) {\n //BEGIN EXTRACTING SERVER DETAILS\n $pattern = '#^Server:*#i';\n $matches = preg_grep($pattern, $headers);\n\n if (count($matches)) {\n $infos = current($matches);\n $pattern = '#Server: ([^ ]+)/([^ ]+)#i';\n preg_match($pattern, $infos, $srv_infos);\n if (count($srv_infos) == 3) {\n $engine = $srv_infos[1];\n $version = $srv_infos[2];\n }\n }\n }\n\n $server = [\n 'engine' => $engine,\n 'version' => $version\n ];\n\n return $server;\n }",
"protected function detectHost()\n {\n if ($this->setHostFromProxy()) {\n return;\n }\n\n if (isset($_SERVER['HTTP_HOST']) && ! empty($_SERVER['HTTP_HOST'])) {\n // Detect if the port is set in SERVER_PORT and included in HTTP_HOST\n if (\n isset($_SERVER['SERVER_PORT'])\n && preg_match('/^(?P<host>.*?):(?P<port>\\d+)$/', $_SERVER['HTTP_HOST'], $matches)\n ) {\n // If they are the same, set the host to just the hostname\n // portion of the Host header.\n if ((int) $matches['port'] === (int) $_SERVER['SERVER_PORT']) {\n $this->setHost($matches['host']);\n return;\n }\n\n // At this point, we have a SERVER_PORT that differs from the\n // Host header, indicating we likely have a port-forwarding\n // situation. As such, we'll set the host and port from the\n // matched values.\n $this->setPort((int) $matches['port']);\n $this->setHost($matches['host']);\n return;\n }\n\n $this->setHost($_SERVER['HTTP_HOST']);\n\n return;\n }\n\n if (! isset($_SERVER['SERVER_NAME']) || ! isset($_SERVER['SERVER_PORT'])) {\n return;\n }\n\n $name = $_SERVER['SERVER_NAME'];\n $this->setHost($name);\n }",
"function parser_host($url) {\n\t$server = strtr($url, array(\"youtu.be/\" => \"youtube.com/watch?v=\", \"my1.imgsmail.ru\" => \"video.mail.ru\", \"vkontakte.ru\" => \"vk.com\", \"kwimg.kz\" => \"kiwi.kz\", \"-\" => \"\", \"video.rutube.ru\" => \"rutube.ru\", \"video.meta.ua\" => \"video.metas.ua\"));\n\t$host1 = explode(\"/\", strtr($server, array(\"http://\" => \"\", \"https://\" => \"\")));\n\t$server = current($host1);\n\tpreg_match('/[a-zA-Z0-9]+\\.[a-zA-Z0-9]{1,3}\\.[a-zA-Z0-9]{2,4}$|[a-zA-Z0-9]{4,}\\.[a-zA-Z0-9]{2,4}$/', $server, $host);\n\tif(isset($host[0]) && !empty($host[0])) {\n\t\t$loc = $host[0];\n\t} else {\n\t\t$loc = $server;\n\t}\n\t$ret = str_replace(array(\".com\", \".ru\", \".at.ua\", \".ua\", \".kz\", \".tv\", \".pro\", \".to\", \".net\", \".uz\", \"www.\", \".info\", \".\"), \"\", $loc);\n\t$ret = str_replace(\"mail\", \"mailru\", $ret);\n\tif(preg_match(\"#([0-9]+)#\", $ret)) {\n\t\t$ret = \"v\".$ret;\n\t}\nreturn $ret;\n}",
"function bb2_msie($package)\r\n{\r\n\tif (!array_key_exists('Accept', $package['headers_mixed'])) {\r\n\t\treturn \"17566707\";\r\n\t}\r\n\r\n\t// MSIE does NOT send \"Windows ME\" or \"Windows XP\" in the user agent\r\n\tif (strpos($package['headers_mixed']['User-Agent'], \"Windows ME\") !== FALSE || strpos($package['headers_mixed']['User-Agent'], \"Windows XP\") !== FALSE || strpos($package['headers_mixed']['User-Agent'], \"Windows 2000\") !== FALSE || strpos($package['headers_mixed']['User-Agent'], \"Win32\") !== FALSE) {\r\n\t\treturn \"a1084bad\";\r\n\t}\r\n\r\n\t// MSIE does NOT send Connection: TE\r\n\tif (preg_match('/\\bTE\\b/i', $package['headers_mixed']['Connection'])) {\r\n\t\treturn \"2b90f772\";\r\n\t}\r\n\r\n\treturn false;\r\n}",
"public static function detectServerSoftware()\n\t{\n\n\t\tif(preg_match('/^lighttpd/', $_SERVER['SERVER_SOFTWARE']))\n\t\t{\n\t\t\treturn self::LIGHTTPD;\n\t\t}\n\n\t\tif(preg_match('/^Apache/', $_SERVER['SERVER_SOFTWARE']))\n\t\t{\n\t\t\treturn self::APACHE;\n\t\t}\n\n\t\treturn self::OTHER;\n\t}",
"private function requestHeaders() \n {\n // getallheaders available, use that\n if (function_exists('getallheaders')) {\n return getallheaders();\n }\n\n // getallheaders not available: manually extract 'm\n $headers = array();\n foreach ($_SERVER as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace(array(' ', 'Http'), array('-', 'HTTP'), ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }",
"function getresponseheader($header = false){\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 return $head;\n }\n }\n }",
"private function checkConnection(){\n\t\t\t\n\t\t\t$request = $this->url.$this->getMode(\"version\").\"?\".$this->key_string;\n\t\t\t$this->http->setURL($request);\n\t\t\t$response = $this->http->send();\n\t\t\t//echo $this->http->HTMLizeErrlog();\n\t\t\t$this->bn_version = str_replace(\"_\", \".\", $response[\"version\"]);\n\n\t\t\treturn $this->http->status;\n\t\t}",
"function SEEDStd_HTTPRequest( $host, $page, $raReqParms )\r\n{\r\n $sResponseHeader = \"\";\r\n $sResponseContent = \"\";\r\n\r\n $reqparms = SEEDStd_ParmsRa2URL( $raReqParms );\r\n\r\n $errno = 0;\r\n $errstr = \"\";\r\n $ok = false;\r\n\r\n $sMessage = \"POST $page HTTP/1.0\\r\\n\"\r\n .\"Host: $host\\r\\n\" // this didn't used to be required by older servers but now seems necessary\r\n// HTTP/1.1 requires Host:, Connection:close, chunked transfer encoding, and handle the 100 response\r\n //.\"Accept: text/plain\\r\\n\"\r\n .\"Content-Type: application/x-www-form-urlencoded\\r\\n\"\r\n .\"Content-Length: \".strlen($reqparms).\"\\r\\n\"\r\n .\"\\r\\n\"\r\n .$reqparms;\r\n// $sMessage = \"GET /int/traductions.php?mode=REST&ns=SED&k=MSD+title&lang=EN HTTP/1.1\\r\\nHost: \\r\\n\\r\\n\";\r\n\r\n if( ($fp = @fsockopen( $host, 80, $errno, $errstr, 30 )) ) { // suppress php error messages when connections fail, host not found, etc\r\n fputs( $fp, $sMessage );\r\n\r\n $bHeader = true;\r\n $bFirst = true;\r\n while( !feof($fp) ) {\r\n // get each line of the header and content. The last line is the response.\r\n $s = fgets( $fp, 1024 );\r\n if( $bHeader ) {\r\n $sResponseHeader .= $s;\r\n if( trim($s) == \"\" ) $bHeader = false;\r\n } else {\r\n $sResponseContent .= ($bFirst ? \"\" : \"\\n\").trim($s);\r\n $bFirst = false;\r\n }\r\n }\r\n fclose ($fp);\r\n $ok = true;\r\n//var_dump($host,$sMessage,$sResponseHeader,$sResponseContent);exit;\r\n } else {\r\n //$this->log( \"HTTP Error: $errno, $errstr\\n$req\" );\r\n }\r\n return( array( $ok, $sResponseHeader, $sResponseContent ) );\r\n}",
"public function isMobileApiCall() {\n\t\t\t\t\t\theader('Access-Control-Allow-Origin:*');\n\t\theader('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');\n\t\theader('Access-Control-Max-Age: 286400');\n\t\theader('Access-Control-Allow-Credentials: true');\n\t\theader('Access-Control-Allow-Headers: xocmerchantid,XOCMERCHANTID,XOCSESSION,xocsession,purpletreemultivendor,Purpletreemultivendor,PURPLETREEMULTIVENDOR');\n\t\tif(NULL !== apache_request_headers()){\n\t\t\tforeach(apache_request_headers() as $key =>$value) {\n\t\t\t\tif($key == 'purpletreemultivendor' || $key == 'Purpletreemultivendor' || $key == 'PURPLETREEMULTIVENDOR') {\n\t\t\t$key = strtolower($key);\n\t\t\t\t\tif ($this->config->get('module_purpletree_multivendor_status')) {\n\t\t\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"api` WHERE `username` = '\" . $key . \"' AND `key` ='\" . $value . \"'\");\n\t\t\t\t\t\tif($query->num_rows) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private function receiveHeader($line) {\n if (trim($line) === 'Transfer-Encoding: chunked') {\n $this->chunked = true;\n }\n if ($line === \"\\r\\n\") {\n if ($this->chunked) {\n $this->currentState = self::RECEIVE_CHUNK_SIZE;\n }\n else {\n $this->currentState = self::RECEIVE_NORMAL_DATA;\n }\n }\n else {\n $this->headers .= $line;\n }\n }",
"function getHeaders($string)\n{\n if (strpos($string, ':') == false) {\n return null;\n }\n\n $string = stristr($string, \"\\n\", false);\n $string = stristr($string, \"\\n\\r\", true);\n $string = removeFirstChar($string);\n\n $result = array();\n\n while (strpos($string, ':') != false) {\n if (strpos($string, \"\\n\") != false) {\n $substring = stristr($string, \"\\n\", true);\n $substring = removeUnnecessaryCharas($substring);\n $string = stristr($string, \"\\n\", false);\n $string = removeFirstChar($string);\n } else {\n $substring = $string;\n }\n\n $key = stristr($substring, ':', true);\n $value = stristr($substring, ' ', false);\n $value = removeUnnecessaryCharas($value);\n $result[$key] = $value;\n if ($string == $substring) {\n break;\n }\n }\n return $result;\n}",
"function getHeaders()\n{\n $headers = array();\n foreach ($_SERVER as $k => $v)\n {\n if (substr($k, 0, 5) == \"HTTP_\")\n {\n $k = str_replace('_', ' ', substr($k, 5));\n $k = str_replace(' ', '-', ucwords(strtolower($k)));\n $headers[$k] = $v;\n }\n }\n return $headers;\n}",
"private function repect_ech_m1(){\t\n\t\t\t\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t\n\t\t\t$result=repect_ech_m1();\n\t\t\t$this->response($this->json($result), 200);\n\t\t\t$this->response('',204);\t\n\t\t}",
"public function isMatch()\n {\n if (false === strpos($this->request->userAgent(), 'python-requests')) {\n return false;\n }\n $keys = array_keys($this->request->input());\n sort($keys);\n\n return $keys === ['description', 'id', 'monitor', 'rule'];\n }",
"protected function _parseHeader() {}",
"function http_spreaker_parse($txt)\n{\n $needed_parts = array('nonce'=>1, 'username'=>1, 'timestamp'=>1, 'response'=>1);\n $data = array();\n $data = explode(\":\",$txt);\n $arrayReturn = array();\n if(count($needed_parts) != count($data)){\n \treturn false;\n }\n $i = 0;\n foreach($needed_parts as $key => $val){\n \t$arrayReturn[$key] = $data[$i];\n \t$i++;\n }\n return $arrayReturn;\n}",
"public function show_masterlist($ver=\"57\") {\r\n\t\t# Master URL\r\n\t\t$host=\"udp://dpmaster.deathmask.net\";\r\n\t\t//$host=\"udp://wolfmaster.s4ndmod.com\";\r\n\t\t//$host=\"udp://82.192.42.115\";\r\n\t\t\t$port=27950;\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * $ver = Protocol version\r\n\t\t\t *\t57 = Rtcw - 1.0\r\n\t\t\t * \t58 = Rtcw - 1.3\r\n\t\t\t *\t59 = Rtcw - 1.33\r\n\t\t\t * \t60 = Rtcw - 1.4+\r\n\t\t\t * 62 = wolfX - pre-alpha \t\t\r\n\t\t\t */\t\t\r\n\t\t\t\r\n\t\t$data = $this->open_socket($host, $port, $ver);\r\n\t\t\r\n\t\t// Sort the multidimensional array\r\n\t\t$servers = $this->sort_data($data, 'hostname');\t\t\r\n\t\t\r\n\t\t# Version handler\r\n\t\techo '<div class=\"prot_links\"><span class=\"right\">\r\n\t\t\t \t<!-- <a href=\"/home/server-browser/protocol-56\" class=\"list_links\">Rtcw Demo List</a> | -->\r\n\t\t\t \t<a href=\"/home/server-browser/\" class=\"list_links\">Rtcw 1.0 List</a> |\r\n\t\t\t \t<!-- <a href=\"/home/server-browser/protocol-58\" class=\"list_links\">Rtcw 1.3 List</a> | -->\r\n\t\t\t \t<a href=\"/home/server-browser/protocol-60\" class=\"list_links\">Rtcw 1.4 List</a> \r\n\t\t </div></span>';\r\n\t\t\r\n\t\t# Title\r\n\t\techo '<div class=\"server_list\">\r\n\t\t\t\t <div class=\"server_row_title\">\r\n\t\t\t\t\t <div class=\"server_hostname_title\">Server name</div>\r\n\t\t\t\t\t <div class=\"server_map_title\">Map</div>\r\n\t\t\t\t\t <div class=\"server_players_title\">Players</div>\r\n\t\t\t\t\t <div class=\"server_ping_title\">Ping</div>\r\n\t\t\t\t\t <div class=\"server_pb_title\">PB</div>\r\n\t\t\t\t\t <div class=\"server_ff_title\">FF</div>\t\r\n\t\t\t\t\t <div class=\"server_maxlives_title\">DM</div>\t\t\t\t\t\t \r\n\t\t\t \t\t</div>'; \r\n\t\t\t\r\n\t\tforeach ($servers AS $server) {\r\n\t\t\t\r\n\t\t\t# Fix unnamed servers..\r\n\t\t\t$server['hostname'] = !empty($server['hostname']) ? $server['hostname'] : \"Unnamed server\";\r\n\t\t\t\r\n\t\t\tif (!empty($server[\"mapname\"])) {\r\n\t\t\t\t\r\n\t\t\t\t# Nice prints\r\n\t\t\t\t$ff = ($server[\"friendlyFire\"]== 0) ? 'No' : 'Yes';\r\n\t\t\t\t$dm = ($server[\"maxlives\"]== 0) ? '<span class=\"color_red\">No</span>' : '<span class=\"color_green\">Yes</span>';\r\n\t\t\t\t\r\n\t\t\t\t# Print now\r\n\t\t\t\techo '<div class=\"server_row\">\r\n\t\t\t\t\t\t<div class=\"server_hostname\"><a href=\"/home/server/'.$server[\"ip\"] . \":\" . $server[\"port\"].'\">'.$server['hostname'].'</a></div>\r\n\t\t\t\t\t\t<div class=\"server_map\">' . $server[\"mapname\"] . '</div>\r\n\t\t\t\t\t\t<div class=\"server_players\">' . $server[\"clients\"] .' (' . $server[\"maxclients\"] . ')</div>\r\n\t\t\t\t\t\t<div class=\"server_ping\">' . $server[\"ping\"] . '</div>\r\n\t\t\t\t\t\t<div class=\"server_pb\">' . $server[\"punkbuster\"] . '</div>\r\n\t\t\t\t\t\t<div class=\"server_ff\">' . $ff . '</div>\t\r\n\t\t\t\t\t\t<div class=\"server_maxlives\">' . $dm . '</div>\t\t\t\t\t\t\t\r\n\t\t\t\t\t </div>';\r\n\t\t\t} \r\n\t\t}\r\n\t\t# Close the server list..\r\n\t\techo '</div>';\r\n\r\n\t\t# Count the list\r\n\t\t$numServers = count($servers);\r\n\t\techo '<span class=\"right\">Got ' . $numServers . \" servers from master server.</span>\";\r\n\t\t\r\n\treturn;\r\n\t}",
"function getServerProtocol() {\n\t\treturn $this->getParam(self::PARAM_SERVER_PROTOCOL);\n\t}",
"function checkDomain($domain,$server,$findText){\n\n//Open Internet or Unix domain socket connection\n $connection = fsockopen($server, 43);\n if (!$connection)\n {return false;}\n\n fwrite($connection, $domain.\"\\r\\n\");\n $response = ':';\n\n//Tests for end-of-file on a file pointer.\n while(!feof($connection)) {\n $response .= fgets($connection,128);\n }\n//The file pointed to by handle is closed.\n fclose($connection);\n// \"The string '$findText' was /not/ found in the string '$response'\"\n if (strpos($response, $findText)){\n return true;\n }else {\n return false;\n }\n}",
"function get_remote_headers($url)\n{\n $parsed = parse_url($url);\n $host = $parsed[\"host\"];\n $fp = @fsockopen($host, 80, $errno, $errstr, 20);\n if(!$fp) return false;\n else {\n @fputs($fp, \"HEAD $url HTTP/1.1\\r\\n\");\n @fputs($fp, \"HOST: $host\\r\\n\");\n @fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n $headers = \"\";\n while(!@feof($fp))$headers .= @fgets ($fp, 128);\n }\n @fclose ($fp);\n $return = false;\n $arr_headers = explode(\"\\n\", $headers);\n foreach($arr_headers as $header) {\n // follow redirect\n $s = 'Location: ';\n if(substr(strtolower ($header), 0, strlen($s)) == strtolower($s)) {\n $url = trim(substr($header, strlen($s)));\n return get_remote_headers($url);\n }\n }\n return $arr_headers;\n}",
"function validate_email($email){\n $mailparts=explode(\"@\",$email);\n $hostname = $mailparts[1];\n\n // validate email address syntax\n $exp = \"^[a-z\\'0-9]+([._-][a-z\\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$\";\n $b_valid_syntax=eregi($exp, $email);\n\n // get mx addresses by getmxrr\n if(function_exists('getmxrr')){\n $b_mx_avail=getmxrr( $hostname, $mx_records, $mx_weight );\n }else{\n $b_mx_avail=getmxrrA($hostname, $mx_records, $mx_weight);\n }\n $b_server_found=0;\n\n if($b_valid_syntax && $b_mx_avail){\n // copy mx records and weight into array $mxs\n $mxs=array();\n\n for($i=0;$i<count($mx_records);$i++){\n $mxs[$mx_weight[$i]]=$mx_records[$i];\n }\n\n // sort array mxs to get servers with highest prio\n ksort ($mxs, SORT_NUMERIC );\n reset ($mxs);\n\n while (list ($mx_weight, $mx_host) = each ($mxs) ) {\n if($b_server_found == 0){\n\n //try connection on port 25\n $fp = @fsockopen($mx_host,25, $errno, $errstr, 2);\n if($fp){\n $ms_resp=\"\";\n // say HELO to mailserver\n $ms_resp.=send_command($fp, \"HELO microsoft.com\");\n\n // initialize sending mail\n $ms_resp.=send_command($fp, \"MAIL FROM:<[email protected]>\");\n\n // try receipent address, will return 250 when ok..\n $rcpt_text=send_command($fp, \"RCPT TO:<\".$email.\">\");\n $ms_resp.=$rcpt_text;\n\n if(substr( $rcpt_text, 0, 3) == \"250\")\n $b_server_found=1;\n\n // quit mail server connection\n $ms_resp.=send_command($fp, \"QUIT\");\n\n fclose($fp);\n\n }\n\n }\n }\n }\n return $b_server_found;\n}",
"function query_info($ip=NULL) {\r\n\tif (!$ip) $ip = $this->ipaddr();\r\n\tif (!$ip) return FALSE;\r\n\t$start = $this->_getmicrotime();\r\n\t$res = $this->_sendquery($ip, 'getstatus');\r\n\t$end = $this->_getmicrotime();\r\n\tif (!$res) return FALSE;\r\n\t$this->data = array();\t\t\t\t\t// query_info always resets the data array (so call this before other queries)\r\n\t$code = '';\r\n\tif ($this->raw != '') {\r\n\t\t$this->data['ping'] = ceil(($end - $start) * 1000);\t// return the time (ms) it took for the packet to return (ping)\r\n\t\t$this->data['ipport'] = $ip;\r\n\t\tlist($this->data['ip'], $this->data['port']) = explode(':', $this->data['ipport']);\r\n\r\n\t\t$this->raw = substr($this->raw, 18);\t\t// strip off response header bytes\r\n\t\t$code = $this->_getchar();\t\t\t// get EOT character: 0x0A\r\n\t\t$this->_getchar();\t\t\t\t// clear trailing slash \\\r\n\t\t$block = \"\";\r\n\r\n\t\t$pos = strpos($this->raw, $code);\t\t// extract the status block from the raw input (0x0A . . . 0x0A)\r\n\t\t$block = substr($this->raw, 0, $pos);\r\n\t\t$block = str_replace(\"\\\\\", \"\\0\", $block);\t// replace \\ with nulls to make parsing in a loop easier\r\n\t\t$this->raw = substr($this->raw, $pos+1);\t// cut the status block out of our raw buffer\r\n\r\n\t\t$old = $this->raw;\r\n\t\t$this->raw = $block . \"\\0\";\r\n\t\twhile ($this->raw != '') {\r\n\t\t\t$key = $this->_getnullstr();\r\n\t\t\t$value = $this->_getnullstr();\r\n\t\t\t$key = str_replace(' ', '_', $key);\t// do not allow spaces in key names\r\n\t\t\t$this->data[strtolower($key)] = $value;\r\n#\t\t\tif ($key{0} == '.') {\t\t\t// some keys have a leading dot. record a 2nd key w/o the dot.\r\n#\t\t\t\t$key = substr($key, 1);\r\n#\t\t\t\t$this->data[strtolower($key)] = $value;\r\n#\t\t\t}\r\n\r\n\t\t\tif ($key == 'sv_maxclients') $this->data['maxplayers'] = $value;\r\n\t\t\tif ($key == 'sv_hostname') $this->data['name'] = $value;\r\n\t\t}\r\n\t\t$this->raw = $old;\r\n\t\t// gather player information ...\r\n\t\tif ($this->raw != '') {\r\n\t\t\t$this->raw = substr($this->raw, 0, -1);\t\t// ignore trailing newline (0x0A)\r\n\t\t\t$plrs = explode(chr(0x0A), $this->raw);\r\n\t\t\t$this->raw = '';\r\n\t\t\t$this->data['players'] = array();\r\n\t\t\tforeach ($plrs as $p) {\r\n\t\t\t\tlist($kills, $ping, $name) = explode(\" \", $p, 3);\r\n\t\t\t\t$this->data['players'][] = array(\r\n\t\t\t\t\t'name'\t=> substr($name, 1, -1),\t// ignore surrounding quotes\r\n\t\t\t\t\t'kills' => $kills,\r\n\t\t\t\t\t'ping'\t=> $ping\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $this->data;\r\n\t}\r\n\treturn FALSE;\r\n}",
"function http_parse_headers($headers) {\n\t\t$replace = ($this->http_linebreak == \"\\n\" ? \"\\r\\n\" : \"\\n\");\n\t\t$headers = str_replace($replace, $this->http_linebreak, trim($headers));\n\t\t$headers = explode($this->http_linebreak, $headers);\n\t\t$this->http_response_headers = array();\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d (\\d{3})/', $headers[0], $matches)) {\n\t\t $this->http_response_code = intval($matches[1]);\n\t\t array_shift($headers);\n\t\t}\n\t\tif($headers):\n\t\t\tforeach ($headers as $string) {\n\t\t\t list($header, $value) = explode(': ', $string, 2);\n\t\t\t $this->http_response_headers[$header] = trim($value);\n\t\t\t}\n\t\tendif;\n\t}",
"function GetDhcp($HostServer) { // Retourne la conf du dhcp 0 ou 1\n\t$filehost = \"/etc/backuppc/hosts\";\n\t$lignes = file(\"$filehost\");\n\t$expr = \"/^$HostServer\\s+([01])/\";\n\tforeach ($lignes as $num => $line) {\n\t\tif (preg_match($expr,$line,$regs)) {\n\t\t\treturn trim($regs[1]);\n\t\t\t\n\t\t}\n\t}\n}",
"private static function verifyRequest()\n {\n if(isset($_SERVER['HTTP_USER_AGENT']) == false)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) == 0)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) > 624)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n $UnsupportedRequestMethod = true;\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'GET')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'POST')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if($UnsupportedRequestMethod)\n {\n UnsupportedVersion::executeResponse();\n exit();\n }\n }",
"private static function detectCarrier() {\n $userAgent = env('HTTP_USER_AGENT');\n $classifier = new \\Woothee\\Classifier;\n $r = $classifier->parse($userAgent);\n\n // smartphone\n if ($r['category'] === 'smartphone') {\n return 'iPhone';\n }\n\n // mobilephone\n if ($r['category'] === 'mobilephone') {\n if (preg_match('/^J-PHONE/', $userAgent)) {\n return 'J-PHONE';\n }\n switch ($r['os']) {\n case 'docomo':\n return 'docomo';\n case 'au':\n return 'au';\n case 'SoftBank':\n return 'SoftBank';\n case 'WILLCOM':\n return 'WILLCOM';\n case 'emobile':\n return 'EMOBILE';\n }\n return 'docomo';\n }\n\n // pc\n return 'PC';\n }",
"public static function server($var = '')\n {\n return self::getFilter($_SERVER, $var);\n }",
"private function detectServerRepair()\n {\n $h = date(\"H\", time());\n if ($h == \"03\") {\n Log::write(\"Server Repair Time,\", 2, \"spider\");\n sleep(3600);\n }\n }",
"function get_host_status($host_data)\n{\n global $API_version;\n global $CGM_version;\n\n $arr = array ('command'=>'version','parameter'=>'');\n $version_arr = send_request_to_host($arr, $host_data);\n\n if ($version_arr)\n {\n if ($version_arr['STATUS'][0]['STATUS'] == 'S')\n {\n $API_version = $version_arr['VERSION'][0]['API'];\n $CGM_version = $version_arr['VERSION'][0]['CGMiner'];\n \n if ($API_version >= 1.0)\n return true;\n }\n }\n return false;\n}",
"private function getGatewayServer ($t)\n\t\t{\n\t\t\t$server_config = $this->config['server'];\n $config_data = file( $this->config['server'] );\n $i=0;\n while ( $i < count ( $config_data ) ) {\n if(strstr ( $config_data [$i] , \"255.255\" ) ) { /* 255.255 is line of gw/netmask */\n $buffer = explode (\" \" , $config_data[$i] ) ;\n\t\t\t\t\tif ( count ( $buffer ) == 3 ) {\n\t\t\t\t\t if ( $t == 'netmask' ) \n\t\t\t\t\t\t$this->result['data']['netmask'] = trim($buffer[2]);\n\t\t\t\t\t if ( $t == 'gateway' ) {\n\t\t\t\t\t\t$b = explode (\".\" , trim($buffer[1]));\n\t\t\t\t\t\t$gw = $b[0].\".\".$b[1].\".\".$b[2].\".1\";\n\t\t\t\t\t\t$this->result['data']['ip_vpn_gateway'] = $gw;\n\t\t\t\t\t }\n\t\t\t\t\t}\n }\n $i++;\n }\n\t\t\treturn;\n\t\t}",
"function getFromServer($requestString)\n{\n\t//Connection information\n\t$protIP = \"tcp://127.0.0.1\";\n\t$portsFile = \"ports.txt\";\n\t$timeout = 10; //in seconds\n\t\n\t//Deserialize ports\n\t$ports = getPorts($portsFile);\n\t\n\t//Obtain index to last port (where primary should be running)\n\t$last_ind = (int)(count($ports)-1);\n\t\n\t//Election related (in case the primary goes down)\n\t$callElections = false;\n\t$oldPrimary = (int)$ports[(int)$last_ind];\n\t\n\t//Try Connecting\n\t$fp = fsockopen($protIP, (int)$ports[$last_ind],$errno, $errstr, $timeout);\n\twhile($fp == false)\n\t{\n\t\t//The time has come to electe a new leader!\n\t\t$callElections = true;\n\t\t//Mark old primary\n\t\t$oldPrimary = (int)$ports[$last_ind];\n\t\t$last_ind--;\n\t\tif($last_ind < 0)\n\t\t{\n\t\t\texit(\"Ran out of destination servers! Oh no :(\");\n\t\t}\n\t\t//Try reconnecting\n\t\t$fp = fsockopen($protIP, (int)$ports[$last_ind],$errno, $errstr, $timeout);\n\t\techo \"Trying to connect to \".$ports[$last_ind].\"\\r\\n\";\t\n\t}\t\n\tif($callElections)\n\t{\n\t\t//Generate a Primary Request String\n\t\t$primaryReq = getPrimaryRequest($oldPrimary);\n\t\t\n\t\t//Send the request to the back-end\n\t\tsendRequest($fp, $primaryReq);\n\t\t\n\t\t//Get election response\n\t\t$r = getResponse($fp);\n\t\t\n\t\t//Remove faulty ports --improve in the future by wrapping write access with a mutex\n\t\t$contents = \"\";\n\t\tfor($i = 0; $i <= $last_ind; $i++)\n\t\t{\n\t\t\t$contents = $contents.$ports[$i].\";\";\n\t\t}\n\t\tfile_put_contents($portsFile, $contents);\n\t\t\n\t\t//Close connection\n\t\tfclose($fp); \n\t}\n\t//Reopen connection\n\t$fp = fsockopen($protIP, (int)$ports[$last_ind],$errno, $errstr, $timeout);\n\t\n\t//send original request to the server\n\tsendRequest($fp, $requestString);\n\t\n\t//obtain response\n\t$responseArr = getResponse($fp);\n\t\n\t//close connection\n\tfclose($fp);\n\t\n\treturn $responseArr;\n}",
"private function CheckHttpResponse()\n\t{\n\t\tfor ( $Z = 0; $Z < count($this->url); $Z++ )\n\t\t{\n\t\t\tif ( isset($this->result_ping[$Z]))\n\t\t\t{\n\t\t\t\tpreg_match('/\\/[[:digit:]]+.[[:digit:]]?\\//' , $this->result_ping[$Z] , $data);\n\t\t\t\tarray_push( $this->avg_ping , str_replace('/' , '' , $data ) );\n\t\t\t}\n\t\t}\n\t}",
"function req_is_ipv4() {\n static $is_ipv4 = null;\n if ($is_ipv4 === null) \n $is_ipv4 = \\preg_match('#^\\d{1,3}(\\.\\d{1,3}){3,3}$#', $_SERVER[\"SERVER_ADDR\"]) != 0;\n return $is_ipv4;\n}",
"function readHttpReq( &$conn ) {\n\t// Read up to 5 kB in one go.\n\t$req = @socket_read( $conn, 5120 );\n\treturn $req ? strstr( $req, \"\\n\", true ) : false;\n}",
"public function getProtocol(): string;",
"public function testGetHost() {\n static::$_server = array(\n 'SERVER_NAME' => 'nimbl.es'\n );\n $request = $this->createRequest();\n $this->assertEquals('nimbl.es', $request->getHost());\n }",
"function getCarrier()\n {\n \t$sh_args = 'getcellnetwork'; //admin client command for getting cellular carrier/network name\n \t$sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n \tdebug('(cell_controller.inc|getCarrier()) admin client api command \"getcellnetwork\" output: $sh_out', $sh_out); \t//DEBUG\n \t \n \tif($sh_out != 'phpcmd: fail' && $sh_out != 'phpcmd: invalid command')\n \t{\n \t\tdebug('(cell_controller.inc|getCarrier()) getcellnetwork command completed.'); \t//DEBUG\n \t\treturn $sh_out;\n \t}\n \telse\n \t{\n \t\tdebug('(cell_controller.inc|getCarrier()) getcellnetwork command failed.'); \t//DEBUG\n \t\treturn false;\n \t\t//return 'Failed to detect cellular carrier';\n \t}\n }",
"function wmfGetProtocolAndHost() {\n\tif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {\n\t\t$protocol = 'https';\n\t} else {\n\t\t$protocol = 'http';\n\t}\n\tif ( defined( 'MISSING_PHP_TEST' ) && isset( $_GET['host'] ) ) {\n\t\t$host = $_GET['host'];\n\t} else {\n\t\t$host = $_SERVER['HTTP_HOST'];\n\t}\n\t$host = strtolower( $host );\n\treturn [ $protocol, $host ];\n}",
"protected function _parseServerString($server) {\n\t\t$socketTransport = 'unix://';\n\t\tif (strpos($server, $socketTransport) === 0) {\n\t\t\treturn array(substr($server, strlen($socketTransport)), 0);\n\t\t}\n\t\tif (substr($server, 0, 1) === '[') {\n\t\t\t$position = strpos($server, ']:');\n\t\t\tif ($position !== false) {\n\t\t\t\t$position++;\n\t\t\t}\n\t\t} else {\n\t\t\t$position = strpos($server, ':');\n\t\t}\n\t\t$port = 11211;\n\t\t$host = $server;\n\t\tif ($position !== false) {\n\t\t\t$host = substr($server, 0, $position);\n\t\t\t$port = substr($server, $position + 1);\n\t\t}\n\t\treturn array($host, (int)$port);\n\t}",
"private function read_header($ch, $string) {\r\n if (preg_match('/^(.*): (.*?)\\s?$/', $string, $result)) {\r\n if (!$this->out_total && $result[1] == 'Content-Length') {\r\n $this->out_total = intval($result[2]);\r\n if ($this->out_total != $this->content_length)\r\n $this->content_length = $this->out_total;\r\n }\r\n\r\n if (!$this->finish_write_headers && in_array($result[1], $this->proxy_headers))\r\n header(\"{$result[1]}: {$result[2]}\");\r\n }\r\n else if (preg_match('/^HTTP\\/1\\.[01] (\\d+) (.*)\\s?$/', $string, $result)) {\r\n $this->code = intval($result[1]);\r\n if ($this->code == 200 || $this->code == 302) {\r\n // OK, write response\r\n if (!$this->finish_write_headers) {\r\n header(\"Content-Type: {$this->content_type}\");\r\n\r\n foreach ($this->headers as $key => $value) {\r\n header(\"$key: $value\");\r\n }\r\n }\r\n } else {\r\n // Error\r\n return 0;\r\n }\r\n }\r\n return strlen($string);\r\n }",
"function playerStatus()\n\t\t{\n\t\t\t$request = $_SESSION['mac'].\" status 0 100 \\n \";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\t//echo \"la réponse non traité : $response \\n\";\n\t\t\t//parfois le retour CLI change attention\n\t\t\t//$response = get_string_between($response,\" mode:\",\"rate:\");\n\t\t\t$response = substr($response, strpos($response, \"mode:\"));\n\t\t\t$response = substr($response, 0, strpos($response, \" \"));\n\t\t\t$response = substr($response, 5);\n\n\t\t\treturn $response;\n\t\t}",
"function rest_send_allow_header($response, $server, $request)\n {\n }",
"function checkNameserver($server, $zone){\n // attempt to connect\n if ($x = @fsockopen($server, 53, $errno, $errstr, 4)) {\n //close connection\n if ($x) @fclose($x);\n return true;\n }\n else {\n echo \"Server \". $server .\" for \". $zone .\" is down, skipping until the next check.\\n\";\n return false;\n }\n }",
"public function getHeader();",
"public function getHeader();"
] | [
"0.54496396",
"0.54465276",
"0.5368983",
"0.5254187",
"0.5145285",
"0.51441336",
"0.51431316",
"0.51309735",
"0.5084767",
"0.5077037",
"0.50609636",
"0.50503993",
"0.50424284",
"0.5022582",
"0.50207037",
"0.5012467",
"0.5012117",
"0.50076365",
"0.5005996",
"0.5001603",
"0.49869114",
"0.49837443",
"0.49814156",
"0.49758634",
"0.4964907",
"0.49470392",
"0.49465418",
"0.4942296",
"0.49406922",
"0.49406922",
"0.49290556",
"0.49152172",
"0.49046844",
"0.49027988",
"0.4886034",
"0.48835135",
"0.4875255",
"0.4856163",
"0.4853218",
"0.48478454",
"0.48333403",
"0.4826068",
"0.48250574",
"0.48159608",
"0.48157078",
"0.48006356",
"0.47974747",
"0.47682047",
"0.4753913",
"0.47513363",
"0.4748282",
"0.47473335",
"0.4743962",
"0.47394544",
"0.4738138",
"0.47321007",
"0.4726106",
"0.47259268",
"0.47179675",
"0.4703174",
"0.47022358",
"0.46982783",
"0.46980196",
"0.4697425",
"0.46856776",
"0.46834674",
"0.46788254",
"0.46703118",
"0.46690035",
"0.46664917",
"0.46657133",
"0.4665526",
"0.46610856",
"0.46447003",
"0.46346587",
"0.46292517",
"0.46212003",
"0.46047455",
"0.4603196",
"0.45973864",
"0.4597155",
"0.45968437",
"0.45919472",
"0.45883667",
"0.45818615",
"0.45815018",
"0.45776838",
"0.45726916",
"0.4571593",
"0.45666522",
"0.45659038",
"0.4550827",
"0.45492414",
"0.45478117",
"0.45445392",
"0.4541514",
"0.4539781",
"0.45377427",
"0.45319608",
"0.45319608"
] | 0.50675124 | 10 |
try to match modem by html '' | function tryTitle() {
global $html, $hostname, $username, $password;
$doc = new DOMDocument();
@$doc->loadHTML($html);
$nodes = $doc->getElementsByTagName('title');
$title = $nodes->item(0)->nodeValue;
if($title) {
switch($title) {
case "DVR": exit(0);
case "INTELBRAS WRN 240": system("changers/intelbrass $hostname $username $password"); exit(0);
case "Wireless Route Module Web Server": logIT('c', "[-] http://$hostname ($username - $password) Wireless Route Module Web Server"); exit(0);
case "INTELBRAS WRN 240": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WRN 240"); exit(0);
case "INTELBRAS WRN 342": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WRN 342"); exit(0);
case "INTELBRAS WIN 240": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WIN 240"); exit(0);
case "INTELBRAS WRN 150": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WRN 150"); exit(0);
case "INTELBRAS WRN 240i": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WRN 240i"); exit(0);
case "INTELBRAS NBOX": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS NBOX"); exit(0);
case "NBOX": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS NBOX sem titulo"); exit(0);
case "INTELBRAS WRN 300": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS WRN 300"); exit(0);
case "Roteador Wireless N WRN 300": logIT('c', "[-] http://$hostname ($username - $password) Roteador Wireless N WRN 300"); exit(0);
case "Roteador Wireless N": logIT('c', "[-] http://$hostname ($username - $password) Roteador Wireless N"); exit(0);
case "INTELBRAS GKM 1220": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS GKM 1220"); exit(0);
case "GKM 1220": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS GKM 1220 sem titulo"); exit(0);
case "802.11n wireless router": logIT('c', "[-] http://$hostname ($username - $password) Mimax"); exit(0);
case "802.11n Wireless Router": logIT('c', "[-] http://$hostname ($username - $password) Mymax"); exit(0);
case "INTELBRAS GWM 2420 N": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS GWM 2420 N"); exit(0);
case "INTELBRAS GWM 2420N": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS GWM 2420N"); exit(0);
case "GWM 2420 N": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS GWM 2420 N sem titulo"); exit(0);
case "INTELBRAS": logIT('c', "[-] http://$hostname ($username - $password) INTELBRAS"); exit(0);
case "Roteador Wireless N WRN 150": logIT('c', "[-] http://$hostname ($username - $password) Roteador Wireless N WRN 150"); exit(0);
case "TL-MR3040": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-MR3040]"); exit(0);
case "TL-MR3220": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-MR3220]"); exit(0);
case "TL-MR3420": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-MR3420]"); exit(0);
case "TL-WDR4300": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WDR4300]"); exit(0);
case "TL-WDR3600": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WDR3600]"); exit(0);
case "TL-WDR3500": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WDR3500]"); exit(0);
case "TL-WR840N": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR840N]"); exit(0);
case "TL-WR1043ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR1043ND]"); exit(0);
case "TL-WR841N": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR841N]"); exit(0);
case "TL-WR841ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR841ND]"); exit(0);
case "TL-WR940N": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR940N]"); exit(0);
case "TL-WR941ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR941ND]"); exit(0);
case "TL-WR1042ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR1042ND]"); exit(0);
case "TL-WR841HP": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR841HP]"); exit(0);
case "TL-WA801ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA801ND]"); exit(0);
case "TL-WA901ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA901ND]"); exit(0);
case "TL-WA901ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA901ND]"); exit(0);
case "TL-WA830RE": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA830RE]"); exit(0);
case "TL-WR740N": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR740N]"); exit(0);
case "TL-WR743ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR743ND]"); exit(0);
case "TP-LINK": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK]"); exit(0);
case "TL-WR720N": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR720N]"); exit(0);
case "TL-WA701ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA701ND]"); exit(0);
case "TL-WA730RE": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA730RE]"); exit(0);
case "TL-WA5110G": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WA5110G]"); exit(0);
case "TD-8817": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TD-8817]"); exit(0);
case "TL-ER6120": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-ER6120]"); exit(0);
case "TL-R860": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-R860]"); exit(0);
case "TL-R460": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-R460]"); exit(0);
case "MA180": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK MA180]"); exit(0);
case "TD-8610": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TD-8610]"); exit(0);
case "TL-WR340G": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR340G]"); exit(0);
case "TL-WR340GD": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR340GD]"); exit(0);
case "TL-WR741ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR741ND]"); exit(0);
case "TL-WR842ND": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-WR842ND]"); exit(0);
case "TL-MR3020": logIT('c', "[-] http://$hostname ($username - $password) [TP-LINK TL-MR3020]"); exit(0);
case "GoAhead WebServer": exit(0);
case "SpeedStream Router Management Interface": exit(0);
case "Configuration Manager GUI": system("changers/triz $hostname $username $password"); exit(0);
#case "SpeedTouch - Início": system("changers/speedtouch $hostname $username $password"); exit(0);
case "TZ5500E Configuration Manager GUI": system("changers/triz $hostname $username $password"); exit(0);
case "ADSL Router GUI": system("changers/dlink2 $hostname $username $password"); exit(0);
case "ADSL 2+ Router": system("changers/dlink1 $hostname $username $password"); exit(0);
case "DSL Router": system("changers/dlink1 $hostname $username $password"); exit(0);
case "Intelbras GWM 1420 Q": exit(0);
case "GS8100 Configuration Manager GUI": system("changers/triz $hostname $username $password"); exit(0);
case "WLAN AP Webserver": logIT('c', "[-] http://$hostname ($username - $password) [WLAN AP Webserver]"); exit(0);
case ".:: OIWTECH :: AP/Router ::.": system("changers/oiwtech $hostname $username $password"); exit(0);
case "Opticom VoIP 690 - Index Page": exit(0);
case "AP Router New Generation": system("changers/aprouter $hostname $username $password"); exit(0);
case "Realtek WLAN AP Webserver": logIT('c', "[-] http://$hostname ($username - $password) [Realtek WLAN]"); exit(0);
case "Basic Setup": exit(0);
case "WLAN AP WebUI": exit(0);
case "Firemax Acess point": exit(0);
case "Wireless-N Router Webserver": exit(0);
default: break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function app_contact_check_inj($val = '') {\n return preg_match('#(\\r|\\n)(?:to|from|b?cc)\\s*:#si', $val);\n}",
"function trieParTxt($txtVerif,$txtARespecter){\n\t\t\t\t$txtCorrespondant = false;\n\t\t\t\t\n\t\t\t\tif( preg_match('#'.$txtARespecter.'#',$txtVerif)) {\n\t\t\t\t\t$txtCorrespondant = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $txtCorrespondant;\n\t\t\t}",
"function mobile($string) {\n\n\n\t\t}",
"function formato($valor, $regex = '//')\r\n{\r\n return preg_match($regex, $valor);\r\n}",
"public function textKontrolEt($veri)\r\n{\r\n \r\n $ifade = '/[a-zA-ZçığöşüÇĞİÖŞÜ ]+$/i'; //Türkçe Uyumlu\r\n $islem= preg_match($ifade, $veri);\r\n return $islem;\r\n \r\n}",
"function fcl_utilities_is_html($string) {\r\n return preg_match('/<\\s?[^\\>]*\\/?\\s?>/i', $string);\r\n}",
"function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}",
"function validate_mobile($mobile)\n{\n return preg_match('/^[0-9]{12}+$/', $mobile);\n}",
"function mREGEX(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$REGEX;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:276:3: ( 'regex' ) \n // Tokenizer11.g:277:3: 'regex' \n {\n $this->matchString(\"regex\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function sugar_valid_mac($mac) {\n // no separator format\n if (strlen($mac) == 12) {\n return preg_match('/[A-F0-9]{12}/', $mac) == 1;\n }\n if (strlen($mac) == 17) {\n // separator : format\n $matches = preg_match('/([A-F0-9]{2}[:]){5}[A-F0-9]{2}/', $mac);\n if ($matches == 1) {\n return TRUE;\n }\n // separator - format\n $matches = preg_match('/([A-F0-9]{2}[\\-]){5}[A-F0-9]{2}/', $mac);\n return ($matches == 1);\n }\n return FALSE;\n}",
"public function testInvalidElementMatchingWithText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1>Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'h1',\n 'inner_text' => 'This is not the right text',\n ));\n\n $this->assertFalse($result);\n }",
"public function mom()\n\t{\n\t\tif (preg_match('/^\\[usenet4ever\\.info\\] und \\[SecretUsenet\\.com\\] - (.+?)-u4e - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //brothers-of-usenet.info/.net <<<Partner von SSL-News.info>>> - [01/26] - \"Be.Cool.German.AC3.HDRip.x264-FuN.par2\" yEnc\n\t\tif (preg_match('/^\\[Art-of-Usenet\\] ([a-fA-F0-9]+) \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(????) [03/20] - \"Weblinger - The.Haunted.House.Mysteries.v1.0-ZEKE.part01.rar\" yEnc\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+?[-_\\s]{0,3}yEnc$/ui',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //ShesGonnaSquirt.12.12.13.Sindy.Lange.My.Knight.In.Squirting.Armor.XXX.1080p.x264 - [1/1] - \"ShesGonnaSquirt.12.12.13.Sindy.Lange.My.Knight.In.Squirting.Armor.XXX.1080p.x264.rar\" yEnc\n\t\tif (preg_match('/[\\w.-]{8,}[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[Art-of-Usenet] dea75eb65e65c56197d749d57919806d [01/19] - \"dea75eb65e65c56197d749d57919806d.par2\" yEnc\n\t\tif (preg_match('/^\\[Art-of-Usenet\\] .+? \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<ghost-of-usenet.org>XCOM.Enemy.Unknown.Deutsch.Patch.TokZic [0/9] - \"XCOM Deutsch.nzb\" ein CrazyUpp yEnc\n\t\tif (preg_match('/^<ghost-of-usenet\\.org>(.+?) \\[\\d+\\/\\d+\\] - \".+?\" .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //.oO \"20.Years.After.German.2008.AC3.BDRip.XviD.INTERNAL-ARC__www.realmom.info__.nfo\" Oo. [02/39] 1,43 GB yEnc\n\t\tif (preg_match('/^\\.oO \"(.+)__www.realmom.info__.+\" Oo. \\[\\d+\\/\\d+\\] \\d+[.,]\\d+ [kKmMgG][bB] yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<kere.ws> - 0DAY - 1331086126 - Robokill.Rescue.Titan.Prime.v1.1.MacOSX.Cracked-CORE - [1/9] - \"Robokill.Rescue.Titan.Prime.v1.1.MacOSX.Cracked-CORE.par2\" yEnc\n\t\tif (preg_match('/^<kere\\.ws>[ _-]{0,3}\\w+(-\\w+)?[ _-]{0,3}\\d+[ _-]{0,3}(.+) - \\[\\d+\\/\\d+\\][ _-]{0,3}(\"|#34;).+?(\"|#34;) yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[A_New_Found_Glory-Its_All_About_The_Girls-Reissue-CDEP-FLAC-2003-JLM] [www.usenet4ever.info by Secretusenet] - \"00-a_new_found_glory-its_all_about_the_girls-reissue-cdep-flac-2003.jpg\" yEnc\n\t\tif (preg_match('/^\\[(.+?)\\][ _-]{0,3}\\[www\\.usenet4ever\\.info by Secretusenet][ _-]{0,3} \".+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//MoM100060 - \"Florian_Arndt-Trix-(BBM36)-WEB-2012-UKHx__www.realmom.info__.nfo\" [2/7] 29,04 MB yEnc\n\t\t//\"Alan.Wake.v1.02.16.4261.Update-SKIDROW__www.realmom.info__.nfo\" (02/17) 138,07 MB yEnc\n\t\tif (preg_match('/^(Mom\\d+[ _-]{0,3})?\"(.+?)__www\\.realmom\\.info__' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}[\\(\\[]\\d+\\/(\\d+[\\)\\]]) \\d+[.,]\\d+ [kKmMgG][bB] yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //\"The.Draughtsmans.Contract.1982.576p.BluRay.DD2.0.x264-EA\"(15/56) \"The.Draughtsmans.Contract.1982.576p.BluRay.DD2.0.x264-EA.part13.rar\" - 2.37 GB yEnc\n\t\tif (preg_match('/^\"(.+?)\"\\(\\d+\\/(\\d+\\))[ _-]{0,3}\".+?' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB] yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(01/29) - Description - \"Revolution.2012.S01E06.HDTV.x264-LOL.nfo\" - 317.24 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/(\\d+\\))[ _-]{0,3}Description[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(02/17) - [Lords-of-Usenet] <<Partner of SSL-News.info>> i8dewFjzft94BW71EI0s -\"19913.r00\" - 928,75 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/(\\d+\\))[ _-]{0,3}\\[Lords-of-Usenet\\][ _-]{0,3}<<Partner of SSL-News\\.info>>[ _-]{0,3}(.+?)[ _-]{0,3}\".+?' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[002/161] - \"Rayman_Legends_USA_PS3-CLANDESTiNE.nfo\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\][ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//NetVideoGirls.13.08.05.Julia.XXX.MP4-KTR - [1/1] - \"NetVideoGirls.13.08.05.Julia.XXX.MP4-KTR.rar\" yEnc\n\t\t//FemaleAgent.E136.Rollie.XXX.1080p.MOV-KTR - [1/1] - \"FemaleAgent.E136.Rollie.XXX.1080p.MOV-KTR.rar\" yEnc\n\t\t//Penthouse.13.07.13.Natalia.Starr.Pet.Of.Month.July.2013.XXX.3D.WMV-TBP - [1/1] - \"Penthouse.13.07.13.Natalia.Starr.Pet.Of.Month.July.2013.XXX.3D.WMV-TBP.rar\" yEnc\n\t\tif (preg_match('/^([a-z0-9].+?\\.XXX.*?\\.[a-z0-9]{3,4}-[a-z0-9]+) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //happy birthday brothers - brothers-of-usenet.info&net-empfehlen-ssl-news - 2brokegirls-s03e12-Die.franzoesische.Versuchung.48 - [01/12] - \"2brokegirls-s03e12-Die.franzoesische.Versuchung.480p.par2\" yEnc\n\t\tif (preg_match('/brothers-of-usenet\\.info&net-empfehlen-ssl-news.+\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Eragon postet Pfeil S01E18 german [01/19] - \"Pfeil S01E18.par2\" yEnc\n\t\tif (preg_match('/^Eragon postet.+\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"[Fansub-Resistance] Naruto Shippuuden 345 xvid (848x480).vol25+15.PAR2\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Die.Sopranos.S05E02.German.AVC-TVS.vol063+60.par2\" (repack180414) yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . '.+yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //LOL.3E05.720p.WEB.DL.nHD.x264-NhaNc3 [64/71] - \"LOL.3E05.720p.WEB.DL.nHD.x264-NhaNc3.sfv\" yEnc\n\t\tif (preg_match('/^([\\w.-]{8,})[-_\\s]{0,3}\\[\\d+\\/(\\d+\\])[-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t\t&& !preg_match('/^(\\d{4,6})-\\d{1}\\[/', $this->subject)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-LaLa.2014.Englisch.R6.HDCAM.x264.AC3-SmY(06/56]\"SmY-I,F.2014.part05.rar\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\[\\(]\\d+\\/\\d+[\\]\\)]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(21/27) - Description Lava.Land.2013.3D.1080p.Bluray.HOU.X264.DL-zman - \"Lava.Land.2013.3D.1080.HOU.DL-zman.part20.rar\" - 8,85 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[-_\\s]{0,3}Description ([\\w.,& ()\\[\\]\\'\\`-]{8,}?)[-_\\s]{0,3}\".+?' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- \"z7QxDdQ5Qs63v8B8.01\" - 374,56 MB - yEnc\n\t\t//- Description - \"le gars et son arc 2x21.vol06+05.PAR2\" - 273,04 MB - yEnc\n\t\tif (preg_match('/^- (Description - )?\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //::: Usejunkies.tk ::: - [11/15] - \"Saitenfeuer - Kein Zurueck 2013.vol00+1.par2\" - 116,42 MB yEnc\n\t\tif (preg_match('/^.+Usejunkies\\.tk.+\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //:.Usejunkies.tk.:---- - [4/8] - \"MKTO - MKTO.vol00+5.par2\" yEnc\n\t\tif (preg_match('/^.+Usejunkies\\.tk.+\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"8ÃÂ
dTbOMaÃÂ¥RuieuD4gÃÂ¥jÃÂ
wOÃÂ¥bmS72ADÃÂ
M1b2æefz9q4yW4O7exV.vol037+6.par2\" yEnc\n\t\tif (preg_match('/^\"(.{8,}?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(08/12) [ArtofUsenet] >>> www.art-of-use.net <<< \"Alles Atze - S01E05 - Die Anatolische Fliege.vol01+02.par2\" - 245,19 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \\[ArtofUsenet\\].+www\\.art-of-use\\.net.+\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(01/10) - [Lords-of-Usenet] <<Sponsored by SSL-News.info>> presents AoA.Audio.Extractor.Platinum.v2.0.Portable.WiNALL.APPZ-NOTRADE -\"notrade-aoaextractorplati_portable.par2\" - 8,14 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \\[Lords-of-Usenet\\].+ presents (.+?)[-_\\s]{0,3}\".+?' .\n\t\t\t$this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(02/66) - [Lords-of-Usenet] <<Partner of SSL-News.info>> presents The_Swapper-FANiSO - \"fan-swap.rar\" - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \\[Lords-of-Usenet\\].+ presents (.+?)[-_\\s]{0,3}\".+?' .\n\t\t\t$this->e1,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/3) - \"Readers Digest Magazin Deutschland Oktober 10-2014.rar\" - 10,92 MB - >>brothers-of-usenet.info/net<< empfehlen SSL-News.info yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[-_\\s]{0,3}\\d+([.,]\\d+)? [kKmMgG][bB][-_\\s].+yEnc$/ui',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/3) \"Die drei Fragezeichen - Folge 162 - Der schreiende Nebel.rar\" - 121,56 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t$this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //brothers-of-usenet.ino/.net<<<Partner von SSL-News.info>>> - [05/33] - \"oiu78_67O77OuiI_ztRe014.part04.rar\" yEnc\n\t\tif (preg_match('/^brothers-of-usenet.+SSL-News\\.info.+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖܤ߶!.,&_()\\[\\]\\'\\`-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //\"Fabulous MP3.v1.10.rar\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function parseSMSBatteryMT90($text) {\n $matches = array();\n preg_match(\"/BAT=[0-9]+%/\", $text, $matches);\n if (!empty($matches)) {\n return substr($matches[0], 4);\n } else {\n return \"NA\";\n }\n}",
"function FindField($options, $text, $mode=0) {\n $skip = array();\n if (is_array($options)) {\n $pattern = $options[0];\n $mode = isset($options[1]) ? $options[1] : 0;\n } else {\n $pattern = $options;\n }\n \n $value = \"\";\n if (is_array($pattern)) {\n foreach ($pattern as $p) {\n $value = RegexValue($p, $text);\n if ($value) break; \n }\n } else\n $value = RegexValue($pattern, $text);\n\n switch ($mode) {\n\n case FINDMODE_NAMECASE:\n case FINDMODE_COMMALINKS:\n if (preg_match_all(\"#<a.*?</a>#\", $value, $m)) {\n $values = array();\n foreach ($m[0] as $part) {\n $val = trim(Html2Text($part)); if (in_array($val, $skip)) continue;\n if ($mode & FINDMODE_NAMECASE) \n $val = mb_convert_case($val, MB_CASE_TITLE, \"UTF-8\");\n $values[] = $val;\n }\n $value = implode(', ', $values);\n } else {\n $value = Html2Text($value);\n if ($mode & FINDMODE_NAMECASE) \n $value = mb_convert_case($value, MB_CASE_TITLE, \"UTF-8\");\n }\n break;\n\n case FINDMODE_TIME:\n if (preg_match(\"#(\\d+)\\s*мин#\", Html2Text($value), $m)) \n $value = intval($m[1]) * 60;\n break;\n\n case FINDMODE_UNESCAPE:\n $value = stripcslashes(Html2Text($value));\n break;\n \n case FINDMODE_DATETIME:\n $value = Html2Text($value);\n $part_date = RegexValue(\"#(\\d{2}.\\d{2}.\\d{4})#\", $value);\n $part_time = RegexValue(\"#(\\d{2}:\\d{2})#\" , $value);\n $format = \"d.m.Y H:i\";\n if (strpos($value, \"Сегодня\")!==false) {\n $part_date = date(\"d.m.Y\");\n }\n if (strpos($value, \"Вчера\")!==false) {\n $part_date = date(\"d.m.Y\", time()-(60*60*24));\n }\n $date = DateTime::createFromFormat($format, \"$part_date $part_time\");\n if ($date) $value = date(\"Y-m-d H:i:s\", $date->getTimestamp());\n else $value = date(\"Y-m-d H:i:s\");\n break;\n\n default:\n $value = Html2Text($value);\n break;\n }\n return trim($value);\n}",
"function testLine ($str) {\r\n $testLineResult = TRUE;\r\n if (strlen($str) > 88) {\r\n $testLineResult = FALSE;\r\n } else if (!preg_match('/[0-9]{16}/',$str)) {\r\n $testLineResult = FALSE;\r\n }\r\n return $testLineResult;\r\n}",
"public function _isOnlineFromName()\n\t{\n\n\tswitch ( strtolower( $this->__deviceDetector( $this->sessionData['browser'] ) ) )\n\t\t{\n\t\t\tcase 'pc':\n\t\t\t\t$phrase = ' с ПК';\n\t\t\t\tbreak;\n\t\t\tcase 'tablet':\n\t\t\t\t$phrase = ' с Планшета';\n\t\t\t\tbreak;\n\t\t\tcase 'phone':\n\t\t\t\t$phrase = ' с Мобильного';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $phrase;\n\t}",
"function ok()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = $this->getresp();\r\n\t\tforeach ($response as $v)\r\n\t\t{\r\n\t\t\tif (!empty($v) && !preg_match(\"/^[123]/\", $v)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\t/*\r\n\t\tif (ereg(\"^[123]\", $response)) {\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\treturn FALSE;\r\n \t}*/\r\n }",
"public function check_html_no_space($html) {\r\n\t\t$html = str_replace(array(\"\\r\", \"\\r\\n\", \"\\n\", \" \", \"\\t\"), '', $html);\r\n\t\treturn $html;\r\n\t}",
"protected function accept_regex() {\n return true;\n }",
"public function getAsciiRegexp();",
"public function testSCAN_PATTERN_CDATA() {}",
"public function globalStringConditionMatchesRegularExpression() {}",
"public function globalStringConditionMatchesRegularExpression() {}",
"public function classic_tv_shows()\n\t{\n\t\tif (preg_match('/^Re: REQ: (.+? - \".+?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Per REQ - \"The.Wild.Wild.West.S03E11.The.Night.of.the.Cut-Throats.DVDRip.XVID-tz.par2\" 512x384 [01/40] yEnc\n\t\tif (preg_match('/^Per REQ - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' .+? \\[\\d+\\/\\d+\\] yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //By req: \"Dennis The Menace - 4x25 - Dennis and the Homing Pigeons.part05.rar\" yEnc\n\t\tif (preg_match('/^By req: \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //I Spy HQ DVDRips \"I Spy - 3x26 Pinwheel.part10.rar\" [13/22] yEnc\n\t\tif (preg_match('/^[a-zA-Z ]+HQ DVDRips \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' \\[\\d+\\/\\d+\\] yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Sledge Hammer! S2D2 [016/138] - \"SH! S2 D2.ISO.016\" yEnc\n\t\t//Sledge Hammer! S2D2 [113/138] - \"SH! S2 D2.ISO.1132 yEnc\n\t\t//Lost In Space - Season 1 - [13/40] - \"S1E02 - The Derelict.avi\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+? (S\\d+D\\d+|- Season \\d+))( -)? \\[\\d+\\/\\d+\\] - \".+?\"? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Night Flight TV Show rec 1991-01-12 (02/54) - \"night flight rec 1991-01-12.nfo\" yEnc\n\t\t//Night Flight TV Show rec 1991-05-05 [NEW PAR SET] (1/9) - \"night flight rec 1991-05-05.par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+? \\d{4}-\\d\\d-\\d\\d)( \\[.+?\\])? \\(\\d+\\/\\d+\\) - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//The.Love.Boat.S05E08 [01/31] - \"The.Love.Boat.S05E08.Chefs.Special.Kleinschmidt.New.Beginnings.par2\" yEnc\n\t\t//Barney.Miller.S08E05.Stress.Analyzer [01/18] - \"Barney.Miller.S08E05.Stress.Analyzer.VHSTVRip.DivX.par2\" yEnc\n\t\tif (preg_match('/^[a-zA-Z0-9][a-zA-Z0-9.-]+S\\d+E\\d+([a-zA-Z0-9.]+)? \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//\"Batman - S1E13-The Thirteenth Hat.par2\" yEnc\n\t\t//\"The Munsters - 1x01 Munster Masquerade.part.par\" HQ DVDRip[02/16] yEnc\n\t\tif (preg_match('/^(Re: )?\"(.+?)(\\.avi|\\.mkv)?' . $this->e0 .\n\t\t\t\t\t '( HQ DVDRip\\[\\d+\\/\\d+\\])? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Re: Outside Edge series 1 - [01/20] - \"Outside Edge S01.nfo\" yEnc\n\t\t//Green Acres Season 1 [01/87] - \"Green Acres Season 1.par2\" yEnc\n\t\t//MASH Season 1 - [01/54] - \"MASH - Season 01.par2\" yEnc\n\t\tif (preg_match('/^(Re: )?[a-zA-Z0-9]+.+? (series|Season) \\d+ (- )?\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[4];\n\t\t}\n\t\t//Rich.Little.Show - 1x12 - Season.and.Series.Finale - [02/33] - \"Rich Little Show - 1x12 - Bill Bixby.avi.002\" yEnc\n\t\t//Rich.Little.Show - 1x11 - [01/33] - \"Rich Little Show - 1x11 - Jessica Walter.avi.001\" yEnc\n\t\t//REQ - Banacek - 2x07 - [02/61] - \"Banacek - 2x07 - Fly Me - If You Can Find Me.avi.002\" yEnc\n\t\tif (preg_match('/^(REQ - )?[A-Z0-9a-z][A-Z0-9a-z.]+ - \\d+x\\d+ (- [A-Z0-9a-z.]+ )?- \\[\\d+\\/\\d+\\] - \"(.+?)(\\.avi|\\.mkv)?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //Handyman Shows-TOH-S32E10 - File 01 of 32 - yEnc\n\t\tif (preg_match('/^Handyman Shows-(.+) - File \\d+ of \\d+ - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//'Mission: Impossible' - 1x09 - NTSC - DivX - 28 of 48 - \"MI-S01E09.r23\" yEnc\n\t\t//'Mission: Impossible' - 1x09 - NTSC - DivX - 01 of 48 - \"MI-S01E09.nfo\" (1/1)\n\t\tif (preg_match('/^([a-zA-Z0-9 -_\\.:]+) - \\d+( of \\d+)[-_\\s]{0,3}\".+?' . $this->e0 .\n\t\t\t\t\t ' (\\(\\d+\\/\\d+\\) )?(yEnc)?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//\"Batman - S2E58-Ice Spy.par2\"yEnc\n\t\t//\"Black Sheep Squadron 1x03 Best Three Out of Five.par2\"\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . '(yEnc)?( )?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Guns of Will Sonnett - 1x04.mp4\" (Not My Rip)Guns Of Will Sonnett Season 1 1 - 26 Mp4 With Pars yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' \\(Not My Rip\\).+ \\d+ (- \\d+) .+ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(01/10) \"Watch_With_Mother-Bill_And_Ben-1953_02_12-Scarecrow-VHSRip-XviD.avi\" - 162.20 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[.,]\\d+ [kKmMgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(Our Gang - Little Rascals DVDRips) \"Our Gang - The Lucky Corner (1936).part0.sfv\" [01/19] yEnc\n\t\t//(Our Gang - Little Rascals DVDRips) \"Our Gang - Wild Poses (1933).part.par\" [02/20] Last One I Have! yEnc\n\t\tif (preg_match('/^\\(.+\\) \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' \\[\\d+\\/(\\d+\\]) (Last One I Have! )?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[EnJoY] =>A Blast from Usenet Past (1/3)<= [00/14] - \"Mcdonalds Training Film - 1972 (Vhs-Mpg).part.nzb\" yEnc\n\t\tif (preg_match('/^.+ Usenet Past .+\\[\\d+\\/(\\d+\\]) - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //<OPA_TV> [01/12] - \"Yancy Derringer - 03 - Geheime Fracht.par2\" yEnc\n\t\tif (preg_match('/^<OPA_TV> \\[\\d+\\/(\\d+\\]) - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//77 Sunset Strip 409 [1 of 23] \"77 Sunset Strip 409 The Missing Daddy Caper.avi.vol63+34.par2\" yEnc\n\t\t//Barney.Miller.NZBs [001/170] - \"Barney.Miller.S01E01.Ramon.nzb\" yEnc\n\t\tif (preg_match('/^.+ [\\[\\(]\\d+( of |\\/)(\\d+[\\]\\)])[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t}\n\t\t//All in the Family - missing eps - DVDRips \"All in the Family - 6x23 Gloria & Mike's House Guests.part5.rar\" [08/16] yEnc\n\t\t//Amos 'n' Andy - more shows---read info.txt \"Amos 'n' Andy S01E00 Introduction of the Cast.mkv.001\" (002/773) yEnc\n\t\tif (preg_match('/^.+[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' [\\[\\(]\\d+\\/(\\d+[\\]\\)]) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Andy Griffith Show,The 1x05....Irresistible Andy - (DVD).part04.rar\n\t\tif (preg_match('/^(.+\\d+x\\d+.+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})( yEnc)?( (Series|Season) Finale)?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function cp_str_containsHTML($str){\r\n return ($str != str_replace(['>','<'],'',$str));\r\n}",
"public function nl()\n\t{\n\t\tif (preg_match('/\\((\\d+|\\?+)\\) \\[\\d+\\/\\d+\\].*\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[2];\n\t\t} //JN - [1/3] - \"Operatie Teheran-Joel C Rosenberg JN.par2\" yEnc\n\t\tif (preg_match('/^\\w+[-_\\s]{0,3}[\\[\\(]\\d+\\/\\d+[\\]\\)][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //( Overlord II RELOADED ) - [013/112] - \"rld-olii.part001.rar\" yEnc\n\t\tif (preg_match('/^\\( ([\\w. -]{8,}) \\)[-_\\s]{0,3}\\[\\d+\\/(\\d+\\]) - \".+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Batman.Arkham-Origins.Initiation-RELOADED - [006/296] - \"r.vol010+08.PAR2\" yEnc\n\t\tif (preg_match('/^([\\w. &()-]{8,}?\\b)[-_\\s]{0,3}\\[\\d+\\/(\\d+\\])[-_\\s]{0,3}\".+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(PC-ISO) ( Trials.Fusion.Riders.of.the.Rustlands-SKIDROW ) [10/40] - \"sr-tfrotr.part01.rar\" yEnc\n\t\tif (preg_match('/^\\(PC-ISO\\)[-_\\s]{0,3}\\( ([\\w.,& ()\\[\\]\\'\\`-]{8,}?\\b) \\) \\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //- - [03/33] - \"s88fX0O0g7ZPGa96TyeDr.part02.rar\" yEnc\n\t\tif (preg_match('/^[-_\\s]{0,4}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function texto_simple($str)\n\t{\t\t\n\t\t$this->CI->form_validation->set_message('texto_simple', \"El campo %s debe contener una combinación de caracteres alfanuméricos, espacios, comas (,) y puntos (.), guión medio (-).\");\n\t\treturn (bool) preg_match(\"/(^[a-zA-Z0-9\\xF1\\xD1\\s.,-ñÑ]+$)|^$/\", $str);\n\t}",
"public function checkControls($html){\n\t\t\t$regex = \"<TAG:\"; $controls = spliti($regex, $html); $method; $stringWithControls = \"\";\n\t\t\t$a_method; $methodString;\n\t\t\tif(count($controls)>1) {\n\t\t\t\tfor ($x = 0; $x < count($controls); $x++) {\n\t\t\t\t\t$a_method = spliti(\"/>\", $controls[$x]);\n\t\t\t\t\tif(count($a_method)>1) {\n\t\t\t\t\t\t$methodString = spliti(\"\\(\", $a_method[0]);\n\t\t\t\t\t\t$method = $methodString[0];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(trim($method) !== \"\");\n\t\t\t\t\t\t\t\t$stringWithControls .= call_user_func(trim($a_method[0])) . $a_method[1];\n\t\t\t\t\t\t} catch(Exception $error){}\n\t\t\t\t\t} else \n\t\t\t\t\t\t$stringWithControls .= $controls[$x];\n\t\t\t\t}\n\t\t\t} else \n\t\t\t\t$stringWithControls = $html;\n\t\t\treturn $stringWithControls;\n\t\t}",
"function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}",
"public function testInvalidElementMatchingWithTextTagAndID()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 id=\"title\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'id' => 'title',\n 'tag' => 'h2',\n 'inner_text' => 'Wrong Text',\n ));\n\n $this->assertFalse($result);\n }",
"function clean_rtf_from_jade_tables() {\r\n\t\t//$this->code = preg_replace('/class=[^\\s<>]*/', '', $this->code, -1, $d);\r\n\t\t//$this->code = preg_replace('/colspan=[0-9]*/', '', $this->code, -1, $e);\r\n\t\t//$this->code = preg_replace('/width=[0-9]*/', '', $this->code, -1, $f);\r\n\t\t//$this->code = str_replace('<p >', '', $this->code, $g);\r\n\t\t//$this->code = str_replace('<span >', '', $this->code, $h);\r\n\t\t//$this->code = str_replace('</p>', '', $this->code, $i);\r\n\t\t//$this->code = str_replace('</span>', '', $this->code, $j);\r\n\t\t//$this->code = str_replace('<p >', '', $this->code, $k);\t\t\r\n\t\t// INAC1168\r\n\t\tif($this->language === \"english\") {\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITIES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSIBILITY<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TIMING GUIDELINES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITIES</b></td>\r\n<td$2><b>RESPONSIBILITY</b></td>\r\n<td$3><b>TIMING GUIDELINES</b></td>\r\n</tr>\r\n<tr>\r\n<td$10>1.', $this->code, -1, $l);\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITIES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSIBILITY<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TIMING GUIDELINES<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITIES</b></td>\r\n<td$2><b>RESPONSIBILITY</b></td>\r\n<td$3><b>TIMING GUIDELINES</b></td>\r\n</tr>\r\n<tr>\r\n<td$9>1.', $this->code, -1, $m);\r\n\t\t}\r\n\t\tif($this->language === \"french\") {\r\n\t\tprint(\"<h1>french</h1>\");\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITÉS<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSABILITÉ<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>HORIZON<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TEMPOREL<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITÉS</b></td>\r\n<td$2><b>RESPONSABILITÉ</b></td>\r\n<td$3><b>HORIZON TEMPOREL</b></td>\r\n</tr>\r\n<tr>\r\n<td$10>1.', $this->code, -1, $n);\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITÉS<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSABILITÉ<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>HORIZON<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TEMPOREL<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<td([^<>]*)>\\s* \\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITÉS</b></td>\r\n<td$2><b>RESPONSABILITÉ</b></td>\r\n<td$3><b>HORIZON TEMPOREL</b></td>\r\n</tr>\r\n<tr>\r\n<td$9>1.', $this->code, -1, $o);\t\t\r\n\t\t}\r\n\t\t//$this->code = preg_replace('/<span\\s*>/', '', $this->code, -1, $p);\r\n\t\t$this->code = preg_replace('/<tr height=\"0\">.*?<\\/tr>/', '', $this->code, -1, $q);\r\n\t\t\r\n\t\t$this->logMsgIf(\"clean_rtf_from_jade_tables\", $c + $d + $e + $f + $g + $h + $i + $j + $k + $l + $m + $n + $o + $p + $q);\r\n\t}",
"function ext_sms($rec_sms) {\n\n $array=explode(\" \",$rec_sms); \n if($array[0]==\"+\") \n {\n require('functions/fget_huawei.php'); \n return ext_huawei($rec_sms);\n }\n\n else {\n require('functions/fget_ZTE.php');\n return ext_ZTE($rec_sms);\n }\n \n }",
"function validaAlfaEsp ($Cad) {\n// prueba si la entrada son cadenas alfabeticas con espacio\n// preg_match realiza búsquedas en cadenas de texto mediante expresiones regulares. Devolverá el valor booleano.\nreturn preg_match(\"/^[a-z ]*$/i\", $Cad );\n}",
"function non_breaking_phone_number() {\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t//print('here33495905060<br>');\r\n\t\t\t\t//$this->code = preg_replace('/(\\([0-9]{3}\\))(' . $this->spaceRegex . ')+([0-9]{3}\\-[0-9]{4})/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5 $8 $11</span>$12', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+))(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5.$8.$11</span>$12', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5 $8</span>$9', $this->code, -1, $d);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5.$8</span>$9', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5</span>$6', $this->code, -1, $g);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5</span>$6', $this->code, -1, $i);\r\n\t\t\t\t\r\n\t\t\t// I am guessing; not necessary\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span class=\"noWrap\">$1 $4 $7</span>', $this->code, -1, $d);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span class=\"noWrap\">$1-$4-$7</span>', $this->code, -1, $e);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span class=\"noWrap\">$1.$4.$7</span>', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span class=\"noWrap\">$1 $4</span>', $this->code, -1, $g);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span class=\"noWrap\">$1-$4</span>', $this->code, -1, $h);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '<span class=\"noWrap\">$1.$4</span>', $this->code, -1, $i);\r\n\t\t\t} else {\r\n\t\t\t\t//print('here33495905061<br>');\r\n\t\t\t\t//$this->code = preg_replace('/(1((\\.|\\-|' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((\\.|\\-|' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((\\.|\\-|' . $this->spaceRegex . ')+)[0-9]{4})/is', '<span style=\"white-space: nowrap;\">$0</span>', $this->code, -1, $a);\r\n\t\t\t//\t$this->code = preg_replace('/(1((' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((' . $this->spaceRegex . ')+)[0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4 $7 $10</span>', $this->code, -1, $a);\r\n\t\t\t//\t$this->code = preg_replace('/(1)((' . implode(\"|\", $this->dashes_array) . '))(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . '))([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4-$7-$10</span>', $this->code, -1, $b);\r\n\t\t\t//\t$this->code = preg_replace('/(1)((\\.)+){0,1}(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4.$7.$10</span>', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4 $7</span>', $this->code, -1, $d);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4-$7</span>', $this->code, -1, $e);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4.$7</span>', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4</span>', $this->code, -1, $g);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4</span>', $this->code, -1, $h);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4</span>', $this->code, -1, $i);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)((\\(?[0-9]{3}\\)?)(' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5 $8 $11</span>$12', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+)(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5.$8.$11</span>$12', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5 $8</span>$9', $this->code, -1, $d);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5.$8</span>$9', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5</span>$6', $this->code, -1, $g);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5</span>$6', $this->code, -1, $i);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//print('here33495905062<br>');\r\n\t\t\t//$this->code = preg_replace('/(\\([0-9]{3}\\))(' . $this->spaceRegex . ')+([0-9]{3}\\-[0-9]{4})/is', '$1 $3', $this->code, -1, $b);\r\n\t\t//\t$this->code = preg_replace('/(1)((' . $this->spaceRegex . ')+){0,1}(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1 $4 $7 $10', $this->code, -1, $b);\r\n\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1 $4 $7', $this->code, -1, $c);\r\n\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1 $4', $this->code, -1, $d);\r\n\t//\t\t$this->code = preg_replace('/(1((' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((' . $this->spaceRegex . ')+)[0-9]{4})/is', '$1 $4 $7 $10', $this->code, -1, $a);\r\n\t//\t\t$this->code = preg_replace('/(1)((' . implode(\"|\", $this->dashes_array) . '))(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . '))([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4-$7-$10', $this->code, -1, $b);\r\n\t//\t\t$this->code = preg_replace('/(1)((\\.)+){0,1}(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4.$7.$10', $this->code, -1, $c);\r\n\t\t\t\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1 $4 $7', $this->code, -1, $d);\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4-$7', $this->code, -1, $e);\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4.$7', $this->code, -1, $f);\r\n\t\t\t\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1 $4', $this->code, -1, $g);\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4', $this->code, -1, $h);\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4', $this->code, -1, $i);\r\n\t\t\t\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2 $5 $8 $11$12', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2 $5 $8$9', $this->code, -1, $d);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2 $5$6', $this->code, -1, $g);\r\n\t\t\t\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+)(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5.$8.$11$12', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5.$8$9', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5$6', $this->code, -1, $i);\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$count = $a + $b + $c + $d + $e + $f + $g + $h + $i;\r\n\t\t//$count = $a + $b + $c;\r\n\t\t//var_dump($a, $b, $c, $d, $e);\r\n\t\t$this->logMsgIf(\"non_breaking_phone_number\", $count);\r\n\t}",
"public function regexHtml($aKey=NULL){\n\t\treturn $this->regexMatch($aKey,$this->regexHtml);\n\t}",
"function testFormatPhone() {\n\n\t\t$ff = new Cgn_ActiveFormatter('888.123.4567');\n\t\t$phone = $ff->printAs('phone');\n\n\t\t$this->assertEquals('(888) 123-4567', $phone);\n\n setlocale(LC_ALL, 'en_US.UTF-8');\n\t\t$clean = $ff->cleanVar(utf8_encode('abc ABC 999 '.chr(0xF6) .'()()') );\n\t\t$this->assertEquals($clean, 'abc ABC 999 ');\n\n\t}",
"function check_html($message){\r\n\tstatic $tags = array('<a','<abbr','<acronym','<address','<applet','<area','<b','<base','\t\t\t<basefront','<bdo','<big','<blockquote','<body','<button','<caption','<center','<cite','<code','<col','<colgroup','<dd','<del','<dir','<div','<dfn','<dl','<dt','<em','<fieldset','<font','<form','<frame','<frameset','<h1','<h2','<h3','<h4','<h5','<h6','<i','<iframe','<ins','<isindex','<kbd','<label','<legend','<li','<link','<map','<menu','<noframes','<noscript','<object','<ol','<optgroup','<options','<p','<param','<pre','<q','<s','<samp','<select','<small','<span','<strike','<strong','<sub','<sup','<table','<tbody','<td','<textarea','<tfoot','<th','<thead','<tr','<tt','<u','<ul','<var','<xmp');\r\n\t//does not include <input /><img /><br /><hr /><embed /> because empty tags\r\n\tstatic $prohib_tags = array('<body', '<html','<head','<meta','<script','<style','<title'); \r\n\t$errors = 0;\r\n\t$error_log = \"\";\r\n\t//check for prohibited tags\r\n\t$n=0;\r\n\twhile($prohib_tags[$n]!=NULL){\r\n\t\tif((strpos($message,$prohib_tags[$n] . \" \",0)!==false) or (strpos($message,$prohib_tags[$n] . \">\",0)!==false) or (strpos($message,\"</\" . substr($prohib_tags[$n],1) . \" \",0)!==false) or (\tstrpos($message,\"</\" . substr($prohib_tags[$n],1) . \">\",0)!==false) ){\r\n\t\t\t$errors++;\r\n\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Prohibited use of <\" . substr($prohib_tags[$n],1) . \"> element<br />\";\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper tag nesting\r\n\t$n=0;\r\n\t$nest_lvl = 0;\r\n\twhile($tags[$n]!=NULL){\r\n\t\t$tag = $tags[$n];\r\n\t\t$tag_e = \"</\" . substr($tags[$n], 1) . \">\";\r\n\t\t$count = substr_count($message, $tag . \">\") + substr_count($message, $tag . \" \");\r\n\t\t$count_e = substr_count($message, $tag_e);\r\n\t\tif($count == $count_e){\r\n\t\t\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\t\t\tif((substr($message,$m,strlen($tag)+1)== $tag . \">\")or((substr($message,$m,strlen($tag)+1)== $tag . \" \"))){\r\n\t\t\t\t\t$nest_lvl++;\r\n\t\t\t\t}\r\n\t\t\t\tif((substr($message,$m,strlen($tag_e))==($tag_e))){\r\n\t\t\t\t\t$nest_lvl--;\r\n\t\t\t\t}\r\n\t\t\t\tif($nest_lvl<0){\r\n\t\t\t\t\t$errors++;\r\n\t\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Improper <\" . substr($tag,1) . \"> tag nesting<br />\";\r\n\t\t\t\t\t$m=strlen($message);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$nest_lvl = 0;\r\n\t\t}else{\r\n\t\t\t$errors++;\r\n\t\t\tif($count>$count_e){\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing </\" . substr($tag,1) . \"> end tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$error_log = $error_log . \"Error \" . $errors . \": Missing <\" . substr($tag,1) . \"> start tag(s)!<br />\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$n++;\r\n\t}\r\n\t//check proper \"</>\" use. example: <content>else> or <whatsoever<content>\r\n\t$tri_brkt!=0;\r\n\tfor($m=0;$m<=strlen($message);$m++){\r\n\t\tif(substr($message,$m,1)==\"<\"){\r\n\t\t\t$tri_brkt++;\r\n\t\t}\r\n\t\tif(substr($message,$m,1)==\">\"){\r\n\t\t\t$tri_brkt--;\r\n\t\t}\r\n\t}\r\n\tif($tri_brkt!=0){\r\n\t\t$errors++;\r\n\t\t$error_log = $error_log . \"Error \" . $errors . \": improper \\\"</>\\\" usage<br />\";\r\n\t}\r\n\t$error_log = \"Errors: \" . $errors . \"<br />\" . $error_log . \"<br />\";\r\n\treturn $error_log;\r\n\t//END OF TAG INSPECTION\r\n}",
"function consecutiveCharacters($telephone) \n\t{\n\t\tif ((preg_match('/\\-\\-+/', $telephone)) || (preg_match('/\\.\\.+/', $telephone)) || (preg_match('/\\s\\s+/', $telephone)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function ismobile(){\n\t$ua = strtolower($_SERVER['HTTP_USER_AGENT']);\n\n\t$uachar = \"/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i\";\n\t$smartuachar = \"/(ipad)/i\";\n\t\t\n\t//if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap'))\n\tif(!(preg_match($smartuachar, $ua)) && ($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap'))\n\t{\n\n\t if (!empty($Loaction))\n\t {\n\t return false;\n\t }else{\n\t \treturn true;\n\n\t }\n\n\t}\n\t}",
"function extract_html_tag($line) {\n if (preg_match(self::REGEX_CODE, $line)) {\n return preg_replace(self::REGEX_CODE, '\\1', $line);\n }\n }",
"function comprobar_web($web){\n\t\tif(preg_match('/^http\\:\\/\\/www\\.[A-Za-z0-9-.]+\\.[A-Za-z]{2,4}$/', $web)){ \n\t\t\treturn 0; \n\t\t}else\n\t\t\treturn 1;\n\t}",
"function comcode_text_to_tempcode($comcode,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$is_all_semihtml,$structure_sweep,$check_only,$highlight_bits=NULL,$on_behalf_of_member=NULL)\n{\n\tglobal $ADVERTISING_BANNERS,$ALLOWED_ENTITIES,$POTENTIALLY_EMPTY_TAGS,$CODE_TAGS,$REVERSABLE_TAGS,$PUREHTML_TAGS,$DANGEROUS_TAGS,$VALID_COMCODE_TAGS,$BLOCK_TAGS,$POTENTIAL_JS_NAUGHTY_ARRAY,$TEXTUAL_TAGS,$LEET_FILTER,$IMPORTED_CUSTOM_COMCODE,$REPLACE_TARGETS;\n\n\t$wml=false; // removed feature from ocPortal now\n\t$print_mode=get_param_integer('wide_print',0)==1;\n\n\t$len=strlen($comcode);\n\n\tif ((function_exists('set_time_limit')) && (ini_get('max_execution_time')!='0')) @set_time_limit(300);\n\n\t$allowed_html_seqs=array('<table>','<table class=\"[^\"]*\">','<table class=\"[^\"]*\" summary=\"[^\"]*\">','<table summary=\"[^\"]*\">','</table>','<tr>','</tr>','<td>','</td>','<th>','</th>','<pre>','</pre>','<br />','<br/>','<br >','<br>','<p>','</p>','<p />','<b>','</b>','<u>','</u>','<i>','</i>','<em>','</em>','<strong>','</strong>','<li>','</li>','<ul>','</ul>','<ol>','</ol>','<del>','</del>','<dir>','</dir>','<s>','</s>','</a>','</font>','<!--','<h1 id=\"main_page_title\">','<h1 class=\"main_page_title\">','<h1 id=\"main_page_title\" class=\"main_page_title\">','</h1>','<img (class=\"inline_image\" )?alt=\"[^\"]*\" src=\"[^\"]*\" (complete=\"true\" )*/>','<img src=[\"\\'][^\"\\'<>]*[\"\\']( border=[\"\\'][^\"\\'<>]*[\"\\'])?( alt=[\"\\'][^\"\\'<>]*[\"\\'])?( )?(/)?'.'>','<a href=[\"\\'][^\"\\'<>]*[\"\\']( target=[\"\\'][^\"\\'<>]*[\"\\'])?'.'>'); // HTML tag may actually be used in very limited conditions: only the following HTML seqs will come out as HTML. This is, unless the blacklist filter is used instead.\n\tif ($as_admin)\n\t{\n\t\t$comcode_dangerous=true;\n\t\t$comcode_dangerous_html=true;\n\t} else\n\t{\n\t\t$comcode_dangerous=($GLOBALS['MICRO_BOOTUP']==0) && (has_specific_permission($source_member,'comcode_dangerous'));\n\t\t$comcode_dangerous_html=false;\n\t\tif ((has_specific_permission($source_member,'allow_html')) && (($is_all_semihtml) || (strpos($comcode,'[html')!==false) || (strpos($comcode,'[semihtml')!==false)))\n\t\t{\n\t\t\t$comcode_dangerous_html=true;\n\t\t\t/*foreach (array_keys($POTENTIALLY_EMPTY_TAGS) as $tag) // Find whether we really need to enable the computational-expensive filtering. Code disabled, not sure why this would have ever worked!\n\t\t\t{\n\t\t\t\tif (($tag!='html') && ($tag!='semihtml') && (strpos($comcode,'['.$tag)!==false))\n\t\t\t\t{\n\t\t\t\t\t$comcode_dangerous_html=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t}\n\tif (is_null($pass_id)) $pass_id=strval(mt_rand(0,32000)); // This is a unique ID that refers to this specific piece of comcode\n\tglobal $COMCODE_ATTACHMENTS;\n\tif (!array_key_exists($pass_id,$COMCODE_ATTACHMENTS)) $COMCODE_ATTACHMENTS[$pass_id]=array();\n\n\t// Tag level\n\t$current_tag='';\n\t$attribute_map=array();\n\t$tag_output=new ocp_tempcode();\n\t$continuation='';\n\t$close=mixed();\n\n\t// Properties that come from our tag\n\t$white_space_area=true;\n\t$textual_area=true;\n\t$formatting_allowed=true;\n\t$in_html=false;\n\t$in_semihtml=$is_all_semihtml;\n\t$in_separate_parse_section=false; // Not escaped because it has to be passed to a secondary filter\n\t$in_code_tag=false;\n\t$code_nest_stack=0;\n\n\t// Our state\n\t$status=CCP_NO_MANS_LAND;\n\t$lax=$GLOBALS['LAX_COMCODE'] || function_exists('get_member') && $source_member!=get_member() || count($_POST)==0; // if we don't want to produce errors for technically invalid Comcode\n\t$tag_stack=array();\n\t$pos=0;\n\t$line_starting=true;\n\t$just_ended=false;\n\t$none_wrap_length=0;\n\t$just_new_line=true; // So we can detect lists starting right away\n\t$just_title=false;\n\tglobal $NUM_LINES;\n\t$NUM_LINES=0;\n\t$queued_tempcode=new ocp_tempcode();\n\t$mindless_mode=false; // If we're doing a semi parse mode and going over a tag we don't actually process\n\t$tag_raw='';\n\n\tif ((!is_null($wrap_pos)) && (strtolower(get_charset())=='utf-8'))\n\t\t$wrap_pos*=2;\n\n\t$b_all=(get_option('admin_banners',true)==='1');\n\n\t$stupidity_mode=get_value('stupidity_mode'); // bork or leet\n\tif ($comcode_dangerous) $stupidity_mode=get_param('stupidity_mode','');\n\tif ($stupidity_mode=='leet')\n\t{\n\t\t$LEET_FILTER=array(\n\t\t'B'=>'8',\n\t\t'C'=>'(',\n\t\t'E'=>'3',\n\t\t'G'=>'9',\n\t\t'I'=>'1',\n\t\t'L'=>'1',\n\t\t'O'=>'0',\n\t\t'P'=>'9',\n\t\t'S'=>'5',\n\t\t'U'=>'0',\n\t\t'V'=>'\\/',\n\t\t'Z'=>'2'\n\t\t);\n\t}\n\n\t$smilies=$GLOBALS['FORUM_DRIVER']->find_emoticons(); // We'll be needing the smiley array\n\t$shortcuts=array('(EUR-)'=>'€','{f.}'=>'ƒ','-|-'=>'†','=|='=>'‡','{%o}'=>'‰','{~S}'=>'Š','{~Z}'=>'Ž','(TM)'=>'™','{~s}'=>'š','{~z}'=>'ž','{.Y.}'=>'Ÿ','(c)'=>'©','(r)'=>'®','---'=>'—','--'=>'–','...'=>'…','-->'=>'→','<--'=>'←');\n\n\t// Text syntax possibilities, that get maintained as our cursor moves through the text block\n\t$list_indent=0;\n\t$list_type='ul';\n\n\tif ($is_all_semihtml) filter_html($as_admin,$source_member,$pos,$len,$comcode,false,false); // Pre-filter the whole lot (note that this means during general output we do no additional filtering)\n\n\twhile ($pos<$len)\n\t{\n\t\t$next=$comcode[$pos];\n\t\t++$pos;\n\n\t\t// State machine\n\t\tswitch ($status)\n\t\t{\n\t\t\tcase CCP_NO_MANS_LAND:\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t// Look ahead to make sure it's a valid tag. If it's not then it's considered normal user input, not a tag at all\n\t\t\t\t\t$dif=(($pos<$len) && ($comcode[$pos]=='/'))?1:0;\n\t\t\t\t\t$ahead=substr($comcode,$pos+$dif,MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH);\n\t\t\t\t\t$equal_pos=strpos($ahead,'=');\n\t\t\t\t\t$space_pos=strpos($ahead,' ');\n\t\t\t\t\t$end_pos=strpos($ahead,']');\n\t\t\t\t\t$lax_end_pos=strpos($ahead,'[');\n\t\t\t\t\t$cl_pos=strpos($ahead,chr(10));\n\t\t\t\t\tif ($equal_pos===false) $equal_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($space_pos===false) $space_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($end_pos===false) $end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($lax_end_pos===false) $lax_end_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\tif ($cl_pos===false) $cl_pos=MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH+3;\n\t\t\t\t\t$use_pos=min($equal_pos,$space_pos,$end_pos,$lax_end_pos,$cl_pos);\n\n\t\t\t\t\t$potential_tag=strtolower(substr($ahead,0,$use_pos));\n\t\t\t\t\tif (($use_pos!=22) && ((!$in_semihtml) || ($dif==1) || (($potential_tag!='html') && ($potential_tag!='semihtml'))) && ((!$in_html) || (($dif==1) && ($potential_tag=='html'))) && ((!$in_code_tag) || ((isset($CODE_TAGS[$potential_tag])) && ($potential_tag==$current_tag))) && ((!$structure_sweep) || ($potential_tag!='contents')))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($in_code_tag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($dif==1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack--;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$code_nest_stack++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ok=($code_nest_stack==-1);\n\t\t\t\t\t\t} else $ok=true;\n\n\t\t\t\t\t\tif ($ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!isset($VALID_COMCODE_TAGS[$potential_tag]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$IMPORTED_CUSTOM_COMCODE)\n\t\t\t\t\t\t\t\t\t_custom_comcode_import($connection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((isset($VALID_COMCODE_TAGS[$potential_tag])) && (strtolower(substr($ahead,0,2))!='i ')) // The \"i\" bit is just there to block a common annoyance: [i] doesn't take parameters and we don't want \"[i think]\" (for example) being parsed.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($comcode[$pos]!='/') || (count($tag_stack)==0))\n\t\t\t\t\t\t\t\t\t$mindless_mode=($semiparse_mode) && /*(!isset($CODE_TAGS[$potential_tag])) && */((!isset($REVERSABLE_TAGS[$potential_tag])) || ((is_string($REVERSABLE_TAGS[$potential_tag])) && (preg_match($REVERSABLE_TAGS[$potential_tag],substr($comcode,$pos,100))!=0))) && (!isset($PUREHTML_TAGS[$potential_tag]));\n\t\t\t\t\t\t\t\telse $mindless_mode=$tag_stack[count($tag_stack)-1][7];\n\n\t\t\t\t\t\t\t\t$close=false;\n\t\t\t\t\t\t\t\t$current_tag='';\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\tif ((/*(($potential_tag=='html') || ($potential_tag=='semihtml')) && */($just_new_line)) || (isset($BLOCK_TAGS[$potential_tag])))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$status=CCP_STARTING_TAG;\n\t\t\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]!='/')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists($potential_tag,$BLOCK_TAGS))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='​<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep_block\">[';\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_raw='​<kbd title=\"'.escape_html($potential_tag).'\" class=\"ocp_keep\">[';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$tag_raw='[';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tag_raw='';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($use_pos!=22) && ((($in_semihtml) || ($in_html)) && (($potential_tag=='html') || ($potential_tag=='semihtml'))) && (!$in_code_tag))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ahc=strpos($ahead,']');\n\t\t\t\t\t\t\tif ($ahc!==false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$pos+=$ahc+1;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((($in_html) || ((($in_semihtml) && (!$in_code_tag)) && (($next=='<') || ($next=='>') || ($next=='\"')))))\n\t\t\t\t{\n\t\t\t\t\tif ($next==chr(10)) ++$NUM_LINES;\n\n\t\t\t\t\tif ((!$comcode_dangerous_html) && ($next=='<')) // Special filtering required\n\t\t\t\t\t{\n\t\t\t\t\t\t$close=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t$portion=substr($comcode,$pos-1,$close-$pos+2);\n\t\t\t\t\t\t$seq_ok=false;\n\t\t\t\t\t\tforeach ($allowed_html_seqs as $allowed_html_seq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (preg_match('#^'.$allowed_html_seq.'$#',$portion)!=0) $seq_ok=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$seq_ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// $next='<'; //OLD STYLE\n\t\t\t\t\t\t\tif ($close!==false) $pos=$close+1; // NEW STYLE\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (substr($comcode,$pos-1,4)=='<!--') // To stop shortcut interpretation\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.='<!--';\n\t\t\t\t\t\t$pos+=3;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Not in HTML\n\t\t\t\t{\n\t\t\t\t\t// Text-format possibilities\n\t\t\t\t\tif (($just_new_line) && ($formatting_allowed) && (!$wml))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($continuation!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// List\n\t\t\t\t\t\t$found_list=false;\n\t\t\t\t\t\t$old_list_indent=$list_indent;\n\t\t\t\t\t\tif (($pos+2<$len) && (is_numeric($next)) && (((is_numeric($comcode[$pos])) && ($comcode[$pos+1]==')') && ($comcode[$pos+2]==' ')) || (($comcode[$pos]==')') && ($comcode[$pos+1]==' '))) && ((($list_type=='1') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n\\d+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='1'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='1';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($pos+2<$len) && (ord($next)>=ord('a')) && (ord($next)<=ord('z')) && ($comcode[$pos]==')') && ($comcode[$pos+1]==' ') && ((($list_type=='a') && ($list_indent!=0)) || (preg_match('#^[^\\n]*\\n[a-z]+\\) #',substr($comcode,$pos+1))!=0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($list_indent!=0) && ($list_type!='a'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$list_indent=1;\n\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t$list_type='a';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($next==' ')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($old_list_indent!=0) && ($list_type!='ul'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist($temp_tpl,$old_list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$scan_pos=$pos-1;\n\t\t\t\t\t\t\t$list_indent=0;\n\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\tif (($scan_next=='-') && ($scan_pos+1<$len) && ($comcode[$scan_pos+1]==' '))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$found_list=true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($scan_next==' ') ++$list_indent; else break;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$found_list) $list_indent=0; else $list_type='ul';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Rule?\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t\t$old_list_indent=0;\n\n\t\t\t\t\t\t\tif (($next=='-') && (!$just_title))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$scan_pos=$pos;\n\t\t\t\t\t\t\t\t$found_rule=true;\n\t\t\t\t\t\t\t\twhile ($scan_pos<$len)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$scan_next=$comcode[$scan_pos];\n\t\t\t\t\t\t\t\t\tif ($scan_next!='-')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($scan_next==chr(10))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t} else $found_rule=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t++$scan_pos;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($found_rule)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$_temp_tpl=do_template('COMCODE_TEXTCODE_LINE');\n\t\t\t\t\t\t\t\t\t$tag_output->attach($_temp_tpl);\n\t\t\t\t\t\t\t\t\t$pos=$scan_pos+1;\n\t\t\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t\t\tcontinue;\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\n\t\t\t\t\t\t// List handling\n\t\t\t\t\t\tif (($list_indent==$old_list_indent) && ($old_list_indent!=0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ($i=$list_indent;$i<$old_list_indent;++$i) // Close any ended\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$temp_tpl=($list_type=='ul')?'</ul>':'</ol>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (($list_indent<$old_list_indent) && ($list_indent!=0)) // Go down one final level, because the list tag must have been nested within an li tag (we closed open li tags recursively except for the final one)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='</li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($found_list)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((($list_indent-$old_list_indent)>1) && (!$lax))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_LIST_JUMPYNESS'),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor ($i=$old_list_indent;$i<$list_indent;++$i) // Or open any started\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($list_type)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 'ul':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ul><li>'; else $temp_tpl='<ul>';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"1\"><li>'; else $temp_tpl='<ol type=\"1\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\t\t\t\t\tif ($i<$list_indent-1) $temp_tpl='<ol type=\"a\"><li>'; else $temp_tpl='<ol type=\"a\">';\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t\tbreak;\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$temp_tpl='<li>';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t$just_ended=true;\n\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t$next='';\n\t\t\t\t\t\t\t$pos=$scan_pos+2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && ($print_mode) && ($list_indent==0)) // We might need to put some queued up stuff here: when we print, we can't float thumbnails\n\t\t\t\t\t{\n\t\t\t\t\t\t$tag_output->attach($queued_tempcode);\n\t\t\t\t\t\t$queued_tempcode=new ocp_tempcode();\n\t\t\t\t\t}\n\t\t\t\t\tif (($next==chr(10)) && ($white_space_area) && (!$in_semihtml) && ((!$just_ended) || ($semiparse_mode) || (substr($comcode,$pos,3)==' - '))) // Hard-new-lines\n\t\t\t\t\t{\n\t\t\t\t\t\t++$NUM_LINES;\n\t\t\t\t\t\t$line_starting=true;\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\tif (($list_indent==0) && (!$just_ended))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\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$just_new_line=false;\n\n\t\t\t\t\t\tif (($next==' ') && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($line_starting) || (($pos>1) && ($comcode[$pos-2]==' '))) // Hard spaces\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$next=' ';\n\t\t\t\t\t\t\t\t++$none_wrap_length;\n\t\t\t\t\t\t\t} else $none_wrap_length=0;\n\t\t\t\t\t\t\t$continuation.=($mindless_mode && $in_code_tag)?escape_html($next):$next;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (($next==\"\\t\") && ($white_space_area) && (!$in_semihtml))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t$tab_tpl=do_template('COMCODE_TEXTCODE_TAB');\n\t\t\t\t\t\t\t$_tab_tpl=$tab_tpl->evaluate();\n\t\t\t\t\t\t\t$none_wrap_length+=strlen($_tab_tpl);\n\t\t\t\t\t\t\t$tag_output->attach($tab_tpl);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($next==' ') || ($next==\"\\t\") || ($just_ended)) $none_wrap_length=0; else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((!is_null($wrap_pos)) && ($none_wrap_length>=$wrap_pos) && ((strtolower(get_charset())!='utf-8') || (preg_replace(array('#[\\x09\\x0A\\x0D\\x20-\\x7E]#','#[\\xC2-\\xDF][\\x80-\\xBF]#','#\\xE0[\\xA0-\\xBF][\\x80-\\xBF]#','#[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}#','#\\xED[\\x80-\\x9F][\\x80-\\xBF]#','#\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}#','#[\\xF1-\\xF3][\\x80-\\xBF]{3}#','#\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2}#'),array('','','','','','','',''),$continuation)=='')) && ($textual_area) && (!$in_semihtml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t$temp_tpl='<br />';\n\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t\t\t\t\t$none_wrap_length=0;\n\t\t\t\t\t\t\t\t} elseif ($textual_area) ++$none_wrap_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$line_starting=false;\n\t\t\t\t\t\t\t$just_ended=false;\n\n\t\t\t\t\t\t\t$differented=false; // If somehow via lookahead we've changed this to HTML and thus won't use it in raw form\n\n\t\t\t\t\t\t\t// Variable lookahead\n\t\t\t\t\t\t\tif ((!$in_code_tag) && (($next=='{') && (isset($comcode[$pos])) && (($comcode[$pos]=='$') || ($comcode[$pos]=='+') || ($comcode[$pos]=='!'))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($comcode_dangerous)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_code_tag) && ((!$semiparse_mode) || (in_tag_stack($tag_stack,array('url','img','flash')))))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='+')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_end=$pos+5;\n\t\t\t\t\t\t\t\t\t\t\twhile ($p_end<$len)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos-1,$p_end-($pos-1)+5);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count($p_portion,'{+START')==substr_count($p_portion,'{+END')) break;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_end++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len=1;\n\t\t\t\t\t\t\t\t\t\t\twhile ($pos+$p_len<$len)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos-1,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t\tif (substr_count(str_replace('{',' { ',$p_portion),'{')==substr_count(str_replace('}',' } ',$p_portion),'}')) break; // str_replace is to workaround a Quercus bug #4494\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$p_len--;\n\t\t\t\t\t\t\t\t\t\t\t$p_portion=substr($comcode,$pos+$p_len,$p_end-($pos+$p_len));\n\t\t\t\t\t\t\t\t\t\t\trequire_code('tempcode_compiler');\n\t\t\t\t\t\t\t\t\t\t\t$ret=template_to_tempcode(substr($comcode,$pos-1,$p_len+1).'{DIRECTIVE_EMBEDMENT}'.substr($comcode,$p_end,6));\n\t\t\t\t\t\t\t\t\t\t\t$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t$ret->singular_bind('DIRECTIVE_EMBEDMENT',comcode_text_to_tempcode($p_portion,$source_member,$as_admin,$wrap_pos,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=$pos+$p_len;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_end+6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telseif ($comcode[$pos]=='!')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t\tif (($ret->parameterless(0)) && ($pos<$len)) // We want to take the lang string reference as Comcode if it's a simple lang string reference with no parameters\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\{\\!([\\w\\d\\_\\:]+)(\\}|$)#U',substr($comcode,$less_pos,$p_len-$less_pos),$matches)!=0) // Hacky code to extract the lang string name\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\t$temp_lang_string=$matches[1];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ret=comcode_lang_string($temp_lang_string); // Recreate as a Comcode lang string\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}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$p_len=$pos;\n\t\t\t\t\t\t\t\t\t\t\t$balance=1;\n\t\t\t\t\t\t\t\t\t\t\twhile (($p_len<$len) && ($balance!=0))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($comcode[$p_len]=='{') $balance++; elseif ($comcode[$p_len]=='}') $balance--;\n\t\t\t\t\t\t\t\t\t\t\t\t$p_len++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$ret=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$less_pos=$pos-1;\n\t\t\t\t\t\t\t\t\t\t\t$ret->parse_from($comcode,$less_pos,$p_len);\n\t\t\t\t\t\t\t\t\t\t\t$pos=$p_len;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\tif (($pos<=$len) || (!$lax))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($ret);\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} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($comcode[$pos]=='$') && ($pos<$len-2) && ($comcode[$pos+1]==',') && (strpos($comcode,'}',$pos)!==false))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$pos=strpos($comcode,'}',$pos)+1;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t// Escaping of comcode tag starts lookahead\n\t\t\t\t\t\t\tif (($next=='\\\\') && (!$in_code_tag)) // We are changing \\[ to [ with the side-effect of blocking a tag start. To get \\[ literal, we need the symbols \\\\[... and add extra \\-pairs as needed. We are only dealing with \\ and [ (update: and now {) here, it's not a further extended means of escaping.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($pos!=$len) && (($comcode[$pos]=='\"') || (substr($comcode,$pos-1,6)=='"')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=$mindless_mode?'"':'\"';\n\t\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='"';\n\t\t\t\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='['))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='[';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos!=$len) && ($comcode[$pos]=='{'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='{';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (($pos==$len) || ($comcode[$pos]=='\\\\'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($semiparse_mode) $continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t$continuation.='\\\\';\n\t\t\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t\t\t\t$differented=true;\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\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ((($textual_area) || ($in_semihtml)) && (trim($next)!='') && (!$wml))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Emoticon lookahead\n\t\t\t\t\t\t\t\t\tforeach ($smilies as $smiley=>$imgcode)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($in_semihtml) $smiley=' '.$smiley.' ';\n\n\t\t\t\t\t\t\t\t\t\tif ($next==$smiley[0]) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($comcode,$pos-1,strlen($smiley))==$smiley)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($smiley)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_emoticon($imgcode));\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t\t\tif ((trim($next)!='') && (!$in_code_tag) && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// CEDI pages\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='[') && ($pos+1<$len) && ($comcode[$pos]=='[') && (!$semiparse_mode) && (addon_installed('cedi')))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\[([^\\[\\]]*)\\]\\]#',substr($comcode,$pos,200),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$cedi_page_name=$matches[1];\n\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t$hash_pos=strpos($cedi_page_name,'#');\n\t\t\t\t\t\t\t\t\t\tif ($hash_pos!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$jump_to=substr($cedi_page_name,$hash_pos+1);\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_name=substr($cedi_page_name,0,$hash_pos);\n\t\t\t\t\t\t\t\t\t\t} else $jump_to='';\n\t\t\t\t\t\t\t\t\t\t$cedi_page_url=build_url(array('page'=>'cedi','type'=>'misc','find'=>$cedi_page_name),get_module_zone('cedi'));\n\t\t\t\t\t\t\t\t\t\tif ($jump_to!='')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$cedi_page_url->attach('#'.$jump_to);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_CEDI_LINK',array('_GUID'=>'ebcd7ba5290c5b2513272a53b4d666e5','URL'=>$cedi_page_url,'TEXT'=>$cedi_page_name)));\n\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Usernames\n\t\t\t\t\t\t\t\tif (($pos<$len) && ($next=='{') && ($pos+1<$len) && ($comcode[$pos]=='{') && (!$in_code_tag) && (!$semiparse_mode))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\tif (preg_match('#^\\{([^\"{}&\\'\\$<>]+)\\}\\}#',substr($comcode,$pos,80),$matches)!=0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$username=$matches[1];\n\n\t\t\t\t\t\t\t\t\t\tif ($username[0]=='?')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$username_info=true;\n\t\t\t\t\t\t\t\t\t\t\t$username=substr($username,1);\n\t\t\t\t\t\t\t\t\t\t} else $username_info=false;\n\t\t\t\t\t\t\t\t\t\t$this_member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($username);\n\t\t\t\t\t\t\t\t\t\tif ((!is_null($this_member_id)) && (!is_guest($this_member_id)))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\n\t\t\t\t\t\t\t\t\t\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url($this_member_id,false,true);\n\t\t\t\t\t\t\t\t\t\t\tif ((get_forum_type()=='ocf') && ($username_info))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('ocf');\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('ocf_members2');\n\t\t\t\t\t\t\t\t\t\t\t\t$details=ocf_show_member_box($this_member_id);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('HYPERLINK_TOOLTIP',array('_GUID'=>'d8f4f4ac70bd52b3ef9ee74ae9c5e085','TOOLTIP'=>$details,'CAPTION'=>$username,'URL'=>$poster_url,'NEW_WINDOW'=>false)));\n\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(hyperlink($poster_url,$username));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[1])+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Shortcut lookahead\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($in_semihtml) && (substr($comcode,$pos-1,3)=='-->')) // To stop shortcut interpretation\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.='-->';\n\t\t\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tforeach ($shortcuts as $code=>$replacement)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (($next==$code[0]) && (substr($comcode,$pos-1,strlen($code))==$code))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($code)-1;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($replacement);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($replacement);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\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}\n\n\t\t\t\t\t\t\tif (($textual_area) && (!$in_code_tag) && (trim($next)!='') && (!$differented))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Table syntax\n\t\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($pos<$len) && ($comcode[$pos]=='|'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$end_tbl=strpos($comcode,chr(10).'|}',$pos);\n\t\t\t\t\t\t\t\t\t\tif ($end_tbl!==false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$end_fst_line_pos=strpos($comcode,chr(10),$pos);\n\t\t\t\t\t\t\t\t\t\t\t$caption=substr($comcode,$pos+2,max($end_fst_line_pos-$pos-2,0));\n\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($caption)+1;\n\n\t\t\t\t\t\t\t\t\t\t\t$rows=preg_split('#(\\|-|\\|\\})#Um',substr($comcode,$pos,$end_tbl-$pos));\n\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)floats($|\\s)#',$caption)!=0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$caption=preg_replace('#(^|\\s)floats($|\\s)#','',$caption);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=0)\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\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $h=>$row)\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\tif ($h!=0) $tag_output->attach(do_template('BLOCK_SEPARATOR'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$num_cells_in_row=count($cells)/2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inter_padding=3.0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_box_width=(100.0-$inter_padding*($num_cells_in_row-1));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Find which to float\n\t\t\t\t\t\t\t\t\t\t\t\t\t$to_float=NULL;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\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\tif (!$spec)\n\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\tif ((strpos($cell,'!')!==false) || (is_null($to_float))) $to_float=$i;\n\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$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do floated one\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_1=(($to_float==1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$i_dir_2=(($to_float!=1)?'left':'right');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($num_cells_in_row===1)\n\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$padding_amount='0';\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$padding_amount=float_to_raw_string($inter_padding,2);\n\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\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\n\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$cell_i=($to_float===1)?0:(count($cells)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\n\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$width=$ratios[$cell_i];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\n\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE_START',array('_GUID'=>'ced8c3a142f74296a464b085ba6891c9','WIDTH'=>$width,'FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_START',array('_GUID'=>'90be72fcbb6b9d8a312da0bee5b86cb3','WIDTH'=>array_key_exists($to_float,$ratios)?$ratios[$to_float]:'','FLOAT'=>$i_dir_1,'PADDING'=>($to_float==1)?'':'-left','PADDING_AMOUNT'=>$padding_amount)));\n\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$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(isset($cells[$to_float])?rtrim($cells[$to_float]):'',$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\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$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cells[$to_float],$pos);\n\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Do non-floated ones\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\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\tif ($i%2==1)\n\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\tif ($i!=$to_float)\n\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$padding_amount=float_to_raw_string($inter_padding,2);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (array_key_exists($cell_i,$ratios))\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\t$width=$ratios[$cell_i];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\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\t$width=float_to_raw_string($total_box_width/$num_cells_in_row,2).'%';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\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\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WIDE2_START',array('_GUID'=>'9bac42a1b62c5c9a2f758639fcb3bb2f','WIDTH'=>$width,'PADDING_AMOUNT'=>$padding_amount,'FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\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\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_2_START',array('_GUID'=>'0f15f9d5554635ed7ac154c9dc5c72b8','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','FLOAT'=>$i_dir_1,'PADDING'=>(($to_float==1)||($cell_i!=0))?'-left':'','PADDING_AMOUNT'=>$padding_amount)));\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$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\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\t$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\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$tag_output->attach(do_template('COMCODE_FAKE_TABLE_END'));\n\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$cell_i++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_FAKE_TABLE_WRAP_END'));\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} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios=array();\n\t\t\t\t\t\t\t\t\t\t\t\t$ratios_matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)([\\d\\.]+%(:[\\d\\.]+%)*)($|\\s)#',$caption,$ratios_matches)!=0)\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\t$ratios=explode(':',$ratios_matches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$caption=str_replace($ratios_matches[0],'',$caption);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#(^|\\s)wide($|\\s)#',$caption)!=0)\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\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START',array('SUMMARY'=>preg_replace('#(^|\\s)wide($|\\s)#','',$caption))));\n\t\t\t\t\t\t\t\t\t\t\t\t} else\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\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_START_SUMMARY',array('_GUID'=>'0c5674fba61ba14b4b9fa39ea31ff54f','CAPTION'=>$caption)));\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\tforeach ($rows as $table_row)\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\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_START'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cells=preg_split('/(\\n\\! | \\!\\! |\\n\\| | \\|\\| )/',$table_row,-1,PREG_SPLIT_DELIM_CAPTURE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($cells); // First one is non-existant empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t$spec=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$c_type='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($cells as $i=>$cell)\n\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\tif ($spec)\n\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$c_type=(strpos($cell,'!')!==false)?'th':'td';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$attaches_before=count($COMCODE_ATTACHMENTS[$pass_id]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_mid=comcode_text_to_tempcode(rtrim($cell),$source_member,$as_admin,60,$pass_id,$connection,$semiparse_mode,$preparse_mode,$in_semihtml,$structure_sweep,$check_only,$highlight_bits,$on_behalf_of_member);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($attach_inspect=$attaches_before;$attach_inspect<count($COMCODE_ATTACHMENTS[$pass_id]);$attach_inspect++)\n\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$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker']+=strpos($comcode,$cell,$pos);\n\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$tag_output->attach(do_template('COMCODE_REAL_TABLE_CELL',array('_GUID'=>'6640df8b503f65e3d36f595b0acf7600','WIDTH'=>array_key_exists($cell_i,$ratios)?$ratios[$cell_i]:'','C_TYPE'=>$c_type,'MID'=>$_mid,'PADDING'=>($cell_i==0)?'':'-left','PADDING_AMOUNT'=>(count($cells)==2)?'0':float_to_raw_string(5.0/(floatval(count($cells)-2)/2.0),2))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cell_i++;\n\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$spec=!$spec;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_ROW_END'));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach(do_template('COMCODE_REAL_TABLE_END'));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$pos=$end_tbl+3;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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\n\t\t\t\t\t\t\t\t// Advertising\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$semiparse_mode) && (!$in_code_tag) && (addon_installed('banners')) && (($b_all) || (!has_specific_permission($source_member,'banner_free'))))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Pick up correctly, including permission filtering\n\t\t\t\t\t\t\t\t\tif (is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ADVERTISING_BANNERS=array();\n\n\t\t\t\t\t\t\t\t\t\t$rows=$GLOBALS['SITE_DB']->query('SELECT * FROM '.get_table_prefix().'banners b LEFT JOIN '.get_table_prefix().'banner_types t ON b.b_type=t.id WHERE t_comcode_inline=1 AND '.db_string_not_equal_to('b_title_text',''),NULL,NULL,true);\n\t\t\t\t\t\t\t\t\t\tif (!is_null($rows))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Filter out what we don't have permission for\n\t\t\t\t\t\t\t\t\t\t\tif (get_option('use_banner_permissions',true)=='1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\trequire_code('permissions');\n\t\t\t\t\t\t\t\t\t\t\t\t$groups=_get_where_clause_groups($source_member);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($groups))\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\t$perhaps=collapse_1d_complexity('category_name',$GLOBALS['SITE_DB']->query('SELECT category_name FROM '.get_table_prefix().'group_category_access WHERE '.db_string_equal_to('module_the_name','banners').' AND ('.$groups.')'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_rows=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\n\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\tif (in_array($row['name'],$perhaps)) $new_rows[]=$row;\n\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$rows=$new_rows;\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}\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($rows as $row)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$trigger_text=$row['b_title_text'];\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (explode(',',$trigger_text) as $t)\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (trim($t)!='') $ADVERTISING_BANNERS[trim($t)]=$row;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Apply\n\t\t\t\t\t\t\t\t\tif (!is_null($ADVERTISING_BANNERS))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($ADVERTISING_BANNERS as $ad_trigger=>$ad_bits)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($ad_trigger[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($ad_trigger)))==strtolower($ad_trigger))\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\trequire_code('banners');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ad_text=show_banner($ad_bits['name'],$ad_bits['b_title_text'],get_translated_tempcode($ad_bits['caption']),$ad_bits['img_url'],'',$ad_bits['site_url'],$ad_bits['b_type']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('tooltip',array('param'=>$ad_text,'url'=>(url_is_local($ad_bits['site_url']) && ($ad_bits['site_url']!=''))?(get_custom_base_url().'/'.$ad_bits['site_url']):$ad_bits['site_url']),substr($comcode,$pos-1,strlen($ad_trigger)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($ad_trigger)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\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}\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\n\t\t\t\t\t\t\t\t// Search highlighting lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!is_null($highlight_bits)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($highlight_bits as $highlight_bit)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strtolower($next)==strtolower($highlight_bit[0])) // optimisation\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (strtolower(substr($comcode,$pos-1,strlen($highlight_bit)))==strtolower($highlight_bit))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t\t$differented=true;\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode('highlight',array(),escape_html(substr($comcode,$pos-1,strlen($highlight_bit))),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($highlight_bit)-1;\n\t\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\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\n\t\t\t\t\t\t\t\t// Link lookahead\n\t\t\t\t\t\t\t\tif ((!$differented) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ((!$in_semihtml) && ($next=='h') && ((substr($comcode,$pos-1,strlen('http://'))=='http://') || (substr($comcode,$pos-1,strlen('https://'))=='https://') || (substr($comcode,$pos-1,strlen('ftp://'))=='ftp://')))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$link_end_pos=strpos($comcode,' ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_2=strpos($comcode,chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_3=strpos($comcode,'[',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_4=strpos($comcode,')',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_5=strpos($comcode,'\"',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_6=strpos($comcode,'>',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_7=strpos($comcode,'<',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_8=strpos($comcode,'.'.chr(10),$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_9=strpos($comcode,', ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_10=strpos($comcode,'. ',$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_11=strpos($comcode,\"'\",$pos-1);\n\t\t\t\t\t\t\t\t\t\t$link_end_pos_12=strpos($comcode,' ',$pos-1);\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_2!==false) && (($link_end_pos===false) || ($link_end_pos_2<$link_end_pos))) $link_end_pos=$link_end_pos_2;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_3!==false) && (($link_end_pos===false) || ($link_end_pos_3<$link_end_pos))) $link_end_pos=$link_end_pos_3;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_4!==false) && (($link_end_pos===false) || ($link_end_pos_4<$link_end_pos))) $link_end_pos=$link_end_pos_4;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_5!==false) && (($link_end_pos===false) || ($link_end_pos_5<$link_end_pos))) $link_end_pos=$link_end_pos_5;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_6!==false) && (($link_end_pos===false) || ($link_end_pos_6<$link_end_pos))) $link_end_pos=$link_end_pos_6;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_7!==false) && (($link_end_pos===false) || ($link_end_pos_7<$link_end_pos))) $link_end_pos=$link_end_pos_7;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_8!==false) && (($link_end_pos===false) || ($link_end_pos_8<$link_end_pos))) $link_end_pos=$link_end_pos_8;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_9!==false) && (($link_end_pos===false) || ($link_end_pos_9<$link_end_pos))) $link_end_pos=$link_end_pos_9;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_10!==false) && (($link_end_pos===false) || ($link_end_pos_10<$link_end_pos))) $link_end_pos=$link_end_pos_10;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_11!==false) && (($link_end_pos===false) || ($link_end_pos_11<$link_end_pos))) $link_end_pos=$link_end_pos_11;\n\t\t\t\t\t\t\t\t\t\tif (($link_end_pos_12!==false) && (($link_end_pos===false) || ($link_end_pos_12<$link_end_pos))) $link_end_pos=$link_end_pos_12;\n\t\t\t\t\t\t\t\t\t\tif ($link_end_pos===false) $link_end_pos=strlen($comcode);\n\t\t\t\t\t\t\t\t\t\t$auto_link=preg_replace('#(keep|for)_session=[\\d\\w]*#','filtered=1',substr($comcode,$pos-1,$link_end_pos-$pos+1));\n\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-3)!='://')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (substr($auto_link,-1)=='.')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$auto_link=substr($auto_link,0,strlen($auto_link)-1);\n\t\t\t\t\t\t\t\t\t\t\t\t$link_end_pos--;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\t$auto_link_tempcode->attach($auto_link);\n\t\t\t\t\t\t\t\t\t\t\tif (!$check_only)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=$GLOBALS['SITE_DB']->query_value_null_ok('url_title_cache','t_title',array('t_url'=>$auto_link));\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ((is_null($link_captions_title)) || (substr($link_captions_title,0,1)=='!'))\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\t$GLOBALS['COMCODE_PARSE_URLS_CHECKED']++;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (($GLOBALS['NO_LINK_TITLES']) || ($GLOBALS['COMCODE_PARSE_URLS_CHECKED']>=MAX_URLS_TO_READ))\n\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$link_captions_title=$auto_link;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$link_captions_title='';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$downloaded_at_link=http_download_file($auto_link,3000,false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((is_string($downloaded_at_link)) && ($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE']!==NULL) && (strpos($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'],'html')!==false) && ($GLOBALS['HTTP_MESSAGE']=='200'))\n\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$matches=array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (preg_match('#\\s*<title[^>]*\\s*>\\s*(.*)\\s*\\s*<\\s*/title\\s*>#miU',$downloaded_at_link,$matches)!=0)\n\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\trequire_code('character_sets');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=trim(str_replace('–','-',str_replace('—','-',@html_entity_decode(convert_to_internal_encoding($matches[1]),ENT_QUOTES,get_charset()))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (((strpos(strtolower($link_captions_title),'login')!==false) || (strpos(strtolower($link_captions_title),'log in')!==false)) && (substr($auto_link,0,strlen(get_base_url()))==get_base_url()))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$link_captions_title=''; // don't show login screen titles for our own website. Better to see the link verbatim\n\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}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('url_title_cache',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_url'=>substr($auto_link,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t't_title'=>substr($link_captions_title,0,255),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),false,true); // To stop weird race-like conditions\n\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}\n\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=mixed();\n\t\t\t\t\t\t\t\t\t\t\t\t$link_handlers=find_all_hooks('systems','comcode_link_handlers');\n\t\t\t\t\t\t\t\t\t\t\t\tforeach (array_keys($link_handlers) as $link_handler)\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\trequire_code('hooks/systems/comcode_link_handlers/'.$link_handler);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$link_handler_ob=object_factory('Hook_comcode_link_handler_'.$link_handler,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($link_handler_ob)) continue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$embed_output=$link_handler_ob->bind($auto_link,$link_captions_title,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!is_null($embed_output)) break;\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\tif (is_null($embed_output))\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\t$page_link=url_to_pagelink($auto_link,true);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($link_captions_title=='') $link_captions_title=$auto_link;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($page_link!='')\n\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$embed_output=_do_tags_comcode('page',array('param'=>$page_link),make_string_tempcode(escape_html($link_captions_title)),$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\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$embed_output=_do_tags_comcode('url',array('param'=>$link_captions_title),$auto_link_tempcode,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,$highlight_bits);\n\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}\n\t\t\t\t\t\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($continuation);\n\t\t\t\t\t\t\t\t\t\t\t$continuation='';\n\t\t\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t\t\t$pos+=$link_end_pos-$pos;\n\t\t\t\t\t\t\t\t\t\t\t$differented=true;\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}\n\n\t\t\t\t\t\t\tif (!$differented)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($stupidity_mode!='') && ($textual_area))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($stupidity_mode=='leet') && (mt_rand(0,1)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists(strtoupper($next),$LEET_FILTER)) $next=$LEET_FILTER[strtoupper($next)];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telseif (($stupidity_mode=='bork') && (mt_rand(0,60)==1))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$next.='-bork-bork-bork-';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ((!$in_separate_parse_section) && ((!$in_semihtml) || ((!$comcode_dangerous_html)/*If we don't support HTML and we haven't done the all_semihtml pre-filter at the top*/ && (!$is_all_semihtml)))) // Display char. We try and support entities\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($next=='&')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ahead=substr($comcode,$pos,20);\n\t\t\t\t\t\t\t\t\t\t$ahead_lower=strtolower($ahead);\n\t\t\t\t\t\t\t\t\t\t$matches=array();\n\t\t\t\t\t\t\t\t\t\t$entity=preg_match('#^(\\#)?([\\w]*);#',$ahead_lower,$matches)!=0; // If it is a SAFE entity, use it\n\n\t\t\t\t\t\t\t\t\t\tif (($entity) && (!$in_code_tag))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (($matches[1]=='') && (($in_semihtml) || (isset($ALLOWED_ENTITIES[$matches[2]]))))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$pos+=strlen($matches[2])+1;\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&'.$matches[2].';';\n\t\t\t\t\t\t\t\t\t\t\t} elseif ((is_numeric($matches[2])) && ($matches[1]=='#'))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$matched_entity=intval(base_convert($matches[2],16,10));\n\t\t\t\t\t\t\t\t\t\t\t\tif (($matched_entity<127) && (array_key_exists(chr($matched_entity),$POTENTIAL_JS_NAUGHTY_ARRAY)))\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\t$continuation.=escape_html($next);\n\t\t\t\t\t\t\t\t\t\t\t\t} else\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\t$pos+=strlen($matches[2])+2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&#'.$matches[2].';';\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} else\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$continuation.='&';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$continuation.='&';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$continuation.=escape_html($next);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$continuation.=$next;\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\tbreak;\n\t\t\tcase CCP_IN_TAG_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\t\t$current_attribute_name='param';\n\t\t\t\t}\n\t\t\t\telseif (trim($next)=='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$next=']';\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($close)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($formatting_allowed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($tag_stack)==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($lax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE',$current_tag),strrpos(substr($comcode,0,$pos),'['),$comcode,$check_only);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$has_it=false;\n\t\t\t\t\t\tforeach (array_reverse($tag_stack) as $t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($t[0]==$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$has_it=true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (($in_semihtml) && (($current_tag=='html') || ($current_tag=='semihtml'))) // Only search one level for this\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($has_it)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\tif ($_last[0]!=$current_tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!$lax)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdo\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\n\t\t\t\t\t\t\t\t\tif (count($tag_stack)==0) // Hmm, it was never open. So let's pretend this tag close never happened\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile ($_last[0]!=$current_tag);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraneous_semihtml=((!$is_all_semihtml) && (!$in_semihtml)) || (($current_tag!='html') && ($current_tag!='semihtml'));\n\t\t\t\t\t\t\tif ((!$lax) && ($extraneous_semihtml))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_NO_CLOSE_MATCH',$current_tag,$_last[0]),$pos,$comcode,$check_only);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Do the comcode for this tag\n\t\t\t\t\t\tif ($in_semihtml) // We need to perform some magic to clean up the Comcode sections\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($_last[1] as $index=>$conv)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_last[1][$index]=@html_entity_decode(str_replace('<br />',chr(10),$conv),ENT_QUOTES,get_charset());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mindless_mode=$_last[7];\n\n\t\t\t\t\t\tif ($mindless_mode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$embed_output=$tag_output;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (!$check_only)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\t\t\tif ($structure_sweep)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_structure_sweep=!in_tag_stack($tag_stack,array('title'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$_structure_sweep,$semiparse_mode,$highlight_bits,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t\t\t} else $embed_output=new ocp_tempcode();\n\n\t\t\t\t\t\t$in_code_tag=false;\n\t\t\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t\t\t\tif (($print_mode) && ($_last[0]=='exp_thumb'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$queued_tempcode->attach($embed_output);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$just_ended=isset($BLOCK_TAGS[$current_tag]);\n\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((strlen($comcode)>$pos+1) && ($comcode[$pos]==chr(10)) && ($comcode[$pos+1]==chr(10))) // Linux newline\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$NUM_LINES+=2;\n\t\t\t\t\t\t\t\t$pos+=2;\n\t\t\t\t\t\t\t\t$just_new_line=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($current_tag=='html') $in_html=false;\n\t\t\t\t\t\telseif ($current_tag=='semihtml') $in_semihtml=false;\n\t\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\tif (($close) && ($mindless_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp_tpl='</kbd>​';\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($temp_tpl);\n\t\t\t\t\t\t$tag_output->attach($temp_tpl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($status==CCP_IN_TAG_NAME) $current_tag.=strtolower($next);\n\t\t\t\tbreak;\n\t\t\tcase CCP_STARTING_TAG:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actual occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t}\n\t\t\t\telseif ($next=='/')\n\t\t\t\t{\n\t\t\t\t\t$close=true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_tag.=strtolower($next);\n\t\t\t\t\t$status=CCP_IN_TAG_NAME;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTES:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_NAME;\n\t\t\t\t\t$current_attribute_name=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_NAME:\n\t\t\t\tif (($mindless_mode) && ($next!='[')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_NO_MANS_LAND;\n\t\t\t\t\t$pos--;\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($current_tag=='title')\n\t\t\t\t\t{\n\t\t\t\t\t\t$just_new_line=false;\n\t\t\t\t\t\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\t\t\t\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t\t\t\t\t\t$tag_output->attach($close_list);\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif (($attribute_map==array()) && (!$lax))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($attribute_map!=array())\n\t\t\t\t\t{\n\t\t\t\t\t\t$at_map_keys=array_keys($attribute_map);\n\t\t\t\t\t\t$old_attribute_name=$at_map_keys[count($at_map_keys)-1];\n\t\t\t\t\t\t$attribute_map[$old_attribute_name].=' '.$current_attribute_name;\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($tag_stack,array($current_tag,$attribute_map,$tag_output,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area,$mindless_mode,$comcode_dangerous,$comcode_dangerous_html));\n\n\t\t\t\t\tlist($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);\n\t\t\t\t\tif ($in_code_tag) $code_nest_stack=0;\n\n\t\t\t\t\t$tag_output->attach($tag_raw);\n\t\t\t\t}\n\t\t\t\telseif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif ($next!=' ') $current_attribute_name.=strtolower($next);\n\t\t\t\telse $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT;\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;\n\t\t\t\telseif (trim($next)!='')\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_ATTRIBUTE_ERROR',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\tif ($next=='[')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($next==']')\n\t\t\t\t\t{\n\t\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t\t$pos--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT:\n\t\t\t\tif (($mindless_mode) && ($next!='[') && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next=='[') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_OPEN_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ($next==']') // Can't actually occur though\n\t\t\t\t{\n\t\t\t\t\tif (!$lax) return comcode_parse_error($preparse_mode,array('CCP_TAG_CLOSE_ANOMALY'),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telseif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='"')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE;\n\t\t\t\t\t$current_attribute_value='';\n\t\t\t\t}\n\t\t\t\telseif ($next!='')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE;\n\t\t\t\t\t$current_attribute_value=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE:\n\t\t\t\tif (($mindless_mode) && ($next!=']')) $tag_raw.=($next);\n\n\t\t\t\tif ($next==' ')\n\t\t\t\t{\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telseif ($next==']')\n\t\t\t\t{\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t\t$pos--;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CCP_IN_TAG_ATTRIBUTE_VALUE:\n\t\t\t\tif ($mindless_mode) $tag_raw.=($next);\n\n\t\t\t\tif ((($next=='\"')/* && (!$in_semihtml)*/) || (($in_semihtml) && (substr($comcode,$pos-1,6)=='"')))\n\t\t\t\t{\n\t\t\t\t\tif ($next!='\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos+=5;\n\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='quot;';\n\t\t\t\t\t}\n\t\t\t\t\t$status=CCP_IN_TAG_BETWEEN_ATTRIBUTES;\n\t\t\t\t\tif ((isset($attribute_map[$current_attribute_name])) && (!$lax)) return comcode_parse_error($preparse_mode,array('CCP_DUPLICATE_ATTRIBUTES',$current_attribute_name,$current_tag),$pos,$comcode,$check_only);\n\t\t\t\t\t$attribute_map[$current_attribute_name]=$current_attribute_value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($next=='\\\\')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($comcode[$pos]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='"';\n\t\t\t\t\t\t\t$current_attribute_value.='\"';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} elseif (substr($comcode,$pos-1,6)=='"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='"';\n\t\t\t\t\t\t\t$current_attribute_value.='"';\n\t\t\t\t\t\t\t$pos+=6;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($comcode[$pos]=='\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($mindless_mode) $tag_raw.='\\\\';\n\t\t\t\t\t\t\t$current_attribute_value.='\\\\';\n\t\t\t\t\t\t\t++$pos;\n\t\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t\t} else $current_attribute_value.=$next;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($continuation);\n\t$tag_output->attach($continuation);\n\t$continuation='';\n\n\tlist($close_list,$list_indent)=_close_open_lists($list_indent,$list_type);\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($close_list);\n\t$tag_output->attach($close_list);\n\n\tif (($status!=CCP_NO_MANS_LAND) || (count($tag_stack)!=0))\n\t{\n\t\tif (!$lax)\n\t\t{\n\t\t\t$stack_top=array_pop($tag_stack);\n\t\t\treturn comcode_parse_error($preparse_mode,array('CCP_BROKEN_END',is_null($stack_top)?$current_tag:$stack_top[0]),$pos,$comcode,$check_only);\n\t\t} else\n\t\t{\n\t\t\twhile (count($tag_stack)>0)\n\t\t\t{\n\t\t\t\t$_last=array_pop($tag_stack);\n\t\t\t\t/*if ($_last[0]=='title') Not sure about this\n\t\t\t\t{\n\t\t\t\t\t$_structure_sweep=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}*/\n\t\t\t\t$embed_output=_do_tags_comcode($_last[0],$_last[1],$tag_output,$comcode_dangerous,$pass_id,$pos,$source_member,$as_admin,$connection,$comcode,$wml,$structure_sweep,$semiparse_mode,NULL,NULL,$in_semihtml,$is_all_semihtml);\n\t\t\t\t$in_code_tag=false;\n\t\t\t\t$white_space_area=$_last[3];\n\t\t\t\t$in_separate_parse_section=$_last[4];\n\t\t\t\t$formatting_allowed=$_last[5];\n\t\t\t\t$textual_area=$_last[6];\n\t\t\t\t$tag_output=$_last[2];\n\t\t\t\t$tag_output->attach($embed_output);\n\t\t\t\t$mindless_mode=$_last[7];\n\t\t\t\t$comcode_dangerous=$_last[8];\n\t\t\t\t$comcode_dangerous_html=$_last[9];\n\t\t\t}\n\t\t}\n\t}\n\n//\t$tag_output->left_attach('<div class=\"xhtml_validator_off\">');\n//\t$tag_output->attach('</div>');\n\n\treturn $tag_output;\n}",
"function MobileDetected() \n{\n\t$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);\n\t$accept = strtolower($_SERVER['HTTP_ACCEPT']);\n \n\tif( strpos($accept,'text/vnd.wap.wml')!==false || strpos($accept,'application/vnd.wap.xhtml+xml')!==false ) \n\t\treturn 1; // Mobile browser detected by HTTP-headers\n \n\tif( isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']) ) \n\t\treturn 2; // Mobile browser detected by server settings\n\n\n\tif(preg_match('/(ipad|android|symbianos|opera mini|ipod|blackberry|'.\n\t\t'palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine|iris|3g_t|'.\n\t\t'windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile|'.\n\t\t'mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|'.\n\t\t'wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|'.\n\t\t'lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|'.\n\t\t'mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|'.\n\t\t'm881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|'.\n\t\t'r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|'.\n\t\t'i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|'.\n\t\t'htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|'.\n\t\t'sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|'.\n\t\t'p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|'.\n\t\t'_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|'.\n\t\t's800|8325rc|ac831|mw200|brew |d88|htc\\/|htc_touch|355x|m50|km100|'.\n\t\t'd736|p-9521|telco|sl74|ktouch|m4u\\/|me702|8325rc|kddi|phone|lg |'.\n\t\t'sonyericsson|samsung|240x|x320vx10|nokia|sony cmd|motorola|'.\n\t\t'up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|'.\n\t\t'pocket|kindle|silk|hpwos|mobile|psp|treo)/', $user_agent)) \n\t{\n\t\treturn 3; // Mobile browser detected by User Agent signature\n\t}\n\n\tif(in_array(substr($user_agent,0,4),\n\t\tArray(\"1207\", \"3gso\", \"4thp\", \"501i\", \"502i\", \"503i\", \"504i\", \"505i\", \"506i\",\n\t\t\t \"6310\", \"6590\", \"770s\", \"802s\", \"a wa\", \"abac\", \"acer\", \"acoo\", \"acs-\",\n\t\t\t \"aiko\", \"airn\", \"alav\", \"alca\", \"alco\", \"amoi\", \"anex\", \"anny\", \"anyw\",\n\t\t\t \"aptu\", \"arch\", \"argo\", \"aste\", \"asus\", \"attw\", \"au-m\", \"audi\", \"aur \",\n\t\t\t \"aus \", \"avan\", \"beck\", \"bell\", \"benq\", \"bilb\", \"bird\", \"blac\", \"blaz\",\n\t\t\t \"brew\", \"brvw\", \"bumb\", \"bw-n\", \"bw-u\", \"c55/\", \"capi\", \"ccwa\", \"cdm-\",\n\t\t\t \"cell\", \"chtm\", \"cldc\", \"cmd-\", \"cond\", \"craw\", \"dait\", \"dall\", \"dang\",\n\t\t\t \"dbte\", \"dc-s\", \"devi\", \"dica\", \"dmob\", \"doco\", \"dopo\", \"ds-d\", \"ds12\",\n\t\t\t \"el49\", \"elai\", \"eml2\", \"emul\", \"eric\", \"erk0\", \"esl8\", \"ez40\", \"ez60\",\n\t\t\t \"ez70\", \"ezos\", \"ezwa\", \"ezze\", \"fake\", \"fetc\", \"fly-\", \"fly_\", \"g-mo\",\n\t\t\t \"g1 u\", \"g560\", \"gene\", \"gf-5\", \"go.w\", \"good\", \"grad\", \"grun\", \"haie\",\n\t\t\t \"hcit\", \"hd-m\", \"hd-p\", \"hd-t\", \"hei-\", \"hiba\", \"hipt\", \"hita\", \"hp i\",\n\t\t\t \"hpip\", \"hs-c\", \"htc \", \"htc-\", \"htc_\", \"htca\", \"htcg\", \"htcp\", \"htcs\",\n\t\t\t \"htct\", \"http\", \"huaw\", \"hutc\", \"i-20\", \"i-go\", \"i-ma\", \"i230\", \"iac\",\n\t\t\t \"iac-\", \"iac/\", \"ibro\", \"idea\", \"ig01\", \"ikom\", \"im1k\", \"inno\", \"ipaq\",\n\t\t\t \"iris\", \"jata\", \"java\", \"jbro\", \"jemu\", \"jigs\", \"kddi\", \"keji\", \"kgt\",\n\t\t\t \"kgt/\", \"klon\", \"kpt \", \"kwc-\", \"kyoc\", \"kyok\", \"leno\", \"lexi\", \"lg g\",\n\t\t\t \"lg-a\", \"lg-b\", \"lg-c\", \"lg-d\", \"lg-f\", \"lg-g\", \"lg-k\", \"lg-l\", \"lg-m\",\n\t\t\t \"lg-o\", \"lg-p\", \"lg-s\", \"lg-t\", \"lg-u\", \"lg-w\", \"lg/k\", \"lg/l\", \"lg/u\",\n\t\t\t \"lg50\", \"lg54\", \"lge-\", \"lge/\", \"libw\", \"lynx\", \"m-cr\", \"m1-w\", \"m3ga\",\n\t\t\t \"m50/\", \"mate\", \"maui\", \"maxo\", \"mc01\", \"mc21\", \"mcca\", \"medi\", \"merc\",\n\t\t\t \"meri\", \"midp\", \"mio8\", \"mioa\", \"mits\", \"mmef\", \"mo01\", \"mo02\", \"mobi\",\n\t\t\t \"mode\", \"modo\", \"mot \", \"mot-\", \"moto\", \"motv\", \"mozz\", \"mt50\", \"mtp1\",\n\t\t\t \"mtv \", \"mwbp\", \"mywa\", \"n100\", \"n101\", \"n102\", \"n202\", \"n203\", \"n300\",\n\t\t\t \"n302\", \"n500\", \"n502\", \"n505\", \"n700\", \"n701\", \"n710\", \"nec-\", \"nem-\",\n\t\t\t \"neon\", \"netf\", \"newg\", \"newt\", \"nok6\", \"noki\", \"nzph\", \"o2 x\", \"o2-x\",\n\t\t\t \"o2im\", \"opti\", \"opwv\", \"oran\", \"owg1\", \"p800\", \"palm\", \"pana\", \"pand\",\n\t\t\t \"pant\", \"pdxg\", \"pg-1\", \"pg-2\", \"pg-3\", \"pg-6\", \"pg-8\", \"pg-c\", \"pg13\",\n\t\t\t \"phil\", \"pire\", \"play\", \"pluc\", \"pn-2\", \"pock\", \"port\", \"pose\", \"prox\",\n\t\t\t \"psio\", \"pt-g\", \"qa-a\", \"qc-2\", \"qc-3\", \"qc-5\", \"qc-7\", \"qc07\", \"qc12\",\n\t\t\t \"qc21\", \"qc32\", \"qc60\", \"qci-\", \"qtek\", \"qwap\", \"r380\", \"r600\", \"raks\",\n\t\t\t \"rim9\", \"rove\", \"rozo\", \"s55/\", \"sage\", \"sama\", \"samm\", \"sams\", \"sany\",\n\t\t\t \"sava\", \"sc01\", \"sch-\", \"scoo\", \"scp-\", \"sdk/\", \"se47\", \"sec-\", \"sec0\",\n\t\t\t \"sec1\", \"semc\", \"send\", \"seri\", \"sgh-\", \"shar\", \"sie-\", \"siem\", \"sk-0\",\n\t\t\t \"sl45\", \"slid\", \"smal\", \"smar\", \"smb3\", \"smit\", \"smt5\", \"soft\", \"sony\",\n\t\t\t \"sp01\", \"sph-\", \"spv \", \"spv-\", \"sy01\", \"symb\", \"t-mo\", \"t218\", \"t250\",\n\t\t\t \"t600\", \"t610\", \"t618\", \"tagt\", \"talk\", \"tcl-\", \"tdg-\", \"teli\", \"telm\",\n\t\t\t \"tim-\", \"topl\", \"tosh\", \"treo\", \"ts70\", \"tsm-\", \"tsm3\", \"tsm5\", \"tx-9\",\n\t\t\t \"up.b\", \"upg1\", \"upsi\", \"utst\", \"v400\", \"v750\", \"veri\", \"virg\", \"vite\",\n\t\t\t \"vk-v\", \"vk40\", \"vk50\", \"vk52\", \"vk53\", \"vm40\", \"voda\", \"vulc\", \"vx52\",\n\t\t\t \"vx53\", \"vx60\", \"vx61\", \"vx70\", \"vx80\", \"vx81\", \"vx83\", \"vx85\", \"vx98\",\n\t\t\t \"w3c \", \"w3c-\", \"wap-\", \"wapa\", \"wapi\", \"wapj\", \"wapm\", \"wapp\", \"wapr\",\n\t\t\t \"waps\", \"wapt\", \"wapu\", \"wapv\", \"wapy\", \"webc\", \"whit\", \"wig \", \"winc\",\n\t\t\t \"winw\", \"wmlb\", \"wonu\", \"x700\", \"xda-\", \"xda2\", \"xdag\", \"yas-\", \"your\",\n\t\t\t \"zeto\", \"zte-\"))) \n\t{\n\t\treturn 4; // Mobile browser detected by User Agent signature\n\t}\n\n\treturn false; // Mobile browser not found\n}",
"public function parseHtml($html)\n {\n // So as a quick fix, we'll str_replace those ahead of time\n // and then keep the Xpath parser consistent.\n $html = str_replace(\n [\n '<td>Vendor:</td>',\n '<td>Reference Number:</td>',\n '<td>Contract Date:</td>',\n '<td>Description of Work:</td>',\n '<td>Contract Period :</td>',\n '<td>Contract Period:</td>',\n '<td>Delivery Date:</td>',\n '<td>Contract Value:</td>',\n '<td>Comments:</td>',\n // Fixes for eg.\n // https://www.statcan.gc.ca/eng/about/contract/2004/62700-04-0035\n '<th class=\"row-stub\" scope=\"row\">Nom du vendeur:</th>',\n '<th class=\"row-stub\" scope=\"row\">Numéro de référence :</th>',\n '<th class=\"row-stub\" scope=\"row\">Description of Work:</th>',\n ],\n [\n '<th scope=\"row\">Vendor:</th>',\n '<th scope=\"row\">Reference Number:</th>',\n '<th scope=\"row\">Contract Date:</th>',\n '<th scope=\"row\">Description of Work:</th>',\n '<th scope=\"row\">Contract Period :</th>',\n '<th scope=\"row\">Contract Period :</th>',\n '<th scope=\"row\">Delivery Date:</th>',\n '<th scope=\"row\">Contract Value:</th>',\n '<th scope=\"row\">Comments:</th>',\n // Replacements per above\n '<th scope=\"row\">Vendor:</th>',\n '<th scope=\"row\">Reference Number:</th>',\n '<th scope=\"row\">Description of Work:</th>',\n\n ],\n $html\n );\n\n $keyArray = [\n 'vendorName' => 'Vendor',\n 'referenceNumber' => 'Reference Number',\n 'contractDate' => 'Contract Date',\n 'description' => 'Description of work',\n 'extraDescription' => 'Detailed Description',\n 'contractPeriodStart' => '',\n 'contractPeriodEnd' => '',\n 'contractPeriodRange' => 'Contract Period',\n 'deliveryDate' => 'Delivery Date',\n 'originalValue' => 'Original Contract Value',\n 'contractValue' => 'Contract Value',\n 'comments' => 'Comments',\n ];\n\n return Parsers::extractContractDataViaGenericXpathParser($html, \"//table//th[@scope='row']\", \"//table//td\", ' to ', $keyArray);\n }",
"function parse_ch1_text($tlv) {\r\n $this->unpack_all_TLVs($tlv);\r\n if (isset($this->tbt[257])) {\r\n $arr = unpack('n1charset/n1subset', substr($this->tbt[257]['value'], 0, 4));\r\n $arr['text'] = $this->decode_text(substr($this->tbt[257]['value'], 4), $arr['charset'], $arr['subset']);\r\n return $arr;\r\n } else {\r\n $this->error('Unknown incoming message format', __FILE__, __LINE__);\r\n return array('text' => '');\r\n }\r\n }",
"public function testDoesNotMatchMultiplePhoneNumbersSeparatedWithNoWhiteSpace()\n {\n $text = 'Call 650-253-4561--455-234-3451';\n $region = RegionCode::US;\n\n $this->assertTrue($this->hasNoMatches($this->phoneUtil->findNumbers($text, $region)));\n }",
"function interdit($message) {//=NULL) {\n\t// Liste des 899 mots interdits dans l'espace membre\n\t// \t\t-> insultes\n\t// \t\t-> language SMS\n\t// Vous pouvez allonger cette liste en mettant ( | ) sans espace entre chaque mot interdit\n\t\t$motInterdit = \"/\\b(anus|baise|baisee|baisent|baiser|baises|baisé|baisée|baisées|baisés|baiz|bande de tâches|bander|barez-vous|barrez-vous-batard|batarde|batardes|batards|bite|bites|bitte|bittes|bondage|bondages|bonnasse|bonnasses|bordel|bordels|branle|branler|branles|branlette|branlettes|branlé|branlés|bâtard|bâtarde|bâtardes|bâtards|bèz|c o n|c o*n|c o^n|c*o n|c*o*n|c*on|c^o n|c^o^n|caca|cacas|casse-toi|cassez-vous|chatte|chiasse|chie|chient|chier|chié|chiées|chiés|clitau|clito|co n|co*n|cocu|cocus|con|con nard|con nards|conar|conard|conarde|conardes|conards|conasse|conasses|connar|connard|connarde|connardes|connards|connasse|connasses|conne|Connerie|Conneries|connes|cons|couille|couilles|couye|couyes|creve|crève|cul|culs|cuni|cunilingus|de ta mer|de ta mere|de ta mèr|de ta mère|debil|debile|debiles|débil|débile|débiles|echangisme|emerde|emerdent|emerder|emerdeur|emerdeurs|emerdeuse|emerdeuses|emerdé|emerdée|emerdés|emmerde|emmerdent|emmerder|emmerdeur|emmerdeurs|emmerdeuse|emmerdeuses|emmerdé|emmerdée|emmerdés|en cul|en cule|en culer|en cules|encule|enculer|encules|enculé|enculés|enfoiré|enfoirée|enfoirées|enfoirés|et ta mere|et ta mère|exta|f o ck|f o k|F U C K|f u ck|f.uck|f_u_c_k|faire mettre|fcuk|fcvk|fela tion|felation|fella tion|fellation|fI_Ick|fl_lck|fo ck|foc k|fock|foutoir|foutoire|foutre|foutrement|fu c k|fu ck|fu.ck|fuc|fuc.k|FUCK|fuk|fuque|fuuck|fuuuck|fuuuuck|fuuuuuck|fvck|féla tion|féla tions|félation|félations|gouine|gouines|gouinne|gouinnes|groniasse|groniasses|k o n|k o*n|k o^n|k o_n|k*o n|k*o*n|k*on|k^o n|k^o^n|k_o n|k_o_n|ko n|ko*n|kon|konasse|konasses|konnasse|konnasses|kons|Lesbien|Lesbiene|Lesbienes|lesbienne|Lesbiens|Lesbo|Lesbos|maso|masturbator|masturbe|masturber|masturbé|masturbée|masturbées|masturbés|meeerdes|meeerdeux|meerdes|meerdeux|merdes|merdeux|morveuse|morveuses|morveux|nasi|nasis|nazi|nazis|negre|negres|negrillon|negrillons|negro|negros|nibard|nibards|nichon|nichons|nik|nike|nique|niquer|niqué|niquée|niquées|niqués|negre|negres|negro|negros|negresse|négresse|nègre|nègres|négrillon|négrillons|négro|négros|ordure|ordures|p u t a i n|p u t a i n s|partouse|partouses|partouze|partouzes|pd|pdd|pddd|pdddd|pddddd|pdddddd|pddddddd|pds|pedale|pedales|pede|pederaste|pederastes|pedes|penis|pennis|petasse|petasses|phuck|pignouf|pignoufette|pi|noufettes|pignoufs|pisse|pissee|pissees|pisser|pisses|pissé|pissée|pissées|pissés|plouc|ploucs|plouk|plouks|porno|pornos|pouffiass|pouffiasse|pouffiasses|poufiasse|pouffiass|pouffiasse|pouffiasses|Prostitue|Prostituee|Prostituees|Prostitues|Prostitué|Prostituée|Prostituées|Prostitués|prout|put|put ain|put ains|put in|put ins|put1|putain|putains|pute|putes|putin|putins|putte|puttes|puttin|puttins|pédale|pédales|pédé|pédéraste|pédérastes|pédés|pénétration|pétasse|pétasses|s e x|s e x e|s e x*e|s e xe|s e*x|s ex|s ex e|s ex*e|s exe|sado|salau|salaud|salauds|salaus|salaut|salauts|sale arabe|sallo|sallop|sallopard|sallopards|sallope|sallopes|salloppard|salloppards|salloppe|salloppes|sallos|sallot|sallots|salo|salop|salopard|salopards|salope|salopes|saloppard|saloppards|saloppe|saloppes|salos|salot|salots|se x|se*x|sex|sex e|sex*e|sexe|shit|skinhead|sodomie|sodomise|sodomisee|sodomisees|sodomisent|sodomiser|sodomises|sodomisé|sodomisée|sodomisées|sodomisés|sperm|sperme|spermes|suce|suck|tete de noeud|tetes de noeud|tête de noeud|têtes de noeud|va te faire|va te fer|va te fere|va te fèr|va te fère|vagin|vagins|zizi|zizis|1e|1st|1dispo|1posibl|1diféren|1trec|1ternet|1vit|1mn|2min|2ri1|2l8|2labal|2m1|2mand|2van|2vanc|4me|5pa|6gar|6garet|6né|6nema|6T|7adir|7ad|10ko|ab1to|akro|a2m1|af'r|afr|aJ|aG|éD|alé|AR|aPero|a+|apré|aprè|aprem|aprè-mi10|apré-mi10|areT|ariv|a12c4|asap|avan|avanC|ayé|abiT|azar|aniv|aK|aps|avc|avk|azar|AL1DI|ard|admin|ADMIN|ATK|arf|balaD|bavar|bavarD|bi1|bi1sur|bi1to|bizz|bap|bsr|boC|blèm|B|b1|bc|Bdo|BG|bj|bocou|bogos|bye|cé|cad|c b1|c sa|c cho|c 2 labal|c mal1|CT|chanG|capou|chuis|chanmé|CriE|C|camé|cam|came|Cdla|celib|celibatR|chi1|Clib|cok1|cokin|cokine|cok1e|colR|comen|dico|cc|colok|condé|dak|danC|ds|D6D|DpenC|dê|dS100|DzSPré|Dzolé|dsl|DtST|diskuT|douT|d1gue|daron|D|daronne|darone|deuspi|dico|die|DEF|écouT|empr1T|enfR|en+|épaT|éxagR|exClen|exQzé|exiG|éziT|Er|E|enkor|entouK|entouka|epaT|ErE|ErEze|fRfet|fiR|meuf|fliP|francè|FR|frR|fr8|foto|FM|FMloJ|F|fb|frero|foo|fliKé|flik|fone|fonetel|gan|Gen|Gnial|gré|glnD|GraV|G la N|GPTléplon|G|gova|gater6|gd|gde|Gnial|grav|gro|Gséré|GG|HT|H|hard|hl|IR|isTrik|ID|ImaJn|I|ie|irl|jalou|jamé|j'le sav|jenémar|jSpR ktu va bi1|jtm|je t'M|j'tapLdkej'pe|jeteléDjadi|jT|jr|JuG|J|jaten|jme|jsai|jsui|jtem|jtaim|Kdo|keum|Kfar|Kfé|Kl1|Knon|Kc|klR|koQ|kEr|komanD|Kom|komencava|koncR|kontST|kruL|karaT|ke|kL|kLq1|kelkun|keske|keske C|kekina|kestion|ki|kil|koi|koa|kwa|koi29|K|KS|kisdé|kif|jtkif|k7|kan|Ksos|LcKc|lol|l1di|lakL|lekL|l8|lH|l'S tomB|LC|L|LVL|ll|mek|magaz1|m1tNan|mnt|mè|kaze|malad|mal1|manG|mat1|max|mm|ménaG|mR|mê|msg|mne|m jvb|MDR|moy1|muscQ|muscu|muzik|muzic|M|m'man|MP|msg|ml|NRV|néCsR|nRvE|nc|no|nb|nombrE|nouvL|nouvo|NRJ|N|news|ns|ok1|oQne|Ojourd8|ojourd'8|ouf|orEr|otL|OQP|Ô|oZ|ouvR|O|oci|oreur|ou1j|ouinj|OMG|partut|partt|paC|péyé|pRturB|pE|piG|poa|po1|poz|pr|pk|prtan|prtant|preC|pb|P|p'pa|ptdr|POULAGA|PANAM|PANAME|poto|pr|ppr|pti|ptite|plon|qoa|qd|quiT|Q|QG|reuch|remps|rapl|ra|rejo1|rdv|répt|rstp|rep|resto|retard|réu|réucir|ri1|rafr|ras|ru|r|reuf|savapa|sniiif|snif|slt|slt cav ?|savoar|semN|stp|sk8|seur|spor|strC|S|sked|SKEUD|tR|tarD|tps|Tê|ti2|tle +bo|tpa fâché|TT|tabitou|2day|tjr|tt|tr1|trankil|taf|tafer|tu vi1 2m1 ?|T|Tci|tsss|ts|utilizé|U|vazi|Vlo|vR|vi1|vs|VoyaG|vrMen|V|VIP|W|WE|W.E|wesh|WTF|wé|wi|wy|X|X-trem|Xtrem|xpldr|Xcité|Xcit|xd|xplorer|xplozé|xploz|xplor|yo|y|é|ye|yè|ya|yâ|Z|zN|ziva|zonmé)\\b/ui\";\n\t\t$message = str_replace(\"'\", \"\", $message);\n\t\tif(!empty($message)) {\n\t\t\tif(preg_match($motInterdit, $message)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}",
"function isHTMLContent($c)\t{\n\t\t$c = trim($c);\n\t\t$first = strtolower(substr($c,0,6));\n\t\t$last = strtolower(substr($c,-7));\n\t\tif ($first.$last=='<html></html>')\treturn 1;\n\t}",
"function validate_mobile_number($mobile){\n if(preg_match('/^((\\+){0,1}91(\\s){0,1}(\\-){0,1}(\\s){0,1})?([0-9]{10})$/', $mobile,$matches)){\n return true;\n }\n return false;\n}",
"function smcf_filter($value) {\r\n\t$pattern = array(\"/\\n/\",\"/\\r/\",\"/content-type:/i\",\"/to:/i\", \"/from:/i\", \"/cc:/i\");\r\n\t$value = preg_replace($pattern, \"\", $value);\r\n\treturn $value;\r\n}",
"public function match() {\r\n\t\treturn false;\r\n\t}",
"function valid_gsm_no($mobile,$formating=0)\n//Check whether a given no. is valid gsm no. or not.\n{\n\tif($formating)\n\t{\n\t\tif(strlen($mobile)==10)\n\t\t\t$mobile='91'.$mobile;\n\t}\n\tif( strlen($mobile)!=12 || !(ctype_digit($mobile)) )\n\t\treturn 0;\n\telse\n\t{\n\t\tif((substr($mobile,2,2)=='94' or substr($mobile,2,2)=='96' or substr($mobile,2,2)=='97' or substr($mobile,2,2)=='98' or substr($mobile,2,2)=='99'))\n return 1;\n\t}\n\treturn 0;\n}",
"public function mobile($ipad=''){\n\t \t\n\t\t($ipad!=''?$ipad='ipad|':$ipad=NULL);\n\t\t\n\t\t$regex_match=\"/(\".$ipad.\"nokia|iphone|android|motorola|^mot\\-|softbank|foma|docomo|kddi|up\\.browser|up\\.link|\";\n\t\t$regex_match.=\"htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|\";\n\t\t$regex_match.=\"blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|\";\t\n\t\t$regex_match.=\"symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\\-|longcos|pantech|gionee|^sie\\-|portalmmm|\";\n\t\t$regex_match.=\"jig\\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\\s*mobi|opera\\*mini|320x320|240x320|176x220\";\n\t\t$regex_match.=\")/i\";\t\t\n\t\treturn isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));\n\t}",
"public function cbt()\n\t{\n\t\tif (preg_match('/^\\(([a-zA-Z0-9-\\.\\&_ ]+)\\) \\[\\d+\\/(\\d+\\]) - \".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[ ABCAsiaPacific.com - Study English IELTS Preparation (2006) ] AVI.PDF (17/34) - \"abcap-senglishielts.r16\" yEnc\n\t\t//[ Ask Video - The Studio Edge 101 Planning a Recording Studio ] MP4.x264 (00/21) - \"syn-avtse101.nzb\" yEnc\n\t\t//[ Brian Tracy and Colin Rose - Accelerated Learning Techniques (2003) ] MP3.PDF (00/14) - \"btcr-accltech.nzb\" yEnc\n\t\t//[ Lynda.com - Advanced Modeling in Revit Architecture (2012) ] DVD.ISO (41/53) - \"i-lcamira.r38\" yEnc\n\t\t//[ Morgan Kaufmann - Database Design Know It All (2008) ] TRUE.PDF (0/5) - \"Morgan.Kaufmann.Database.Design.Know.It.All.Nov.2008.eBook-DDU.nzb\" yEnc\n\t\t//[ VertexPusher - Vol. 2 Lighting, Shading and Rendering (2012) ] MP4.x264 (05/20) - \"vp-c4dlsar.r03\" yEnc\n\t\tif (preg_match('/^\\[ ([a-zA-Z0-9-\\.\\&\\(\\)\\,_ ]+) \\] [a-zA-Z0-9]{3,4}\\.[a-zA-Z0-9]{3,4} \\(\\d+\\/(\\d+\\)) - \".+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"MythBusters S10E02 720p HDTV x264-DHD.rar\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . ' {1,2}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //2nd Annual American CountryMusicAwards 2011 HDTV XviD 2HD.rar yEnc\n\t\tif (preg_match('/^(.+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}) {1,2}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(????) [005/358] - \"WLAN - professionell absichern.rar\" Sayco yEnc\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' Sayco yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"public function u_4all()\n\t{\n\t\tif (preg_match('/^(.+)\\[.+?usenet-4all\\.info\\][ _-]{0,3}\\[.+\\][ _-]{0,3}\\(\\d+\\/\\d+\\) (\"|#34;).+(\"|#34;) yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//-4y (PW) [ usenet-4all.info - powered by ssl.news -] [1,44 GB] [08/14] \"71cc4edc6R08eb7.vol00+01.PAR2\" yEnc\n\t\tif (preg_match('/\\[ usenet-4all\\.info - powered by ssl\\.news -\\][-_\\s]{0,3}\\[\\d+([.,]\\d+)? [kKmMgG][bB]\\][-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(????) [02838/75096] - \"3D Browser v5.51.rar\" yEnc\n\t\tif (preg_match('/^\\(\\?{4}\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(????) [02838/75096] - \"3D Browser v5.51.rar\" yEnc\n\t\tif (preg_match('/^\\(\\?{4}\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . '.+yEnc$/ui', $this->subject, $match)\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(06/10) \"Christopher Paolini - Eragon 01-04.part5.rar\" - 7,84 GB - yEnc\n\t\t//[09/22] - \"H56A2_20131018_038.part08.rar\" - 858,20 MB yEnc\n\t\tif (preg_match('/^[\\[\\(]\\d+\\/\\d+[\\]\\)][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e2, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(07/27) - Description - \" Court Order 890879887870337.vol015+016.par2\" - 1.80 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[-_\\s]{0,3}Description[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e2, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//\"18X Girls Mirabella Gets Her Tight Ass Hole Plowed Hard.rar\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"private function checkSpecialConditions(TelegramMethods $method)\r\n { \r\n $method->check_reply_markup();\r\n }",
"public function testGetRegex() {\n $p = Process::runOk($this->cv('ang:module:list'));\n $this->assertRegexp(';crmUi.*civicrm/a.*crmResource;', $p->getOutput());\n\n $p = Process::runOk($this->cv('ang:module:list \";crm;\"'));\n $this->assertRegexp(';crmUi.*civicrm/a.*crmResource;', $p->getOutput());\n\n $p = Process::runOk($this->cv('ang:module:list \";foo;\"'));\n $this->assertNotRegexp(';crmUi.*civicrm/a.*crmResource;', $p->getOutput());\n }",
"function common_wlan_scan(){\r\n\tglobal $text;\r\n\t//get output dari iwlist\r\n\t$iw_ssid = shell_exec('sudo /sbin/iwlist wlan0 scan');\r\n\t$iw_mac = $iw_ssid;\r\n\t$iw_quality = $iw_ssid;\r\n\t\r\n\t$iw_ssid = explode('ESSID:\"', $iw_ssid);\r\n\t$iw_mac = explode('Address:', $iw_mac);\r\n\t$iw_quality = explode('Quality=', $iw_quality);\r\n\t\r\n\t//get sssid\r\n\t$data_ssid = array();\r\n\t$counter = 0;\r\n\tforeach($iw_ssid as $ssid){\r\n\t\t$tmp = explode('\"',$ssid);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$data_ssid[] = $tmp[0];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get mac address\r\n\t$data_mac = array();\r\n\t$counter = 0;\r\n\tforeach($iw_mac as $mac){\r\n\t\t$tmp = explode(' ',$mac);\r\n\t\tif(!empty($tmp[1]) && $counter != 0){\r\n\t\t\t$data_mac[] = $tmp[1];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get kekuatan sinyal\r\n\t$data_quality = array();\r\n\t$counter = 0;\r\n\tforeach($iw_quality as $signal){\r\n\t\t$tmp = explode(' ',$signal);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$tmpb = explode('/',$tmp[0]);\r\n\t\t\t$a = $tmpb[0];\r\n\t\t\t$b = $tmpb[1];\r\n\t\t\t$c = number_format(($a/$b) * 100,0,',','.');\r\n\t\t\t$data_quality[] = $c;\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t$result = array(\r\n\t\t'ssid' \t\t=> $data_ssid,\r\n\t\t'mac' \t\t=> $data_mac,\r\n\t\t'signal'\t=> $data_quality\r\n\t);\t\r\n\treturn $result;\r\n}",
"function parsepm($text, $sid=\"\")\n{\n $text = getbbcode($text, $sid, 1);\n $text = findcard($text);\n return $text;\n}",
"public function globalStringConditionMatchesEmptyRegularExpression() {}",
"function _parseHtml($html)\n\t\t{\n\t\t\t$html=preg_replace(\"/<!DOCTYPE((.|\\n)*?)>/ims\",\"\",$html);\n\t\t\t$html=preg_replace(\"/<script((.|\\n)*?)>((.|\\n)*?)<\\/script>/ims\",\"\",$html);\n\t\t\tpreg_match(\"/<head>((.|\\n)*?)<\\/head>/ims\",$html,$matches);\n\t\t\t$head=$matches[1];\n\t\t\tpreg_match(\"/<title>((.|\\n)*?)<\\/title>/ims\",$head,$matches);\n\t\t\t$this->title = $matches[1];\n\t\t\t$html=preg_replace(\"/<head>((.|\\n)*?)<\\/head>/ims\",\"\",$html);\n\t\t\t$head=preg_replace(\"/<title>((.|\\n)*?)<\\/title>/ims\",\"\",$head);\n\t\t\t$head=preg_replace(\"/<\\/?head>/ims\",\"\",$head);\n\t\t\t$html=preg_replace(\"/<\\/?body((.|\\n)*?)>/ims\",\"\",$html);\n\t\t\t$this->htmlHead=$head;\n\t\t\t$this->htmlBody=$html;\n\t\t\treturn;\n\t\t}",
"public function preg_match_HTML($pattern)\n\t{\n\t\treturn (bool)preg_match($pattern,$this->HTML);\n\t}",
"public function globalStringConditionMatchesEmptyRegularExpression() {}",
"private static function html() : string\n {\n return '<(.|\\n)*?>';\n }",
"public function ath()\n\t{\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ ([a-zA-Z0-9]+ .+?)\\..+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //8b33bf5960714efbe6cfcf13dd0f618f - (01/55) - \"8b33bf5960714efbe6cfcf13dd0f618f.par2\" yEnc\n\t\tif (preg_match('/^([a-f0-9]{32}) - \\(\\d+\\/\\d+\\) - \"[a-f0-9]{32}\\..+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //::: Usejunkies.tk ::: - [01/11] - \"DJ Shog - DNA - HD 720p.par2\" - 47,76 MB yEnc\n\t\tif (preg_match('/^.+Usejunkies.tk.+ \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t$this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-Mutter.und.Sohn.German.2013.DVDRiP.x264-XFi[01/27]\"xf-mutterusohn.nfo\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+[\\)\\]]\".+\" yEnc$/',\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<->http://you-need-all.tk<-> - [28/32] - \"Dirty Minded Wife Advent Vol 40 JAV Uncensored DVDRip x264-APX.vol007+08.par2\" yEnc\n\t\tif (preg_match('/^.+http:\\/\\/you-need-all\\.tk.+\\[\\d+\\/\\d+\\][\\s-_]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[02/21] - \"Staendig Feucht.part01.rar\" - 493.38 MB ....::::UR-powered by SecretUsenet.com::::.... yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . ' - \\d+[.,]\\d+ [kKmMgG][bB] .+? yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //>>> usenet4ever.info <<<+>>> secretusenet.com <<< \"Weltnaturerbe USA Grand Canyon Nationalpark 2012 3D Blu-ray untouched - DarKneSS.part039.rar\" - DarKneSS yEnc\n\t\tif (preg_match('/^>+ .+?\\.info [<>+]+ .+?\\.com <+ \"(.+?)\\s+- .*?' . $this->e0 .\n\t\t\t' - .+? yEnc$/',\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //nmlsrgnb - [04/37] - \"htwlngmrstdsntdnh.part03.rar\" yEnc\n\t\tif (preg_match('/^([a-z]+) - \\[\\d+\\/\\d+\\] - \"[a-z]+\\..+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>>>>>Hell-of-Usenet>>>>> - [01/33] - \"Cassadaga Hier lebt der Teufel 2011 German AC3 DVDRip XViD iNTERNAL-VhV.par2\" yEnc\n\t\tif (preg_match('/^>+Hell-of-Usenet(\\.org)?>+( -)? \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '( - \\d+[.,]\\d+ [kKmMgG][bB])? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //1dbo1u5ce6182436yb2eo (001/105) \"1dbo1u5ce6182436yb2eo.par2\" yEnc\n\t\tif (preg_match('/^([a-z0-9]{10,}) \\(\\d+\\/\\d+\\) \"[a-z0-9]{10,}\\..+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<>>>kosova-shqip.eu<<< Deep SWG - 90s Club Megamix 2011 >>>kosova-shqip.eu<<<<<< - (2/4) - \"Deep SWG - 90s Club Megamix 2011.rar\" yEnc\n\t\tif (preg_match('/^<<<>>>kosova-shqip\\.eu<<< (.+?) >>>kosova-shqip.eu<<<<<< - \\(\\d+\\/\\d+\\) - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<Have Fun> \"Invader.German.2012.PAL.DVDR-MORTAL.nfo\" SpongeBoZZ yEnc\n\t\tif (preg_match('/^<Have Fun> \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' SpongeBoZZ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1] . $match[2];\n\t\t} //Old Dad uppt Taffe Mädels XivD LD HDTV Rip oben Kleine Einblendug German 01/43] - \"Taffe Mädels.par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+?\\s{2,}|Old Dad uppt\\s+)(.+?) \\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(????) Rom.S02E09.Deus.Impeditio.Esuritori.Nullus Rom.S02E09.Deus.Impeditio.Esuritori.Nullus.avi.vol007+08.PAR2\" yEnc\n\t\tif (preg_match('/^\\(\\?+\\) (.+) .+?([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})\" yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"27MZ4CXQ3AN86D95KVHB.part06.rar\" - 21,61 GB - yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"2EACM94X65NHZ37.par2\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //A7Soft ExamXML v4.37.rar yEnc\n\t\tif (preg_match('/^([^.]{8,})([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[- ]{0,3}yEnc$/u',\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function is_valid_mobile($mobile)\n{\n if (is_null($mobile) || strlen($mobile) != 11)\n {\n return false;\n }\n $pattern = \"/^1(3|4|5|7|8)\\d{9}$/\";\n return preg_match($pattern, $mobile) == 1;\n}",
"public function testInvalidElementMatchingWithTextAndID()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 id=\"title\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'id' => 'title',\n 'inner_text' => 'Wrong Text',\n ));\n\n $this->assertFalse($result);\n }",
"public static function getRegexp($enc) {\n switch($enc) {\n /**\n * All positions except C contain numbers 0-9.\n *\n * PNO:\n * YYYYMMDDCNNNN, C = -|+ length 13\n * YYYYMMDDNNNN 12\n * YYMMDDCNNNN 11\n * YYMMDDNNNN 10\n *\n * ORGNO:\n * XXXXXXNNNN\n * XXXXXX-NNNN\n * 16XXXXXXNNNN\n * 16XXXXXX-NNNN\n *\n */\n case self::PNO_SE:\n return '/^[0-9]{6,6}(([0-9]{2,2}[-\\+]{1,1}[0-9]{4,4})|([-\\+]{1,1}[0-9]{4,4})|([0-9]{4,6}))$/';\n break;\n\n /**\n * All positions contain numbers 0-9.\n *\n * Pno\n * DDMMYYIIIKK (\"fodelsenummer\" or \"D-nummer\") length = 11\n * DDMMYY-IIIKK (\"fodelsenummer\" or \"D-nummer\") length = 12\n * DDMMYYYYIIIKK (\"fodelsenummer\" or \"D-nummer\") length = 13\n * DDMMYYYY-IIIKK (\"fodelsenummer\" or \"D-nummer\") length = 14\n *\n * Orgno\n * Starts with 8 or 9.\n *\n * NNNNNNNNK (orgno) length = 9\n */\n case self::PNO_NO:\n return '/^[0-9]{6,6}((-[0-9]{5,5})|([0-9]{2,2}((-[0-9]{5,5})|([0-9]{1,1})|([0-9]{3,3})|([0-9]{5,5))))$/';\n break;\n\n /**\n * Pno\n * DDMMYYCIIIT\n * DDMMYYIIIT\n * C = century, '+' = 1800, '-' = 1900 och 'A' = 2000.\n * I = 0-9\n * T = 0-9, A-F, H, J, K-N, P, R-Y\n *\n * Orgno\n * NNNNNNN-T\n * NNNNNNNT\n * T = 0-9, A-F, H, J, K-N, P, R-Y\n */\n case self::PNO_FI:\n return '/^[0-9]{6,6}(([A\\+-]{1,1}[0-9]{3,3}[0-9A-FHJK-NPR-Y]{1,1})|([0-9]{3,3}[0-9A-FHJK-NPR-Y]{1,1})|([0-9]{1,1}-{0,1}[0-9A-FHJK-NPR-Y]{1,1}))$/i';\n break;\n\n /**\n * Pno\n * DDMMYYNNNG length 10\n * G = gender, odd/even for men/women.\n *\n * Orgno\n * XXXXXXXX length 8\n */\n case self::PNO_DK:\n return '/^[0-9]{8,8}([0-9]{2,2})?$/';\n break;\n\n /**\n * Pno\n * DDMMYYYYG length 9\n * DDMMYYYY 8\n *\n * Orgno\n * XXXXXXX 7 company org nr\n */\n case self::PNO_NL:\n case self::PNO_DE:\n return '/^[0-9]{7,9}$/';\n break;\n\n /**\n * Validates an email.\n */\n case self::EMAIL:\n return '/^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z0-9-][a-zA-Z0-9-]+)+$/';\n break;\n\n /**\n * Validates a cellno.\n *\n */\n case self::CELLNO:\n return '/^07[\\ \\-0-9]{8,13}$/';\n break;\n\n default:\n throw new BillmateException('Error in ' . __METHOD__ . ': Unknown PNO/SSN encoding constant! ('.$enc.')', 50091);\n }\n }",
"function valid_locator ($loc) {\n\tif (ereg(\"^[A-R]{2}[0-9]{2}[A-X]{2}$\", $loc)) {\n\t\treturn 1;\n\t}\n\telse {\n\t\treturn 0;\n\t}\n}",
"function verifyRegEx(){\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_SEARCH);\n $this->type(TEXT_EDITOR, (TEXT_SAMPLE_REGEX));\n $this->type(INPUT_SEARCH, (TEXT_SEARCH_REGEX));\n $this->type(INPUT_REPLACE, (TEXT_REPLACE_REGEX));\n $this->click(CHK_REGEX);\n $this->click(BUTTON_REPLACEALL);\n $this->click(BUTTON_CANCEL);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT1));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT2));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }",
"function _convert()\n {\r\n \t$badStr = $this->html;\n\t //remove PHP if it exists\r\n\t while( substr_count( $badStr, '<'.'?' ) && substr_count( $badStr, '?'.'>' ) && strpos( $badStr, '?'.'>', strpos( $badStr, '<'.'?' ) ) > strpos( $badStr, '<'.'?' ) ) {\r\n\t $badStr = substr( $badStr, 0, strpos( $badStr, '<'.'?' ) ) . substr( $badStr, strpos( $badStr, '?'.'>', strpos( $badStr, '<'.'?' ) ) + 2 ); }\r\n\t //remove comments\r\n\t while( substr_count( $badStr, '<!--' ) && substr_count( $badStr, '-->' ) && strpos( $badStr, '-->', strpos( $badStr, '<!--' ) ) > strpos( $badStr, '<!--' ) ) {\r\n\t $badStr = substr( $badStr, 0, strpos( $badStr, '<!--' ) ) . substr( $badStr, strpos( $badStr, '-->', strpos( $badStr, '<!--' ) ) + 3 ); }\r\n\t //now make sure all HTML tags are correctly written (> not in between quotes)\r\n\r\n\t \r\n\t //TODO: here is any problem, because in some cases happens loop and mail is never parsed\r\n\t //\t for( $x = 0, $goodStr = '', $is_open_tb = false, $is_open_sq = false, $is_open_dq = false; strlen( $chr = $badStr{$x} ); $x++ ) {\r\n//\t //take each letter in turn and check if that character is permitted there\r\n//\t switch( $chr ) {\r\n//\t case '<':\r\n//\t if( !$is_open_tb && strtolower( substr( $badStr, $x + 1, 5 ) ) == 'style' ) {\r\n//\t $badStr = substr( $badStr, 0, $x ) . substr( $badStr, strpos( strtolower( $badStr ), '</style>', $x ) + 7 ); $chr = '';\r\n//\t } elseif( !$is_open_tb && strtolower( substr( $badStr, $x + 1, 6 ) ) == 'script' ) {\r\n//\t $badStr = substr( $badStr, 0, $x ) . substr( $badStr, strpos( strtolower( $badStr ), '</script>', $x ) + 8 ); $chr = '';\r\n//\t } elseif( !$is_open_tb ) { $is_open_tb = true; } else { $chr = '<'; }\r\n//\t break;\r\n//\t case '>':\r\n//\t if( !$is_open_tb || $is_open_dq || $is_open_sq ) { $chr = '>'; } else { $is_open_tb = false; }\r\n//\t break;\r\n//\t case '\"':\r\n//\t if( $is_open_tb && !$is_open_dq && !$is_open_sq ) { $is_open_dq = true; }\r\n//\t elseif( $is_open_tb && $is_open_dq && !$is_open_sq ) { $is_open_dq = false; }\r\n//\t else { $chr = '"'; }\r\n//\t break;\r\n//\t case \"'\":\r\n//\t if( $is_open_tb && !$is_open_dq && !$is_open_sq ) { $is_open_sq = true; }\r\n//\t elseif( $is_open_tb && !$is_open_dq && $is_open_sq ) { $is_open_sq = false; }\r\n//\t } $goodStr .= $chr;\r\n//\t }\r\n$goodStr = $badStr;\r\n\t \r\n\t //now that the page is valid (I hope) for strip_tags, strip all unwanted tags\r\n\t $goodStr = strip_tags( $goodStr, '<title><hr><h1><h2><h3><h4><h5><h6><div><p><br><pre><sup><ul><ol><dl><dt><table><caption><tr><li><dd><th><td><a><area><img><form><input><textarea><button><select><option>' );\r\n\t //strip extra whitespace except between <pre> and <textarea> tags\r\n\t $badStr = preg_split( \"/<\\/?pre[^>]*>/i\", $goodStr );\r\n\t for( $x = 0; is_string( $badStr[$x] ); $x++ ) {\r\n\t if( $x % 2 ) { $badStr[$x] = '<pre>'.$badStr[$x].'</pre>'; } else {\r\n\t $goodStr = preg_split( \"/<\\/?textarea[^>]*>/i\", $badStr[$x] );\r\n\t for( $z = 0; is_string( $goodStr[$z] ); $z++ ) {\r\n\t if( $z % 2 ) { $goodStr[$z] = '<textarea>'.$goodStr[$z].'</textarea>'; } else {\r\n\t $goodStr[$z] = preg_replace( \"/\\s+/\", ' ', $goodStr[$z] );\r\n\t } }\r\n\t $badStr[$x] = implode('',$goodStr);\r\n\t } }\r\n\t $goodStr = implode('',$badStr);\r\n\r\n\t\t$search = array(\r\n\t\t \"/\\r/\", // Non-legal carriage return\r\n\t\t \"/[\\n\\t]+/\", // Newlines and tabs\r\n\t\t '/<br[^>]*>/i', // <br>\r\n\t\t '/ /i',\r\n\t\t '/"/i',\r\n\t\t '/>/i',\r\n\t\t '/</i',\r\n\t\t '/&/i',\r\n\t\t '/©/i',\r\n\t\t '/™/i',\r\n\t\t '/“/',\r\n\t\t '/”/',\r\n\t\t '/–/',\r\n\t\t '/’/',\r\n\t\t '/&/',\r\n\t\t '/©/',\r\n\t\t '/™/',\r\n\t\t '/—/',\r\n\t\t '/“/',\r\n\t\t '/”/',\r\n\t\t '/•/',\r\n\t\t '/®/i',\r\n\t\t '/•/i',\r\n\t\t '/&[&;]+;/i'\r\n\t\t );\r\n\r\n\t\t\t$replace = array(\r\n\t\t '', // Non-legal carriage return\r\n\t\t ' ', // Newlines and tabs\r\n\t\t \"\\n\", // <br>\r\n\t\t ' ',\r\n\t\t '\"',\r\n\t\t '>',\r\n\t\t '<',\r\n\t\t '&',\r\n\t\t '(c)',\r\n\t\t '(tm)',\r\n\t\t '\"',\r\n\t\t '\"',\r\n\t\t '-',\r\n\t\t \"'\",\r\n\t\t '&',\r\n\t\t '(c)',\r\n\t\t '(tm)',\r\n\t\t '--',\r\n\t\t '\"',\r\n\t\t '\"',\r\n\t\t '*',\r\n\t\t '(R)',\r\n\t\t '*',\r\n\t\t ''\r\n\t\t );\r\n\t \r\n\t \r\n\t $goodStr = preg_replace( $search, $replace, $goodStr );\r\n\t \r\n\t //remove all options from select inputs\r\n\t $goodStr = preg_replace( \"/<option[^>]*>[^<]*/i\", '', $goodStr );\r\n\t //replace all tags with their text equivalents\r\n\t $goodStr = preg_replace( \"/<(\\/title|hr)[^>]*>/i\", \"\\n --------------------\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(h|div|p)[^>]*>/i\", \"\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<sup[^>]*>/i\", '^', $goodStr );\r\n\t $goodStr = preg_replace( \"/<(ul|ol|dl|dt|table|caption|\\/textarea|tr[^>]*>\\s*<(td|th))[^>]*>/i\", \"\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<li[^>]*>/i\", \"\\n· \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<dd[^>]*>/i\", \"\\n\\t\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(th|td)[^>]*>/i\", \"\\t\", $goodStr );\r\n\t $goodStr = preg_replace('/<br[^>]*>/i', \"\\n\", $goodStr);\r\n\t $goodStr = preg_replace( \"/<a[^>]* href=(\\\"((?!\\\"|#|javascript:)[^\\\"#]*)(\\\"|#)|'((?!'|#|javascript:)[^'#]*)('|#)|((?!'|\\\"|>|#|javascript:)[^#\\\"'> ]*))[^>]*>/i\", \"[LINK: $2$4$6] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<img[^>]* alt=(\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\\"'> ]+))[^>]*>/i\", \"[IMAGE: $2$3$4] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<form[^>]* action=(\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\\"'> ]+))[^>]*>/i\", \"\\n[FORM: $2$3$4] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(input|textarea|button|select)[^>]*>/i\", \"[INPUT] \", $goodStr );\r\n\t //strip all remaining tags (mostly closing tags)\r\n\t $goodStr = strip_tags( $goodStr );\r\n\t //convert HTML entities\r\n\t $goodStr = strtr( $goodStr, array_flip( get_html_translation_table( HTML_ENTITIES ) ) );\r\n\t preg_replace( \"/&#(\\d+);/me\", \"chr('$1')\", $goodStr );\r\n\t //wordwrap\r\n\t //$goodStr = wordwrap( $goodStr );\r\n\t //make sure there are no more than 3 linebreaks in a row and trim whitespace\r\n\t $this->text = preg_replace( \"/^\\n*|\\n*$/\", '', preg_replace( \"/[ \\t]+(\\n|$)/\", \"$1\", preg_replace( \"/\\n(\\s*\\n){2}/\", \"\\n\\n\\n\", preg_replace( \"/\\r\\n?|\\f/\", \"\\n\", str_replace( chr(160), ' ', $goodStr ) ) ) ) );\r\n }",
"function is_mobile() {\n return preg_match(\"/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\\.browser|up\\.link|webos|wos)/i\", $_SERVER[\"HTTP_USER_AGENT\"]);\n}",
"public function getValidated080GSMNo($data){\n if(empty($data)){\n \t$validPhone= FALSE;\n }\n\t\telse {\n\t\t\tif (preg_match (\"/^0[0-9]{10}$/\", $data)){\n \t$validPhone= $data;\t\n\t \t}\n\t \telse {\n\t \t$validPhone= FALSE;\n\t \t}\n\t\t}\n\t\treturn $validPhone;\n }",
"public function testInvalidElementMatchingWithNoText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1></h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'invalidelement',\n ));\n\n $this->assertFalse($result);\n }",
"public function testElementMatchingWithNoText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1></h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'h1',\n ));\n\n $this->assertTrue($result);\n }",
"public function mp3_complete_cd()\n\t{\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[ _-]{0,3}\\[Lords-of-usenet\\][ _-]{0,3}<<Partner of SSL-News.info>>[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(06/11) - <www.lords-of-usenet.org><by Nerts> - \"Diens - Schwarzmale.vol00+01.PAR2\" - 141,07 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[ _-]{0,3}<www\\.lords-of-usenet\\.org><by Nerts>[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<www.Lords-Of-Usenet.org><by Nerts> (09/18) - \"Mantus - Fatum (2013) [2CD].FH.vol00+2.PAR2\" - 336,39 MB - yEnc\n\t\tif (preg_match('/^<www\\.lords-of-usenet\\.org><by Nerts>[ _-]{0,3}\\(\\d+\\/\\d+\\)[ _-]{0,3}[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(08/15) \"Noemi-Red.(Unreleased).2006.by.NYCrules.vol000+01.PAR2\" - 179,66 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[16_Bit_Lolitas-Warung_Brazil_002-2CD-2012-iHF] [www.usenet4ever.info by Secretusenet] - \"000-16_bit_lolitas-warung_brazil_002-2cd-2012-ihf.sfv\" yEnc\n\t\t//[3RD_Prototype_-_On_My_Way-(TB7368)-WEB-2013-FMC] [www.usenet4ever.info by Secretusenet] - \"01-3rd_prototype_-_deafback-when_you_are_in_the_dark_(deafback_remix).mp3\" yEnc\n\t\t//[Armin_Van_Buuren_Feat._Fiora-Waiting_For_The_Night-(ARMD1140)-WEB-2013-UKHx] [www.usenet4ever.info by Secretusenet] - \"00-armin_van_buuren_feat._fiora-waiting_for_the_night-(armd1140)-web-2013-ukhx.m3u\" yEnc\n\t\tif (preg_match('/^\\[([a-zA-Z0-9-_\\(\\)\\.]+)\\] \\[www\\.usenet4ever\\.info by Secretusenet\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>ghost-of-usenet.org<< 16_Bit_Lolitas-Warung_Brazil_002-2CD-2012-iHF >>www.SSL-News.info> - \"101-16_bit_lolitas-warung_brazil_002_cd1.mp3\" yEnc\n\t\tif (preg_match('/^>ghost-of-usenet\\.org<< ([a-zA-Z0-9-_\\(\\)\\.]+) >>www\\.SSL-News\\.info> - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Blok_B-Bienvenue_Dans_Mon_Blok_Vol.1-2005-BZ_INT [20 of 27] \"01-gangsta.mp3\" yEnc\n\t\t//DJ Neev - HedKandi_2013-06-08 (Ministry of Sound Radio) [01/13] - \"DJ Neev - HedKandi_2013-06-08 (Ministry of Sound Radio).par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9 -_\\(\\)\\.]+) \\[\\d+(\\/| of )(\\d+\\])[-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(www.Thunder-News.org) >Dee_And_Crane-Let_The_Music_Play-WEB-2012-UKHx< <Sponsored by Secretusenet> - \"05-dee_and_crane-let_the_music_play_(jay_frogs_keep_the_groove_remix_edit).mp3\" yEnc\n\t\tif (preg_match('/^\\(www\\.Thunder-News\\.org\\) >(.+?)< <Sponsored by Secretusenet> - \".+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[1/1] - (MP3 ALBUM CHARTS) - \"Andreas Gabalier - Volksrock'n'roller-Live.rar\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \\((MP3 )?ALBUM CHARTS\\) - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //\"Miley Cyrus - Bangerz (Deluxe Version).nzb\" - yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . ' - yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //VA 200 NRJ 2014 CD2 mp3_320kbps[18/27]VA 200 NRJ 2014 CD2 mp3_320kbps\"(217) [Capital Cities] Safe And Sound.mp3\" yEnc\n\t\tif (preg_match('/^.+\\[\\d+\\/\\d+\\](.+)\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"protected function getCode() {\n while($str = @fgets($this->smtp,515)) {\n $this->message .= $str;\n if(substr($str,3,1) == \" \") {\n return substr($str,0,3);\n }\n }\n return false;\n }",
"public function parsing_sms($isi_pesan,$nama_kontak){\n \n return $parsing_pesan;\n }",
"public function test()\n\t{\n\t\tif (preg_match('/^brothers-of-usenet.net\\)\\((.+)\\)\\)\\(\\d+\\/\\d+\\) (\"|#34;).+(\"|#34;).+yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //brothers-of-usenet.net(Sons.of.Anarchy.S03E03.Fuersorge.GERMAN.DUBBED.720p.BLURAY.x264-ZZGtv))(07/31) #34;zzgtv-soa-s03e03.part05.rar#34; - 2,02 GB - yEnc\n\t\telseif (preg_match('/^brothers-of-usenet.net\\((.+)\\)\\)\\(\\d+\\/\\d+\\) (\"|#34;).+(\"|#34;).+yEnc$/',\n\t\t\t\t\t\t $this->subject,\n\t\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //brothers-of-usenet.net><Sons.of.Anarchy.S03E02.Letzte.Oelung.GERMAN.DUBBED.720p.BLURAY.x264-ZZGtv>>(01/31) \"zzgtv-soa-s03e02.nfo\" - 1,98 GB - yEnc\n\t\telseif (preg_match('/^brothers-of-usenet.net><(.+)>>\\(\\d+\\/\\d+\\) (\"|#34;).+(\"|#34;).+yEnc$/',\n\t\t\t\t\t\t $this->subject,\n\t\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"public function testInvalidTextMatchingCaseInsensitive()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 class=\"active hover\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('text', 'http://dhwebco.com', array(\n 'text' => 'Text not present',\n ));\n\n $this->assertFalse($result);\n }",
"function get_mac(){\n\t\n\t//Nicolas Padfield [email protected]\n\t\n\t$debug = 0;\n\n\t$adr = $_SERVER[REMOTE_ADDR];\n\t\t\n\tusleep(10000);\n\t\n\t$arpstring = '/usr/sbin/arp -a '.$adr;\n\t\n\t$arp = exec($arpstring);\n\t\n\t//echo $arp.'<BR><BR>';\n\t\n\t$match = preg_match ('/..\\:..\\:..\\:..\\:..\\:../', $arp, $matches);\n\t\n\t//echo $match.'<BR><BR>';\n\t\n\tif (!$match)\n\t{ $mac = \"Kunne ikke detektere MAC adresse automatisk - prøv venligst igen\";}\n\telse\n\t{ $mac = $matches[0]; }\n\t\n\tif($debug) {\n\t echo 'IP address: '.$adr.'<BR>';\n\t echo 'MAC address: '.$mac.'<BR>';\n\t}\n\t\n\treturn $mac;\n}",
"function findMatches($content){\n\n\t\t$videos = array();\n\t\t$data = \"\";\n\t\t$cdata = \"\";\n\t\t$xdata = \"\";\n\t\t$sig = \"\";\n\t\t$url = \"\";\n\t\t$type = \"\";\n\n\t\t// Break page into pieces and run regex's to find and build download links.\n\t\t// Note: $results is an array.\n\t\tif(preg_match('/url_encoded_fmt_stream_map(.*?);/', $content, $results)){\n\n\t\t\t$data = \"\";\n\n\t\t\t// $results[0]=the text that matched the full pattern\n\t\t\t// $results[1]=the text matching the first subpattern\n\t\t\t// $results[2]=the text matching the second subpattern (n/a)\n\t\t\t$data = $results[1];\n\n\t\t\t// Literally replace the characters '\\u0026' with an '&'.\n\t\t\t$data = str_replace('\\u0026', '&', $data);\n\t\t\t\n\t\t\t// Convert $data to an array by splitting on ','.\n\t\t\t$data = explode(',', $data);\n\n\t\t\tforeach($data As $cdata){\n\n\t\t\t\t// Break each element in the $data array into an array.\n\t\t\t\t$cdata = explode('&', $cdata);\n\n\t\t\t\t// The $cdata array should have exactly 5 elements if it is an applicable URL.\n\t\t\t\tif (sizeof($cdata) === 5) {\n\n\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\techo \"<b>\";\n\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\techo \"CDATA\" . \"<br>\";\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($cdata);\n\t\t\t\t\t\techo \"</pre>\";\n\t\t\t\t\t\techo \"</b>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// For each element in the $cdata array...\n\t\t\t\t\tforeach($cdata As $xdata){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Sometimes this is found as the first three characters of an element: \":\"\n\t\t\t\t\t\t// Check for it by seeing if first character is '\"'.\n\t\t\t\t\t\t// If so, remove those three characters.\n\t\t\t\t\t\tif ($xdata[0] === '\"') {\n\t\t\t\t\t\t\t$xdata = substr($xdata, 3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for signature.\n\t\t\t\t\t\tif(preg_match('/^sig/', $xdata)){\n\t\t\t\t\t\t\t$sig = substr($xdata, 4);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for URL.\n\t\t\t\t\t\tif(preg_match('/^url/', $xdata)){\n\t\t\t\t\t\t\t$url = substr($xdata, 4);\n\t\t\t\t\t\t\t$url = urldecode($url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"URL: \" . $url . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for video type.\n\t\t\t\t\t\tif(preg_match('/^itag/', $xdata)){\n\t\t\t\t\t\t\t$type = substr($xdata, 5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If $type is not a known video type, change it to type '0' (unknown)\n\t\t\t\t\t\t\tif (!array_key_exists($type, $this->videoMap)) {\n\t\t\t\t\t\t\t\t$type = \"0\";\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"<br>\" . \"TYPE: \" . $type . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\t\t\t//echo \"<hr>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//$url = $url . '&signature=' . $sig;\n\t\t\t\t\t$videos[$this->videoMap[$type][0]][$this->videoMap[$type][1]] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $videos;\n\t}",
"public function testElementMatchingWithText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1>Hi!</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'h1',\n 'inner_text' => 'Hi!',\n ));\n\n $this->assertTrue($result);\n }",
"public function parse(){\n try {\n $table = new HomeNet_Model_DbTable_Apikeys();\n $apikey = $table->fetchRowById($this->apikey);\n\n $table = new HomeNet_Model_DbTable_Devices();\n $device = $table->fetchRowByHouseNodeDevice($apikey->house, $this->_packet->fromNode, $this->_packet->fromDevice);\n\n if(!$device && (!$device->command == $this->_packet->command)){\n throw new Zend_Exception('Cannot find matching device');\n }\n $this->saveDatapoint();\n /*\n $table = new HomeNet_Model_DbTable_Components();\n $component = $table->fetchAllByDevice($this->fromDevice);*/\n\n } catch (Zend_Exception $e){\n return $e->message();\n }\n return 'true';\n }",
"function get_html_split_regex()\n {\n }",
"public function anime()\n\t{\n\t\tif (preg_match('/^\\((\\[.+?\\] .+?)\\) \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //[REPOST][ New Doraemon 2013.05.03 Episode 328 (TV Asahi) 1080i HDTV MPEG2 AAC-DoraClub.org ] [35/61] - \"doraclub.org-doraemon-20130503-b8de1f8e.r32\" yEnc\n\t\tif (preg_match('/^\\[.+?\\]\\[ (.+?) \\] \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[De.us] Suzumiya Haruhi no Shoushitsu (1920x1080 h.264 Dual-Audio FLAC 10-bit) [017CB24D] [000/357] - \"[De.us] Suzumiya Haruhi no Shoushitsu (1920x1080 h.264 Dual-Audio FLAC 10-bit) [017CB24D].nzb\" yEnc\n\t\tif (preg_match('/^\\[.+?\\] (.+?) \\[[A-F0-9]+\\] \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[eraser] Ghost in the Shell ARISE - border_1 Ghost Pain (BD 720p Hi444PP LC-AAC Stereo) - [01/65] - \"[eraser] Ghost in the Shell ARISE - border_1 Ghost Pain (BD 720p Hi444PP LC-AAC Stereo) .md5\" yEnc\n\t\tif (preg_match('/^\\[.+?\\] (.+?) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(01/27) - Maid.Sama.Jap.dubbed.german.english.subbed - \"01 Misaki ist eine Maid!.divx\" - 6,44 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - (.+?) - \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ New Doraemon 2013.06.14 Episode 334 (TV Asahi) 1080i HDTV MPEG2 AAC-DoraClub.org ] [01/60] - \"doraclub.org-doraemon-20130614-fae28cec.nfo\" yEnc\n\t\tif (preg_match('/^\\[ (.+?) \\] \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Overman King Gainer [Dual audio, EngSub] Exiled Destiny - [002/149] - \"Overman King Gainer.part001.rar\" yEnc\n\t\tif (preg_match('/^(.+? \\[Dual [aA]udio, EngSub\\] .+?) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ TOWN ]-[ www.town.ag ]-[ partner of www.ssl-news.info ]-[ ANIME ] [3/5] - \"[HorribleSubs] Ai-Mai-Mi - Mousou Catastrophie - 04 [480p].part2.rar\" - 26,44 MB yEnc\n\t\tif (preg_match('/^.+?-\\[\\s*ANIME\\s*\\] \\[\\d+\\/\\d+\\] - \"(.*)\" - \\d+[,.]\\d+ [mMkKgG][bB][\\s]*yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function test($banner, $pattern, $name)\n{\n\t$output = \"<table>\\n\";\t\n\t$output .= \"<tr><td colspan=3><i>$banner</i></td></tr>\\n\";\n\t$output .= '<tr>';\n\t$output .= '<td><u>Pattern</u> --></td>';\n\t$output .= '<td width=\"10px\"> </td>';\n\t$output .= \"<th align=\\\"left\\\">$pattern</th></tr>\\n\";\n\tforeach($name as $item) {\n\t\tif (preg_match($pattern, $item)) {\n\t\t\t$match = 'MATCH';\n\t\t} else {\n\t\t\t$match = 'DOES NOT MATCH';\n\t\t}\n\t\t$output .= \"<tr><td width='50%'>$item</td><td width='10%'> </td><td>$match</td></tr>\\n\";\n\t}\n\t$output .= \"</table>\\n\";\n\t$output .= \"<hr />\\n\";\n\treturn $output;\n}",
"function is_ok_smtp ($cmd = \"\"){\n\t\tif(empty($cmd))\t\t\t\t{ return false; }\n\t\tif (ereg (\"^220\", $cmd))\t{ return true; }\n\t\tif (ereg (\"^250\", $cmd))\t{ return true; }\n\t\treturn false;\n\t}",
"function fixRedirectorUnparsedEquals($buffer)\n{\n return preg_replace('#\\[url-disabled].*\\[/url-disabled]#U', '', $buffer);\n}",
"function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}",
"public function test_extract_empty_pattern_wrong_param()\n {\n $method = new ExtractElementTextPattern($this->selectorProvider->get($this->itemCssSelector), [\n 'pattern' => $this->validPatternWrongParam,\n ]);\n $value = $method->extract($this->crawler);\n $this->assertEquals('', $value);\n }",
"function validarDirCorreoElec ($Cad) {\n// prueba si la entrada coincide con los patrones de correo electronico\nreturn preg_match(\"/^([a-z0-9_-])+([\\.a-z0-9_-])*@([a-z0-9-])+(\\.[a-z0-9-]+)*\\.([a-z]{2,6})*$/i\", $Cad );\n}",
"function displayHTML($msg, $number, $start){\r\n $html = <<<HTML\r\n<html>\r\n<head><title>Send SMS to India</title>\r\n<style>\r\n#doc{\r\n margin: auto; /* center in viewport */\r\n width: 760px;\r\n border: 1px solid #C0C0C0;\r\n -webkit-border-radius: 8px; /* Saf3-4, iOS 1-3.2, Android =1.6 */\r\n -moz-border-radius: 8px; /* FF1-3.6 */\r\n border-radius: 8px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */\r\n padding: 25px;\r\n margin-top: 50px;\r\n margin-bottom: 25px;\r\n}\r\n#bd{\r\n}\r\n.small{\r\n font-size: 81%;\r\n}\r\n#smsform{\r\n font-size: 91%;\r\n}\r\n.error{\r\n color: red;\r\n}\r\n.success{\r\n color: green;\r\n}\r\n#ft{\r\n text-align: center;\r\n font-size: 91%;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n <div class=\"yui3-g\" id=\"doc\">\r\n <div class=\"yui3-u\" id=\"hd\"><h2>Send SMS to India Hack</h2></div>\r\n <div class=\"yui3-u\" id=\"bd\"> \r\n <form id=\"smsform\" method=\"post\" onsubmit=\"return validateForm(this)\">\r\n <div>Mobile No. (10 digits)</div>\r\n <input type=\"text\" id=\"num\" name=\"num\" maxlength=\"10\" /></br></br>\r\n \r\n <div>Message</div>\r\n <textarea name=\"msg\" rows=4 cols=40 id=\"msg\" onKeyDown=\"limitText(this.form.msg,this.form.countdown,140);\" onKeyUp=\"limitText(this.form.msg,this.form.countdown,140);\"></textarea></br>\r\n <div class=\"small\">(Maximum characters: 140)</div>\r\n <div class=\"small\">You have <input readonly type=\"text\" name=\"countdown\" size=\"3\" value=\"140\" /> characters left.</div></br>\r\n <div><input type=\"submit\" value=\"Submit\" /></div>\r\n </form>\r\nHTML;\r\n if(!$start){\r\n $ch = curl_init();\r\n $url = \"http://s2.freesmsapi.com/messages/send?\";\r\n /* REPLACE YOUR SECRET KEY HERE */\r\n $params = array('response' => 'json',\r\n 'skey' => 'REPLACE YOUR SECRET KEY HERE',\r\n 'message' => $msg,\r\n 'recipient' => $number\r\n );\r\n foreach($params as $key=>$value){\r\n $url .= $key . \"=\" . urlencode($value) . \"&\";\r\n } \r\n //remove last &\r\n $url = substr($url, 0, -1); \r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \r\n $response = curl_exec($ch); // execute curl session\r\n $data = json_decode($response, true);\r\n curl_close($ch);\r\n if(!$data || (isset($data['response']) && isset($data['response']['errors']))){\r\n $html .= \"<div class='error'>Message sending failed :(, please try again after sometime</div>\"; \r\n }else{\r\n $html .= \"<div class='success'>Message sent successfully to $number :) ! Have a nice day !</div>\";\r\n }\r\n }\r\n $html .= <<<HTML\r\n</div>\r\n</div>\r\n<div id=\"ft\">Hack by Ravikiran Janardhana</div>\r\n<script type=\"text/javascript\">\r\nfunction limitText(limitField, limitCount, limitNum) {\r\n\tif (limitField.value.length > limitNum) {\r\n\t\tlimitField.value = limitField.value.substring(0, limitNum);\r\n\t} else {\r\n\t\tlimitCount.value = limitNum - limitField.value.length;\r\n\t}\r\n}\r\nfunction validateForm(dataform){\r\n var num = dataform.num.value;\r\n var pat = /[1-9][0-9]{9}/;\r\n var msg = dataform.msg.value;\r\n if(pat.test(num) && msg){\r\n return true;\r\n }else{\r\n if(!pat.test(num)){\r\n alert(\"Mobile no. should be 10 digits\");\r\n }else{\r\n alert(\"Cannot send an empty message\");\r\n }\r\n return false;\r\n }\r\n}\r\n</script>\r\n</body>\r\n</html> \r\nHTML;\r\n echo $html;\r\n }",
"function getColorToBasket($comFulldesc)\n{\n if (isset($comFulldesc)) {\n $comDescString = str_replace(\" \", '',\n htmlspecialchars_decode($comFulldesc));\n }\n\n $needle = \"Цвет:\";\n $findColor = strstr($comDescString, $needle);\n if ($findColor !== false) {\n $wovels = array('Цвет:</span>', 'Цвет:');\n $comColor = str_replace($wovels, \"\", strstr($findColor, \"</p>\", true));\n } else {\n $comColor = \"Цвет как на фото\";\n }\n return $comColor;\n}",
"function checkValidLine_Meditech($line, $clientid='Y9155'){\r\n\t\t//echo \"checking $clientid<br />\";\r\n\t\t$line = trim($line);\r\n\t\t$full = substr($line, 1, 9);\r\n\t\t$firstTwoChars = substr($line, 0, 2);\r\n\t\t$firstTenChars = substr($line, 0, 10);\r\n\t\t$lastSevenChars = substr($line, 2, 7);\r\n\t\t$valid = false;\r\n\t\t/*\r\n\t\tif($clientid=='Y9275'){\r\n\t\t\tif($firstTwoChars == \"OS\" || $firstTwoChars == \"BS\"){ //we're looking for \"OS\" followed by 7 digits to start populating a record\r\n\t\t\t\tif(is_numeric($lastSevenChars)){ $valid = true; }else{ $valid = false; }\r\n\t\t\t}else{\r\n\t\t\t\t$valid = false;\r\n\t\t\t} //end if\r\n\t\t}elseif($clientid=='Y3373'){\r\n\t\t\t$regex = \"/[L]+\\d+/\"; //check for an 'L'followed by a number\r\n\t\t\t$valid = preg_match($regex, $firstTenChars); //check for the pattern\r\n\t\t}else{\r\n\t\t\tif($firstTwoChars == \"CB\"){ //we're looking for \"CB\" followed by 7 digits to start populating a record\r\n\t\t\t\tif(is_numeric($lastSevenChars)){ $valid = true; }else{ $valid = false; }\r\n\t\t\t}else{\r\n\t\t\t\t$valid = false;\r\n\t\t\t} //end if\r\n\t\t}*/\r\n\r\n\t\tswitch($this->clientId){ //get the client id profile and react accordingly\r\n\t\t\tcase \"Y9275\":\r\n\t\t\t\tif($firstTwoChars == \"OS\" || $firstTwoChars == \"BS\"){ //we're looking for \"OS\" followed by 7 digits to start populating a record\r\n\t\t\t\t\tif(is_numeric($lastSevenChars)){ $valid = true; }else{ $valid = false; }\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$valid = false;\r\n\t\t\t\t} //end if\r\n\t\t\tbreak;\r\n\t\t\tcase \"Y3373\":\r\n\t\t\t\t$regex = \"/[A-Z]+\\d+/\"; //check for an 'L'followed by a number\r\n\t\t\t\t$valid = preg_match($regex, $firstTenChars); //check for the pattern\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif($firstTwoChars == \"CB\"){ //we're looking for \"CB\" followed by 7 digits to start populating a record\r\n\t\t\t\t\tif(is_numeric($lastSevenChars)){ $valid = true; }else{ $valid = false; }\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$valid = false;\r\n\t\t\t\t} //end if\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $valid;\r\n\t}",
"public function parseHtml($html)\n\t{\n\t\t$delimiters = SLS_String::getBoundContent($html,\"|||sls:\",\"|||\");\n\t\t$arraySearch = array();\n\t\t$arrayReplace = array();\n\t\t\n\t\t$dtd = new SLS_Dtd(null);\n\t\t\n\t\t// Foreach delimiters found, search if we can map a function of SLS_Dtd's class with this delimiter\n\t\tforeach($delimiters as $delimiter)\n\t\t{\n\t\t\t$dtd_mask = $delimiter;\n\t\t\t$delimiter = explode(\":\",$delimiter);\n\t\t\t$method = array_shift($delimiter);\n\t\t\t$args = $delimiter;\t\t\t\n\t\t\t\n\t\t\t$ref = new ReflectionMethod($dtd,$method);\t\t\t\n\t\t\t$nbRequiredParams = $ref->getNumberOfRequiredParameters();\n\t\t\t$nbMaxParams = $ref->getNumberOfParameters();\n\t\t\t\n\t\t\tif ($nbRequiredParams > count($args))\t\t\t\n\t\t\t\tSLS_Tracing::addTrace(new Exception(\"Error: Specific SLS_Dtd function `\".$method.\"` needs at least \".$nbRequiredParams.\" required parameters\"),true);\n\t\t\tif ($nbMaxParams < count($args))\n\t\t\t\tSLS_Tracing::addTrace(new Exception(\"Warning: Specific SLS_Dtd function `\".$method.\"` has only \".$nbMaxParams.\" parameters, you call it with \".count($args).\" parameters\"),true);\n\t\t\t\n\t\t\tif (method_exists($dtd,$method) && $nbRequiredParams <= count($args))\n\t\t\t{\n\t\t\t\tarray_push($arraySearch,\"|||sls:\".$dtd_mask.\"|||\");\n\t\t\t\tarray_push($arrayReplace,$ref->invokeArgs($dtd,$args));\n\t\t\t}\n\t\t\telse\n\t\t\t\tSLS_Tracing::addTrace(new Exception(\"Warning: the delimiter |||sls:\".$method.\"||| doesn't match with any function of class SLS_Dtd\"));\n\t\t}\n\t\treturn str_replace($arraySearch,$arrayReplace,$html);\n\t}",
"function bbcodes($reactie) \n { \n \n // Vet, schuin, etc V\n $reactie = preg_replace(\"/\\[b\\](.+?)\\[\\/b\\]/is\",'<strong>\\1</strong>', $reactie);\n $reactie = preg_replace(\"/\\[i\\](.+?)\\[\\/i\\]/is\",'<em>\\1</em>', $reactie);\n $reactie = preg_replace(\"/\\[u\\](.+?)\\[\\/u\\]/is\",'<u>\\1</u>', $reactie);\n $reactie = preg_replace(\"/\\[s\\](.+?)\\[\\/s\\]/is\",'<s>\\1</s>', $reactie);\n\n\t//quote box.\t \n\t$reactie = preg_replace(\"/\\[quote\\](.+?)\\[\\/quote\\]/is\",'<br /><center><fieldset style=\"color: #000000; border: 1px solid #000000; width: 90%; text-align: left; padding: 5px;\">\n<legend style=\"color: #999999; font-weight: bold;\">Quote.</legend>\\1</fieldset></center><br />', $reactie);\n\t \t \n // Color, font & size V\n $reactie = preg_replace (\"#\\[color=(\\#[0-9A-F]{6}|[a-z\\-]+)\\](.*?)\\[/color\\]#si\", \"<font color=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n $reactie = preg_replace (\"/\\[font=(.*)\\](.*)\\[\\/font\\]/\", \"<font face=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n $reactie = preg_replace (\"/\\[size=(.*)\\](.*)\\[\\/size\\]/\", \"<font size=\\\"\\\\1\\\">\\\\2</font>\", $reactie);\n\t\n // Diversen V\n $reactie = str_replace (\"[left]\", \"<div align=left>\", $reactie);\n $reactie = str_replace (\"[/left]\", \"</div>\", $reactie);\n $reactie = str_replace (\"[center]\", \"<div align=\\\"center\\\">\", $reactie);\n $reactie = str_replace (\"[/center]\", \"</div>\", $reactie);\n $reactie = str_replace (\"[right]\", \"<div align=\\\"right\\\">\", $reactie);\n $reactie = str_replace (\"[/right]\", \"</div>\", $reactie);\n \n // Horizontale lijn V\n $reactie = str_replace (\"[hr]\",\"<hr color=\\\"#000000\\\" noshade />\",$reactie);\n \n // Lijst - Unorderd V\n $reactie = str_replace (\"[list]\",\"<ul>\",$reactie);\n $reactie = str_replace (\"[*]\",\"<li>\",$reactie);\n $reactie = str_replace (\"[/list]\",\"</li></ul>\",$reactie);\n \n\t// list orderd.\n\t\n\t$reactie = str_replace (\"[order]\",\"<ol>\",$reactie);\n $reactie = str_replace (\"[*]\",\"<li>\",$reactie);\n $reactie = str_replace (\"[/order]\",\"</li></ol>\",$reactie);\n\t \n return $reactie; \n }",
"function mLESS(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LESS;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:683:3: ( '<' ) \n // Tokenizer11.g:684:3: '<' \n {\n $this->matchChar(60); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function caricastatorelays()\n {\n global $arrRelays;\n $statorele = shell_exec( '/usr/sbin/i2cget -y 1 0x23' );\n if (empty($statorele)) {\n\n die(\"<h1>La multipresa sembra scollegata!</h1>\");\n }\n $relays = zerificabinario( base_convert( $statorele, 16, 2 ) );\n $arrRelays = str_split( $relays );\n return ( $arrRelays );\n }",
"function check_reply($code)\n\t{\n\t\tif($code=='230')\n\t\t{\n\t\t\twhile(1)\n\t\t\t{\n\t\t\t\tif($this->is_ok())\n\t\t\t\t{\n\t\t\t\t\tif( preg_match('/^230 /',$this->message))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->is_ok())\n\t\t\t{\n\t\t\t\t$pat = '/^'. $code .'/';\n\t\t\t\tif( preg_match($pat,$this->message))\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t\treturn 0;\n\t\t}\n\t}",
"function isPostResult($result) {\n return (preg_match(\"/entry xml:lang=\\\"en\\\"/\", $result)\n && preg_match(\"/<title/\", $result)\n && preg_match(\"/<ss:community/\", $result));\n}"
] | [
"0.527976",
"0.50017875",
"0.48581153",
"0.48297492",
"0.47648388",
"0.4720816",
"0.46922216",
"0.46870118",
"0.4684975",
"0.4678415",
"0.46768722",
"0.46702808",
"0.46496105",
"0.46453077",
"0.46368906",
"0.4636599",
"0.46014473",
"0.45932984",
"0.4592873",
"0.45910442",
"0.45821998",
"0.45820886",
"0.4578818",
"0.45756525",
"0.45613462",
"0.45521116",
"0.45479363",
"0.45472002",
"0.4541013",
"0.45351496",
"0.4517198",
"0.45158568",
"0.4515334",
"0.45126045",
"0.4502021",
"0.4487516",
"0.4487115",
"0.44631904",
"0.44530225",
"0.4447147",
"0.44425637",
"0.4438398",
"0.44343802",
"0.4428366",
"0.442752",
"0.4426057",
"0.44031933",
"0.4402998",
"0.43952253",
"0.43933526",
"0.43911278",
"0.43859679",
"0.4385609",
"0.43830663",
"0.43801454",
"0.4376674",
"0.4375595",
"0.43748844",
"0.4374114",
"0.43736953",
"0.4372784",
"0.4372708",
"0.43722773",
"0.43717045",
"0.437159",
"0.43674397",
"0.43667966",
"0.4361889",
"0.43594584",
"0.43572277",
"0.43496668",
"0.43487602",
"0.43426308",
"0.4341338",
"0.43401965",
"0.4337056",
"0.43292275",
"0.43275097",
"0.43261808",
"0.431976",
"0.43140793",
"0.431382",
"0.43083772",
"0.43068847",
"0.43054032",
"0.4304606",
"0.43033397",
"0.430309",
"0.43029457",
"0.43013328",
"0.42998877",
"0.42962056",
"0.42899552",
"0.42884022",
"0.42880386",
"0.4287358",
"0.42857552",
"0.42839506",
"0.42831925",
"0.4276943",
"0.42709982"
] | 0.0 | -1 |
retrieve modem authentication realm from http header | function getRealm() {
global $hostname, $realm;
$chopts = array(
CURLOPT_URL=>$hostname,
CURLOPT_PORT=>80,
CURLOPT_TIMEOUT=>5,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_HEADER=>true);
$ch = curl_init();
curl_setopt_array($ch, $chopts);
$return = curl_exec($ch);
if(curl_errno($ch)) {
if(curl_errno($ch) == 28) {
logIT('e',"[!] connection timed out to: $hostname, skipping...");
echo "[!] connection timed out to: $hostname, skipping...\n";
exit(0);
}
}
curl_close($ch);
$headers = http_response_headers($return);
foreach ($headers as $header) {
$hdr_arr = http_response_header_lines($header);
if(isset($hdr_arr['WWW-Authenticate'])) {
$strRealm = explode('=', $hdr_arr['WWW-Authenticate']);
$realm = str_replace('"', "", $strRealm[1]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function read_auth_header() {\n\t\t$auth_header = isset( $_SERVER['HTTP_AUTHORIZATION'] ) ? $_SERVER['HTTP_AUTHORIZATION'] : null;\n\n\t\tif ( !is_null( $auth_header ) ) {\n\t\t\t// Grab our type\n\t\t\t$auth_header_type = explode( ' ', $auth_header )[0];\n\n\t\t\t// Grab our string, and do some string processing\n\t\t\t$auth_header_string = str_replace(\n\t\t\t\t\"\\r\\n\",\n\t\t\t\t'',\n\t\t\t\ttrim( substr( $auth_header, strlen( $auth_header_type ) ) )\n\t\t\t);\n\n\t\t\t// Process our string into params\n\t\t\t$auth_header_params = array();\n\t\t\t// Regex source: http://oauth.googlecode.com/svn/code/php/OAuth.php OAuthUtil::split_header()\n\t\t\tif ( preg_match_all( '/([a-z_-]*)=(:?\"([^\"]*)\"|([^,]*))/', $auth_header_string, $params ) ) {\n\t\t\t\tforeach( $params[1] as $key => $val ) {\n\t\t\t\t\t$auth_header_params[ $val ] = trim( $params[2][ $key ], '\"' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Combine our parts\n\t\t\t$auth_header_parts = (object) array(\n\t\t\t\t'type' => $auth_header_type,\n\t\t\t\t'string' => $auth_header_string,\n\t\t\t\t'params' => $auth_header_params,\n\t\t\t);\n\n\t\t\treturn $auth_header_parts;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function getRealm(): string\n {\n if ($this->realm === null) {\n $this->realm = $this->getConfig('http_basic.realm', 'Restricted');\n }\n return $this->realm;\n }",
"function req_auth($realm = 'Secret Realm') {\n\theader('WWW-Authenticate: Basic realm=\"'.$realm.'\"');\n\theader('HTTP/1.1 401 Unauthorized');\n\tprint '<h1>Error 401: Authorization Required</h1>';\n\texit;\n}",
"public function getSystemAuthenticationRealm()\n\t{\n\t\t$options = XenForo_Application::get('options');\n\t\t$boardTitle = $options->get('boardTitle');\n\t\t\n\t\tif (empty($boardTitle))\n\t\t{\n\t\t\t// no board title, just use a generic name\n\t\t\t$boardTitle = 'XenForo';\n\t\t}\n\t\t\n\t\t$realm = new XenForo_Phrase('bdapi_realm', array('boardTitle' => $boardTitle));\n\t\t$realm .= ''; // convert to string\n\t}",
"public static function getServerAuthentication() {\n $header = array();\n // PHP as Apache module provides a SAPI function.\n // PHP 5.4+ enables getallheaders() also for FastCGI.\n if (function_exists('getallheaders')) {\n $headers = getallheaders();\n if (isset($headers['Authorization'])) {\n $input = $headers['Authorization'];\n }\n }\n // PHP as CGI with server/.htaccess configuration (e.g., via mod_rewrite)\n // may transfer/forward HTTP request data into server variables.\n elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $input = $_SERVER['HTTP_AUTHORIZATION'];\n }\n // PHP as CGI may provide HTTP request data as environment variables.\n elseif (isset($_ENV['HTTP_AUTHORIZATION'])) {\n $input = $_ENV['HTTP_AUTHORIZATION'];\n }\n if (isset($input)) {\n preg_match_all('@([^, =]+)=\"([^\"]*)\"@', $input, $header);\n $header = array_combine($header[1], $header[2]);\n }\n return $header;\n }",
"abstract public function getAuthenticator();",
"public function authentication_header() {\n return 'Proxy-Authorization: Basic ' . base64_encode($this->authentication());\n }",
"private function getAuthHeader()\n\t\t{\n\t\t\tif (isset($_SERVER['Authorization'])) {\n\t\t\t\treturn $_SERVER['Authorization'];\n\t\t\t} elseif (function_exists('apache_request_headers')) {\n\t\t\t\t$headers = apache_request_headers();\n\t\t\t\tif (isset($headers['Authorization'])) {\n\t\t\t\t\treturn $headers['Authorization'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new Exception(\"No authorization data!\");\n\t\t}",
"public function get_authorization(){\n\t\t$bvars = $this->get_bvars();\n\t\tif ( array_key_exists( 'Authorization', $bvars ) ) {\n\t\t\treturn $bvars[ 'Authorization' ];\t\n\t\t}\n\t\t\n\t\treturn 'Basic Kjo=';\n\t}",
"public function getAuthorizationHeader() \n {\n $headers = null;\n \n if (isset($_SERVER['Authorization'])) {\n $headers = trim($_SERVER['Authorization']);\n }\n else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $headers = trim($_SERVER['HTTP_AUTHORIZATION']);\n } elseif (function_exists('apache_request_headers')) {\n $apacheHeaders = apache_request_headers();\n \n $apacheHeaders = array_combine(array_map('ucwords', array_keys($apacheHeaders)), array_values($apacheHeaders));\n if (isset($apacheHeaders['Authorization'])) {\n $headers = trim($apacheHeaders['Authorization']);\n }\n }\n \n //echo (\"Headers: \" . $headers .\"\\n\"); //debug\n return $headers;\n }",
"public function authentication_header()\n {\n }",
"private function _getAuth()\n {\n if (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Sorry this action is not allowed for you';\n return false;\n } else {\n \n if ($_SERVER['PHP_AUTH_USER'] == 'testUser' && $_SERVER['PHP_AUTH_PW'] == 'testPassword') {\n return true;\n }\n \n return false;\n \n }\n }",
"private function authWWW()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing auth username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing auth password\");\n }\n \n $qop_present = false;\n if (strpos($this->response,'qop=') !== false)\n {\n $qop_present = true;\n \n // we can only do qop=\"auth\"\n if (strpos($this->response,'qop=\"auth\"') === false)\n {\n throw new PhpSIPException('Only qop=\"auth\" digest authentication supported.');\n }\n }\n \n // realm\n $result = [];\n if (!preg_match('/^WWW-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find realm in www-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = [];\n if (!preg_match('/^WWW-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find nonce in www-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n if ($qop_present)\n {\n $cnonce = md5(time());\n \n $res = md5($ha1.':'.$nonce.':00000001:'.$cnonce.':auth:'.$ha2);\n }\n else\n {\n $res = md5($ha1.':'.$nonce.':'.$ha2);\n }\n \n $this->auth = 'Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n \n if ($qop_present)\n {\n $this->auth.= ', qop=\"auth\", nc=\"00000001\", cnonce=\"'.$cnonce.'\"';\n }\n }",
"public function getAuth()\n {\n $this->getRequestHeaders([\n 'X-User-Id', 'X-Auth-Token'\n ]);\n }",
"abstract public function getAuthToken();",
"function auth (){\n //$app = \\Slim\\Slim::getInstance();\n //$headers = $app->request()->headers();\n //$token = JWT::decode($headers['X-Auth-Token'], 'secret_server_key');\n //print_r($token);\n //echo $headers['X-Auth-Token'];\n}",
"function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}",
"public function sendAuthChallengeHeader()\n {\n\t\t\n\t\theader('Authorization: Digest');\n header('WWW-Authenticate: Digest realm=\"' . self::AUTH_REALM \n . '\",qop=\"auth\",nonce=\"' . uniqid() \n\t\t\t . '\",algorithm=\"MD5\"'\n . '\",opaque=\"' . md5(self::AUTH_REALM) . '\"');\n\t\theader('HTTP/1.1 200');\n }",
"private function api_get_auth_header(array $headers) {\n foreach ($headers as $header) {\n if( substr( $header, 0, 14 ) === \"Authorization:\" ) {\n return $header;\n }\n }\n return '';\n }",
"public function checkAuth()\n\t{\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI\";\n\t\t$authinfo = json_decode($this->curlObj->fetch_url($url),true);\n\t\treturn $authinfo;\n\t}",
"private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}",
"public function get_auth_string()\n {\n }",
"public function setAuthenticateHeader()\n {\n $response = \\Yii::$app->response;\n $response->getHeaders()->set('WWW-Authenticate', \"Basic realm=\\\"{$this->realm}\\\"\");\n }",
"function unauthorized($realm = 'PHPRestSQL') {\n header('WWW-Authenticate: Basic realm=\"'.$realm.'\"');\n header('HTTP/1.0 401 Unauthorized');\n }",
"protected function getAuthorizationHeader(){\n return base64_encode(\n Controller\\Controller::getEnvironmentData('CCP_SSO_CLIENT_ID') . ':'\n . Controller\\Controller::getEnvironmentData('CCP_SSO_SECRET_KEY')\n );\n }",
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"public function getValidAuthString()\n {\n return 'Basic YXBwc2VydmVyOmFwcHNlcnZlci5pMA==';\n }",
"public function getAuthorization(): string\n {\n return self::PREFIX . base64_encode($this->username . ':' . $this->password);\n }",
"public function __construct($realm='lepton', $type=HttpAuthentication::AUTH_BASIC) {\n $this->type = $type;\n $this->realm = $realm;\n $this->username = $_SERVER['PHP_AUTH_USER'];\n $this->password = $_SERVER['PHP_AUTH_PW'];\n }",
"public function getAuthHeader()\n {\n return [\n 'auth' => [\n $this->username,\n $this->password,\n ],\n ];\n }",
"public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if(!empty($_SERVER[$temp])) return $_SERVER[$temp];\n\n // This seems to be the only way to get the Authorization header on Apache\n if (function_exists('apache_request_headers'))\n {\n $headers = apache_request_headers();\n if(!empty($headers[$header])) return $headers[$header];\n }\n return null;\n }",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }",
"function getRealm();",
"public function getAuthString()\n {\n }",
"public function auth(): string|null\n\t{\n\t\t$auth = trim($this->username . ':' . $this->password);\n\t\treturn $auth !== ':' ? $auth : null;\n\t}",
"public function getAuthorizationHeader()\n {\n // from the request, try to fall back to our own non-standard header\n $names = ['authorization', 'arengu-authorization'];\n\n // https://bugs.php.net/bug.php?id=72915\n // https://github.com/symfony/symfony/issues/19693\n // https://datatracker.ietf.org/doc/html/rfc3875#section-9.2\n foreach ($names as $lower) {\n $upper = strtoupper($lower);\n $prefixed = 'HTTP_' . str_replace('-', '_', $upper);\n\n // fpm/cli\n if (!empty($_SERVER[$prefixed])) {\n return $_SERVER[$prefixed];\n }\n \n // old cgi?\n if (!empty($_SERVER[$upper])) {\n return $_SERVER[$upper];\n }\n\n // apache\n $apache_headers = $this->getApacheHeaders();\n\n if (!empty($apache_headers[$lower])) {\n return $apache_headers[$lower];\n }\n }\n\n return '';\n }",
"public function getSessionAuthTokenName();",
"public static function getJWTFromHeader() {\n $httpHeaders = getallheaders();\n if (isset($httpHeaders['Authorization']) &&strpos($httpHeaders['Authorization'], 'Bearer ') === 0) {\n return substr($httpHeaders['Authorization'], strlen('Bearer '));\n }\n return NULL;\n }",
"public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if (isset($_SERVER[$temp])) {\n return $_SERVER[$temp];\n }\n\n // This seems to be the only way to get the Authorization header on\n // Apache\n if (function_exists('apache_request_headers')) {\n $headers = apache_request_headers();\n if (isset($headers[$header])) {\n return $headers[$header];\n }\n $header = strtolower($header);\n foreach ($headers as $key => $value) {\n if (strtolower($key) == $header) {\n return $value;\n }\n }\n }\n\n return false;\n }",
"private function auth()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing password\");\n }\n \n // realm\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }",
"public function getAuthAsString();",
"private function authWWW()\n {\n if (!$this->username)\n {\n throw new PhpOpenSIPsException(\"Missing auth username\");\n }\n \n if (!$this->password)\n {\n throw new PhpOpenSIPsException(\"Missing auth password\");\n }\n \n $qop_present = false;\n if (strpos($this->response,'qop=') !== false)\n {\n $qop_present = true;\n \n // we can only do qop=\"auth\"\n if (strpos($this->response,'qop=\"auth\"') === false)\n {\n throw new PhpOpenSIPsException('Only qop=\"auth\" digest authentication supported.');\n }\n }\n \n // realm\n $result = array();\n if (!preg_match('/^WWW-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find realm in www-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = array();\n if (!preg_match('/^WWW-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find nonce in www-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n if ($qop_present)\n {\n $cnonce = md5(time());\n \n $res = md5($ha1.':'.$nonce.':00000001:'.$cnonce.':auth:'.$ha2);\n }\n else\n {\n $res = md5($ha1.':'.$nonce.':'.$ha2);\n }\n \n $this->auth = 'Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n \n if ($qop_present)\n {\n $this->auth.= ', qop=\"auth\", nc=\"00000001\", cnonce=\"'.$cnonce.'\"';\n }\n }",
"public function getRealm()\n {\n return $this->realm;\n }",
"function wp_populate_basic_auth_from_authorization_header()\n {\n }",
"function authGet() { }",
"public function getHeaders(): array\n {\n $headers = [];\n\n foreach ($this->parameters as $key => $value) {\n\n if (Str::startsWith($key, 'HTTP_')) {\n $headers[Str::cutFromStart($key, 5)] = $value;\n\n } elseif (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) {\n $headers[$key] = $value;\n }\n }\n\n // TODO check and refactor\n\n if ($this->has('PHP_AUTH_USER')) {\n $headers['PHP_AUTH_USER'] = $this->get('PHP_AUTH_USER');\n $headers['PHP_AUTH_PW'] = $this->get('PHP_AUTH_PW', '');\n\n } else {\n /*\n * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default\n * For this workaround to work, add these lines to your .htaccess file:\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n *\n * A sample .htaccess file:\n * RewriteEngine On\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n * RewriteCond %{REQUEST_FILENAME} !-f\n * RewriteRule ^(.*)$ app.php [QSA,L]\n */\n\n $authorizationHeader = null;\n\n if ($this->has('HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('HTTP_AUTHORIZATION');\n } elseif ($this->has('REDIRECT_HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('REDIRECT_HTTP_AUTHORIZATION');\n }\n\n if ($authorizationHeader !== null) {\n\n if (Str::startsWith($authorizationHeader, 'basic ')) {\n\n // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n $exploded = explode(':', base64_decode(Str::cutFromStart($authorizationHeader, 6)), 2);\n\n if (count($exploded) === 2) {\n [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded;\n }\n\n } else if (empty($this->parameters['PHP_AUTH_DIGEST']) && (Str::startsWith($authorizationHeader, 'digest '))) {\n // In some circumstances PHP_AUTH_DIGEST needs to be set\n $headers['PHP_AUTH_DIGEST'] = $authorizationHeader;\n $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader;\n\n } else if (0 === stripos($authorizationHeader, 'bearer ')) {\n /*\n * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,\n * I'll just set $headers['AUTHORIZATION'] here.\n * https://php.net/reserved.variables.server\n */\n $headers['AUTHORIZATION'] = $authorizationHeader;\n }\n }\n }\n\n if (!isset($headers['AUTHORIZATION'])) {\n // PHP_AUTH_USER/PHP_AUTH_PW\n if (isset($headers['PHP_AUTH_USER'])) {\n $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);\n } elseif (isset($headers['PHP_AUTH_DIGEST'])) {\n $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }",
"public function requestReAuthBasic($realm = 'Restricted area', $message = 'Restricted area')\n {\n $this->send401Unauthorized();\n $this->sendHeader(\"WWW-Authenticate: Basic realm=\\\"{$realm}\\\"\");\n die($message);\n }",
"public function to_header($realm=null) {\n $first = true;\n\tif($realm) {\n $out = 'Authorization: OAuth realm=\"' . OAuthUtil::urlencode_rfc3986($realm) . '\"';\n $first = false;\n } else\n $out = 'Authorization: OAuth';\n\n $total = array();\n foreach ($this->parameters as $k => $v) {\n if (substr($k, 0, 5) != \"oauth\") continue;\n if (is_array($v)) {\n throw new OAuthException('Arrays not supported in headers');\n }\n $out .= ($first) ? ' ' : ',';\n $out .= OAuthUtil::urlencode_rfc3986($k) .\n '=\"' .\n OAuthUtil::urlencode_rfc3986($v) .\n '\"';\n $first = false;\n }\n return $out;\n }",
"public function getAuthKeyword()\n {\n return 'CRAM-MD5';\n }",
"public function headerMsisdnAction(){\n $headers = apache_request_headers();\n \n Zend_Debug::dump( $headers);\n die();\n \n \n \n \n echo $headers['Y-MSISDN'].'###';\n echo @$_SERVER['Y-MSISDN'].'###';\n die();\n }",
"public static function getAuthentication(): ?string {\r\n return $_SERVER['AUTH_TYPE'] ?? null;\r\n }",
"function auth() {\n header('WWW-Authenticate: Basic realm=\"Citations\"');\n header('HTTP/1.0 401 Unauthorized');\n print 'authorisation required';\n exit;\n }",
"public function testThatPasswordGrantRealmLoginSendsBasicRequestCorrectly()\n {\n $api = new MockAuthenticationApi([new Response(200)]);\n\n $api->call()->login( [\n 'username' => 'the_username',\n 'password' => 'the_password',\n 'realm' => 'the_realm',\n ] );\n\n $this->assertEquals( 'https://test-domain.auth0.com/oauth/token', $api->getHistoryUrl() );\n\n $request_body = $api->getHistoryBody();\n $this->assertEquals( 'the_realm', $request_body['realm'] );\n $this->assertEquals( 'http://auth0.com/oauth/grant-type/password-realm', $request_body['grant_type'] );\n }",
"public function authentication()\n {\n $response = new RESTAPI_CLASS_Response();\n $headers = self::getRequestHeaders();\n if (!isset($headers['Authorization'])) {\n return $response->error(401, \"Token is not exist.\");\n }\n\n $auth = explode(' ', $headers['Authorization']);\n if ($model = RESTAPI_BOL_Service::getInstance()->checkToken($auth[1])) {\n $this->token = $auth[1];\n return $model;\n } else {\n return $response->error(401, \"Your access denied.\");\n }\n }",
"function authenticateHeader($message = 'Authentication required')\n{\n header('WWW-Authenticate: Basic realm=\"FusionDirectory\"');\n header('HTTP/1.0 401 Unauthorized');\n echo \"$message\\n\";\n exit;\n}",
"public function getAmfHeaders();",
"protected function getBearer(){\n\t\t$a = $this->param->getServer('REDIRECT_HTTP_AUTHORIZATION');\n\t\tif(!$a){\n\t\t\t$a = $this->param->getServer('HTTP_AUTHORIZATION');\n\t\t}\n\n\t\tif($a){\n\t\t\t$authorization = $a;\n\t\t} else {\n\t\t\t$authorization = 'Bearer ' . $this->param->getParam('token');\n\t\t}\n\n\t\tif($authorization){\n\t\t\t$authorization = explode(' ', $authorization);\n\t\t\tif(isset($authorization[1])){\n\t\t\t\t$token = explode('.', $authorization[1]);\n\t\t\t\tif(count($token) == 3){\n\t\t\t\t\treturn $token;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public function getAuthMode() {}",
"function getAuthToken()\n {\n \treturn $this->_authToken;\n }",
"public function getAuthMode();",
"public function get_test_authorization_header()\n {\n }",
"private function parseHeader(string $header)\n {\n if (strpos($header, 'Basic') !== 0) {\n return false;\n }\n $header = explode(':', base64_decode(substr($header, 6)), 2);\n return [\n 'username' => $header[0],\n 'password' => isset($header[1]) ? $header[1] : null,\n ];\n }",
"public function getSessionAuthToken();",
"public static function getAuthorizationHeader(): ?string {\r\n\r\n $header = null;\r\n\r\n if(true === isset($_SERVER['Authorization'])) {\r\n $header = trim($_SERVER['Authorization']);\r\n }\r\n\r\n //Nginx or fast CGI\r\n elseif(true === isset($_SERVER['HTTP_AUTHORIZATION'])) {\r\n $header = trim($_SERVER['HTTP_AUTHORIZATION']);\r\n }\r\n\r\n //Apache\r\n elseif(true === function_exists('apache_request_headers')) {\r\n\r\n $requestHeaders = apache_request_headers();\r\n\r\n //Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)\r\n $requestHeaders = array_combine(array_map('ucwords', array_keys($requestHeaders)), array_values($requestHeaders));\r\n\r\n if(true === isset($requestHeaders['Authorization'])) {\r\n $header = trim($requestHeaders['Authorization']);\r\n }\r\n }\r\n\r\n return $header;\r\n }",
"private function getAuthorization()\n {\n // Post id_token\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n }\n $data = [\n 'authenticationToken' => $this->idToken,\n ];\n $url = \"https://api2.ov-chipkaart.nl/femobilegateway/v1/api/authorize\";\n $authorizationResponse = (self::Execute($url, $data));\n\n // Returns string\n $this->authorizationToken = $authorizationResponse['o'];\n }",
"public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }",
"function rc_request_header($name)\n{\n if (function_exists('getallheaders'))\n {\n $hdrs = array_change_key_case(getallheaders(), CASE_UPPER);\n $key = strtoupper($name);\n }\n else\n {\n $key = 'HTTP_' . strtoupper(strtr($name, '-', '_'));\n $hdrs = array_change_key_case($_SERVER, CASE_UPPER);\n }\n\n return $hdrs[$key];\n }",
"private function auth()\n {\n if (!$this->username)\n {\n throw new PhpOpenSIPsException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpOpenSIPsException(\"Missing password\");\n }\n \n // realm\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }",
"function extract_access_token()\r\n{\r\n $header = $_SERVER['HTTP_AUTHORIZATION'];\r\n\r\n if ($header != null && preg_match('/^Bearer[ ]+(.+)/i', $header, $captured))\r\n {\r\n return $captured;\r\n }\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET')\r\n {\r\n return $_GET['access_token'];\r\n }\r\n else\r\n {\r\n return $_POST['access_token'];\r\n }\r\n}",
"public function testParsingAuthorizationHeader() {\n\t\t$signer = new Auth_OAuth_Signer();\n\n\t\t$auth_header = 'OAuth realm=\"http://photos.example.net/\", oauth_version=\"1.0\", oauth_consumer_key=\"dpf43f3'\n\t\t\t. 'p2l4k3l03\", oauth_token=\"nnch734d00sl2jdk\", oauth_timestamp=\"1191242096\", oauth_nonce=\"kllo9940pd93'\n\t\t\t. '33jh\", oauth_signature_method=\"PLAINTEXT\", oauth_signature=\"kd94hf93k423kf44%26pfkkdhi9sl3r4s00\"';\n\t\t$params = array('file'=>'vacation.jpg', 'size'=>'original');\n\t\tself::build_request('GET', 'http://photos.example.net/photos', $params, $auth_header);\n\t\t$request = Auth_OAuth_RequestImpl::fromRequest();\n\n\t\t$this->assertEquals('http://photos.example.net/', $request->getRealm());\n\t\t$this->assertEquals('1.0', $request->getVersion());\n\t\t$this->assertEquals('dpf43f3p2l4k3l03', $request->getConsumerKey());\n\t\t$this->assertEquals('nnch734d00sl2jdk', $request->getToken());\n\t\t$this->assertEquals('1191242096', $request->getTimestamp());\n\t\t$this->assertEquals('kllo9940pd9333jh', $request->getNonce());\n\t\t$this->assertEquals('PLAINTEXT', $request->getSignatureMethod());\n\t\t$this->assertEquals('kd94hf93k423kf44&pfkkdhi9sl3r4s00', $request->getSignature());\n\t}",
"protected function fetchHeaders() \n {\n\n $authHeader = $this->request->getHeader(\"Authorization\");\n\n // exist if no Auth token is present in request\n if(!$authHeader) {\n \n // set API response via helper\n $response = setAPIresponse(['Success'=>'Authorization token required'], 400);\n \n returnJson($response);\n\n }\n\n // get token value from header\n $token = $authHeader->getValue();\n\n return $this->decodeToken($token);\n\n }",
"public function getToken() {\r\n $token = 'ZGV2czppZHNs';\r\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) {\r\n\t\t\t// mod_php\r\n $username = $_SERVER['PHP_AUTH_USER'];\r\n $password = $_SERVER['PHP_AUTH_PWD'];\r\n $token = base64_encode(\"$username:$password\");\r\n } elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) {\r\n\t\t\t// most other servers\r\n if (strpos(strtolower($_SERVER['HTTP_AUTHORIZATION']), 'basic')===0) {\r\n $token = base64_encode(substr($_SERVER['HTTP_AUTHORIZATION'], 6));\r\n }\r\n }\r\n if (is_null($token)) {\r\n\t\t\theader('HTTP/1.0 401 Unauthorized');\r\n return false;\r\n }\r\n return $token;\r\n }",
"public function action_basic() {\n\tif (Input::server(\"PHP_AUTH_USER\", null) == null) {\n\t $response = new Response();\n\t $response->set_header('WWW-Authenticate', 'Basic realm=\"Authenticate for eventual.org\"');\n\t return $response;\n\t} else {\n\t $response = Response::forge(\"You are authenticated as \" . Input::server(\"PHP_AUTH_USER\"));\n\t return $response;\n\t}\n }",
"function _digestMd5Login($challenge) {\n $result = $this->_digestmd5_parse_challenge($challenge);\n\n // verify server supports qop=auth\n // $qop = explode(\",\",$result['qop']);\n //if (!in_array(\"auth\",$qop)) {\n // rfc2831: client MUST fail if no qop methods supported\n // return false;\n //}\n $cnonce = base64_encode(bin2hex($this->_hmac_md5(microtime())));\n $ncount = \"00000001\";\n\n /* This can be auth (authentication only), auth-int (integrity protection), or\n auth-conf (confidentiality protection). Right now only auth is supported.\n DO NOT CHANGE THIS VALUE */\n $qop_value = \"auth\";\n\n $digest_uri_value = 'smtp/'.$this->SERVER;\n\n // build the $response_value\n //FIXME This will probably break badly if a server sends more than one realm\n $string_a1 = utf8_encode($this->AUTHID).\":\";\n $string_a1 .= utf8_encode($result['realm']).\":\";\n $string_a1 .= utf8_encode($this->AUTHPWD);\n $string_a1 = $this->_hmac_md5($string_a1);\n $A1 = $string_a1 . \":\" . $result['nonce'] . \":\" . $cnonce;\n $A1 = bin2hex($this->_hmac_md5($A1));\n $A2 = \"AUTHENTICATE:$digest_uri_value\";\n // If qop is auth-int or auth-conf, A2 gets a little extra\n if ($qop_value != 'auth') {\n $A2 .= ':00000000000000000000000000000000';\n }\n $A2 = bin2hex($this->_hmac_md5($A2));\n\n $string_response = $result['nonce'] . ':' . $ncount . ':' . $cnonce . ':' . $qop_value;\n $response_value = bin2hex($this->_hmac_md5($A1.\":\".$string_response.\":\".$A2));\n\n $response = 'charset=utf-8,username=\"' . $this->AUTHID . '\",realm=\"' . $result[\"realm\"] . '\",';\n $response .= 'nonce=\"' . $result['nonce'] . '\",nc=' . $ncount . ',cnonce=\"' . $cnonce . '\",';\n $response .= \"digest-uri=\\\"$digest_uri_value\\\",response=$response_value\";\n $response .= ',qop=' . $qop_value;\n $response = base64_encode($reply);\n return $response . \"\\r\\n\";\n\n}",
"public function getAuthenticationMode() {\n\t}",
"public function getHeader($token)\n {\n list($header) = explode('.', $token);\n return json_decode(base64_decode($header));\n }",
"public abstract function getRealm();",
"public function getAuth();",
"public function getAuth();",
"public function retrieveAuthCredentials()\n\t{\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\n\t\t$username = $password = NULL;\n\t\t\n\t\t// mod_php\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \n\t\t{\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\n\t\t}\n\n\t\t// most other servers\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\n\t\t{\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\n\t\t\t{\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check them - if they're null a/o empty, they're invalid.\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\n\t\t\treturn FALSE;\n\t\telse\n\t\t\treturn array('username' => $username, 'password' => $password);\n\t}",
"private function getAuthHeader()\n {\n $credential = $this->apiContext->getCredential();\n\n $header = '<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 $header .= '<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 $header .= '<wsse:Username>' . $credential->getUsername() . '</wsse:Username>';\n $header .= '<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">' . $credential->getPassword() . '</wsse:Password>';\n $header .= '</wsse:UsernameToken>';\n $header .= '</wsse:Security>';\n\n $headerbody = new \\SoapVar($header, XSD_ANYXML, null, null, null);\n return new \\SOAPHeader(self::PAYU_NAMESPACE, 'Security', $headerbody, true);\n }",
"public function authenticationReqd(){\n\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t$this['app']['hologram']->setModule(\"WWW\")->log(\\Bakery\\Utilities\\Hologram::NORMAL, \"Response: Page requires authentication\");\r\n\t\t\n\t\t$_SESSION['redirect_to'] = $this['request']['uri'];\n\t\t\n\t\tif($this->isJson()){\n\n\t\t\treturn array(\"response\" => \"authentication required\");\n\t\t\t\n\t\t}\n\t\t\n\t\theader(\"Location: {$this['app']['security.login']['handler']}\");\n\t\t\n\t}",
"function http_require_auth() {\n\theader('WWW-Authenticate: Basic realm=\"HTTP Authentication System\"');\n\theader('HTTP/1.0 401 Unauthorized');\n\techo \"You must enter a valid login ID and password to access this resource\\n\";\n\texit;\n}",
"function getBearerToken() {\n $headers = $this->getHeaders();\n $auth = $headers->get('Authorization', null);\n\n if ($auth !== null) {\n if (preg_match('/Bearer\\s(\\S+)/', $auth, $matches)) {\n return $matches[1];\n }\n }\n\n return null;\n }",
"protected static function getJWTFromAuthHeader()\n {\n if ('testing' === env('APP_ENV')) {\n //getallheaders method is not available in unit test mode.\n return [];\n }\n\n if (!function_exists('getallheaders')) {\n function getallheaders()\n {\n if (!is_array($_SERVER)) {\n return [];\n }\n\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] =\n $value;\n }\n }\n\n return $headers;\n }\n }\n\n $token = null;\n $headers = getallheaders();\n $authHeader = ArrayUtils::get($headers, 'Authorization');\n if (strpos($authHeader, 'Bearer') !== false) {\n $token = substr($authHeader, 7);\n }\n\n return $token;\n }",
"public function authDigestGetUserDetails()\n {\n $subject = $this->getServerVariableValue('PHP_AUTH_DIGEST');\n if (empty($subject)) {\n return false;\n }\n $pattern = '@(nonce|nc|cnonce|qop|username|uri|response)=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@';\n //int , int\n $matches = array();\n $flags = PREG_SET_ORDER;\n $offset = 0;\n preg_match_all($pattern, $subject, $matches, $flags, $offset);\n\n $result = array();\n foreach ($matches as $match) {\n $result[$match[1]] = $match[3] ? $match[3] : $match[4];\n }\n return count($result) != 7 ? false : $result;\n }",
"private function build_oauth_header($params, $realm='') {\r\n $header = 'Authorization: OAuth realm=\"' . $realm . '\"';\r\n foreach ($params as $k => $v) {\r\n if (substr($k, 0, 5) == 'oauth') {\r\n $header .= ',' . rfc3986_encode($k) . '=\"' . rfc3986_encode($v) . '\"';\r\n }\r\n }\r\n return $header;\r\n }",
"function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}",
"protected function getBasicAuthHeader()\n {\n return \"Basic \" . base64_encode($this->clientId . \":\" . $this->clientSecret);\n }",
"public function getHTTPHeaders() {\n\t\treturn array(\n\t\t\t'Authorization: Basic '.base64_encode($this->username.':'.$this->password)\n\t\t);\n\t}",
"private function login()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !$this->isAdmin()) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n exit;\n }\n }",
"public function to_header()\n {\n $out ='Authorization: OAuth realm=\"\"';\n $total = array();\n foreach ($this->parameters as $k => $v)\n {\n if (substr($k, 0, 5) != \"oauth\") continue;\n if (is_array($v)) throw new OAuthException('Arrays not supported in headers');\n $out .= ',' . OAuthUtil::urlencode_rfc3986($k) . '=\"' . OAuthUtil::urlencode_rfc3986($v) . '\"';\n }\n return $out;\n }",
"public static function getAuthInfo($uri)\n\t{\n\t\tif (isset(MHTTPD::$config['Auth'][$uri]) && MHTTPD::$config['Auth'][$uri] !== false) {\n\t\t\tif (!is_array(MHTTPD::$config['Auth'][$uri])) {\n\t\t\t\tMHTTPD::$config['Auth'][$uri] = array_combine(\n\t\t\t\t\tarray('realm', 'user', 'pass'),\n\t\t\t\t\tlistToArray(MHTTPD::$config['Auth'][$uri])\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn MHTTPD::$config['Auth'][$uri];\n\t\t}\n\t\treturn false;\n\t}",
"private static function split_header($header)\n {\n $pattern = '/(([-_a-z]*)=(\"([^\"]*)\"|([^,]*)),?)/';\n $offset = 0;\n $params = array();\n while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0)\n {\n $match = $matches[0];\n $header_name = $matches[2][0];\n $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];\n $params[$header_name] = OAuthUtil::urldecode_rfc3986( $header_content );\n $offset = $match[1] + strlen($match[0]);\n }\n\n if (isset($params['realm']))\n unset($params['realm']);\n\n return $params;\n }",
"private static function get_headers()\n {\n if (function_exists('apache_request_headers'))\n {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n return apache_request_headers();\n }\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n foreach ($_SERVER as $key => $value)\n {\n if (substr($key, 0, 5) == \"HTTP_\")\n {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\" \", \"-\", ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5)))));\n $out[$key] = $value;\n }\n }\n return $out;\n }",
"protected function _parseHeader() {}",
"public function GetTokenData()\n {\n $received_Token = $this->input->request_headers('Authorization');\n try\n {\n $jwtData = $this->objOfJwt->DecodeToken($received_Token['Token']);\n echo json_encode($jwtData);\n }\n catch (Exception $e)\n {\n http_response_code('401');\n echo json_encode(array( \"status\" => false, \"message\" => 'Token incorrect'));\n exit;\n }\n }"
] | [
"0.65520126",
"0.6253562",
"0.61188495",
"0.60663706",
"0.58420783",
"0.5770771",
"0.57658464",
"0.5747157",
"0.5716443",
"0.5703648",
"0.566769",
"0.56633323",
"0.5626101",
"0.56052816",
"0.55784595",
"0.5561879",
"0.55455554",
"0.55434877",
"0.5533076",
"0.5511598",
"0.5507342",
"0.5506063",
"0.54995996",
"0.5489162",
"0.54798716",
"0.5479001",
"0.5479001",
"0.5479001",
"0.54730743",
"0.54683536",
"0.5449541",
"0.54389143",
"0.54279065",
"0.5412923",
"0.5412923",
"0.54047763",
"0.54031444",
"0.54029214",
"0.5396824",
"0.5371178",
"0.5368741",
"0.53381914",
"0.5327049",
"0.532408",
"0.5323746",
"0.5321365",
"0.5310534",
"0.5309518",
"0.5300101",
"0.52911913",
"0.5281497",
"0.5281357",
"0.52795315",
"0.5272801",
"0.52685374",
"0.5264758",
"0.52617013",
"0.52538943",
"0.5252631",
"0.52514666",
"0.52461094",
"0.52316755",
"0.5225514",
"0.52113044",
"0.52012175",
"0.519209",
"0.5189018",
"0.5188035",
"0.51871693",
"0.51866657",
"0.51716006",
"0.5171287",
"0.5166481",
"0.5160672",
"0.51456237",
"0.5133439",
"0.51273525",
"0.5122928",
"0.51209205",
"0.5118497",
"0.508719",
"0.508719",
"0.5080134",
"0.5073725",
"0.5068456",
"0.505327",
"0.5051789",
"0.50426245",
"0.5041093",
"0.5037093",
"0.502954",
"0.50283754",
"0.50279975",
"0.50238353",
"0.50149465",
"0.5013941",
"0.5007789",
"0.50049204",
"0.5002253",
"0.49831957"
] | 0.6690058 | 0 |
Append an ordinal indicator to a numeric value. | function str_ordinal($value, $superscript = false)
{
$number = abs($value);
$indicators = ['th','st','nd','rd','th','th','th','th','th','th'];
$suffix = $superscript ? '<sup>' . $indicators[$number % 10] . '</sup>' : $indicators[$number % 10];
if ($number % 100 >= 11 && $number % 100 <= 13) {
$suffix = $superscript ? '<sup>th</sup>' : 'th';
}
return number_format($number) . $suffix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addOrdinal($num) {\n\t\ttry {\n\t\t\tif (!in_array(($num % 100), array(11, 12, 13))){\n\t\t\t\tswitch ($num % 10) {\n\t\t\t\t\t// Handle 1st, 2nd, 3rd\n\t\t\t\t\tcase 1: return $num.'st';\n\t\t\t\t\tcase 2: return $num.'nd';\n\t\t\t\t\tcase 3: return $num.'rd';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $num.'th';\n\t\t\t\n\t\t} catch (Exception $e) { \n\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} //<-- end try -->\n\t}",
"function show_ordinal($num) \n\t{\n\t\t$the_num = (string) $num;\n\t\t$last_digit = substr($the_num, -1, 1);\n\t\tswitch($last_digit) \n\t\t{\n\t\t\tcase \"1\":\n\t\t\t\t$the_num.=\"st\";\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\t$the_num.=\"nd\";\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\t$the_num.=\"rd\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$the_num.=\"th\";\n\t\t}\n\t\treturn $the_num;\n\t}",
"public function setOrdinalPosition($var)\n {\n GPBUtil::checkInt32($var);\n $this->ordinal_position = $var;\n\n return $this;\n }",
"public function setOrdinal($ordinal)\n {\n $this->ordinal = $ordinal;\n return $this;\n }",
"public function getOrdinal()\n {\n return $this->ordinal;\n }",
"public function getOrdinalPosition()\n {\n return $this->ordinal_position;\n }",
"public static function Ordinal($number) {\n $ends = array('th','st','nd','rd','th','th','th','th','th','th');\n if ((($number % 100) >= 11) && (($number%100) <= 13))\n return $number. 'th';\n else\n return $number. $ends[$number % 10];\n }",
"function ordinal($number) {\r\n\r\n // when fed a number, adds the English ordinal suffix. Works for any\r\n // number, even negatives\r\n\r\n if ($number % 100 > 10 && $number %100 < 14):\r\n $suffix = \"th\";\r\n else:\r\n switch($number % 10) {\r\n\r\n case 0:\r\n $suffix = \"th\";\r\n break;\r\n\r\n case 1:\r\n $suffix = \"st\";\r\n break;\r\n\r\n case 2:\r\n $suffix = \"nd\";\r\n break;\r\n\r\n case 3:\r\n $suffix = \"rd\";\r\n break;\r\n\r\n default:\r\n $suffix = \"th\";\r\n break;\r\n }\r\n\r\n endif;\r\n\r\n return \"${number}$suffix\";\r\n\r\n}",
"protected function ordinal($number)\n {\n return (isset($this->dict[$number]))\n ? $this->dict[$number]\n : 'th';\n }",
"public function formatOrdinal($number, array $attributes = array(), array $textAttributes = array(), $locale = null)\n {\n return $this->format($number, \\NumberFormatter::ORDINAL, $attributes, $textAttributes, $locale);\n }",
"function number_increment_class($value)\n {\n return $value > 0 ? 'positive' : ($value < 0 ? 'negative' : 'unchanged');\n }",
"public function setIndicator($val)\n {\n $this->_propDict[\"indicator\"] = $val;\n return $this;\n }",
"public function addPos( $value){\n return $this->_add(1, $value);\n }",
"private function doSetBitInt($ordinal): void\n {\n /** @var int $thisBitset */\n $thisBitset = $this->bitset;\n\n $this->bitset = $thisBitset | (1 << $ordinal);\n }",
"function number_increment_sign($value)\n {\n if($value >= 0) {\n return '+';\n } else {\n return '';\n }\n }",
"public function setIncrement($value) {\r\n\r\n /** @todo RAISING EXCEPTIONS HERE FORCES DECLARING \"THROW\" EVERYWHERE! */\r\n// if ($value < 0) {\r\n// throw new TeeChartException(Language.getString(\"AxisIncrementNeg\"));\r\n// }\r\n\r\n //if (isDateTime()) System.Convert.ToDateTime($value).ToString();\r\n $this->desiredIncrement = $this->setDoubleProperty($this->desiredIncrement, $value);\r\n }",
"public function ordinalize($number)\n\t{\n\t\tif (in_array(($number % 100),range(11,13))){\n\t\t\treturn $number.'th';\n\t\t}else{\n\t\t\tswitch (($number % 10)) {\n\t\t\tcase 1:\n\t\t\t\treturn $number.'st';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\treturn $number.'nd';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\treturn $number.'rd';\n\t\t\tdefault:\n\t\t\t\treturn $number.'th';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public function ordinalize($number)\n {\n if (in_array($number % 100, range(11, 13))) {\n return $number . 'th';\n }\n switch ($number % 10) {\n case 1:\n return $number . 'st';\n case 2:\n return $number . 'nd';\n case 3:\n return $number . 'rd';\n default:\n return $number . 'th';\n }\n }",
"public static function ordinalize($number)\n {\n if (in_array((intval($number) % 100),range(11,13))){\n return $number.'th';\n }else{\n switch (($number % 10)) {\n case 1:\n return $number.'st';\n break;\n case 2:\n return $number.'nd';\n break;\n case 3:\n return $number.'rd';\n default:\n return $number.'th';\n break;\n }\n }\n }",
"public function testOrdinal() {\n $this->assertEquals('1st', Inflector::ordinal(1));\n $this->assertEquals('2nd', Inflector::ordinal(2));\n $this->assertEquals('3rd', Inflector::ordinal(3));\n $this->assertEquals('4th', Inflector::ordinal(4));\n $this->assertEquals('5th', Inflector::ordinal(5));\n\n // teens\n $this->assertEquals('12th', Inflector::ordinal(12));\n $this->assertEquals('15th', Inflector::ordinal(15));\n $this->assertEquals('18th', Inflector::ordinal(18));\n $this->assertEquals('20th', Inflector::ordinal(20));\n\n // high numbers\n $this->assertEquals('91st', Inflector::ordinal(91));\n $this->assertEquals('342nd', Inflector::ordinal(342));\n $this->assertEquals('8534th', Inflector::ordinal(8534));\n $this->assertEquals('92343rd', Inflector::ordinal(92343));\n $this->assertEquals('678420th', Inflector::ordinal(678420));\n\n // casting\n $this->assertEquals('11th', Inflector::ordinal('11th'));\n $this->assertEquals('98th', Inflector::ordinal('98s'));\n $this->assertEquals('438th', Inflector::ordinal('438lbs'));\n $this->assertEquals('-12th', Inflector::ordinal('-12$'));\n }",
"public function xmlaOrdinal()\n {\n return $this->xmlaOrdinal;\n }",
"function addAttribute($value_id, $ord)\n {\n $this->arrRelations[$value_id] = $ord;\n return true;\n }",
"function ordinal_suffix($number)\n {\n $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');\n if ((($number % 100) >= 11) && (($number % 100) <= 13)) {\n return $number . 'th';\n } else {\n return $number . $ends[$number % 10];\n }\n }",
"public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}",
"protected function _format($ordinalValue)\n {\n $hex = dechex($ordinalValue);\n return '&#x' . $hex . ';';\n }",
"function prepend_one($num) {\n\n\t\tif ($num < 10) {\n\t\t\t$num = \"0\" . $num;\n\t\t}\n\t\t\n\t\treturn $num;\n }",
"protected function _setNumeric($name, $value) {}",
"function addInputValue( $idx, $value );",
"function ord($ord=null)\n {\n if (isset($ord)) {\n $this->ord = intval($ord);\n }\n return $this->ord;\n }",
"public static function NumericOrdering($tag, $ascdesc = 'ascending')\n {\n return '<numeric>' . self::Term($ascdesc, $tag) . '</numeric>';\n }",
"public function setProgressIndicator(int $indicator) {\n $this->setValue(0x3C5, $indicator);\n }",
"function _getOrdinal($nr) {\n $digit = substr($nr, -1);\n if (!in_array($digit, array(1, 2, 3)) || in_array($nr, array(11, 12, 13))) {\n return 'th';\n }\n switch ($digit) {\n case 1:\n return 'st';\n case 2:\n return 'nd';\n case 3:\n return 'rd';\n }\n return 'th';\n }",
"function GetOrdinal($num) {\n // first convert to string if needed\n $the_num = (string) $num;\n // now we grab the last digit of the number\n $last_digit = substr($the_num, -1, 1);\n // if the string is more than 2 chars long, we get\n // the second to last character to evaluate\n if (strlen($the_num)>1) {\n $next_to_last = substr($the_num, -2, 1);\n } else {\n $next_to_last = \"\";\n }\n // now iterate through possibilities in a switch\n switch($last_digit) {\n case \"1\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"st\";\n }\n break;\n case \"2\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"nd\";\n }\n break;\n // if last digit is a 3\n case \"3\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"rd\";\n }\n break;\n // for all the other numbers we use \"th\"\n default:\n $the_num.=\"th\";\n }\n\n // finally, return our string with it's new suffix\n return $the_num;\n}",
"public function AddIntData ($key, $int_value) {\n\t\t$this->data[$key] = strval($int_value);\n\t}",
"private function AddHeaderDigit($i)\n {\n $this->length = $this->length * 16 + $i;\n }",
"public function setOrd($ord) {\n $this->ord = $ord;\n }",
"public function setIncrementing($value);",
"public function addValue($value);",
"public function getFormattedIndicator()\n {\n return $this->formattedIndicator;\n }",
"function ordinal_suffix($n) {\n $n_last = $n % 100;\n if (($n_last > 10 && $n_last < 14) || $n == 0){\n return \"{$n}th\";\n }\n switch(substr($n, -1)) {\n case '1': return \"{$n}st\";\n case '2': return \"{$n}nd\";\n case '3': return \"{$n}rd\";\n default: return \"{$n}th\";\n }\n}",
"private static function integerCallback($value)\n {\n\t\treturn str_pad(substr($value, -9), 9, 0, STR_PAD_LEFT);\n\t}",
"function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }",
"function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }",
"public function setX($ord)\r\n {\r\n $this->x=$ord;\r\n }",
"function arredonda($valor){\n\t\t$v = round($valor - intval($valor), 1);\n\t\tif($v<0.3){\n\t\t\t$v = 0;\n\t\t}\n\t\t\n\t\tif($v>=0.3 && $v<0.8){\n\t\t\t$v = 0.5;\n\t\t}\n\t\t\n\t\tif($v>=0.8){\n\t\t\t$v = 1;\n\t\t}\n\t\tif($valor == \"\"){ \n\t\t\treturn NULL; \n\t\t}else{\n\t\t\t$valor= number_format(intval($valor) + $v,1,'.','');\n\t\t\treturn $valor;\n\t\t}\n\t}",
"function addRawInputValue( $idx, $value );",
"public function setIndicator($indicator)\n {\n $this->indicator = $indicator;\n return $this;\n }",
"public static function ordinalSuffix ($number)\r\n\t{\r\n\t\t# Obtain the last character in the number\r\n\t\t$last = substr ($number, -1);\r\n\t\t\r\n\t\t# Obtain the penultimate number\r\n\t\tif (strlen ($number) < 2) {\r\n\t\t\t$penultimate = 0;\r\n\t\t} else {\r\n\t\t\t$penultimate = substr ($number, -2);\r\n\t\t}\r\n\t\t\r\n\t\t# Assign the suffix\r\n\t\tif ($penultimate >= 10 && $penultimate < 20) {\r\n\t\t\t$suffix = 'th';\r\n\t\t} else if ($last == 1) {\r\n\t\t\t$suffix = 'st';\r\n\t\t} else if ($last == 2) {\r\n\t\t\t$suffix = 'nd';\r\n\t\t} else if ($last == 3) {\r\n\t\t\t$suffix = 'rd';\r\n\t\t} else {\r\n\t\t\t$suffix = 'th';\r\n\t\t}\r\n\t\t\r\n\t\t# Return the result\r\n\t\treturn number_format ($number) . $suffix;\r\n\t}",
"private function doSetBitBin($ordinal): void\n {\n /** @var string $thisBitset */\n $thisBitset = $this->bitset;\n\n $byte = (int) ($ordinal / 8);\n $thisBitset[$byte] = $thisBitset[$byte] | \\chr(1 << ($ordinal % 8));\n\n $this->bitset = $thisBitset;\n }",
"public function addExtendpos( $value){\n return $this->_add(3, $value);\n }",
"public function getCurrentOrdinal()\n {\n $bytes = $this->context->getBytes();\n $index = $bytes->indexOf($this->currentByte);\n $ordinal = '';\n\n for ($j = 0; $j < 4; $j++) {\n if ($index & 1) {\n $ordinal = OrdinalEnum::search($j);\n break;\n }\n\n $index >>= 1;\n }\n\n return $ordinal;\n }",
"function numeral($number) {\r\n $test = abs($number) % 10;\r\n $ext = ((abs($number) % 100 < 21 and abs($number) % 100 > 4) ? 'th' : (($test < 4) ? ($test < 3) ? ($test < 2) ? ($test < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));\r\n return $number . $ext;\r\n}",
"public function appendValue($value) {\n $this->current->value($value);\n }",
"public function writeInt($num){ }",
"public function appendDpsRank(Down_DpsRank $value)\n {\n return $this->append(self::_DPS_RANK, $value);\n }",
"protected function setDNINumber($value)\n\t{\n\t\t$this->setTextFont(10);\n\t\t$value = number_format($value,\"0\",\"\",\".\");\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->drawText($value, 298, 623, 'UTF-8');\n\t\t}\n\t\t\n\t}",
"private static function _intVal($int)\n {\n return $int + 0;\n }",
"private function append($value)\n {\n \t$this->values[] = $value;\n }",
"function getIndicator() ;",
"function ordinal_day($ord, $day, $month, $year) {\n\n\t$firstOfMonth = get_timestamp(\"$year-$month-01\");\n\t$lastOfMonth = $firstOfMonth + date(\"t\", $firstOfMonth) * 86400;\n\t$dayOccurs = 0;\n\n\tfor ($i = $firstOfMonth; $i < $lastOfMonth ; $i += 86400){\n\t\tif (date(\"D\", $i) == $day){\n\t\t\t$dayOccurs++;\n\t\t\tif ($dayOccurs == $ord){\n\t\t\t\t$ordDay = $i;\n\t\t\t}\n\t\t}\n\t}\n\treturn $ordDay;\n}",
"abstract public function addCharCode($charCode);",
"public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }",
"public function addLevel( $value){\n return $this->_add(2, $value);\n }",
"private function getFieldOutputNumericAI($value, $iar = [])\n {\n if ($this->getFieldValue($value) == '') {\n $spF = ['id' => $value['COLUMN_NAME'], 'style' => 'font-style:italic;'];\n return $this->setStringIntoTag('auto-numar', 'span', $spF);\n }\n $inAdtnl = [\n 'type' => 'hidden',\n 'name' => $value['COLUMN_NAME'],\n 'id' => $value['COLUMN_NAME'],\n 'value' => $this->getFieldValue($value),\n ];\n if ($iar !== []) {\n $inAdtnl = array_merge($inAdtnl, $iar);\n }\n return '<b>' . $this->getFieldValue($value) . '</b>' . $this->setStringIntoShortTag('input', $inAdtnl);\n }",
"final public function ordinal(): int\n {\n $key = array_search($this->name, array_keys(self::getEnumConstants()), true);\n if ($key === false) {\n throw new \\RuntimeException(sprintf('Not found the ordinal number of the constant %s', $this->name));\n }\n return $key;\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"protected function _encode_digit($d)\n {\n return chr($d + 22 + 75 * ($d < 26));\n }",
"function inc ($key, $value = 1);",
"public function appendValue(\\Google\\Protobuf\\EnumValueDescriptorProto $value)\n {\n return $this->append(self::VALUE, $value);\n }",
"function add_zero($num){\n if((int)$num<10){\n return \"0\".(String)$num;\n }\n else\n return $num;\n }",
"public function appendParamsInt($value)\n {\n return $this->append(self::PARAMS_INT, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(3, $value);\n }",
"function postdigit(string $c, int $n):void{\n global $i, $romanval;\n for($j = 0; $j < $n; $j++){\n $romanval[$i++] = $c;\n }\n}",
"public function __invoke(int $number)\n {\n $lastDigit = $this->calculateLastDigit($number);\n\n return $number.$this->ordinal($lastDigit);\n }",
"private function convertToNumberOrdinal($number)\n {\n $error_code = $this->checkParamaters($number, 'n');\n\n if ($error_code > 0) {\n return self::$error_codes[$error_code];\n }\n\n if ($number === 0) {\n return 0;\n }\n\n if (!in_array(($number % 100), [11, 12, 13])) {\n switch ($number % 10) {\n case 1:\n return $number.'st';\n case 2:\n return $number.'nd';\n case 3:\n return $number.'rd';\n }\n }\n\n return $number.'th';\n }",
"public function getOrdinalSuffix($number) {\n $number = abs($number);\n $lastChar = substr($number, -1, 1);\n switch ($lastChar) {\n case '1' : return ($number == '11') ? 'th' : 'st';\n case '2' : return ($number == '12') ? 'th' : 'nd';\n case '3' : return ($number == '13') ? 'th' : 'rd';\n }\n return 'th';\n }",
"public function setOrder($str) { $this->val .= ' ' . $str; }",
"function number_int( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_NUMBER,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_INTEGER\n );\n\t}",
"function predigit(string $num1, string $num2):void{\n global $i, $romanval;\n $romanval[$i++] = $num1; // Stores $num1 in i'th cell and increase it to 1.\n $romanval[$i++] = $num2; // Stores $num2 in i'th cell and increase it to 1.\n}",
"public function addObjectives(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(9, $value);\n }",
"public function appendOrderId($value)\n {\n return $this->append(self::order_id, $value);\n }",
"public function setAdvance($number);",
"public function adicionarPeriodicidade($iValor) {\n $this->aPeriodicidades[] = $iValor;\n }",
"public function __construct($value) {\n\t\t$this->_value = $value + 0;\n\t\t$this->_result = '';\n\t}",
"public function addStatuses(\\google\\rpc\\Status $value){\n return $this->_add(1, $value);\n }",
"public function appendInt32($value)\n {\n $s = pack(\"l\", $value);\n return $this->append(self::$isLittleEndian ? self::swapEndian32($s) : $s);\n }",
"public function add($enumerator): void\n {\n $this->{$this->fnDoSetBit}(($this->enumeration)::get($enumerator)->getOrdinal());\n }",
"public function appendInt8($value)\n {\n return $this->append(pack(\"c\", $value));\n }",
"function _putIntNumber(&$pdf, $x, $y, $data, $distance, $align, $margin1) {\n\t\t$data = strval($data);\n $step = 0;\n for ($i = strlen($data) - 1; $i >= 0; $i--) {\n $element = mb_substr($data, $i, 1, 'utf-8');\n if ($element == '-') {\n $element = '△';\n $pdf->SetXY($x - $step + $margin1, $y);\n } else {\n $pdf->SetXY($x - $step, $y);\n }\n $pdf->MultiCell(10, 5, $element, 0, $align);\n $step += $distance;\n }\n }",
"public function updateInteger( Inx_Api_Recipient_Attribute $attr, $iValue );",
"public function setNumericCode($numericCode);",
"public function getOrdinals(): array\n {\n return $this->{$this->fnDoGetOrdinals}();\n }",
"public function addAccess($value) {\n return $this->_add(16, $value);\n }",
"function SetValuePrepend( $k, $v ) { $this->_values[$k] = $v . $this->_values[$k]; }",
"public static function prepend($index, $value)\n {\n self::exist($index);\n array_unshift(self::$registry[$index], $value);\n }",
"public function setFormattedIndicator($formattedIndicator)\n {\n $this->formattedIndicator = $formattedIndicator;\n return $this;\n }",
"public function xAxis($value) {\n return $this->setProperty('xAxis', $value);\n }",
"public function addNumber($str_name)\n {\n return $this->addField($str_name, self::FIELD_NUMBER);\n }"
] | [
"0.5982373",
"0.5979901",
"0.55339915",
"0.54651165",
"0.5463416",
"0.51590705",
"0.51133007",
"0.498149",
"0.49227795",
"0.48972845",
"0.48784953",
"0.4855803",
"0.48298126",
"0.48257002",
"0.4780186",
"0.4777891",
"0.4774414",
"0.47550923",
"0.47222975",
"0.469611",
"0.4617003",
"0.46156913",
"0.4609507",
"0.4607101",
"0.46053457",
"0.46013787",
"0.45978996",
"0.45775783",
"0.4577148",
"0.45675185",
"0.4516186",
"0.45150277",
"0.4471893",
"0.44498077",
"0.444927",
"0.44227278",
"0.44167924",
"0.44163686",
"0.44135967",
"0.43828008",
"0.43601638",
"0.43588886",
"0.43588886",
"0.4354947",
"0.43412822",
"0.43397203",
"0.4338903",
"0.4305725",
"0.42897785",
"0.42811987",
"0.42781603",
"0.42639995",
"0.42405963",
"0.4231964",
"0.42258126",
"0.4225564",
"0.4223635",
"0.42086637",
"0.4200954",
"0.41965476",
"0.41948217",
"0.41860595",
"0.418326",
"0.41760224",
"0.4175341",
"0.41681153",
"0.41681153",
"0.41681153",
"0.41592187",
"0.41591334",
"0.4143884",
"0.41437536",
"0.41411775",
"0.4141099",
"0.41378227",
"0.41183615",
"0.4103404",
"0.40840942",
"0.40669617",
"0.40657425",
"0.4059226",
"0.40517578",
"0.40456092",
"0.40451458",
"0.40406784",
"0.4038832",
"0.40364912",
"0.40339226",
"0.4030327",
"0.4018532",
"0.4011027",
"0.40060616",
"0.40024346",
"0.39942813",
"0.3992764",
"0.39864874",
"0.3983999",
"0.39818573",
"0.39790437",
"0.39727804"
] | 0.54786056 | 3 |
Append an ordinal indicator to a numeric value. | function number_increment_sign($value)
{
if($value >= 0) {
return '+';
} else {
return '';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addOrdinal($num) {\n\t\ttry {\n\t\t\tif (!in_array(($num % 100), array(11, 12, 13))){\n\t\t\t\tswitch ($num % 10) {\n\t\t\t\t\t// Handle 1st, 2nd, 3rd\n\t\t\t\t\tcase 1: return $num.'st';\n\t\t\t\t\tcase 2: return $num.'nd';\n\t\t\t\t\tcase 3: return $num.'rd';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $num.'th';\n\t\t\t\n\t\t} catch (Exception $e) { \n\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} //<-- end try -->\n\t}",
"function show_ordinal($num) \n\t{\n\t\t$the_num = (string) $num;\n\t\t$last_digit = substr($the_num, -1, 1);\n\t\tswitch($last_digit) \n\t\t{\n\t\t\tcase \"1\":\n\t\t\t\t$the_num.=\"st\";\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\t$the_num.=\"nd\";\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\t$the_num.=\"rd\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$the_num.=\"th\";\n\t\t}\n\t\treturn $the_num;\n\t}",
"public function setOrdinalPosition($var)\n {\n GPBUtil::checkInt32($var);\n $this->ordinal_position = $var;\n\n return $this;\n }",
"function str_ordinal($value, $superscript = false)\n {\n $number = abs($value);\n\n $indicators = ['th','st','nd','rd','th','th','th','th','th','th'];\n\n $suffix = $superscript ? '<sup>' . $indicators[$number % 10] . '</sup>' : $indicators[$number % 10];\n if ($number % 100 >= 11 && $number % 100 <= 13) {\n $suffix = $superscript ? '<sup>th</sup>' : 'th';\n }\n\n return number_format($number) . $suffix;\n }",
"public function setOrdinal($ordinal)\n {\n $this->ordinal = $ordinal;\n return $this;\n }",
"public function getOrdinal()\n {\n return $this->ordinal;\n }",
"public function getOrdinalPosition()\n {\n return $this->ordinal_position;\n }",
"public static function Ordinal($number) {\n $ends = array('th','st','nd','rd','th','th','th','th','th','th');\n if ((($number % 100) >= 11) && (($number%100) <= 13))\n return $number. 'th';\n else\n return $number. $ends[$number % 10];\n }",
"function ordinal($number) {\r\n\r\n // when fed a number, adds the English ordinal suffix. Works for any\r\n // number, even negatives\r\n\r\n if ($number % 100 > 10 && $number %100 < 14):\r\n $suffix = \"th\";\r\n else:\r\n switch($number % 10) {\r\n\r\n case 0:\r\n $suffix = \"th\";\r\n break;\r\n\r\n case 1:\r\n $suffix = \"st\";\r\n break;\r\n\r\n case 2:\r\n $suffix = \"nd\";\r\n break;\r\n\r\n case 3:\r\n $suffix = \"rd\";\r\n break;\r\n\r\n default:\r\n $suffix = \"th\";\r\n break;\r\n }\r\n\r\n endif;\r\n\r\n return \"${number}$suffix\";\r\n\r\n}",
"protected function ordinal($number)\n {\n return (isset($this->dict[$number]))\n ? $this->dict[$number]\n : 'th';\n }",
"public function formatOrdinal($number, array $attributes = array(), array $textAttributes = array(), $locale = null)\n {\n return $this->format($number, \\NumberFormatter::ORDINAL, $attributes, $textAttributes, $locale);\n }",
"function number_increment_class($value)\n {\n return $value > 0 ? 'positive' : ($value < 0 ? 'negative' : 'unchanged');\n }",
"public function setIndicator($val)\n {\n $this->_propDict[\"indicator\"] = $val;\n return $this;\n }",
"public function addPos( $value){\n return $this->_add(1, $value);\n }",
"private function doSetBitInt($ordinal): void\n {\n /** @var int $thisBitset */\n $thisBitset = $this->bitset;\n\n $this->bitset = $thisBitset | (1 << $ordinal);\n }",
"public function setIncrement($value) {\r\n\r\n /** @todo RAISING EXCEPTIONS HERE FORCES DECLARING \"THROW\" EVERYWHERE! */\r\n// if ($value < 0) {\r\n// throw new TeeChartException(Language.getString(\"AxisIncrementNeg\"));\r\n// }\r\n\r\n //if (isDateTime()) System.Convert.ToDateTime($value).ToString();\r\n $this->desiredIncrement = $this->setDoubleProperty($this->desiredIncrement, $value);\r\n }",
"public function ordinalize($number)\n\t{\n\t\tif (in_array(($number % 100),range(11,13))){\n\t\t\treturn $number.'th';\n\t\t}else{\n\t\t\tswitch (($number % 10)) {\n\t\t\tcase 1:\n\t\t\t\treturn $number.'st';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\treturn $number.'nd';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\treturn $number.'rd';\n\t\t\tdefault:\n\t\t\t\treturn $number.'th';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public function ordinalize($number)\n {\n if (in_array($number % 100, range(11, 13))) {\n return $number . 'th';\n }\n switch ($number % 10) {\n case 1:\n return $number . 'st';\n case 2:\n return $number . 'nd';\n case 3:\n return $number . 'rd';\n default:\n return $number . 'th';\n }\n }",
"public static function ordinalize($number)\n {\n if (in_array((intval($number) % 100),range(11,13))){\n return $number.'th';\n }else{\n switch (($number % 10)) {\n case 1:\n return $number.'st';\n break;\n case 2:\n return $number.'nd';\n break;\n case 3:\n return $number.'rd';\n default:\n return $number.'th';\n break;\n }\n }\n }",
"public function testOrdinal() {\n $this->assertEquals('1st', Inflector::ordinal(1));\n $this->assertEquals('2nd', Inflector::ordinal(2));\n $this->assertEquals('3rd', Inflector::ordinal(3));\n $this->assertEquals('4th', Inflector::ordinal(4));\n $this->assertEquals('5th', Inflector::ordinal(5));\n\n // teens\n $this->assertEquals('12th', Inflector::ordinal(12));\n $this->assertEquals('15th', Inflector::ordinal(15));\n $this->assertEquals('18th', Inflector::ordinal(18));\n $this->assertEquals('20th', Inflector::ordinal(20));\n\n // high numbers\n $this->assertEquals('91st', Inflector::ordinal(91));\n $this->assertEquals('342nd', Inflector::ordinal(342));\n $this->assertEquals('8534th', Inflector::ordinal(8534));\n $this->assertEquals('92343rd', Inflector::ordinal(92343));\n $this->assertEquals('678420th', Inflector::ordinal(678420));\n\n // casting\n $this->assertEquals('11th', Inflector::ordinal('11th'));\n $this->assertEquals('98th', Inflector::ordinal('98s'));\n $this->assertEquals('438th', Inflector::ordinal('438lbs'));\n $this->assertEquals('-12th', Inflector::ordinal('-12$'));\n }",
"public function xmlaOrdinal()\n {\n return $this->xmlaOrdinal;\n }",
"function addAttribute($value_id, $ord)\n {\n $this->arrRelations[$value_id] = $ord;\n return true;\n }",
"function ordinal_suffix($number)\n {\n $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');\n if ((($number % 100) >= 11) && (($number % 100) <= 13)) {\n return $number . 'th';\n } else {\n return $number . $ends[$number % 10];\n }\n }",
"public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}",
"protected function _format($ordinalValue)\n {\n $hex = dechex($ordinalValue);\n return '&#x' . $hex . ';';\n }",
"function prepend_one($num) {\n\n\t\tif ($num < 10) {\n\t\t\t$num = \"0\" . $num;\n\t\t}\n\t\t\n\t\treturn $num;\n }",
"protected function _setNumeric($name, $value) {}",
"function addInputValue( $idx, $value );",
"function ord($ord=null)\n {\n if (isset($ord)) {\n $this->ord = intval($ord);\n }\n return $this->ord;\n }",
"public static function NumericOrdering($tag, $ascdesc = 'ascending')\n {\n return '<numeric>' . self::Term($ascdesc, $tag) . '</numeric>';\n }",
"public function setProgressIndicator(int $indicator) {\n $this->setValue(0x3C5, $indicator);\n }",
"function _getOrdinal($nr) {\n $digit = substr($nr, -1);\n if (!in_array($digit, array(1, 2, 3)) || in_array($nr, array(11, 12, 13))) {\n return 'th';\n }\n switch ($digit) {\n case 1:\n return 'st';\n case 2:\n return 'nd';\n case 3:\n return 'rd';\n }\n return 'th';\n }",
"function GetOrdinal($num) {\n // first convert to string if needed\n $the_num = (string) $num;\n // now we grab the last digit of the number\n $last_digit = substr($the_num, -1, 1);\n // if the string is more than 2 chars long, we get\n // the second to last character to evaluate\n if (strlen($the_num)>1) {\n $next_to_last = substr($the_num, -2, 1);\n } else {\n $next_to_last = \"\";\n }\n // now iterate through possibilities in a switch\n switch($last_digit) {\n case \"1\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"st\";\n }\n break;\n case \"2\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"nd\";\n }\n break;\n // if last digit is a 3\n case \"3\":\n // testing the second from last digit here\n switch($next_to_last) {\n case \"1\":\n $the_num.=\"th\";\n break;\n default:\n $the_num.=\"rd\";\n }\n break;\n // for all the other numbers we use \"th\"\n default:\n $the_num.=\"th\";\n }\n\n // finally, return our string with it's new suffix\n return $the_num;\n}",
"public function AddIntData ($key, $int_value) {\n\t\t$this->data[$key] = strval($int_value);\n\t}",
"private function AddHeaderDigit($i)\n {\n $this->length = $this->length * 16 + $i;\n }",
"public function setOrd($ord) {\n $this->ord = $ord;\n }",
"public function setIncrementing($value);",
"public function addValue($value);",
"public function getFormattedIndicator()\n {\n return $this->formattedIndicator;\n }",
"function ordinal_suffix($n) {\n $n_last = $n % 100;\n if (($n_last > 10 && $n_last < 14) || $n == 0){\n return \"{$n}th\";\n }\n switch(substr($n, -1)) {\n case '1': return \"{$n}st\";\n case '2': return \"{$n}nd\";\n case '3': return \"{$n}rd\";\n default: return \"{$n}th\";\n }\n}",
"private static function integerCallback($value)\n {\n\t\treturn str_pad(substr($value, -9), 9, 0, STR_PAD_LEFT);\n\t}",
"function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }",
"function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }",
"public function setX($ord)\r\n {\r\n $this->x=$ord;\r\n }",
"function arredonda($valor){\n\t\t$v = round($valor - intval($valor), 1);\n\t\tif($v<0.3){\n\t\t\t$v = 0;\n\t\t}\n\t\t\n\t\tif($v>=0.3 && $v<0.8){\n\t\t\t$v = 0.5;\n\t\t}\n\t\t\n\t\tif($v>=0.8){\n\t\t\t$v = 1;\n\t\t}\n\t\tif($valor == \"\"){ \n\t\t\treturn NULL; \n\t\t}else{\n\t\t\t$valor= number_format(intval($valor) + $v,1,'.','');\n\t\t\treturn $valor;\n\t\t}\n\t}",
"function addRawInputValue( $idx, $value );",
"public function setIndicator($indicator)\n {\n $this->indicator = $indicator;\n return $this;\n }",
"public static function ordinalSuffix ($number)\r\n\t{\r\n\t\t# Obtain the last character in the number\r\n\t\t$last = substr ($number, -1);\r\n\t\t\r\n\t\t# Obtain the penultimate number\r\n\t\tif (strlen ($number) < 2) {\r\n\t\t\t$penultimate = 0;\r\n\t\t} else {\r\n\t\t\t$penultimate = substr ($number, -2);\r\n\t\t}\r\n\t\t\r\n\t\t# Assign the suffix\r\n\t\tif ($penultimate >= 10 && $penultimate < 20) {\r\n\t\t\t$suffix = 'th';\r\n\t\t} else if ($last == 1) {\r\n\t\t\t$suffix = 'st';\r\n\t\t} else if ($last == 2) {\r\n\t\t\t$suffix = 'nd';\r\n\t\t} else if ($last == 3) {\r\n\t\t\t$suffix = 'rd';\r\n\t\t} else {\r\n\t\t\t$suffix = 'th';\r\n\t\t}\r\n\t\t\r\n\t\t# Return the result\r\n\t\treturn number_format ($number) . $suffix;\r\n\t}",
"private function doSetBitBin($ordinal): void\n {\n /** @var string $thisBitset */\n $thisBitset = $this->bitset;\n\n $byte = (int) ($ordinal / 8);\n $thisBitset[$byte] = $thisBitset[$byte] | \\chr(1 << ($ordinal % 8));\n\n $this->bitset = $thisBitset;\n }",
"public function addExtendpos( $value){\n return $this->_add(3, $value);\n }",
"public function getCurrentOrdinal()\n {\n $bytes = $this->context->getBytes();\n $index = $bytes->indexOf($this->currentByte);\n $ordinal = '';\n\n for ($j = 0; $j < 4; $j++) {\n if ($index & 1) {\n $ordinal = OrdinalEnum::search($j);\n break;\n }\n\n $index >>= 1;\n }\n\n return $ordinal;\n }",
"function numeral($number) {\r\n $test = abs($number) % 10;\r\n $ext = ((abs($number) % 100 < 21 and abs($number) % 100 > 4) ? 'th' : (($test < 4) ? ($test < 3) ? ($test < 2) ? ($test < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));\r\n return $number . $ext;\r\n}",
"public function appendValue($value) {\n $this->current->value($value);\n }",
"public function writeInt($num){ }",
"public function appendDpsRank(Down_DpsRank $value)\n {\n return $this->append(self::_DPS_RANK, $value);\n }",
"protected function setDNINumber($value)\n\t{\n\t\t$this->setTextFont(10);\n\t\t$value = number_format($value,\"0\",\"\",\".\");\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->drawText($value, 298, 623, 'UTF-8');\n\t\t}\n\t\t\n\t}",
"private static function _intVal($int)\n {\n return $int + 0;\n }",
"private function append($value)\n {\n \t$this->values[] = $value;\n }",
"function getIndicator() ;",
"function ordinal_day($ord, $day, $month, $year) {\n\n\t$firstOfMonth = get_timestamp(\"$year-$month-01\");\n\t$lastOfMonth = $firstOfMonth + date(\"t\", $firstOfMonth) * 86400;\n\t$dayOccurs = 0;\n\n\tfor ($i = $firstOfMonth; $i < $lastOfMonth ; $i += 86400){\n\t\tif (date(\"D\", $i) == $day){\n\t\t\t$dayOccurs++;\n\t\t\tif ($dayOccurs == $ord){\n\t\t\t\t$ordDay = $i;\n\t\t\t}\n\t\t}\n\t}\n\treturn $ordDay;\n}",
"abstract public function addCharCode($charCode);",
"public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }",
"public function addLevel( $value){\n return $this->_add(2, $value);\n }",
"private function getFieldOutputNumericAI($value, $iar = [])\n {\n if ($this->getFieldValue($value) == '') {\n $spF = ['id' => $value['COLUMN_NAME'], 'style' => 'font-style:italic;'];\n return $this->setStringIntoTag('auto-numar', 'span', $spF);\n }\n $inAdtnl = [\n 'type' => 'hidden',\n 'name' => $value['COLUMN_NAME'],\n 'id' => $value['COLUMN_NAME'],\n 'value' => $this->getFieldValue($value),\n ];\n if ($iar !== []) {\n $inAdtnl = array_merge($inAdtnl, $iar);\n }\n return '<b>' . $this->getFieldValue($value) . '</b>' . $this->setStringIntoShortTag('input', $inAdtnl);\n }",
"final public function ordinal(): int\n {\n $key = array_search($this->name, array_keys(self::getEnumConstants()), true);\n if ($key === false) {\n throw new \\RuntimeException(sprintf('Not found the ordinal number of the constant %s', $this->name));\n }\n return $key;\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(4, $value);\n }",
"protected function _encode_digit($d)\n {\n return chr($d + 22 + 75 * ($d < 26));\n }",
"function inc ($key, $value = 1);",
"public function appendValue(\\Google\\Protobuf\\EnumValueDescriptorProto $value)\n {\n return $this->append(self::VALUE, $value);\n }",
"function add_zero($num){\n if((int)$num<10){\n return \"0\".(String)$num;\n }\n else\n return $num;\n }",
"public function appendParamsInt($value)\n {\n return $this->append(self::PARAMS_INT, $value);\n }",
"public function addAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(3, $value);\n }",
"function postdigit(string $c, int $n):void{\n global $i, $romanval;\n for($j = 0; $j < $n; $j++){\n $romanval[$i++] = $c;\n }\n}",
"public function __invoke(int $number)\n {\n $lastDigit = $this->calculateLastDigit($number);\n\n return $number.$this->ordinal($lastDigit);\n }",
"private function convertToNumberOrdinal($number)\n {\n $error_code = $this->checkParamaters($number, 'n');\n\n if ($error_code > 0) {\n return self::$error_codes[$error_code];\n }\n\n if ($number === 0) {\n return 0;\n }\n\n if (!in_array(($number % 100), [11, 12, 13])) {\n switch ($number % 10) {\n case 1:\n return $number.'st';\n case 2:\n return $number.'nd';\n case 3:\n return $number.'rd';\n }\n }\n\n return $number.'th';\n }",
"public function getOrdinalSuffix($number) {\n $number = abs($number);\n $lastChar = substr($number, -1, 1);\n switch ($lastChar) {\n case '1' : return ($number == '11') ? 'th' : 'st';\n case '2' : return ($number == '12') ? 'th' : 'nd';\n case '3' : return ($number == '13') ? 'th' : 'rd';\n }\n return 'th';\n }",
"public function setOrder($str) { $this->val .= ' ' . $str; }",
"function number_int( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_NUMBER,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_INTEGER\n );\n\t}",
"function predigit(string $num1, string $num2):void{\n global $i, $romanval;\n $romanval[$i++] = $num1; // Stores $num1 in i'th cell and increase it to 1.\n $romanval[$i++] = $num2; // Stores $num2 in i'th cell and increase it to 1.\n}",
"public function addObjectives(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(9, $value);\n }",
"public function appendOrderId($value)\n {\n return $this->append(self::order_id, $value);\n }",
"public function setAdvance($number);",
"public function adicionarPeriodicidade($iValor) {\n $this->aPeriodicidades[] = $iValor;\n }",
"public function __construct($value) {\n\t\t$this->_value = $value + 0;\n\t\t$this->_result = '';\n\t}",
"public function addStatuses(\\google\\rpc\\Status $value){\n return $this->_add(1, $value);\n }",
"public function appendInt32($value)\n {\n $s = pack(\"l\", $value);\n return $this->append(self::$isLittleEndian ? self::swapEndian32($s) : $s);\n }",
"public function add($enumerator): void\n {\n $this->{$this->fnDoSetBit}(($this->enumeration)::get($enumerator)->getOrdinal());\n }",
"public function appendInt8($value)\n {\n return $this->append(pack(\"c\", $value));\n }",
"function _putIntNumber(&$pdf, $x, $y, $data, $distance, $align, $margin1) {\n\t\t$data = strval($data);\n $step = 0;\n for ($i = strlen($data) - 1; $i >= 0; $i--) {\n $element = mb_substr($data, $i, 1, 'utf-8');\n if ($element == '-') {\n $element = '△';\n $pdf->SetXY($x - $step + $margin1, $y);\n } else {\n $pdf->SetXY($x - $step, $y);\n }\n $pdf->MultiCell(10, 5, $element, 0, $align);\n $step += $distance;\n }\n }",
"public function updateInteger( Inx_Api_Recipient_Attribute $attr, $iValue );",
"public function setNumericCode($numericCode);",
"public function getOrdinals(): array\n {\n return $this->{$this->fnDoGetOrdinals}();\n }",
"public function addAccess($value) {\n return $this->_add(16, $value);\n }",
"function SetValuePrepend( $k, $v ) { $this->_values[$k] = $v . $this->_values[$k]; }",
"public static function prepend($index, $value)\n {\n self::exist($index);\n array_unshift(self::$registry[$index], $value);\n }",
"public function setFormattedIndicator($formattedIndicator)\n {\n $this->formattedIndicator = $formattedIndicator;\n return $this;\n }",
"public function xAxis($value) {\n return $this->setProperty('xAxis', $value);\n }",
"public function addNumber($str_name)\n {\n return $this->addField($str_name, self::FIELD_NUMBER);\n }"
] | [
"0.5982373",
"0.5979901",
"0.55339915",
"0.54786056",
"0.54651165",
"0.5463416",
"0.51590705",
"0.51133007",
"0.498149",
"0.49227795",
"0.48972845",
"0.48784953",
"0.4855803",
"0.48298126",
"0.48257002",
"0.4777891",
"0.4774414",
"0.47550923",
"0.47222975",
"0.469611",
"0.4617003",
"0.46156913",
"0.4609507",
"0.4607101",
"0.46053457",
"0.46013787",
"0.45978996",
"0.45775783",
"0.4577148",
"0.45675185",
"0.4516186",
"0.45150277",
"0.4471893",
"0.44498077",
"0.444927",
"0.44227278",
"0.44167924",
"0.44163686",
"0.44135967",
"0.43828008",
"0.43601638",
"0.43588886",
"0.43588886",
"0.4354947",
"0.43412822",
"0.43397203",
"0.4338903",
"0.4305725",
"0.42897785",
"0.42811987",
"0.42781603",
"0.42639995",
"0.42405963",
"0.4231964",
"0.42258126",
"0.4225564",
"0.4223635",
"0.42086637",
"0.4200954",
"0.41965476",
"0.41948217",
"0.41860595",
"0.418326",
"0.41760224",
"0.4175341",
"0.41681153",
"0.41681153",
"0.41681153",
"0.41592187",
"0.41591334",
"0.4143884",
"0.41437536",
"0.41411775",
"0.4141099",
"0.41378227",
"0.41183615",
"0.4103404",
"0.40840942",
"0.40669617",
"0.40657425",
"0.4059226",
"0.40517578",
"0.40456092",
"0.40451458",
"0.40406784",
"0.4038832",
"0.40364912",
"0.40339226",
"0.4030327",
"0.4018532",
"0.4011027",
"0.40060616",
"0.40024346",
"0.39942813",
"0.3992764",
"0.39864874",
"0.3983999",
"0.39818573",
"0.39790437",
"0.39727804"
] | 0.4780186 | 15 |
Append a class name. | function percentage_rate_class($value, $base = 50)
{
if(!is_numeric($value)) {
$value = 0;
}
$percentage = (float)$value;
if($percentage == 100) {
return 'excelent';
}
if($percentage == 0) {
return 'neutral';
}
if($percentage < $base) {
return 'poor';
}
return 'ok';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function percentage_rate($value, $append_plus = false)
{
$percentage = (float)$value;
if($percentage > 0) {
return ($append_plus ? "+" : "").$percentage."%";
} else {
return $percentage."%";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.59817207",
"0.5976367",
"0.59619486",
"0.5916029",
"0.590647",
"0.5903996",
"0.5903902",
"0.589988",
"0.5878004",
"0.58627725",
"0.58230734",
"0.5812556",
"0.5810813",
"0.5806368",
"0.5804144",
"0.5796144",
"0.5786776",
"0.5786776",
"0.5786776",
"0.5786776",
"0.57839704",
"0.5769354",
"0.57619077",
"0.5759068",
"0.575581",
"0.57515",
"0.57515",
"0.5743191",
"0.5736344",
"0.57319295",
"0.5730261",
"0.5722999",
"0.569984",
"0.56921333",
"0.5687784",
"0.56769353",
"0.56728464",
"0.566053",
"0.56596076",
"0.5649808",
"0.56483144",
"0.564414",
"0.5643092",
"0.56401026",
"0.5637375",
"0.5636997",
"0.5634476",
"0.5626199",
"0.560891",
"0.56076485",
"0.5601076",
"0.55834514",
"0.55777925",
"0.5576471",
"0.5570655",
"0.5569135",
"0.55671704",
"0.55655926",
"0.5565097",
"0.5560546",
"0.5560546",
"0.55581385",
"0.5547161",
"0.5546801",
"0.5539416",
"0.55374813",
"0.5531349",
"0.5521656",
"0.5518898",
"0.5509552",
"0.55036646",
"0.5499315",
"0.5497561",
"0.5483755",
"0.5482012",
"0.5479589",
"0.5477526",
"0.5472895",
"0.5470406",
"0.54607666",
"0.54572713"
] | 0.0 | -1 |
Append a class name. | function number_increment_class($value)
{
return $value > 0 ? 'positive' : ($value < 0 ? 'negative' : 'unchanged');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function question_type_class($type)
{
switch($type) {
case QUESTION_TYPE_MULTIPLE_CHOICE :
return ''; // Default, no class
case QUESTION_TYPE_ONE_OF_VALUES :
return 'type-ofc';
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function section_score_header($section_score, $scoring = 'score')
{
if($scoring == 'percentile') {
return 'Your Score: '.str_ordinal($section_score);
} else if($scoring == 'stanine') {
return 'Your Stanine: '.$section_score;
}
return 'Your Score: '.$section_score;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function section_score_composite_header($score, $scoring = 'score')
{
if($scoring == 'percentile') {
return 'Your Percentile: '.str_ordinal($score);
}
return 'Your Score: '.$score;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.59817207",
"0.5976367",
"0.59619486",
"0.5916029",
"0.590647",
"0.5903996",
"0.5903902",
"0.589988",
"0.5878004",
"0.58627725",
"0.58230734",
"0.5812556",
"0.5810813",
"0.5806368",
"0.5804144",
"0.5796144",
"0.5786776",
"0.5786776",
"0.5786776",
"0.5786776",
"0.57839704",
"0.5769354",
"0.57619077",
"0.5759068",
"0.575581",
"0.57515",
"0.57515",
"0.5743191",
"0.5736344",
"0.57319295",
"0.5730261",
"0.5722999",
"0.569984",
"0.56921333",
"0.5687784",
"0.56769353",
"0.56728464",
"0.566053",
"0.56596076",
"0.5649808",
"0.56483144",
"0.564414",
"0.5643092",
"0.56401026",
"0.5637375",
"0.5636997",
"0.5634476",
"0.5626199",
"0.560891",
"0.56076485",
"0.5601076",
"0.55834514",
"0.55777925",
"0.5576471",
"0.5570655",
"0.5569135",
"0.55671704",
"0.55655926",
"0.5565097",
"0.5560546",
"0.5560546",
"0.55581385",
"0.5547161",
"0.5546801",
"0.5539416",
"0.55374813",
"0.5531349",
"0.5521656",
"0.5518898",
"0.5509552",
"0.55036646",
"0.5499315",
"0.5497561",
"0.5483755",
"0.5482012",
"0.5479589",
"0.5477526",
"0.5472895",
"0.5470406",
"0.54607666",
"0.54572713"
] | 0.0 | -1 |
Append a class name. | function section_score_table($score, $scoring = 'score')
{
if($scoring == 'percentile') {
return str_ordinal($score);
}
return $score;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function gain_if_correct($score_increment, $total, $correct, $suffix)
{
if($total == $correct) {
return 'N/A';
}
return $score_increment. " ".$suffix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function answer_status_class($answer)
{
if($answer['is_correct']) {
return 'correct';
} else if($answer['is_unanswered']) {
return 'unanswered';
} else {
return 'incorrect';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.7826987",
"0.75793904",
"0.71178335",
"0.6864903",
"0.6639969",
"0.6519955",
"0.6493575",
"0.64797026",
"0.6386583",
"0.6346888",
"0.633751",
"0.62863815",
"0.6233489",
"0.6215977",
"0.6196478",
"0.61677337",
"0.6100036",
"0.6097792",
"0.60085213",
"0.60030776",
"0.59818655",
"0.5977024",
"0.59622246",
"0.591572",
"0.59064573",
"0.59037983",
"0.59034497",
"0.5900648",
"0.587781",
"0.586246",
"0.58232266",
"0.5812455",
"0.5811435",
"0.580688",
"0.58045375",
"0.57958114",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57872844",
"0.57845277",
"0.57698965",
"0.57616335",
"0.5758996",
"0.57560277",
"0.5751982",
"0.5751982",
"0.57433814",
"0.573633",
"0.57317436",
"0.5730385",
"0.57235444",
"0.5699851",
"0.56927186",
"0.5688301",
"0.5676914",
"0.56723726",
"0.5660472",
"0.56598854",
"0.5649762",
"0.5648389",
"0.56440294",
"0.5643279",
"0.56400853",
"0.56375396",
"0.5636754",
"0.5634684",
"0.5626748",
"0.5608543",
"0.5608197",
"0.56013066",
"0.5583758",
"0.5578459",
"0.55769473",
"0.5570761",
"0.5569788",
"0.55673134",
"0.5565979",
"0.5565322",
"0.5561232",
"0.5561232",
"0.5558931",
"0.55477655",
"0.5547265",
"0.5539798",
"0.5537422",
"0.5531454",
"0.5522308",
"0.5519364",
"0.5509584",
"0.55037117",
"0.54998237",
"0.5497391",
"0.54835284",
"0.5482611",
"0.5480029",
"0.5477609",
"0.5473556",
"0.547101",
"0.546137",
"0.54571414"
] | 0.0 | -1 |
Append a class name. | function answer_status_tags_class($answer)
{
if(($answer['has_tags'])) {
return 'warning';
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addClassName(string $class): void {\n\t\t$this->m_attributes[\"class\"][] = $class;\n\t}",
"public function add_class($class_name)\n {\n }",
"public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}",
"public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}",
"public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}",
"public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}",
"public function addClass($className) {\r\n $this->join($className);\r\n return $this;\r\n }",
"public static function AddClass($class, $element) {\n return 'Html.AddClass(\\'' . $element . '\\',\\'' . $class . '\\');';\n }",
"public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}",
"function setClassName($value) {\r\n $this->className = $value;\r\n }",
"public function setClassName($class) {\n $this->_className = $class;\n }",
"public function setClass(string $class_name);",
"public function addClass($class)\n {\n $this->classes .= \" \" . $class;\n return $this;\n }",
"protected function addClass($node,$class)\n {\n $existing = $node->getAttribute('class');\n if (strlen($existing)>0) $existing .= ' '; // add space delimiter\n $existing .= $class;\n $node->setAttribute('class',$existing);\n }",
"function macro_assemble_class_name($suffix, $moduleAuthor = null, $moduleName = null)\n{\n return $moduleAuthor\n ? 'XLite\\Module\\\\' . $moduleAuthor . '\\\\' . $moduleName . '\\\\' . $suffix\n : 'XLite\\\\' . $suffix;\n}",
"public function push_class(string $class) : self\n {\n $this->class_list[] = $class;\n return $this;\n }",
"private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}",
"public function class() {\n\t\t$base = self::DEFAULTS['baseclass'];\n\t\t$class = $base;\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}",
"public function addClass(string $class): self\n\t{\n\t\t$this->getElementPrototype()->class[] = $class;\n\t\treturn $this;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function render_class_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.classname');\n\t\t}\n\t\t$namespace_parts = explode('\\\\', $str);\n\t\tforeach ($namespace_parts as &$part)\n\t\t{\n\t\t\t$part = ucfirst($this->render_name(ucwords($part), $option));\n\t\t}\n\t\treturn implode('\\\\', $namespace_parts);\n\t}",
"public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}",
"public static function class(string $class): string\n\t{\n\t\treturn str_replace('Kirby\\\\', 'Kirby\\\\Kql\\\\Interceptors\\\\', $class);\n\t}",
"function add_cssclass($class_to_add, $classes)\n {\n }",
"public static function class(string $type): string\n {\n return 'type type-' . $type;\n }",
"public function addClass($name) {\n\t\t$this->attributes[\"class\"][$name] = $name;\n\t\treturn $this;\n\t}",
"function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push($options[ \"CLASS\" ],$class);\n\n $options[ \"CLASS\" ]=join(\",\",$options[ \"CLASS\" ]);\n }",
"public function setClassName($className) {\n $this->className = $className;\n }",
"public function addClass(DOMElement $element, $class) {\n $classes = $element->getAttribute(\"class\");\n $classes .= \" $class\";\n $element->setAttribute(\"class\", trim($classes));\n }",
"public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"protected function _generate_classname($group, $time)\n\t{\n\t\t$class = ucwords(str_replace('/', ' ', $group));\n\n\t\t// If group is empty then we want to avoid double underscore in the\n\t\t// class name\n\t\tif ( ! empty($class))\n\t\t{\n\t\t\t$class .= '_';\n\t\t}\n\n\t\t$class .= $time;\n\n\t\treturn 'Migration_'.preg_replace('~[^a-zA-Z0-9]+~', '_', $class);\n\t}",
"public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }",
"private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n // If this array > 2 elements: it's a subclass [example: OmsEvent::Account::Account]\n $this->className = $arr;\n if ( count($this->className) > 1 ) {\n $this->functionName = array_pop($this->className);\n }\n }",
"public function getClassName() ;",
"function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}",
"public function addClassTask(string $className, $_ctorArgs = NULL): void {}",
"public function getClassName();",
"public function getClassName();",
"function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}",
"public function addClass($options = array(), $class = null, $key = 'class') {\n if (isset($options[$key]) && trim($options[$key])) {\n $oClasses = explode(' ', $options[$key]);\n $nClasses = explode(' ', $class);\n foreach($nClasses as $nClass) {\n if(!in_array($nClass, $oClasses)) {\n $options[$key] .= ' ' . $class;\n $oClasses[] = $nClass;\n }\n }\n } else {\n $options[$key] = $class;\n }\n return $options;\n }",
"function addClass($classInfo) {\r\n $this->db->insert('class', $classInfo);\r\n }",
"function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}",
"public static function newClassName(string $className): string\n {\n // Only proxy AOP class\n if (!Aop::matchClass($className)) {\n return $className;\n }\n\n // Is RPC proxy\n if (strpos($className, '_IGNORE_') !== false) {\n return $className;\n }\n\n $visitor = new ProxyVisitor();\n return BaseProxy::newClassName($className, $visitor);\n }",
"function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}",
"public function getClassShortName(string $class);",
"public function getClassName() : string;",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }",
"function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}",
"public static function concatClassNames($className1)\n {\n return implode('', array_map(\n function($arg) {\n return ucfirst(strtolower($arg));\n },\n func_get_args()\n ));\n }",
"public static function of($class)\n {\n return static::class.':'.$class;\n }",
"protected function buildClassnameConstraint() {\n\t\treturn 'doc.classname==\"' . addslashes($this->type) . '\"';\n\t}",
"protected function getClassToExtend()\n {\n $class = $this->getConfig(ClassExtendConfiguration::class)->getValue();\n if (empty($class)) {\n return '';\n }\n\n return \" extends $class\";\n }",
"protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }",
"public function addClass($class, $targetClass) {\n\t\t$class = '\\\\' . ltrim($class, '\\\\');\n\t\t$targetClass = '\\\\' . ltrim($targetClass, '\\\\');\n\t\t$this->classes[$class] = $targetClass;\n\t}",
"function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }",
"public function addClass(string $class): HtmlElementInterface;",
"function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}",
"public function getClassName(): string;",
"public static function className($class, $separator = self::PACKAGE) {\n return trim(strrchr($class, $separator), $separator);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function setInsert(string $className): void;",
"public static function className(string $fullClass): string\n {\n $fullClass = str_replace('\\\\', '/', $fullClass);\n\n return basename($fullClass);\n }",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}",
"public function className($value)\n {\n $this->attributes['className'] = $value;\n\n return $this;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function setClassName(string $className): void\n {\n $this->set(self::CLASS_NAME, $className);\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"private function get_file_name_from_class( $class ) {\n\t\treturn 'class-' . str_replace( array( 'tp_', '_' ), array( '', '-' ), $class ) . '.php';\n\t}",
"static public function registerClass ($phpClassName, $haxeClassName) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:153: characters 3-40\n\t\tBoot::$aliases[$phpClassName] = $haxeClassName;\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"protected function getClassName($name)\n {\n return Str::studly($name);\n }",
"public static function generateClassFileName($classname) {\n return 'class.' . $classname . '.php';\n }",
"public function register_class($class_name, $path)\n\t{\n\t\t$class_name = strtolower($class_name);\n\t\tif ($path[0]!=DIRECTORY_SEPARATOR) $path = $this->get_modules_dir().DIRECTORY_SEPARATOR.$path;\n\t\t$this->classes[$class_name] = $path;\n\t}",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}",
"public function push(string $class)\n {\n foreach (explode(' ', $class) as $item) {\n if ( ! $this->has($item))\n $this->classes[] = $item;\n }\n\n return $this;\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"function class_dotcase($className){\n if(is_object($className)){\n $className = get_class($className);\n }\n\n $namespaced = array_where(explode('\\\\',$className), function($i, $v){ return !empty($v); });\n array_walk($namespaced, function(&$value){ $value = lcfirst($value);});\n\n return implode('.', $namespaced);\n}",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function setClassname($classname)\n\t{\n\t\t$this->classname = $classname;\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = EFC_WEBAPP_PATH.$path;\n require_once(EFC_WEBAPP_PATH.$path);\n }"
] | [
"0.78269464",
"0.75794536",
"0.7118151",
"0.6865146",
"0.6639506",
"0.65203303",
"0.6493597",
"0.6480172",
"0.63859916",
"0.6346284",
"0.633686",
"0.6285827",
"0.62338406",
"0.6216182",
"0.61962706",
"0.61678845",
"0.6100063",
"0.60980356",
"0.60088426",
"0.60026723",
"0.59817207",
"0.5976367",
"0.59619486",
"0.5916029",
"0.590647",
"0.5903996",
"0.5903902",
"0.589988",
"0.5878004",
"0.58627725",
"0.58230734",
"0.5812556",
"0.5810813",
"0.5806368",
"0.5804144",
"0.5796144",
"0.5786776",
"0.5786776",
"0.5786776",
"0.5786776",
"0.57839704",
"0.5769354",
"0.57619077",
"0.5759068",
"0.575581",
"0.57515",
"0.57515",
"0.5743191",
"0.5736344",
"0.57319295",
"0.5730261",
"0.5722999",
"0.569984",
"0.56921333",
"0.5687784",
"0.56769353",
"0.56728464",
"0.566053",
"0.56596076",
"0.5649808",
"0.56483144",
"0.564414",
"0.5643092",
"0.56401026",
"0.5637375",
"0.5636997",
"0.5634476",
"0.5626199",
"0.560891",
"0.56076485",
"0.5601076",
"0.55834514",
"0.55777925",
"0.5576471",
"0.5570655",
"0.5569135",
"0.55671704",
"0.55655926",
"0.5565097",
"0.5560546",
"0.5560546",
"0.55581385",
"0.5547161",
"0.5546801",
"0.5539416",
"0.55374813",
"0.5531349",
"0.5521656",
"0.5518898",
"0.5509552",
"0.55036646",
"0.5499315",
"0.5497561",
"0.5483755",
"0.5482012",
"0.5479589",
"0.5477526",
"0.5472895",
"0.5470406",
"0.54607666",
"0.54572713"
] | 0.0 | -1 |
retorna el resultado de llamr a la clase y hacer consultas a la base de datos, | public function getFunction($obj); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resultado(){\n\t\t\treturn $this->result=mysql_fetch_object($this->query);\n\t\t\t}",
"public function getAll(){\r\n $sql=\"SELECT * FROM salas\";\r\n try{\r\n //creo la instancia de conexion\r\n $this->connection= Connection::getInstance();\r\n $result = $this->connection->execute($sql);\r\n }catch(\\PDOException $ex){\r\n throw $ex;\r\n } \r\n //hay que mapear de un arreglo asociativo a objetos\r\n if(!empty($result)){\r\n return $this->mapeo($result);\r\n }else{\r\n return false;\r\n }\r\n\r\n }",
"function getResult(){\n\t\t\n\t\t$cx\t\t= new Connexion();\n\t\t$managerVisuel\t= new ManagerVisuel($cx);\n\t\t$managerLike\t= new ManagerLike($cx);\n\t\t$managerFavoris\t= new ManagerFavoris($cx);\n\n\t\t$transformDate = new DateTimeTransform();\n\n\t\t$http = new HTTPRequest();\n\t\t$offset = $http->getDataPost('offset');\n\t\t$values = $http->getDataPost('select');\n\t\t$exp = explode(\",\", $values);\n\n\t\tforeach ($exp as $value) {\n\t\t\tif(preg_match('/^theme-/', $value)){\n\t\t\t\t$theme[] = preg_replace('/[a-zA-Z-]/', '', $value);\n\t\t\t}\n\t\t\tif(preg_match('/^logiciel-/', $value)){\n\t\t\t\t$log[] = preg_replace('/[a-zA-Z-]/', '', $value);\n\t\t\t}\n\t\t}\n\t\tif(isset($theme)){\n\t\t\t$themes = implode(',', $theme);\n\t\t}\n\t\tif(isset($log)){\n\t\t\t$logs = implode(',', $log);\n\t\t}\n\t\t\n\t\t\n\n\t\tif((isset($themes)) || (isset($logs))){\n\n\t\t\tif(!isset($logs)){\n\t\t\t\t$tabVisuChaine = $managerVisuel->selectVisuelsAndChainesByThemes($offset,$themes);\n\t\t\t}else if(!isset($themes)){\n\t\t\t\t$tabVisuChaine = $managerVisuel->selectVisuelsAndChainesByLogs($offset,$logs);\n\t\t\t}else{\n\t\t\t\t$tabVisuChaine = $managerVisuel->selectVisuelsAndChainesByCat($offset,$themes,$logs);\n\t\t\t}\n\n\t\t}else{\n\t\t\t$tabVisuChaine = $managerVisuel->selectVisuelsAndChaines($offset);\n\t\t}\n\n\t\tif(!is_null($tabVisuChaine)){\n\t\t\tforeach ($tabVisuChaine as $visuel) {\n\n\t\t\t\t$visuel->{'3'} = $transformDate->transformDateTime($visuel->{'3'});\n\t\t\t\tif(isset($_SESSION['auth'])){\n\t\t\t\t\t$like = $managerLike->likePostExist($_SESSION['auth'][\"id\"],$visuel->getIdVisuel());\n\t\t\t\t\t$fav = $managerFavoris->favorisVisuelExist($_SESSION['auth'][\"id\"],$visuel->getIdVisuel());\n\t\t\t\t\t$tabLike[] = $like;\n\t\t\t\t\t$tabFav[] = $fav;\n\t\t\t\t}\n\t\t\t\t$countLikes[] = $managerLike->countLikeVisuel($visuel->getIdVisuel());\n\t\t\t}\n\t\t\tif(isset($_SESSION['auth'])){\n\t\t\t\t$result[\"user\"] = $_SESSION['auth']['id'];\n\t\t\t\t$result[\"favoris\"] = $tabFav;\n\t\t\t\t$result[\"likes\"] = $tabLike;\n\t\t\t}\n\t\t\t$result[\"countLikes\"] = $countLikes;\n\t\t\t$result[\"visu\"] = $tabVisuChaine;\n\t\t}else{\n\t\t\t$result[\"visu\"] = \"Aucun visuel trouvé\";\n\t\t}\n\t\t$cx->close();\n\t\techo json_encode($result);\n\t\texit();\n\t}",
"public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }",
"function RellenaDatos()\n{\n $sql = \"SELECT *\n\t\t\tFROM USUARIOS\n\t\t\tWHERE (\n\t\t\t\t(login = '$this->login') \n\t\t\t)\";\n\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}else\n\t{\n\t\t$tupla = $resultado->fetch_array();\n\t}\n\treturn $tupla;\n}",
"public function mostrarpersonal($sql){\n $c= new conectar();\n $conexion=$c->conexion();\n\n $result=mysqli_query($conexion,$sql);\n\n return mysqli_fetch_all($result,MYSQLI_ASSOC);\n }",
"function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}",
"public function all(){ \n $arraytoret = array();\n $query='select *\n from Usuario';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}",
"function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }",
"function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}",
"public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }",
"function RellenaDatos()\n {\t// se construye la sentencia de busqueda de la tupla\n $sql = \"SELECT * FROM ENTREGA WHERE (IdTrabajo = '$this->idTrabajo' AND login = '$this->login')\";\n // Si la busqueda no da resultados, se devuelve el mensaje de que no existe\n if (!($resultado = $this->mysqli->query($sql))){\n return 'No existe en la base de datos'; //\n }\n else{ // si existe se devuelve la tupla resultado\n $result = $resultado->fetch_array();\n return $result;\n }\n }",
"private function query_consultores(){\n\n \t$respuesta = false;\n\n\t\ttry {\n\n\t\t\t$this->db->select('cao_usuario.co_usuario');\n\t\t\t$this->db->select('cao_usuario.no_usuario');\n\t\t\t$this->db->select('cao_usuario.no_email');\t\n\t\t\t$this->db->from('cao_usuario');\n\t\t\t$this->db->join('permissao_sistema', 'permissao_sistema.co_usuario = cao_usuario.co_usuario');\n\t\t\t$this->db->where('cao_usuario.co_usuario is NOT NULL', NULL, FALSE);\n\t\t\t$this->db->where('permissao_sistema.co_sistema',$this->_co_sistema);\n\t\t\t$this->db->where('permissao_sistema.in_ativo',$this->_in_ativo);\n\t\t\t$this->db->where_in('permissao_sistema.co_tipo_usuario', $this->_co_tipo_usuario);\n\t\t\t$this->db->order_by(\"cao_usuario.co_usuario\", \"asc\");\t\t\t\n\n\t\t\t$query = $this->db->get();\n\n\t\t if ($query && $query->num_rows() > 0)\n\t\t {\n\t\t\t\t$respuesta = $query->result_array();\n\n\t\t }else{\n\n\t\t throw new Exception('Error al intentar listar todos los consultores');\n\t\t\t log_message('error', 'Error al intentar listar todos los consultores');\t\t \n\n\t\t $respuesta = false;\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\n\t\t\t$respuesta = false;\n\t\t}\t\t\t\n\n\t\treturn $respuesta;\n }",
"function realizarBusqueda(){\n\n $cedula = $_GET['cedula'];\n\n $fbd = FachadaBD::getInstance();\n $resultado = $fbd->consultarPacienteBD($cedula);\n $paciente = new Paciente();\n\n if (($row = oci_fetch_array($resultado, OCI_BOTH))){\n $paciente->setCI($row[0]);\n $paciente->setNombres($row[1]);\n $paciente->setApellidos($row[2]);\n $paciente->setProfesion($row[3]);\n $paciente->setLugarRes($row[4]);\n $paciente->setFechaNac($row[5]);\n $paciente->setID_Historial($row[6]);\n $paciente->setDiagnostico($row[7]);\n $paciente->setInterQuir($row[8]);\n }\n\n return $paciente; \n}",
"public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}",
"function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }",
"private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }",
"public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }",
"function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupl\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODCENTRO = '$this->CODCENTRO') \n\t\t\t)\";\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}//si no\n\telse//si se ejecuta con éxito\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}",
"function RellenaDatos()\n{\n $this->ConectarBD();\n $sql = \"select * from EMPLEADOS where EMP_USER = '\".$this->EMP_USER.\"'\";\n\n if (!($resultado = $this->mysqli->query($sql))){\n\treturn 'Error en la consulta sobre la base de datos';\n\t}\n else{\n\t$result = $resultado->fetch_array();\n\treturn $result;\n\t}\n}",
"function rellenaDatos(){\n\n $stmt = $this->db->prepare(\"SELECT *\n\t\t\t\t\tFROM centro\n\t\t\t\t\tWHERE centro_id = ?\");\n\n $stmt->execute(array($this->centro_id));\n $centro = $stmt->fetch(PDO::FETCH_ASSOC);\n if($centro != null){\n\n return new CENTRO_Model($centro[\"centro_id\"], $centro[\"nombre_centro\"], $centro[\"edificio_centro\"]);\n\n }else{\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\n }\n }",
"function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }",
"public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}",
"public function GetResultados(){\n $resultado = null;\n\n while ($objeto = $this->resultados->fetch_object()) {\n $resultado[] = $objeto;\n }\n\n return $resultado;\n }",
"function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}",
"function consultar(){\n\n\n\t\t$this->db->select('p.NUMERO, p.FACULTAD, p.PROGRAMA, p.FORMATO_PROYECTO, c.ESTADO');\n\t\t$this->db->from('PROYECTO p');\n\t\t$this->db->join('VICERRECTORIA_INVESTIGACION c', 'c.FK_PROYECTO = p.NUMERO');\n\n\n\t\t$query = $this->db->get();\n\n\t\treturn $data[]=$query->result();\n\t}",
"function fetchRuta() {\n\n $rutas = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM ruta\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $descripcion = $row['descripcion'];\n $id_usuario = $row['id_usuario'];\n $ruta = new Ruta($id, $nombre, $descripcion, $id_usuario);\n array_push($rutas, $ruta);\n }\n\n return $rutas;\n }",
"public function listar(){\n //se consulta \n $consulta = $this->db->query(\"SELECT * FROM empleados\");\n //y se retorna el resultado\n return $consulta->result();\n }",
"public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}",
"public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}",
"function getResults(){\n\t\t//$nombre,$apellido,$ciudad,$provincia,$areas,$pais\n\t\t$db = $this->getDbo();\n\n\t\t$nombre = JFactory::getApplication()->input->getString('txtNombre');\n\t\t$apellido = JFactory::getApplication()->input->getString('txtApellido');\n\t\t$ciudad = JFactory::getApplication()->input->getString('txtCiudad');\n\t\t$provincia = JFactory::getApplication()->input->getString('txtProvincia');\n\t\t//$areas = JFactory::getApplication()->input->getString('txtProvincia');\n\t\t$pais = JFactory::getApplication()->input->getString('txtPais');\n\n\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tCONCAT(u.name, ' ', cp.zv_apellidopadre,' ', cp.zv_apellidomadre) AS name,\n\t\t\t\tu.name AS firstname,\n\t\t\t\tu.email AS email,\n\t\t\t\tcp.zv_apellidopadre AS apellidopadre,\n\t\t\t\tcp.zv_apellidomadre AS apellidomadre,\n\t\t\t\tCONCAT(cp.zv_apellidopadre,' ',cp.zv_apellidomadre) AS apellidos,\n\t\t\t\tcp.zv_telefono AS telefono,\n\t\t\t\tcp.zv_direccion AS direccion,\n\t\t\t\tcp.zv_direccionnumero AS numero,\n\t\t\t\tCONCAT(cp.zv_direccion,' ', cp.zv_direccionnumero) AS direccionCompleta,\n\t\t\t\tcp.zv_perfilacadmico AS perfil,\n\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'instituc')>0,\n\t\t\t\t\tcp.zv_institucion ,-1)AS institucion\n\t\t\t\t,\n\t\t\t\tcp.zv_areainteres AS areas,\n\t\t\t\tcp.zv_direccionprovincia AS provincia,\n\t\t\t\tcp.user_id AS id\n\n\t\t\tFROM zv_zvcadastramento cp\n\t\t\tLEFT JOIN zv_users u ON cp.user_id = u.id\n\n\t\t\tWHERE\n\t\t\t\tcp.zv_socio = 1 AND\n\t\t\t\tu.name != 'administrator' AND\n\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'nombre')>0,\n\t\t\t\t\tIF('' != '\".$nombre.\"',\n\t\t\t\t\t\tu.name like '%\".$nombre.\"%'\n\t\t\t\t\t,u.name like '%%')\n\t\t\t\t\tAND\n\t\t\t\t\tIF('' != '\".$apellido.\"',\n\t\t\t\t\t\tcp.zv_apellidomadre like '%\".$apellido.\"%'\n\t\t\t\t\t\t\t\tOR cp.zv_apellidopadre like '%\".$apellido.\"%'\n\t\t\t\t\t\t\t,cp.zv_apellidomadre like '%%'\n\t\t\t\t\t\t\t\tOR cp.zv_apellidopadre like '%%'\n\t\t\t\t\t\t\t)\n\n\t\t\t\t,'')\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$ciudad.\"',\n\t\t\t\t\t\tcp.zv_direccionciudad like '%\".$ciudad.\"%'\n\t\t\t\t\t,cp.zv_direccionciudad like '%%')\n\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$provincia.\"',\n\t\t\t\t\t\t\tcp.zv_direccionprovincia like '%\".$provincia.\"%'\n\t\t\t\t\t,cp.zv_direccionprovincia like '%%')\n\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$pais.\"',\n\t\t\t\t\t\t\tcp.zv_direccionpais like '%\".$pais.\"%'\n\t\t\t\t\t,cp.zv_direccionpais like '%%')\n\n\t\t\t\";\n\n\t\t/*\n\t\tforeach($areas as $area){\n\t\t\tforeach($fields as $field){\n\t\t\t\tif($field->fieldvalueid == $area){\n\t\t\t\t\t$query.=\n\t\t\t\t\t\t\"AND\n\t\t\t\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'reas de inter') > 0,\n\t\t\t\t\t\t\t\tcp.zv_areainteres like'%\".$field->fieldtitle.\"%'\n\t\t\t\t\t\t\t,'')\";\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\n\t\t$query .= \" ORDER BY name\";\n\n\n\t\t$users = $this->_getList($query);\n\n\t\treturn $users;\n\t}",
"public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}",
"public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}",
"function consultar($nomClase, $arrPar = array()) {\n $tb = \"\";\n $sql = \"\";\n $n = \"\";\n $arrPar['aliasTb'] = (isset($arrPar['aliasTb'])) ? $arrPar['aliasTb'] : '';\n $arrPar['join'] = (isset($arrPar['join'])) ? $arrPar['join'] : '';\n $arrPar['filtro'] = (isset($arrPar['filtro'])) ? $arrPar['filtro'] : '';\n $arrPar['orderBy'] = (isset($arrPar['orderBy'])) ? $arrPar['orderBy'] : '';\n $arrPar['limit'] = (isset($arrPar['limit'])) ? $arrPar['limit'] : '';\n $retornos = array();\n\n $tb = \"tb_{$nomClase} {$arrPar['aliasTb']}\";\n $sql = \"SELECT \" . ($arrPar['aliasTb'] ? $arrPar['aliasTb'] . \".id_\" . $nomClase : \"id_\" . $nomClase) . \" FROM {$tb} \";\n $sql .= \" \" . ($arrPar['join'] != '' ? $arrPar['join'] : '');\n $sql .= ($arrPar['filtro'] != '' ? \" WHERE \" . $arrPar['filtro'] : '');\n $sql .= \" ORDER BY \" . ($arrPar['orderBy'] != '' ? $arrPar['orderBy'] : \" id_{$nomClase} \");\n $sql .= \" \" . ($arrPar['limit'] != '' ? $arrPar['limit'] : 'LIMIT 2500 OFFSET 0');\n\n $bd = new conector_bd();\n// IF($_SESSION[SESSION_USUARIO] == 1706){PRINT_R ($sql);EXIT;}\n $query = $bd->consultar($sql);\n\n $n = $bd->num_reg($tb, $arrPar['filtro'], $arrPar['join']);\n while ($row = pg_fetch_row($query))\n $retornos[] = new $nomClase($row[0]);\n return array('elementos' => $retornos, 'n' => $n);\n }",
"function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}",
"public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }",
"public function consultarListado()\n {\n $sql = \"SELECT * FROM examen\";\n $execute = $this->con->query($sql);\n $request = $execute->fetchall(PDO::FETCH_ASSOC);\n return $request; \n }",
"function GetPeliculasConGenero(){\n //$sentencia = $this->db->prepare(\"SELECT * FROM peliculas INNER JOIN genero ON peliculas.titulo = genero.nombre\");\n $sentenciasad = $this->db->prepare(\"SELECT peliculas.titulo, genero.nombre FROM peliculas INNER JOIN genero ON peliculas.id_genero = genero.id_genero\");\n $sentencias->executing();\n //print_r( $sentencia->fetchAll(PDO::FETCH_OBJ));// vemos que este cargado y con que \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }",
"public function consulta(){\n\n $this->db->select(\"*\");\n $this->db->from(\"empleados\");\n\n /*\n if( $this->session->userdata('perfil') != \"admin\"){\n $this->db->where( $where );\n }\n */\n\n // El get() se utiliza para ejecutar el query.\n $resultado = $this->db->get();\n\n // El result() se utiliza para enviar solamente los datos de la consulta.\n return $resultado->result();\n\n }",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function fetchResult();",
"function consultarPedido (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM pedido');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}",
"function consultarProducto (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM producto');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}",
"function consultarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE CEDULA='\".$ced.\"' \";\n\n\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\n\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\n\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\t\t}\t\n\t\t$objConexion->cerrarBd(); \n\t\treturn $this->objEmpleado; \t\t\n}",
"public function consultar($sql){\n $this->configura();\n $this->conectar();\n return $this->conn->query($sql);\n }",
"public function buscarPorIdEndereco($endereco) {\n \n //Preparando um comando sql para parametrização \n $sql = \"SELECT * FROM Endereco WHERE id_endereco = ?;\";\n\n $stmt = $this->conn->prepare($sql); \n\n $idEndereco = $endereco->getId(); \n \n\n //Passando os parametros e seus tipos (s = String, d = Double , i = Int)\n $stmt->bind_param('i', $idEndereco);\n \n // Executando o comando parametrizad\n\n if ($stmt->execute()){\n /* store first result set */\n $result = $stmt->get_result();\n while ($row = $result->fetch_assoc()) { \n\n $enderecoLocatario = new Endereco();\n $enderecoLocatario->setIdLocatario((int)$row[\"id_locatario\"]);\n $enderecoLocatario->setLogradouro((string)$row[\"logradouro\"]);\n $enderecoLocatario->setId((int)$row[\"id_endereco\"]);\n $enderecoLocatario->setCep((int)$row[\"cep\"]);\n $enderecoLocatario->setEstado((string)$row[\"estado\"]);\n $enderecoLocatario->setBairro((string)$row[\"Bairro\"]);\n $enderecoLocatario->setCidade((string)$row[\"Cidade\"]);\n $enderecoLocatario->setNumero((int)$row[\"numero\"]);\n $listEnderecoLocatario = $enderecoLocatario;\n \n }\n \n return $listEnderecoLocatario;\n }\n\n //$conexao->close();\n }",
"function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}",
"function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}",
"public function listar(){\n\n\t\t$data = $this->db->from($this->table)\n\t\t\t\t\t\t ->orderBy('id DESC')\n\t\t\t\t\t\t ->fetchAll();\n\t\tif(empty($data)){\n\t\t $respuesta = array('respuesta' => 0 );\n\t\t return $respuesta;\n\t\t}else{\n\t\t return $data;\n\t\t}\t\t\t\t \n\t// return $data = $this->db_pdo->query('select * from '.$this->table)\n\t//\t\t\t\t\t \t\t\t->fetchAll();\t\t\t\t \t\t\t\t\t\t \n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getUsuario(){\n $sql=\"SELECT id, tipo, tipo_identificacion, numero_identificacion, apellidos, nombres, razon_social, codigo, \n direccion, telefono1, telefono2, celular1, celular2, email1, email2, fecha_nacimiento, profesion, \n actividades, rol, fecha_registro, descripcion FROM ctk_usuario where estado=1\";\n //$sentencia=$this->conexion_db->prepare($sql);\n //$sentencia->execute(array());\n //$resultado=$sentencia->fetchAll(PDO::FETCH_ASSOC);\n //otra opcion \n //$resultado=$this->conexion_db->query($sql)->fetchAll(PDO::FETCH_ASSOC);\n $resultado=$this->conexion_db->query($sql)->fetchAll(PDO::FETCH_OBJ);\n //$sentencia->closeCursor();\n return $resultado;\n $this->conexion_db=null;\n \n //El ejemplo que se encuentra a continuacion realiza la consulta con la libreria mysqli\n /*\n $resultado=$this->conexion_db->query(\"SELECT codigo_ticket, abierto_por, fecha_apertura, fecha_cierre, \n descripcion_evento, tecnico_ctk FROM ctk_ticket WHERE tecnico_ctk='\".$buscar.\"'\");\n $ticket=$resultado->fetch_all(MYSQLI_ASSOC);\n return $ticket;\n */\n }",
"function leer(){\n \n // hace la consulta\n $query = \"SELECT Id, Nombre, Apellidos, Edad FROM Usuario\";\n \n // prepara la consulta\n $stmt = $this-> con->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n}",
"public function consultar ($conexion){\r\n // PROCEDIMIENTO ALMACENADO \r\n $query=\"call consulta_acudiente()\";\r\n $consulta=mysqli_query($conexion, $query);\r\n return $consulta;\r\n }",
"function get_interpretes_por($seccion){\n // dependiendo de la seccion debo armar distintas consultas\n\n\n return $query->result();\n}",
"function consulta_datos_empresa($id) {\n $sql = \"SELECT nombre_empresa,ruc_empresa FROM prosic_empresa WHERE id_empresa=\" . $id;\n $sql = \"SELECT nombre_empresa,ruc_empresa FROM prosic_empresa WHERE id_empresa=\" . $id;\n $result = $this->Consulta_Mysql($sql);\n $row = mysql_fetch_array($result);\n return $row;\n }",
"public function findAll(){\n //recupere le nom de la classe et le formate\n $table = strtolower(get_class($this));\n\n //Prepare la requete\n $query = \"SELECT * FROM $table\";\n $results = $this->conn->prepare($query);\n\n //Execution requete et stockage resultats dans une variable\n $results->execute();\n $resultats = $results->fetchAll(PDO::FETCH_ASSOC);\n return $resultats;\n }",
"public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }",
"function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \";\r\n\r\n if (!empty($Where)) {\r\n $SQL .= \" AND \" . $Where;\r\n\r\n }\r\n\r\n $SQL .= \" ORDER BY sapellido \";\r\n\r\n//ejecutamos la consulta\r\n\r\n\r\n $this->Consulta_ID = @mysql_query($SQL, $Conexion_ID);\r\n\r\n if (!$this->Consulta_ID) {\r\n\r\n $this->Errno = mysql_errno();\r\n\r\n $this->Error = mysql_error();\r\n\r\n }\r\n\r\n/* Si hemos tenido éxito en la consulta devuelve el identificador de la conexión, sino devuelve 0 */\r\n\r\n return $this->Consulta_ID;\r\n\r\n}",
"public function get() {\n\t\t\n\t\t/**\n\t\t * @get() Almacena los resultados de la query en un array\n\t\t * en este caso $this->rows[]\n\t\t */\n\t\t\n\t\ttry {\n\n\t\t\tif (!$this->result) {\n\t\t\t\tthrow new Exception(_QUERY_ERROR);\n\t\t\t}\n\t\t\t\t\n\t\t\t/**\n\t\t\t * Almacenamos los resultados MySQLi en un array ($this->rows[])\n\t\t\t * Para poder exportarlo a la vista.\n\t\t\t */\n\t\t\t\n\t\t\twhile($row = $this->result->fetch_array()) {\n\t\t\t\t$this->rows[] = $row;\n\t\t\t}\n\n//\t\t\t\trecorrer datos almacenados en $rows[]\n//\t\t\t\tlo hacemos desde la vista:\t\t\t\n \t\t\t//foreach ($this->rows as $row) {\n \t\t\t\t//echo $row['id'] . $row['title'];\n \t\t\t//}\n\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t$e->getMessage();\n\t\t}\n\t\t\n\t}",
"public function listarlapaz(){\n $persona=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapaz as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=1\";\n $bajas=\"SELECT p.*,c.nombre as caja FROM persona as p\n LEFT JOIN cajalapazretirado as c ON c.id=p.id_caja where p.ciudad='lapaz' AND p.estado=0\";\n $cajas=\"SELECT * FROM cajalapaz WHERE estado = 1\";\n $cajaretirados=\"SELECT * FROM cajalapazretirado WHERE estado = 1\";\n $result=[\n \"personal\"=> parent::consultaRetorno($persona),\n \"bajas\"=>parent::consultaRetorno($bajas),\n \"cajas\"=>parent::consultaRetorno($cajas),\n \"cajasretirados\"=>parent::consultaRetorno($cajaretirados)\n ];\n return $result;\n }",
"public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function trier(){\r\n \r\n $db = config::getConnexion();\r\n $sql=\"SElECT * From livreur ORDER BY nom\";\r\n\r\n try{\r\n $req=$db->prepare($sql);\r\n $req->execute();\r\n $livreur= $req->fetchALL(PDO::FETCH_OBJ);\r\n return $livreur;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}",
"function consultaUsuario($conexion){\n $resultado = $conexion->query(\"SELECT * FROM usuario\");\n return $resultado;\n}",
"public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}",
"function RellenaDatos(){\n $sql = \"SELECT `idpareja`, `login1`, `login2` FROM PAREJA WHERE idpareja = '\".$this->idpareja.\"'\";\n\t$result = $this->mysqli->query($sql); \n\tif($result ->num_rows >0){\n\t\t$tupla = mysqli_fetch_assoc($result);\t\t \n\t\treturn $tupla;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}",
"public function getAll() {\n $this->db->select('*');\n $this->db->from('lamar');\n $query = $this->db->get();\n return $query->result();\n }",
"function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }",
"function listarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_sel';\n\t\t$this->transaccion='DIR_EMP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_empresa','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('tipo_sociedad','varchar');\n\t\t$this->captura('actividad','text');\n\t\t$this->captura('actividad_esp','varchar');\n\t\t$this->captura('nit','varchar');\n\t\t$this->captura('actividad_gral','varchar');\n\t\t$this->captura('domicilio','text');\n\t\t$this->captura('matricula','int8');\n\t\t$this->captura('renovado','int4');\n\t\t$this->captura('actividad_prim','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('departamento','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('municipio','varchar');\n\t\t$this->captura('estado_matricula','varchar');\n\t\t$this->captura('mail','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"function getDatos(){\n $res = $this->Consulta('SELECT C.*, P.id_planta FROM '.$this->Table .' C\n INNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\n INNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\n INNER JOIN\n plantas P ON P.id_planta = S.id_planta\n \n WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n $resultado = $res[0];\n // $resultado = array_map('utf8_encode',$resultado);\n \n print_r( json_encode( $resultado ) );\n }",
"public function get_personas(){\n $consulta=$this->db->query(\"select * from personas;\");\n while($filas=$consulta->fetch_assoc()){\n $this->personas[]=$filas;\n }\n return $this->personas;\n}",
"public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }",
"public function TraerCiudadRiesgo(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad WHERE zona_riesgo=1 \" ); \n $sentencia->execute(); // ejecuta -\n $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $query;\n }",
"public static function modeloUserGet ($userid){\n $datosuser=[];\n $stmt=self::$db->prepare(self::$consulta_user);\n $stmt->bindValue(1,$userid);\n $stmt->execute();\n if ($stmt->rowCount()>0) {\n $stmt->setFetchMode(PDO::FETCH_CLASS,\"Usuario\");\n $cod=$stmt->fetch();\n $datosuser=[\n $cod->clave,\n $cod->nombre,\n $cod->email,\n $cod->plan,\n $cod->estado\n ];\n return $datosuser;\n }\n return null;\n}",
"function consultarenviodetallesCedula (){\n\t\t$x = $this->pdo->prepare('SELECT En.empresa,En.telefono,En.fechaEnvio,Cl.cedula FROM enviodetalles EN INNER JOIN cliente Cl ON En.cedulaCliente = Cl.cedula');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}",
"function rellenaDatos(){\r\n\r\n $stmt = $this->db->prepare(\"SELECT *\r\n\t\t\t\t\tFROM edificio\r\n\t\t\t\t\tWHERE edificio_id = ?\");\r\n\r\n $stmt->execute(array($this->edificio_id));\r\n $edificio = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($edificio != null){\r\n return new EDIFICIO_Model($this->edificio_id, $edificio[\"nombre_edif\"],$edificio[\"direccion_edif\"],$edificio[\"telef_edif\"],\r\n $edificio[\"num_plantas\"],$edificio[\"agrup_edificio\"]);\r\n }else {\r\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\r\n }\r\n\r\n }",
"function get_entradas_marcas_list($id) {\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus,e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.cmarca_id='$id'\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, e.lote_id , cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryselect() {\r\n // we should load the database (autoload)\r\n $this->load->database();\r\n $query = $this->db->query('SELECT * FROM crud');\r\n return $query->result_array();\r\n //$result = $query->result_array();\r\n //return $result;\r\n }",
"public function consultar()\r\n {\r\n $id = $_GET['id'];\r\n\r\n //criando conexão com o banco\r\n $q = new QueryBuilder();\r\n\r\n //selecionando dados\r\n $dados = $q->selectinner2($id);\r\n\r\n \r\n\r\n //devolvendo a pagina \r\n require './app/views/consultar.php';\r\n\r\n \r\n\r\n \r\n }",
"function consulta1($query){\n $resultado=mysql_query($query);\n $ca=mysql_num_rows($resultado);\n for($i=0;$ca>$i;$i++){\n \t$arreglo[]=mysql_fetch_assoc($resultado);\n }\n $devolver[\"resultante\"]=$arreglo;\n $devolver[\"contador\"]=$ca;\n return $devolver;\n }",
"public function listar(){\n\t\t$sql = \"SELECT * FROM cargo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}",
"function leer_datos( $sql ) {\n // Nos conectamos a la Base de Datos y guardamos la referencia en la variable $conexion\n $conexion = conectar_Base_de_Datos();\n\n // Ejecutamos la consulta, y guardamos el resultado en la variable $resultado\n $resultado = mysqli_query( $conexion, $sql );\n\n // Comprobamos que la variable $resultado no esté vacía\n if ( !$resultado ) {\n // Si hubo un error, hacemos un echo\n echo \"No se pudo ejecutar Consulta\";\n echo 'MySQL Error: ' . mysqli_error( $conexion );\n // Y cerramos todo\n exit;\n } else {\n\n // Creamos la variable $resultado_final, va a ser un Array\n $resultado_final = array();\n\n // Cargamos los datos desde $resultado en $resultado_final\n while ( $row = mysqli_fetch_assoc( $resultado ) )\n {\n array_push( $resultado_final, $row );\n }\n if ( count($resultado_final) === 1 ) {\n $resultado_final = $resultado_final[0];\n }\n\n // Limpiamos la memoria\n mysqli_free_result( $resultado );\n // Cerramos la conexion a la Base de Datos\n mysqli_close( $conexion );\n // Devolvemos $resultado_final\n return $resultado_final;\n }\n}",
"public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}",
"public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}",
"function consultarUserEmpleado(){\n\t\t\n\t\t$usu=$this->objEmpleado->getUsuario();\n\t\t//SELECT ESTADO FROM `cliente` WHERE `usuario`=\"lili\"\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE USUARIO='\".$usu.\"' \";\n\t\t\n\t\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\t\n\t\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\t\n\t\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t\t$this->objEmpleado->setCedula($registro[\"cedula\"]);\n\t\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$objConexion->cerrarBd(); \n\t\t\treturn $this->objEmpleado; \t\t\n\t}",
"public function selectAllRegiuniData(){\n $sql = \"SELECT * FROM regiune ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }",
"public function getLadas()\n {\n try {\n\n $conn = $this->makeConn->makeConnection();\n\n $res = $conn->query('select * from Ladas;');\n\n $array_result = [];\n\n foreach ($res->fetchAll() as $item) {\n array_push(\n $array_result,\n [\n 'lada' => $item['lada'],\n 'city' => $item['city'],\n 'state' => $item['state'],\n 'lada' => $item['lada'],\n 'id' => $item['id']\n ]\n );\n }\n\n echo json_encode($array_result);\n } catch (Exception $e) {\n echo 'Ocurrió un error al obtener las ladas';\n }\n }",
"function Linha(){\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$this->rs = mssql_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$a1 = oci_fetch_array ($this->cursor, OCI_BOTH);\n\t\t\t\t$this->rs = $a1;\n\t\t\t\tif ($this->rs == false){\n\t\t\t\t\t$this->liberaStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$this->rs = pg_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$this->rs = mysql_fetch_array($this->cursor, MYSQL_BOTH);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t}\n\t\t//echo \"Cria Linha <br />\";\n\t\treturn $a1;\n\t}",
"public function resultSet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n /*PDO::FETCH_OBJ\r\n assim podemos imprimir como objeto exemplo\r\n foreach($users as user){\r\n echo $user->name . '<br>';\r\n ao invés de echo $user['name];\r\n */\r\n }",
"public function lista() {\n $sql = \"SELECT * FROM cliente\";\n $qry = $this->db->query($sql); // query do pdo com acesso ao bd\n\n //return $qry->fetchAll(); // retorna todos os registros\n return $qry->fetchAll(\\PDO::FETCH_OBJ); // retorna todos os registros a nível de objeto\n }",
"public function selectAllClasse(){\n\n\t\tif($this->unPdo!=null)\n\t\t{\n\t\t\t$requete=\"select * from classe ;\";\n\t\t\t//preparation de la requete avant execution\n\t\t\t$select= $this->unPdo->prepare($requete);\n\t\t\t//execution de la requete\n\t\t\t$select->execute();\n\t\t\t//extraction des données\n\t\t\t$resultats = $select->fetchAll();\n\t\t\treturn $resultats;\n\t\t}\n\t}",
"public function consultar() {\n\t\t$this->load->model('Consultar_model');\n\t\t$result = $this->Consultar_model->consultar();\n\t\techo json_encode($result);\n\t}",
"function llamarRegistrosMySQLPlaneServicios() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t$cons = \"SELECT * FROM Salud.EPS ORDER BY AutoId ASC\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}",
"function fetchUsuario() {\n\n $usuarios = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM usuario\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $username = $row['username'];\n $password = $row['password'];\n $email = $row['email'];\n $poblacion = $row['poblacion'];\n $idioma = $row['idioma'];\n $telefono = $row['telefono'];\n $url = $row['url'];\n $foto = $row['foto'];\n $textoPresentacion = $row['textoPresentacion'];\n $administrador = $row['esAdministrador'];\n $registrado = $row['esUsuarioRegistrado'];\n $professional = $row['esUsuarioProfesional'];\n $usuario = new Usuario($id, $username, $password, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion, $administrador, $registrado, $professional);\n array_push($usuarios, $usuario);\n }\n\n return $usuarios;\n }",
"function listaRuta()\r\n\t{\t\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::listaRegistros( $query );\r\n\t}",
"public function all(){\n\n $a= parent::bdd()->query(\"SELECT * FROM auteur\");\n $b= $a->fetchall(\\PDO::FETCH_OBJ);\n\n return $b;\n\n }",
"function consultarproduto(Connection $con, $codproduto){\r\n\trequire_once(\"../class/consultaproduto.class.php\");\r\n\r\n\t$consultaproduto = new ConsultaProduto($con);\r\n\t$consultaproduto->addcodproduto($codproduto);\r\n\t$consultaproduto->consultar();\r\n\t$encontrado = $consultaproduto->getencontrado();\r\n\treturn array_shift($encontrado);\r\n}",
"public function getResultado()\r\n\t\t{\r\n\t\t\t$query =\"SELECT * FROM resultados\";\r\n\t\t\t$result =mysqli_query($this->link,$query);\r\n\t\t\t$data =array();\r\n\t\t\twhile ($data[]=mysqli_fetch_assoc($result));\r\n\t\t\tarray_pop($data);\r\n\t\t\treturn $data;\r\n\t\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"function obtenerSesion(){\n\t\t\n\t\t$query1 = ('select sesion.id, sesion.checkin, sesion.pagada, sesion.id_servicio, sesion.id_usuario, sesion.id_agenda, sesion.ejecutada, usuario.nombre,\n\t\t\t\t\tusuario.apellido, servicio.descripcion , cliente.nombre as nombre_cliente , cliente.apellido as apellido_cliente from sesion \n\t\t\t\t\tInner JOIN usuario\n\t\t\t\t\ton sesion.id_usuario = usuario.id\n\t\t\t\t\tInner Join servicio\n\t\t\t\t\ton sesion.id_servicio = servicio.id\n\t\t\t\t\tInner Join cliente\n\t\t\t\t\ton sesion.id_cliente = cliente.id'); //QUERY PARA OBTENER TODO DE UNA VEZ.\n\t\t$query = $this->db->query($query1);\n\t\t\n\t\t\n\t //$query = $this->db->get('sesion');\n\t if($query-> num_rows() > 0) return $query->result_array();\n\t else return false ;\n\t \n\t \n\t}"
] | [
"0.7477516",
"0.7328853",
"0.73000413",
"0.72325826",
"0.7183479",
"0.7163526",
"0.71136844",
"0.71050525",
"0.7082869",
"0.7078526",
"0.70645267",
"0.7057175",
"0.70523",
"0.7048317",
"0.7039162",
"0.702969",
"0.7029054",
"0.7025341",
"0.698548",
"0.6982075",
"0.6972118",
"0.6951041",
"0.69391614",
"0.69262713",
"0.6920638",
"0.6913008",
"0.6908645",
"0.69072795",
"0.69052535",
"0.6892201",
"0.68916875",
"0.6884545",
"0.6883386",
"0.6882566",
"0.6870923",
"0.6868288",
"0.6865707",
"0.68632466",
"0.68579435",
"0.68552035",
"0.6854041",
"0.6843238",
"0.68402225",
"0.683041",
"0.6815363",
"0.68030566",
"0.6799033",
"0.6782132",
"0.6780061",
"0.67796147",
"0.6777903",
"0.67696023",
"0.675211",
"0.6746533",
"0.6746423",
"0.67441845",
"0.6741739",
"0.6735004",
"0.67233086",
"0.6721045",
"0.67199695",
"0.6718589",
"0.6717073",
"0.67092985",
"0.6704661",
"0.66967833",
"0.6687767",
"0.66827446",
"0.66813165",
"0.6673638",
"0.66716504",
"0.6670312",
"0.6660651",
"0.66505665",
"0.66467166",
"0.6640081",
"0.6640052",
"0.6637148",
"0.6633642",
"0.66321653",
"0.6627356",
"0.6617965",
"0.66166806",
"0.66126275",
"0.6608115",
"0.6601753",
"0.6601058",
"0.66009974",
"0.659425",
"0.65924835",
"0.6587916",
"0.658601",
"0.65832496",
"0.6583215",
"0.6579245",
"0.6575023",
"0.65740204",
"0.6571324",
"0.65670997",
"0.6563585",
"0.6562435"
] | 0.0 | -1 |
Return the igniter service key responsible for the Processor class. The key must be the same as the one used in the assigned igniter service. | protected static function getFacadeAccessor()
{
return 'processor';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getServiceKey() {\n return $this->_get( 'service_key' );\n }",
"public function getServiceKey()\n {\n return $this->getParameter('serviceKey');\n }",
"public function getServiceKey() {}",
"protected function getKey()\n {\n\treturn 'ip:' . $this->ip;\n }",
"public function getKey()\n {\n return $this->getInternalKey();\n }",
"public static function keyPrefix()\n {\n return Inflector::camel2id(StringHelper::basename(get_called_class()), '_');\n }",
"public static function key() {\n return self::$key;\n }",
"protected function keyGenerator() {\n\t\treturn $this->serviceLocator->get('Application\\Common\\KeyGeneratator');\n\t}",
"protected function getCacheKey()\r\n {\r\n if (null == $this->cacheKey) {\r\n $this->cacheKey = get_class($this)\r\n . $this->getParent()->getEnvironment()\r\n . $this->getHttpHost();\r\n }\r\n return $this->cacheKey;\r\n }",
"public function key(): string\n {\n return key($this->drivers);\n }",
"public function key()\n {\n return $this->key;\n }",
"public function key()\n {\n return $this->key;\n }",
"public function key()\n {\n return $this->key;\n }",
"public function key()\n {\n return $this->key;\n }",
"public function key()\n {\n return $this->key;\n }",
"public function get_key() {\n\t\treturn c27()->class2file( static::class );\n\t}",
"protected function getKey()\n {\n return self::$lockPrefix . $this->name;\n }",
"public function key()\n\t{\n\t\tif (empty($this->key) && !empty($this->definition->primary))\n\t\t{\n\t\t\t$keys = array_values(\n\t\t\t\tarray_filter(\n\t\t\t\t\tpreg_split('~[\\s,]+~', $this->definition->primary)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$keys = array_map(\n\t\t\t\tfunction ($key) {\n\t\t\t\t\treturn Normalise::toVariable($key);\n\t\t\t\t},\n\t\t\t\t$keys\n\t\t\t);\n\n\t\t\t$this->key = count($keys) > 1 ? $keys : array_shift($keys);\n\t\t}\n\n\t\tif (empty($this->key) && $this->has('id'))\n\t\t{\n\t\t\t$this->key = 'id';\n\t\t}\n\n\t\treturn $this->key;\n\t}",
"public function getKey()\n {\n return $this->__get(\"key\");\n }",
"public function getKey(): string\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->getId();\n }",
"public function key()\n {\n return key($this->container);\n }",
"public function getKey()\r\n {\r\n return $this->key;\r\n }",
"public function getKey() {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->__key;\n }",
"public function key() {\n\t\treturn $this->key;\n\t}",
"public function getProcessDefinitionKey()\n {\n return $this->processDefinitionKey;\n }",
"protected function _getKeyClassName() {}",
"protected function _getKeyClassName() {}",
"protected function getKey(): Key {\n return $this->key;\n }",
"public function key()\n {\n return $this->_key;\n }",
"public function getKey() {\n\t\treturn $this -> key;\n\t}",
"public function key() {\n return $this->_key;\n }",
"public function key() {\n return $this->key;\n }",
"public function key() {\n return key($this->_path);\n }",
"public function getService()\n {\n return $this->getKey('Service');\n }",
"public function GetKey() {\n\t\treturn $this->_key;\n\t}",
"public function getConfigKey()\n {\n return Extension::SERVICE_NAME;\n }",
"public function getKey() {\n return $this->key;\n }",
"private function getCacheKey(): string\n {\n return $this->webserviceId.$this->cacheKey;\n }",
"public function key()\n {\n return key($this->drivers);\n }",
"public function getKeyField()\n {\n $class = get_class($this);\n $parts = explode('\\\\', $class);\n $name = $parts[count($parts)-1];\n return strtolower($name) . '_id';\n }",
"public function getKey() {\n return $this->key;\n }",
"public function getKey()\n {\n return $this->key;\n }",
"public function key() {\n\t\treturn $this->_key;\n\t}",
"public function key() {\n return key($this->components);\n }",
"public function getGatewayKey ();",
"public function key()\n {\n return key($this->requests);\n }",
"public function getKey() : string\n {\n return $this->key;\n }",
"public function getCacheKey(): string\n {\n $customerGroupId = 0;\n\n if ($this->hasCustomerGroupId()) {\n $customerGroupId = $this->getCustomerGroupId();\n }\n\n return sprintf('%d-%d-%d', $this->getWebsiteId(), $customerGroupId, $this->getStoreId());\n }",
"public function getPackageKey() {}",
"public function getVendorKey()\n {\n return $this->getParameter('vendorKey');\n }",
"public function getPackageKey() {}",
"public function getIdKey()\n {\n\n if (is_null($this->idKey))\n $this->idKey = BuizCore::uniqKey();\n\n return $this->idKey;\n\n }",
"public function getKey() \n {\n return $this->_key;\n }",
"private function getKey() {\n\t\tif ( !$this->key )\n\t\t\t$this->key = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->key;\n\t}",
"public function getKey()\n\t{\n\t\treturn $this->key;\n\t}",
"public function getKey()\n\t{\n\t\treturn $this->key;\n\t}",
"public function getKey()\n\t{\n\t\treturn $this->key;\n\t}",
"public function getKey()\n\t{\n\t\treturn $this->key;\n\t}",
"public function getKey()\n\t{\n\t\treturn $this->key;\n\t}",
"public function getKey()\n {\n return Config::getKey(get_class($this->config));\n }",
"public function getKey()\n {\n return $this->get(self::KEY);\n }",
"public function getKey()\n {\n return $this->get(self::KEY);\n }",
"public function getCacheKey()\n {\n return $this->CacheKey;\n }",
"public function key(): int\n {\n return $this->key;\n }",
"abstract protected function _getKeyClassName();",
"function GetKey() { return( $this->key ); }",
"protected function _getKeyInstanceName() {}",
"protected function _getKeyInstanceName() {}",
"public function getKey() {}",
"public function getKey() {}"
] | [
"0.7038256",
"0.67894286",
"0.6732171",
"0.63158596",
"0.6294346",
"0.6274648",
"0.62365735",
"0.62061197",
"0.6174985",
"0.6115981",
"0.60961175",
"0.60961175",
"0.60961175",
"0.60961175",
"0.60961175",
"0.6089252",
"0.6082439",
"0.6080213",
"0.6074824",
"0.60482734",
"0.60461044",
"0.60436875",
"0.60417175",
"0.60405916",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6035982",
"0.6033039",
"0.6016",
"0.6012789",
"0.6012177",
"0.6012177",
"0.6010085",
"0.6008944",
"0.6006802",
"0.6006026",
"0.59985536",
"0.59904015",
"0.5982084",
"0.59791356",
"0.59780145",
"0.5973796",
"0.5973238",
"0.5969007",
"0.5967822",
"0.59563446",
"0.59504455",
"0.59490025",
"0.5929422",
"0.5919691",
"0.5917759",
"0.59007734",
"0.58914256",
"0.5880166",
"0.5879775",
"0.58790916",
"0.58671206",
"0.58658934",
"0.5863813",
"0.5862136",
"0.5862136",
"0.5862136",
"0.5862136",
"0.5862136",
"0.58514667",
"0.5847772",
"0.5847772",
"0.5846374",
"0.5838183",
"0.5831774",
"0.5812952",
"0.58096904",
"0.58096904",
"0.58058125",
"0.58058125"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(): View
{
$products = $this->productService->list();
return view('products.index', compact('products'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create(): View
{
$categories = $this->categoryService->list();
return view('products.create', compact('categories'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}"
] | [
"0.7594622",
"0.7594622",
"0.7588457",
"0.7580005",
"0.75723624",
"0.7499764",
"0.7436887",
"0.74322647",
"0.7387517",
"0.735172",
"0.73381543",
"0.73117113",
"0.72958225",
"0.7280436",
"0.7273787",
"0.72433424",
"0.7230227",
"0.7225085",
"0.71851814",
"0.71781176",
"0.7174025",
"0.7149406",
"0.71431303",
"0.7142905",
"0.7136737",
"0.712733",
"0.7122102",
"0.71148264",
"0.71148264",
"0.71148264",
"0.7111841",
"0.7092733",
"0.70843536",
"0.70822084",
"0.7079442",
"0.70571405",
"0.70571405",
"0.7055195",
"0.70391846",
"0.7039114",
"0.7035626",
"0.7033991",
"0.70300245",
"0.7026507",
"0.7026417",
"0.7019451",
"0.7017105",
"0.7004775",
"0.70031846",
"0.6999904",
"0.6995238",
"0.6994825",
"0.699354",
"0.6988824",
"0.6986871",
"0.6965804",
"0.6965542",
"0.69560695",
"0.69515944",
"0.6950682",
"0.6947703",
"0.69433117",
"0.6941539",
"0.6939613",
"0.69377476",
"0.69377476",
"0.693678",
"0.69344354",
"0.69314486",
"0.6927608",
"0.69264024",
"0.6922966",
"0.69181216",
"0.69150716",
"0.6911192",
"0.69095594",
"0.69092506",
"0.6907887",
"0.69018227",
"0.69008595",
"0.69006085",
"0.6900209",
"0.68949944",
"0.6892768",
"0.6891944",
"0.6891552",
"0.6891552",
"0.6891443",
"0.68886423",
"0.6888326",
"0.68856037",
"0.68835604",
"0.68813664",
"0.6878345",
"0.6876079",
"0.6873206",
"0.6873183",
"0.687048",
"0.687014",
"0.686966",
"0.68695843"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(StoreProductRequest $request): RedirectResponse
{
$this->createProductCommand->execute(new ProductDTO($request->validated()));
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.7285922",
"0.714503",
"0.71324795",
"0.6639801",
"0.6620405",
"0.6568167",
"0.65257645",
"0.650948",
"0.64484984",
"0.6375281",
"0.6373189",
"0.63650924",
"0.63650924",
"0.63650924",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731",
"0.6341731"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(int $id): View
{
$product = $this->productService->find($id);
abort_unless($product, 404);
$categories = $this->categoryMapper->map($product, $this->categoryService->list());
return view('products.edit', compact('product', 'categories'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(UpdateProductRequest $request, int $id): RedirectResponse
{
$this->updateProductCommand->execute($id, new ProductDTO($request->validated()));
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy(int $id): RedirectResponse
{
$this->deleteProductCommand->execute($id);
return redirect()->route('home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"public function remove($id);",
"public function remove($id);",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853",
"0.58968836",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58800334",
"0.5869308",
"0.5861188",
"0.5811069",
"0.5774596",
"0.5763277",
"0.5755447",
"0.5747713",
"0.5742094",
"0.573578",
"0.5727048",
"0.57164854",
"0.5712422",
"0.57092893",
"0.57080173",
"0.5707143",
"0.5704078",
"0.5696418",
"0.5684556",
"0.5684556",
"0.56790006",
"0.5678463",
"0.5658492",
"0.564975",
"0.5648406",
"0.56480885",
"0.5641393",
"0.5638992",
"0.56302536",
"0.56228197",
"0.5616424",
"0.5607389",
"0.56033397",
"0.5602035",
"0.55991143",
"0.55988586",
"0.5590501",
"0.5581284",
"0.55681103",
"0.5566215",
"0.55644745",
"0.5563726",
"0.55593926",
"0.55583876",
"0.5548547",
"0.5542015",
"0.5541403",
"0.5541403",
"0.55397224",
"0.55390894",
"0.55376494",
"0.5531044",
"0.5529739",
"0.55279493",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527671",
"0.5527155",
"0.5526666",
"0.55245256",
"0.552101",
"0.55183184"
] | 0.0 | -1 |
Loads the session storage handler | public static function load($name = null) {
$class_name = 'Kuuzu\\KU\\Core\\Session\\' . KUUZU::getConfig('store_sessions');
if ( !class_exists($class_name) ) {
trigger_error('Session Handler \'' . $class_name . '\' does not exist, using default \'Kuuzu\\KU\\Core\\Session\\File\'', E_USER_ERROR);
$class_name = 'Kuuzu\\KU\\Core\\Session\\File';
}
$obj = new $class_name();
if ( !isset($name) ) {
$name = 'sid';
}
$obj->setName($name);
$obj->setLifeTime(ini_get('session.gc_maxlifetime'));
return $obj;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"public static function setAsSessionHandler()\n {\n session_set_save_handler(array('Eb_MemcacheSession', 'sessionOpen'),\n array('Eb_MemcacheSession', 'sessionClose'),\n array('Eb_MemcacheSession', 'sessionRead'),\n array('Eb_MemcacheSession', 'sessionWrite'),\n array('Eb_MemcacheSession', 'sessionDestroyer'),\n array('Eb_MemcacheSession', 'sessionGc'));\n }",
"function loadSession() {}",
"public static function setSessionHandler () {\n \n // use memcache if available\n $handler = conf::getMainIni('session_handler');\n if ($handler == 'memcache'){\n $host = conf::getMainIni('memcache_host');\n if (!$host) {\n $host = 'localhost';\n }\n $port = conf::getMainIni('memcache_port');\n if (!$port) {\n $port = '11211';\n }\n $query = conf::getMainIni('memcache_query');\n if (!$query) {\n $query = 'persistent=0&weight=2&timeout=2&retry_interval=10';\n }\n $session_save_path = \"tcp://$host:$port?$query, ,tcp://$host:$port \";\n ini_set('session.save_handler', 'memcache');\n ini_set('session.save_path', $session_save_path);\n }\n }",
"public static function sessionOpenHandler();",
"public function setSaveHandler()\n {\n function open($savePath, $sessionName){ // open\n }\n function close(){ // close\n }\n function read($sessionId){ // read\n return $this->get($sessionId);\n }\n function write($sessionId, $data){ // write\n return $this->set($sessionId, $data);\n }\n function destroy($sessionId){ // destroy\n $this->delete($sessionId);\n }\n function gc($lifetime) { // gc\n }\n session_set_save_handler(\"open\", \"close\",\"read\",\"write\",\"destroy\",\"gc\");\n }",
"public function _initAuthStorage()\n {\n $bootstrap = $this->getApplication()->bootstrap('doctrine');\n $em = $bootstrap->getResource('doctrine');\n\n $storage = new DoctrineStorage($em, 'User\\Model\\Session');\n Authenticator::getInstance()->setStorage($storage)->getIdentity();\n }",
"protected function load()\n {\n $_SESSION[$this->name] = $_SESSION[$this->name]?? [];\n $_SESSION[SessionBlockInterface::FLASH_KEY] = $_SESSION[SessionBlockInterface::FLASH_KEY] ?? [];\n }",
"public function load()\n {\n if ($this->isLoaded()) {\n return;\n }\n \n // can't be loaded if the session has started\n if (! $this->isStarted()) {\n // not possible for anything to be loaded, then\n $this->unload();\n return;\n }\n \n // set up the value store.\n if (empty($_SESSION[$this->_segment])) {\n $_SESSION[$this->_segment] = array();\n }\n $this->_store =& $_SESSION[$this->_segment];\n \n // set up the flash store\n if (empty($_SESSION['Solar_Session']['flash'][$this->_segment])) {\n $_SESSION['Solar_Session']['flash'][$this->_segment] = array();\n }\n $this->_flash =& $_SESSION['Solar_Session']['flash'][$this->_segment];\n \n // done!\n $this->_is_loaded = true;\n }",
"protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }",
"function load()\n {\n $this->cookieJar = $this->getSession()->get($this->getCookieJarName(), []);\n }",
"public static function sessionReadHandler();",
"function _getStorage()\n {\n if ($this->_handler instanceof CacheStorage) {\n return $this->_handler;\n }\n\n $this->_handler = CacheStorage::getInstance($this->_options['storage'], $this->_options);\n if ($this->_handler != null) {\n if ($this->_handler->test()) {\n return $this->_handler;\n } else {\n $this->_handler = CacheStorage::getInstance('file', $this->_options);\n return $this->_handler;\n }\n } else {\n return null;\n }\n }",
"function hook_session() {\n session_set_save_handler(array($this, '_open'),\n array($this, '_close'),\n array($this, '_read'),\n array($this, '_write'),\n array($this, '_destroy'),\n array($this, '_clean'));\n }",
"public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }",
"protected function getSession_Storage_NativeService()\n {\n return $this->services['session.storage.native'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage(array('cookie_httponly' => true, 'gc_probability' => 1), $this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"private function _initSession()\n {\n Zend_Session::setOptions(array('remember_me_seconds' => intval(App::config()->remember_me_seconds) , 'save_path' => VAR_PATH . \"session\" , 'gc_probability' => 1 , 'gc_divisor' => 5000 , 'name' => \"zfsession\" , 'use_only_cookies' => 0));\n $handler = strtolower(App::config()->session_save_handler);\n if('db' === $handler){\n Zend_Session::setSaveHandler(new App_Session_SaveHandler_DbTable(array('name' => DB_TABLE_PREFIX . 'session' , 'primary' => 'id' , 'modifiedColumn' => 'modified' , 'dataColumn' => 'data' , 'lifetimeColumn' => 'lifetime')));\n }\n Zend_Session::start();\n }",
"public function &_getStorage()\n\t{\n\t\t$hash = md5(serialize($this->_options));\n\n\t\tif (isset(self::$_handler[$hash]))\n\t\t{\n\t\t\treturn self::$_handler[$hash];\n\t\t}\n\n\t\tself::$_handler[$hash] = TCacheStorage::getInstance($this->_options['storage'], $this->_options);\n\n\t\treturn self::$_handler[$hash];\n\t}",
"private function set_storage() {\r\n if (!is_array($this->cache_handler) && !empty($this->cache_handler)) {\r\n $this->cache_handler = array($this->cache_handler);\r\n }\r\n\r\n foreach ($this->cache_handler as $handler) {\r\n if ((extension_loaded($handler) || $handler == 'File') && class_exists('TS3ViewerStorage' . $handler)) {\r\n $handler = 'TS3ViewerStorage' . $handler;\r\n $this->cache = new $handler;\r\n break;\r\n }\r\n }\r\n\r\n if ($this->cache === null && class_exists('TS3ViewerStorageFile')) {\r\n $this->cache = new TS3ViewerStorageFile;\r\n }\r\n elseif ($this->cache === null) {\r\n $this->errors[] = 'no cache handler found..';\r\n return;\r\n }\r\n $this->cache_handler = get_class($this->cache);\r\n if ($this->cache_handler == 'TS3ViewerStorageFile') {\r\n $this->cache->path = $this->cache_path;\r\n }\r\n\r\n $this->cache->timeout = $this->cache_timeout;\r\n }",
"public function register_session_handler(array $config = array())\n\t{\n\t\trequire_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions'\n\t\t\t. DIRECTORY_SEPARATOR . 'dynamodbsessionhandler.class.php';\n\n\t\t$dynamo_session_handler = new DynamoDBSessionHandler($this, $config);\n\t\t$dynamo_session_handler->register();\n\n\t\treturn $dynamo_session_handler;\n\t}",
"protected abstract function loadSessionData();",
"protected function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('cp_user_auth_storage');\n }\n\n return $this->storage;\n }",
"private static function storage($session)\n {\n //Initiat the class\n static::session($session);\n\n $files = ['Storage'];\n $folder = static::$root.'Storage'.'/';\n\n self::call($files, $folder);\n\n $files = ['NotFoundStorageDiskException'];\n $folder = static::$root.'Storage/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function initStorage() {}",
"private function loadGameSession()\n {\n $gameData = $this->getSession()->get('gameData', null);\n $this->getGame()->initialize($gameData);\n }",
"public function getSession(string $key) : SessionStorage {\n return new \\lib\\SessionStorage($key);\n }",
"protected function _loadFromSession()\n {\n if (isset($this->sessionData['_options']))\n {\n $this->_options = $this->sessionData['_options'];\n }\n else\n {\n $this->initDefaultOptions();\n }\n\n if (isset($this->sessionData['_selectedIndex'])) $this->_selectedIndex = $this->sessionData['_selectedIndex'];\n if (isset($this->sessionData['safeMode'])) $this->safeMode = $this->sessionData['safeMode'];\n }",
"protected function getSession_Storage_PhpBridgeService()\n {\n return $this->services['session.storage.php_bridge'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage($this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"function HTTP_SessionServer_SaveHandler_read($id)\n{\n $GLOBALS['__session']->open($id);\n return $GLOBALS['__session']->get($GLOBALS['__sessionName']);\n}",
"public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }",
"public function storeSession() {}",
"public function __construct(){\n session_set_save_handler(\n array($this, \"_open\"),\n array($this, \"_close\"),\n array($this, \"_read\"),\n array($this, \"_write\"),\n array($this, \"_destroy\"),\n array($this, \"_clean\")\n );\n \n // Start the session\n session_start();\n }",
"private function _load($session) {\n if (isset($session['configuration']) && is_array($session['configuration'])) {\n $this->_configuration = $session['configuration'];\n }\n else {\n $this->_configuration = include 'config.php';\n\n $this->_check();\n }\n }",
"private function getHandlerInstance($handlerName) {\n\t $file = self::HANDLER_FOLDER.\"/\".$handlerName.\".php\";\n\t if(!file_exists($file)) throw new ServletException(\"Handler file not found: \".$file);\n\t require_once($file);\n\t if(!class_exists($handlerName)) throw new ServletException(\"Handler class not found: \".$handlerName);\n\t $object = new $handlerName();\n\t if(!($object instanceof SessionHandlerInterface)) throw new ServletException(\"Handler must be instance of SessionHandlerInterface!\");\n\t return $object;\n\t}",
"protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage((__DIR__.'/sessions'), 'MOCKSESSID', ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"function getStorage()\n{\n\tif (!$this->storage) $this->storage = new AuthDbStorage;\n\treturn $this->storage;\t\n}",
"protected function getTroopersAlertifybundle_SessionHandlerService()\n {\n return $this->services['troopers_alertifybundle.session_handler'] = new \\Troopers\\AlertifyBundle\\Handler\\AlertifySessionHandler($this->get('twig'), array('contexts' => array('victoire' => array('engine' => 'codrops-notification', 'translationDomain' => 'victoire', 'layout' => NULL, 'timeout' => NULL, 'options' => array())), 'default' => array('context' => 'front', 'engine' => 'toastr', 'layout' => NULL, 'translationDomain' => 'alertify')));\n }",
"public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }",
"protected function buildSession($handler)\n {\n return new Store($this->app['config']['staff_session.cookie'], $handler);\n }",
"public function initStorage()\n {\n $this->open();\n }",
"public function registerSessionHandler(array $config = [])\n {\n $handler = SessionHandler::fromClient($this, $config);\n $handler->register();\n\n return $handler;\n }",
"public function registerSessionHandler(array $config = [])\n {\n $handler = SessionHandler::fromClient($this, $config);\n $handler->register();\n\n return $handler;\n }",
"public static function initRequest() {\n spl_autoload_register(function ($class) {\n require_once '/Users/Anders/Sites/tasty/classes/App/' . \\str_replace('\\\\', '/', $class) . '.php';\n });\n\n session_start();\n }",
"public function load($id)\n {\n return $this->session;\n }",
"public function registering()\n {\n $di = $this->getDI();\n\n $di->set(Services::SESSION_BAG, Bag::class);\n\n $di->setShared(Services::SESSION, function () {\n /** @var \\Phalcon\\DiInterface $this */\n\n $sessionConfig = $this->getShared(Services::CONFIG)->session;\n\n if (!isset($sessionConfig->adapter)) {\n if (!isset($sessionConfig->stores[$sessionConfig->default])) {\n throw new \\RuntimeException(\"Session store {$sessionConfig->default} not found in stores\");\n }\n\n $sessionConfig = $sessionConfig->stores[$sessionConfig->default];\n }\n\n $adapter = $sessionConfig->adapter;\n\n switch ($adapter){\n case 'Aerospike':\n case 'Database':\n case 'HandlerSocket':\n case 'Mongo':\n case 'Files':\n case 'Libmemcached':\n case 'Memcache':\n case 'Redis':\n $class = 'Phalcon\\Session\\Adapter\\\\' . $adapter;\n break;\n case FilesAdapter::class:\n case LibmemcachedAdapter::class:\n case MemcacheAdapter::class:\n case RedisAdapter::class:\n $class = $adapter;\n break;\n default:\n $class = $adapter;\n\n if(!class_exists($adapter)){\n throw new \\RuntimeException(\"Session Adapter $class not found.\");\n }\n }\n\n try {\n $options = [];\n if (!empty($sessionConfig->options)) {\n $options = $sessionConfig->options->toArray();\n }\n /** @var \\Phalcon\\Session\\Adapter|\\Phalcon\\Session\\AdapterInterface $session */\n $session = new $class($options);\n } catch (\\Throwable $e) {\n throw new \\RuntimeException(\"Session Adapter $class construction fail.\", $e);\n }\n\n $session->start();\n\n return $session;\n });\n }",
"protected function initSession()\n {\n $this->di->setShared('session', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $adapter = '\\Phalcon\\Session\\Adapter\\\\' . $config->get('session')->adapter;\n\n /** @var \\Phalcon\\Session\\AdapterInterface $session */\n $session = new $adapter;\n $session->start();\n\n return $session;\n });\n }",
"function get_session()\n{\n static $session;\n if (!$session) {\n $session = new session_class();\n }\n return $session;\n}",
"public function load($sessionID, $audience);",
"public function getSessionStore()\n {\n return $this->session;\n }",
"public function __construct()\n {\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.use_trans_sid', 0);\n ini_set('session.save_handler', 'files');\n ini_set('session.gc_maxlifetime', 3600);\n\n session_name($this->sessionName);\n session_set_cookie_params(\n $this->sessionMaxLifeTime,\n $this->sessionPath,\n $this->sessionDomain,\n $this->sessionSSL,\n $this->sessionHTTPOnly\n );\n session_save_path($this->sessionSavePath);\n\n /*\n * very important : so read, write \n * can use them form my class not from SessionHandler\n * */\n session_set_save_handler($this, true);\n }",
"public function start()\n {\n if (self::$sessionStarted) {\n return;\n }\n\n // use this object as the session handler\n session_set_save_handler(\n array($this, 'sessionDummy'), // open\n array($this, 'sessionDummy'), // close\n array($this, 'sessionRead'),\n array($this, 'sessionDummy'), // write\n array($this, 'sessionDestroy'),\n array($this, 'sessionDummy') // gc\n );\n\n parent::start();\n }",
"public function getDataHandler() {\n $data_handler = \\Drupal::service('social_auth_extra.session_persistent_data_handler');\n $data_handler->setPrefix('social_auth_twitter_');\n\n return $data_handler;\n }",
"public function storeSessionData() {}",
"public function storeSessionData() {}",
"protected function init_session () {\n\t\t$Request = Request::instance();\n\t\t/**\n\t\t * If session exists\n\t\t */\n\t\tif ($Request->cookie('session')) {\n\t\t\t$this->user_id = $this->load();\n\t\t}\n\t\t$this->update_user_is();\n\t}",
"final public function __construct(Storage $storage) {\n\t\tparent::__construct();\n\n\t\t$this->_storage = $storage;\n\t\t$this->_storage->config->storage = 'session';\n\t}",
"protected function setStorage($data)\n {\n Session::register(__NAMESPACE__, serialize($data));\n }",
"protected function initSession() {\n\t\tSession::init($this);\n\t}",
"protected function initializeSession() {}",
"private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }",
"private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}",
"private function getStorage()\n {\n if (empty($this->storage)) {\n $this->storage = $this->wizardStorageFactory->create([\n 'key' => $this->getRequest()->getParam(UrlBuilder::REQUEST_PARAM_CONFIGURE_KEY)\n ]);\n }\n return $this->storage;\n }",
"private static function init(){\n\t\t\tif (session_status() != PHP_SESSION_ACTIVE) {\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}",
"function MySessionStart() {\n\tif (defined('SET_SESSION_NAME')) session_name(SET_SESSION_NAME);\n\t\n\tif (TRACKPOINT_ISSETUP) {\n\t\tif (!defined('TABLEPREFIX')) define('TABLEPREFIX', TRACKPOINT_TABLEPREFIX);\n\t\t$ses_class = new Session();\n\t\tsession_set_save_handler(\n\t\t\tarray(&$ses_class, '_open'),\n\t\t\tarray(&$ses_class, '_close'),\n\t\t\tarray(&$ses_class, '_read'),\n\t\t\tarray(&$ses_class, '_write'),\n\t\t\tarray(&$ses_class, '_destroy'),\n\t\t\tarray(&$ses_class, '_gc')\n\t\t);\n\t} else {\n\t\tini_set('session.save_handler', 'files');\n\t\tif (defined('TEMP_DIRECTORY') && is_writable(TEMP_DIRECTORY)) ini_set('session.save_path', TEMP_DIRECTORY);\n\t}\n\tsession_start();\n}",
"protected function load(): void\n {\n if (!isset($_SESSION[$this->sessionKey])) {\n return;\n }\n $data = \\json_decode($_SESSION[$this->sessionKey], true);\n if (\\is_array($data)) {\n foreach ($data as $cookie) {\n $this->setCookie(new SetCookie($cookie));\n }\n } elseif (\\strlen($data)) {\n throw new \\RuntimeException('Invalid cookie data');\n }\n }",
"function session_set_save_handler($open, $close = true, $read = null, $write = null, $destroy = null, $gc = null) {\r\n\t\tif(is_object($open) && $open instanceof SessionHandlerInterface) {\r\n\t\t\t$retval = Pancake\\PHPFunctions\\setSessionSaveHandler($open, false);\r\n\t\t\tif($close && $retval)\r\n\t\t\t\tsession_register_shutdown();\r\n\t\t} else\r\n\t\t#.endif\r\n\t\t\t$retval = Pancake\\PHPFunctions\\setSessionSaveHandler($open, $close, $read, $write, $destroy, $gc);\r\n\t\tif($retval)\r\n\t\t\treturn Pancake\\vars::$resetSessionSaveHandler = true;\r\n\t\treturn false;\r\n\t}",
"public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }",
"function load_open_session($key=VANCO_KEY) {\n $shm = shmop_open(VANCO_MEM, \"c\", 0644, 58);\n $session = shmop_read($shm, 0, 48);\n $age = time() - shmop_read($shm, 48, 10);\n shmop_close($shm);\n if($age < 86400) {\n return trim(decrypt($session, $key)); # Read decrypt and trim from shared memory\n } else {\n return false;\n }\n}",
"private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }",
"public function getSecHandler() {}",
"protected function LoadHandlers()\n {\n $this->handlers = array(\n testHandler::class,\n );\n }",
"public static function init() {\n\t\t\t\n\t\t\t/* Run session */\n\t\t\tsession_start();\n\t\t\t\n\t\t}",
"private static function getHandler()\n {\n if (self::$config_handler == null) {\n self::$config_handler = new self();\n }\n return self::$config_handler;\n }",
"protected static function initStorages()\n {\n $modelName = ClassFinder::getClassBasename(static::class);\n\n static::$storages = [];\n\n foreach (static::$storagesConf as $name => &$storageConf) {\n if (!isset($storageConf['type'])) {\n $storageConf['type'] = $name;\n }\n if (!isset($storageConf['primaryKey'])) {\n $storageConf['primaryKey'] = static::$primaryKey;\n }\n $storageConf['modelClass'] = static::class;\n $storageConf['modelName'] = $modelName;\n\n $class = Storages\\Generic::class;\n $class = substr($class, 0, strrpos($class, '\\\\'))\n . '\\\\' . $storageConf['type'];\n static::$storages[$name] = new $class($storageConf);\n }\n }",
"protected function _LoadExportSession()\n\t{\n\t\t$query = \"select data from [|PREFIX|]export_session where type='primary'\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t$this->_exportSession = @unserialize($GLOBALS['ISC_CLASS_DB']->FetchOne($result));\n\t}",
"public function loads_django_session($str)\n\t{\n\t\t$str = base64_decode($str);\n\t\t//echo \"str = $str \\r\\n\";\n\t\tlist($hash, $pickle) = explode(\":\", $str, 2);\n\t\t//echo \"hash: $hash, pickle: $pickle \\r\\n\";\n\t\treturn $this->loads($pickle);\n\t}",
"protected function getStorage()\n{\n\tglobal $pclib;\n\tif (!$this->storage) $this->storage = new TranslatorDbStorage($this);\n\treturn $this->storage;\n}",
"private function _getStorageName() {\n\t\tif($this->_rememberMe) {\n\t\t\treturn self::TOKEN_COOKIE_STORAGE;\n\t\t}\n\n\t\treturn self::TOKEN_SESSION_STORAGE;\n\t}",
"protected function registerStorage()\n {\n $this->app->singleton('file.storage', function ($app) {\n return new StorageManager($app);\n });\n\n $this->app->singleton('file.storage.store', function ($app) {\n return $app['file.storage']->driver();\n });\n }",
"function load ($session_id = null) {\n\t\t$session_data = $this->get_internal($session_id);\n\t\tif (!$session_data || !$this->is_session_owner_internal($session_data)) {\n\t\t\t$this->add(User::GUEST_ID);\n\t\t\treturn User::GUEST_ID;\n\t\t}\n\t\t/**\n\t\t * Updating last online time and ip\n\t\t */\n\t\t$Config = Config::instance();\n\t\t$time = time();\n\t\tif ($session_data['expire'] - $time < $Config->core['session_expire'] * $Config->core['update_ratio'] / 100) {\n\t\t\t$session_data['expire'] = $time + $Config->core['session_expire'];\n\t\t\t$this->update($session_data);\n\t\t\t$this->cache->set($session_data['id'], $session_data);\n\t\t\tResponse::instance()->cookie('session', $session_data['id'], $session_data['expire'], true);\n\t\t}\n\t\tunset($session_data['data']);\n\t\tEvent::instance()->fire(\n\t\t\t'System/Session/load',\n\t\t\t[\n\t\t\t\t'session_data' => $session_data\n\t\t\t]\n\t\t);\n\t\treturn $this->load_initialization($session_data['id'], $session_data['user']);\n\t}",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"public function getStorageService();",
"public function initStorage()\n {\n $dbMasterConfig = C(self::$dbKey);\n $this->storage = $this->getDbInstance($dbMasterConfig);\n $this->setTableName($dbMasterConfig);\n\n return $this->storage;\n }",
"function session_create_custom_handler(SessionConfiguration $configuration): SessionHandlerInterface\n{\n $handler = __NAMESPACE__ . '\\\\Handler\\\\' . ucfirst($configuration->handler()) . 'Handler';\n\n if (false === class_exists($handler, true)) {\n throw SessionException::forNotFoundHandler($handler);\n }\n\n return new $handler($configuration);\n}",
"public function __construct()\n {\n $this->sessionKey = \"WebsiteUserManager\";\n }",
"public function start($sessionName = null)\n {\n if (isset($_SESSION) && !$this->getSkipEmptySessionCheck()) {\n return $this;\n }\n\n // getSessionSaveMethod has to return correct version of handler in any case\n $moduleName = $this->getSessionSaveMethod();\n switch ($moduleName) {\n /**\n * backward compatibility with db argument (option is @deprecated after 1.12.0.2)\n */\n case 'db':\n $moduleName = 'user';\n /* @var $sessionResource Mage_Core_Model_Resource_Session */\n $sessionResource = Mage::getResourceSingleton('core/session');\n $sessionResource->setSaveHandler();\n break;\n case 'user':\n // getSessionSavePath represents static function for custom session handler setup\n call_user_func($this->getSessionSavePath());\n break;\n case 'files':\n //don't change path if it's not writable\n if (!is_writable($this->getSessionSavePath())) {\n break;\n }\n default:\n session_save_path($this->getSessionSavePath());\n break;\n }\n session_module_name($moduleName);\n\n $cookie = $this->getCookie();\n if (Mage::app()->getStore()->isAdmin()) {\n $sessionMaxLifetime = Mage_Core_Model_Resource_Session::SEESION_MAX_COOKIE_LIFETIME;\n $adminSessionLifetime = (int)Mage::getStoreConfig('admin/security/session_cookie_lifetime');\n if ($adminSessionLifetime > $sessionMaxLifetime) {\n $adminSessionLifetime = $sessionMaxLifetime;\n }\n if ($adminSessionLifetime > 60) {\n $cookie->setLifetime($adminSessionLifetime);\n }\n }\n\n // session cookie params\n $cookieParams = array(\n 'lifetime' => $cookie->getLifetime(),\n 'path' => $cookie->getPath(),\n 'domain' => $cookie->getConfigDomain(),\n 'secure' => $cookie->isSecure(),\n 'httponly' => $cookie->getHttponly()\n );\n\n if (!$cookieParams['httponly']) {\n unset($cookieParams['httponly']);\n if (!$cookieParams['secure']) {\n unset($cookieParams['secure']);\n if (!$cookieParams['domain']) {\n unset($cookieParams['domain']);\n }\n }\n }\n\n if (isset($cookieParams['domain'])) {\n $cookieParams['domain'] = $cookie->getDomain();\n }\n\n call_user_func_array('session_set_cookie_params', $cookieParams);\n\n if (!empty($sessionName)) {\n $this->setSessionName($sessionName);\n }\n\n // potential custom logic for session id (ex. switching between hosts)\n $this->setSessionId();\n\n Varien_Profiler::start(__METHOD__ . '/start');\n\n $sessionCacheLimiter = Mage::getConfig()->getNode('global/session_cache_limiter');\n if ($sessionCacheLimiter) {\n session_cache_limiter((string)$sessionCacheLimiter);\n }\n\n session_start();\n\n // REMOVED SECURE CODE PREVENT MITM ATTACK (1.9.1.0+)\n if (defined('self::SECURE_COOKIE_CHECK_KEY') && isset($_SESSION[self::SECURE_COOKIE_CHECK_KEY])) {\n unset($_SESSION[self::SECURE_COOKIE_CHECK_KEY]);\n }\n\n /**\n * Renew cookie expiration time if session id did not change\n */\n if ($cookie->get(session_name()) == $this->getSessionId()) {\n $cookie->renew(session_name());\n }\n\n Varien_Profiler::stop(__METHOD__ . '/start');\n\n // FORCE SESSION DATA TO CURRENT REQUEST TO BYPASS VALIDATOR\n $this->_fakeSessionData();\n\n return $this;\n }",
"protected static function loadLibraryData()\n {\n self::$libraryData = $GLOBALS['TSFE']->fe_user->getKey('ses', AbstractController::getControllerObjectName());\n }",
"protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }",
"private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}",
"public function storeSessionTokenInRegistry() {}",
"public static function initSession(){\n \n self::setSessionIni(); \n self::setSessionHandler();\n session_start();\n self::checkSystemCookie();\n\n // if 'started' is set for previous request\n //we truely know we are in 'in_session'\n if (isset($_SESSION['started'])){\n $_SESSION['in_session'] = 1;\n }\n\n // if not started we do not know for sure if session will work\n // we destroy 'in_session'\n if (!isset($_SESSION['started'])){\n $_SESSION['started'] = 1;\n $_SESSION['in_session'] = null;\n }\n\n // we set a session start time\n if (!isset($_SESSION['start_time'])){\n $_SESSION['start_time'] = time();\n }\n }",
"protected function get_sessions()\n {\n }",
"public static function sessionData(): object {\n return Session::instance()->get(AccessControl::SESSION_AUTH_KEY);\n }",
"public function getSession()\r\n {\r\n return Mage::getSingleton('firstdatae4/session');\r\n }",
"function session_register_custom_handler(ConfigurationFactory $configuration): SessionConfiguration\n{\n $configuration = new SessionConfiguration($configuration);\n\n if (PHP_SESSION_ACTIVE !== session_status()) {\n session_set_save_handler(session_create_custom_handler($configuration), false);\n }\n\n return $configuration;\n}",
"public static function instance(){\n\t\t\tif(!Session::session_started()){\n\t\t\t\tSession::session_start();\n\t\t\t}\n\t\t}",
"public static function init()\n {\n if (session_id() == '') {\n session_start();\n }\n }"
] | [
"0.71013063",
"0.6844777",
"0.67214483",
"0.65603197",
"0.64592654",
"0.6355589",
"0.6320818",
"0.62356997",
"0.6222851",
"0.6150736",
"0.6137202",
"0.6128961",
"0.61177063",
"0.61128676",
"0.60955334",
"0.60686505",
"0.60648364",
"0.6063041",
"0.59682107",
"0.59311396",
"0.59215873",
"0.5915134",
"0.5838363",
"0.57706445",
"0.5737606",
"0.57218593",
"0.5715403",
"0.5709424",
"0.57045615",
"0.5654793",
"0.5591398",
"0.5563868",
"0.5560568",
"0.55453986",
"0.5538116",
"0.55113375",
"0.5503584",
"0.5497198",
"0.54944235",
"0.547827",
"0.5465035",
"0.5465035",
"0.5429402",
"0.54238445",
"0.5413067",
"0.5405227",
"0.5393165",
"0.5385632",
"0.5383917",
"0.53797555",
"0.5379286",
"0.5356133",
"0.5352513",
"0.5351863",
"0.531733",
"0.5315038",
"0.53093845",
"0.53045243",
"0.5301455",
"0.5293272",
"0.52845234",
"0.52661926",
"0.5263911",
"0.52548766",
"0.5254744",
"0.52518374",
"0.5240891",
"0.5237636",
"0.52356976",
"0.52235335",
"0.5222755",
"0.52104133",
"0.5206247",
"0.5204451",
"0.519552",
"0.5190996",
"0.51801616",
"0.51773494",
"0.51749086",
"0.5174575",
"0.5173976",
"0.5173976",
"0.5173976",
"0.5173976",
"0.5157246",
"0.5154483",
"0.51509184",
"0.51500666",
"0.51470673",
"0.5146093",
"0.5128616",
"0.51129574",
"0.5112734",
"0.51110995",
"0.5109895",
"0.5109669",
"0.5109326",
"0.5107376",
"0.51046115",
"0.50982964"
] | 0.6244705 | 7 |
Run the database seeds. | public function run()
{
$visitante = new App\Models\Pet;
$visitante->original_name = 'example-1.png';
$visitante->save();
$visitante = new App\Models\Pet;
$visitante->original_name = 'example-2.png';
$visitante->save();
$visitante = new App\Models\Pet;
$visitante->original_name = 'example-3.png';
$visitante->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Register widget with WordPress. | function __construct() {
parent::__construct(
'rss_widget', // Base ID
esc_html__( 'RSS Widget', 'rss-widget' ), // Name
array( 'description' => esc_html__( 'A Wiget To Display RSS Feeds', 'rss-widget' ), ) // Args
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_widget() {\n register_widget( 'WPP_Widget' );\n }",
"function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}",
"function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}",
"function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}",
"function wpb_load_widget() {\r\n\tregister_widget( 'wpb_widget' );\r\n}",
"function register_widget($widget)\n {\n }",
"function wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}",
"function montheme_register_widget() {\n register_widget(YoutubeWidget::class);\n register_sidebar([\n 'id' => 'homepage',\n 'name' => __('Sidebar Accueil', 'montheme'),\n 'before_widget' => '<div class=\"p-4 %2$s\" id=\"%1$s\"',\n 'after_widget' => '</div>',\n 'before_title' => ' <h4 class=\"fst-italic\">',\n 'after_title' => '</h4>'\n ]);\n}",
"static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}",
"function register()\n {\n // Incluimos el widget en el panel control de Widgets\n wp_register_sidebar_widget( 'widget_ultimosp', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'widget' ) );\n\n // Formulario para editar las propiedades de nuestro Widget\n wp_register_widget_control('widget_ultimos_autor', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'control' ) );\n }",
"function whichet_load_widget() {\n\tregister_widget( 'WHICHet_widget' );\n\tadd_action( 'wp_enqueue_script', 'WHICHet_scripts' );\n}",
"function load_widget() {\n\n\t\tregister_widget( 'WordpressConnectWidgetActivityFeed' );\n\t\tregister_widget( 'WordpressConnectWidgetComments' );\n\t\tregister_widget( 'WordpressConnectWidgetFacepile' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeBox' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeButton' );\n\t\tregister_widget( 'WordpressConnectWidgetLiveStream' );\n\t\tregister_widget( 'WordpressConnectWidgetLoginButton' );\n\t\tregister_widget( 'WordpressConnectWidgetRecommendations' );\n\t\tregister_widget( 'WordpressConnectWidgetSendButton' );\n\n\t}",
"public function _register_widgets()\n {\n }",
"function load_postmeta_widget(){\n register_widget( 'postmeta_widget' );\n}",
"function itstar_widget() {\n register_widget( 'last_video_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'simple_button_widget' );\n}",
"function wpb_load_widget()\n{\n register_widget( 'WC_External_API_Widget' );\n}",
"function itstar_widget() {\n// register_widget( 'last_products_widget' );\n// register_widget( 'last_projects_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'contact_info_widget' );\n// register_widget( 'social_widget' );\n}",
"function twd_register_widgets() {\r\n\r\n\t$widgets = array(\r\n\r\n\t\t'shortcode'\r\n\r\n\t);\r\n\r\n\tforeach ( $widgets as $widget ) {\r\n\r\n\t\trequire_once get_template_directory() . '/includes/widgets/widget-' . $widget . '.php';\r\n\r\n\t}\r\n\r\n\t register_widget( 'paste_shortcode_widget' );\r\n\r\n}",
"function wpzh_load_widget() {\n register_widget( 'sliderHTML2' ); \n}",
"function widget_wrap()\n{\n\tregister_widget('ag_pag_familie_w');\n\tregister_widget('ag_social_widget_container');\n\tregister_widget('ag_agenda_widget');\n}",
"function ds_social_load_widget() {\n\tregister_widget( 'ds_social_widget' );\n}",
"function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }",
"function bp_media_register_widgets() {\n\tadd_action('widgets_init', create_function('', 'return register_widget(\"BP_Media_Widget\");') );\n}",
"function register_dc_widget() {\n\t\tregister_widget( 'dc_linked_image' );\n\t\tregister_widget( 'dc_widget_link_text' );\n\t}",
"function load_tag_widget() {\n register_widget( 'custom_tag_widget' );\n}",
"function registerWidgets( ) {\r\n\t\t\twp_register_sidebar_widget( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetOutput' ) );\r\n\t\t\twp_register_widget_control( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetControlOutput' ) );\r\n\t\t}",
"function load_widget_plugin_name() {\n register_widget( 'widget_plugin_name' );\n}",
"function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}",
"function green_widget_twitter_load() {\n\tregister_widget( 'green_widget_twitter' );\n}",
"function hw_load_widget() {\n\tregister_widget( 'hw_cal_widget' );\n\tregister_widget( 'hw_custom_post_list_widget' );\n}",
"function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}",
"function dt_twitter_register() {\n register_widget('DT_Twitter_Widget');\n}",
"function aw_add_load_widget() {\r\n\t\tregister_widget( 'AW_AddFeed' );\r\n\t}",
"function wpc_load_widget()\n{\n register_widget('expat_category_widget');\n}",
"function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}",
"function custom_register_widget()\n{\n register_widget('oferta_widget');\n register_widget('events_widget');\n register_widget('group_list_widget');\n}",
"public static function register() {\n\t register_widget( __CLASS__ );\n\t}",
"function qed_register_widgets() {\r\n\t\t// Make a Wordpress built-in Text widget process shortcodes.\r\n\t\tadd_filter( 'widget_text', 'shortcode_unautop' );\r\n\t\tadd_filter( 'widget_text', 'do_shortcode', 11 );\r\n\r\n\t\tregister_widget( 'QED_Widget_Latest_Posts' );\r\n\t\tregister_widget( 'QED_Widget_Contact_Us' );\r\n\t\tregister_widget( 'QED_Widget_Advanced_Text' );\r\n\r\n\t\t// if ( class_exists( 'woocommerce' ) ) {\r\n\t\t\t// TODO: Widget for woocommerce.\r\n\t\t// }\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'sidebar',\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'swishdesign' ),\r\n\t\t\t'description' => esc_html__( 'Sidebar located on the right side of blog page.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'footer1',\r\n\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 1 ),\r\n\t\t\t'description' => esc_html__( 'Located in 1st column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\t$footer_columns_count = qed_get_footer_columns();\r\n\t\tif ( $footer_columns_count >= 2 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer2',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 2 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 2nd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 3 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer3',\r\n\t\t\t\t'name' =>sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 3 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 3rd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 4 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer4',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 4 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 4th column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\t}",
"function load_twitticker_widgets() {\n\tregister_widget( 'twitticker_widget' );\n}",
"function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}",
"function example_load_widgets()\n{\n\tregister_widget('GuildNews_Widget');\n}",
"function featured_news_load_widget() {register_widget( 'featured_news_widget' );}",
"public function register($widget)\n {\n }",
"function portfolio_recent_register_widgets() {\n\tregister_widget( 'blog_recent_post' );\n}",
"function register_service_widget() {\n register_widget( 'Services_Widget' );\n}",
"function widget_registration($name, $id, $description, $beforeWidget, $afterWidget, $beforeTitle, $afterTitle) {\n register_sidebar(\n array(\n 'name' => $name,\n 'id' => $id,\n 'description' => $description,\n 'before_widget' => $beforeWidget,\n 'after_widget' => $afterWidget,\n 'before_title' => $beforeTitle,\n 'after_title' => $afterTitle,\n )\n );\n}",
"function pgnyt_articles_register_widgets() {\n register_widget( 'Pgnyt_Articles_Widget' );\n}",
"function suhv_widgets()\n{\n register_widget( 'Suhv_Widgets' );\n}",
"function pre_load_widget() {\n register_widget( 'events_widget' );\n register_widget( 'fundys_widget' );\n}",
"function wpcoupon_register_slider_widget() {\r\n register_widget( 'WPCoupon_Slider_Widget' );\r\n}",
"function harbour_city_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Footer Widgets', 'harbour-city' ),\n 'id' => 'widgets-footer',\n 'description' => __( 'Appears on the front page', 'harbour-city' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget span4 %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}",
"function WeblizarTwitterWidget() {\r\n\tregister_widget( 'WeblizarTwitter' );\r\n}",
"public function registerWidget($id, $widget)\n {\n add_action('widgets_init', function () use ($id, $widget) {\n global $wp_widget_factory;\n $this->plugin->activateLoader();\n register_widget($widget['uses']);\n //get latest create widget in widget factory\n $wdg = end($wp_widget_factory->widgets);\n // pre init latest widget.\n $wdg->initializeWidget($id, $widget, $this->plugin);\n });\n }",
"function register_coupons_widget() {\n register_widget( 'CouponsWidget' );\n}",
"function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }",
"function ebay_feeds_for_wordpress_Widget() {\n // curl need to be installed\n\tregister_widget( 'ebay_feeds_for_wordpress_Widget_class' );\n}",
"public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Hello_World() );\n\t}",
"function widget_load() {\n\t\tregister_widget('ilgelo_wSocial');\n\t\tregister_widget('ilgelo_wTwitter');\n\t\tregister_widget('ilgelo_banner');\n\t}",
"function sbc_connect_widget() {\n\n class connect_widget extends WP_Widget {\n\n function __construct() {\n parent::__construct(\n\n // Base ID of your widget\n 'connect_widget',\n\n // Widget name will appear in UI\n __('Connect', 'connect_widget_domain'),\n\n // Widget description\n array( 'description' => __( 'Insert your connect links with this widget', 'connect_widget_domain' ), )\n );\n }\n\n // Creating widget output\n public function widget( $args, $instance ) {\n $title = apply_filters( 'widget_title', $instance['title'] );\n\n // echo Title if Title\n echo $args['before_widget'];\n echo '<div class=\"connect-widget\">';\n if ( ! empty( $title ) ):\n echo $args['before_title'] . $title . $args['after_title'];\n endif;\n\n // echo social links if social links available in theme options\n if( have_rows('_about', 'option') ):\n while( have_rows('_about', 'option') ): the_row();\n if( have_rows('connect_media') ):\n// echo 'Follow Us: ';\n while( have_rows('connect_media') ): the_row();\n $link = get_sub_field('link');\n $platform = get_sub_field('platform');\n $icon = '<a href=\"' . $link . '\">' .\n '<i class=\"' . $platform . '\"></i>' .\n '</a>';\n echo $icon;\n endwhile;\n endif;\n endwhile;\n endif;\n\n // This is where you run the code and display the output\n// echo __( 'Hello, World!', 'connect_widget_domain' );\n echo $args['after_widget'];\n echo '</div>';\n }\n\n // Widget Backend\n public function form( $instance ) {\n if ( isset( $instance[ 'title' ] ) ) {\n $title = $instance[ 'title' ];\n }\n else {\n $title = __( 'New title', 'connect_widget_domain' );\n }\n // Widget admin form\n ?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:' ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n </p>\n <?php\n }\n\n // Updating widget replacing old instances with new\n public function update( $new_instance, $old_instance ) {\n $instance = array();\n $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\n return $instance;\n }\n\n } // close class\n\n // Register the widget\n register_widget( 'connect_widget' );\n\n}",
"function custom_widgets_register() {\n register_post_type('custom_widgets', array(\n 'labels' => array(\n 'name' => __('Custom Widgets'),\n 'singular_name' => __('Custom Widget'),\n ),\n 'public' => false,\n 'show_ui' => true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n ));\n}",
"function register_port_posts_widget() {\n register_widget( 'port_posts' );\n}",
"function register_Zappy_Feed_Burner_Widget() {\n register_widget('Zappy_Feed_Burner_Widget');\n}",
"function wpb_carousel_widget() {\n\t register_widget( 'wpb_widget' );\n\t}",
"public static function register()\n {\n register_sidebar( array(\n 'name' => 'Widget Area 1',\n 'id' => 'widget_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n }",
"function mytheme_load_widget() {\n register_widget( 'mytheme_widget_text' );\n \n // Allow to execute shortcodes on mytheme_widget_text\n add_filter('mytheme_widget_text', 'do_shortcode');\n}",
"function pb18_article_also_widget() {\n register_widget( 'pb18_article_also_widget' );\n}",
"function funct_Sandy_RSS() {\r\n register_widget( 'WP_Sandy_RSS' );\r\n}",
"function wuss_scoring_widgets() {\r\n\tregister_widget( 'wuss_scoring_widget' );\r\n}",
"function RSSPhotoWidgetInit() \n{\n register_widget('RSSPhotoWidget');\n wp_enqueue_script('jquery');\n wp_enqueue_script('rssphoto_javascript','/wp-content/plugins/rssphoto/rssphoto.js');\n wp_enqueue_style('rssphoto_stylesheet','/wp-content/plugins/rssphoto/rssphoto.css');\n}",
"function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}",
"function ds_social_links_load_widget() {\n\tregister_widget( 'ds_social_links_widget' );\n}",
"public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}",
"function register_page_bpposts_widget() {\n\tadd_action('widgets_init', create_function('', 'return register_widget(\"BP_Paginated_Posts_Widget\");') );\n}",
"function avhamazon_widgets_init ()\n{\n\tregister_widget( 'WP_Widget_AVHAmazon_Wishlist' );\n}",
"function instagram_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Instagram',\n\t\t'id' => 'instagram',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}",
"function pts_widget_init() {\n\n register_sidebar( array(\n\t\t'name' => 'Top Widget',\n\t\t'id' => 'top_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s top-widgs\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Sidebar Widget',\n\t\t'id' => 'sidebar_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Single Post Widget',\n\t\t'id' => 'single_post_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'First Footer Widget',\n\t\t'id' => 'first_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Second Footer Widget',\n\t\t'id' => 'second_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Third Footer Widget',\n\t\t'id' => 'third_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Fourth Footer Widget',\n\t\t'id' => 'fourth_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n}",
"public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Dropdown() );\n\t}",
"public function action_widgets_init() {\n\n // Our widgets\n register_widget( '\\Pedestal\\Widgets\\Recent_Content_Widget' );\n register_widget( '\\Pedestal\\Widgets\\Recent_Video_Widget' );\n\n if ( PEDESTAL_ENABLE_INSTAGRAM_OF_THE_DAY ) {\n register_widget( '\\Pedestal\\Widgets\\Daily_Insta_Widget' );\n }\n\n // Unregister core widgets we won't be using\n unregister_widget( 'WP_Widget_Archives' );\n unregister_widget( 'WP_Widget_Calendar' );\n unregister_widget( 'WP_Widget_Categories' );\n unregister_widget( 'WP_Widget_Custom_HTML' );\n unregister_widget( 'WP_Widget_Links' );\n unregister_widget( 'WP_Widget_Media_Audio' );\n unregister_widget( 'WP_Widget_Media_Gallery' );\n unregister_widget( 'WP_Widget_Media_Image' );\n unregister_widget( 'WP_Widget_Media_Video' );\n unregister_widget( 'WP_Widget_Meta' );\n unregister_widget( 'WP_Widget_Pages' );\n unregister_widget( 'WP_Widget_Recent_Comments' );\n unregister_widget( 'WP_Widget_Recent_Posts' );\n unregister_widget( 'WP_Widget_RSS' );\n unregister_widget( 'WP_Widget_Search' );\n unregister_widget( 'WP_Widget_Tag_Cloud' );\n unregister_widget( 'WP_Widget_Text' );\n\n // Unregister widgets added by plugins\n unregister_widget( 'P2P_Widget' );\n }",
"function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}",
"static function init() {\n\t\t\t$classname = get_called_class();\n\t\t\tadd_action( 'widgets_init', $classname . '::register_widget' );\n\t\t\tadd_shortcode( $classname, $classname . '::register_shortcode' );\n\t\t}",
"function adelle_footer_widgets_instagram_init() {\r\n register_sidebar( array(\r\n 'name' => __( 'Instagram Widget', 'adelle-theme' ),\r\n 'id' => 'footer-widget-instagram',\r\n 'class' => '',\r\n 'description' => 'Instagram widget area.',\r\n 'before_widget' => '<article id=\"%1$s\" class=\"footer-instagram-widget %2$s\">',\r\n 'after_widget' => '</article>',\r\n 'before_title' => '<h4>',\r\n 'after_title' => '</h4>',\r\n ) );\r\n}",
"function load_type_widget() {\n register_widget( 'custom_type_widget' );\n}",
"function FoodByNight_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<ul class=\"list-inline\">',\n\t\t'after_widget' => '</ul>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Social_Link_Widget' );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Popups',\n\t\t'id' => 'popups',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Contact_Popup_Widget' );\n\n}",
"function widget_init() {\n if ( function_exists('register_sidebar') )\n \n register_sidebar(\n array(\n 'name' => 'Footer',\n 'before_widget' => '<div class = \"footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Event Navigation',\n 'before_widget' => '<div class=\"custom-widget top-round card slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Frontpage News',\n 'before_widget' => '<div class=\"custom-widget card top-round slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n }",
"function register_Zappy_Lates_Comment_Widget() {\n register_widget('Zappy_Lates_Comment_Widget');\n}",
"function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}",
"public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }",
"function wp_listings_register_widgets() {\n\n\t$widgets = array( 'WP_Listings_Featured_Listings_Widget', 'WP_Listings_Search_Widget' );\n\n\tforeach ( (array) $widgets as $widget ) {\n\t\tregister_widget( $widget );\n\t}\n\n}",
"public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}",
"public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}",
"public function register_widget_scripts() {\n\n wp_enqueue_script( $this->get_widget_slug().'-script', plugins_url( 'js/widget.js', __FILE__ ), array('jquery') );\n\n }",
"function widget_init() {\r\n if ( !function_exists('wp_register_sidebar_widget') || !function_exists('register_widget_control') ) return;\r\n function widget($args) {\r\n extract($args);\r\n $wpca_settings = get_option('wpcareers');\r\n echo $before_widget;\r\n echo $before_title . $wpca_settings['widget_title'] . $after_title;\r\n\r\n $fieldsPre=\"wpc_\";\r\n $before_tag=stripslashes(get_option($fieldsPre.'before_Tag'));\r\n $after_tag=stripslashes(get_option($fieldsPre.'after_Tag'));\r\n echo '<p><ul>' . widget_display($wpca_settings['widget_format']) . '</ul></p>'; \r\n }\r\n\r\n function widget_control() {\r\n $wpca_settings = $newoptions = get_option('wpcareers');\r\n if ( $_POST[\"wpCareers-submit\"] ) {\r\n $newoptions['widget_title'] = strip_tags(stripslashes($_POST['widget_title']));\r\n $newoptions['widget_format'] = $_POST['widget_format'];\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Classifieds Ads';\r\n }\r\n if ( $wpca_settings != $newoptions ) {\r\n $wpca_settings = $newoptions;\r\n update_option('wpcareers', $wpca_settings);\r\n }\r\n $title = htmlspecialchars($wpca_settings['widget_title'], ENT_QUOTES);\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Careers Posts';\r\n if ( empty($newoptions['widget_format']) ) $newoptions['widget_format'] = 'y';\r\n ?>\r\n <label for=\"wpCareers-widget_title\"><?php _e('Title:'); ?><input style=\"width: 200px;\" id=\"widget_title\" name=\"widget_title\" type=\"text\" value=\"<?php echo htmlspecialchars($wpca_settings['widget_title']); ?>\" /></label></p>\r\n <br />\r\n <label for=\"wpCareers-widget_format\">\r\n <input class=\"checkbox\" id=\"widget_format\" name=\"widget_format\" type=\"checkbox\" value=\"y\"<?php echo ($wpca_settings['widget_format']=='y')?\" checked\":\"\";?>>Small Format Output</label><br />\r\n <input type=\"hidden\" id=\"wpCareers-submit\" name=\"wpCareers-submit\" value=\"1\" />\r\n <?php\r\n }\r\n \r\n function widget_display() {\r\n $wpca_settings = get_option('wpcareers');\r\n //$out = wpcaLastPosts($wpca_settings['widget_format']);\r\n return $out;\r\n }\r\n \r\n wp_register_sidebar_widget('wpCareers', 'widget', null, 'wpCareers');\r\n register_widget_control('wpCareers', 'widget_control');\r\n }",
"function urbanfitness_widgets()\n{\n //registering widget must write php code to show it\n register_sidebar([\n 'name' => 'Sidebar', //widget name on wordpress panel\n 'id' => 'sidebar', //we are passing this id to dynamic_widget('sidebar') must be unique for wordpress to identify\n 'before_widget' => '<div class=\"widget\">', //html before widget\n 'after_widget' => '</div>', //html after widget\n 'before_title' => '<h3 class=\"text-primary\">', //html before title\n 'after_title' => '</h3>', //html after title\n ]);\n}",
"function widget_sparkplug_register() {\n\twp_register_sidebar_widget( 'sparkplug', 'Sparkplug', 'widget_sparkplug', array( 'description' => 'Display a sparkline chart showing post frequency for the current author/tag/category/blog.' ) );\n\twp_register_widget_control( 'sparkplug', 'Sparkplug', 'widget_sparkplug_control' );\n}",
"public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t$save_widget = ( ! empty( $this->fields() ) ) ? array( &$this, 'save_widget' ) : false;\n\t\t\twp_add_dashboard_widget( $wid, $wname, $widget_render, $save_widget );\n\t\t}\n\t}",
"function aidtransparency_widgets_init() {\r\n\r\n $widgetDefaults = array(\r\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => \"</aside>\",\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>'\r\n );\r\n\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Home Page Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-3',\r\n 'description' => __( 'The Home Page widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Page Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-1',\r\n 'description' => __( 'The Sidebar widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Blog Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-2',\r\n 'description' => __( 'The Blog Sidebar widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Footer', 'aidtransparency' ),\r\n 'id' => 'footer-1',\r\n 'description' => __( 'The Footer widgetized area', 'aidtransparency' )\r\n )\r\n )\r\n );\r\n}",
"function reg_wp_footer_widget() {\n\t // First Footer Widget.\n\t$template_uri = get_template_directory_uri();\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget One' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/bulb.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h3>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Second Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Two' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-2',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/recent_post_icon.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Third Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Three' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-3',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/contact_us_icons.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Fourth Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Page Sidebar' ), 'wpthemes1' ),\n\t\t'id' => 'sidebar1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t'after_title' => \"</h2>\\n\",\n\t);\n\tregister_sidebar( $args );\n}",
"function sparcwp_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'sparcwp' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget 4 Column', 'sparcwp' ),\n\t\t'id' => 'footer-widgets-four-column',\n\t\t'description' => __( 'Each widget added will be 25% width', 'sparcwp' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget footer-widget %2$s four-column\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Full Width', 'sparcwp' ),\n\t\t'id' => 'footer-widgets-full-width',\n\t\t'description' => __( 'Wrap footer blocks in cols if needed', 'sparcwp' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget footer-widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}",
"function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}",
"function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}",
"function twentyfifteen_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Widget Area', 'twentyfifteen' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}"
] | [
"0.8390025",
"0.83101994",
"0.82505625",
"0.82505625",
"0.82282835",
"0.80624324",
"0.79771596",
"0.7901524",
"0.7809308",
"0.77684814",
"0.77520776",
"0.7727257",
"0.7609239",
"0.75666004",
"0.75445676",
"0.75443226",
"0.7522003",
"0.75196254",
"0.75170845",
"0.7512498",
"0.7447794",
"0.7446988",
"0.74403644",
"0.73797035",
"0.7377074",
"0.7355821",
"0.73377615",
"0.7337268",
"0.73335594",
"0.7328682",
"0.73182005",
"0.73169446",
"0.7298888",
"0.7290922",
"0.7250272",
"0.72397614",
"0.7228767",
"0.7226242",
"0.7219717",
"0.7201903",
"0.7187676",
"0.7166757",
"0.71408266",
"0.7139097",
"0.7133043",
"0.7121191",
"0.7116391",
"0.70914453",
"0.7086108",
"0.70773035",
"0.7073097",
"0.70627826",
"0.7054209",
"0.7047725",
"0.7043728",
"0.70430505",
"0.70393866",
"0.70383275",
"0.7036506",
"0.7034996",
"0.70253414",
"0.70248973",
"0.7024256",
"0.70237195",
"0.70200586",
"0.7008153",
"0.6998476",
"0.6996311",
"0.699286",
"0.69875365",
"0.6987385",
"0.69862676",
"0.698265",
"0.69741976",
"0.696835",
"0.69600004",
"0.69569546",
"0.6948305",
"0.6945937",
"0.69412565",
"0.6935894",
"0.693448",
"0.6932985",
"0.6923548",
"0.69225895",
"0.69146496",
"0.6908146",
"0.6907732",
"0.6890926",
"0.6890926",
"0.68861413",
"0.6874315",
"0.68732387",
"0.6858937",
"0.68582195",
"0.6840389",
"0.6823092",
"0.6816244",
"0.6809824",
"0.680631",
"0.68060595"
] | 0.0 | -1 |
Frontend display of widget. | public function widget( $args, $instance ) {
echo $args['before_widget'];
if ( ! empty( $instance['title'] ) ) {
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
}
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'New title', 'text_domain' );
$rss_feed = $instance['rss_feed'];
$rss_items = $instance['rss_items'];
$rss_date = $instance['rss_date'];
$rss_summary = $instance['rss_summary'];
if(!empty($rss_feed)){
wp_widget_rss_output(array(
'url'=>$rss_feed ,
'title'=>$title ,
'items'=>$rss_items ,
'show_date'=>$rss_date ,
'show_summary'=>$rss_summary ,
'show_author'=>0
));
}
echo $args['after_widget'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}",
"public function render_widget() {\n\n return Widget::render($this->settings);\n\n }",
"public static function widget() {\n \n\t\t$start = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t$remaining_days = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t\n\t\t// Display Dashboard widget\n\t\trequire_once( 'red-flag-parking-display.php' );\n }",
"public function frontend_render()\n {\n $user_selected_language = get_user_lang();\n $widget_saved_values = $this->get_settings();\n\n $widget_title = $widget_saved_values['widget_title_' . $user_selected_language] ?? '';\n\n $output = $this->widget_before(); //render widget before content\n\n if (!empty($widget_title)) {\n $output .= '<h4 class=\"widget-title\">' . purify_html($widget_title) . '</h4>';\n }\n $output .='<div class=\"widget widget_search\">\n <form action=\"'.route('frontend.blog.search').'\" method=\"get\" class=\"search-form\">\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" name=\"search\" placeholder=\"'.__('Write your keyword...').'\">\n </div>\n <button class=\"submit-btn\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\n </form>\n </div>';\n\n $output .= $this->widget_after(); // render widget after content\n\n return $output;\n }",
"public function run() {\r\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\r\n\t\t$contents=ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\tif($this->activeDataProvider === null) {\r\n\t\t\techo $contents;\r\n\t\t} else {\r\n\t\t\tif(($this->hideOnEmpty === true) && ($this->activeDataProvider->totalItemCount == 0)) {\r\n\t\t\t\techo $contents;\r\n\t\t\t} else {\r\n\t\t\t\t$this->render('TableWidget', array(\r\n\t\t\t\t\t'activeDataProvider' => $this->activeDataProvider,\r\n\t\t\t\t\t'fields' => $this->getFields(),\r\n\t\t\t\t\t'title' => $this->title,\r\n\t\t\t\t\t'pagination' => $this->enablePagination,\r\n\t\t\t\t\t'catalog' => $this->getCatalog(),\r\n\t\t\t\t\t'htmlOptions' => $this->htmlOptions,\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function getWidget();",
"public static function widget() {\n require_once( 'includes/widget.php' );\n }",
"public static function widget() {\n\t\t$username = self::get_dashboard_widget_option(self::wid, 'username');\n\t\t$apikey = self::get_dashboard_widget_option(self::wid, 'apikey');\n\t\t$project_id = self::get_dashboard_widget_option(self::wid, 'project_id');\n\t\t$ref_url = 'http://go.endcore.64905.digistore24.com/';\n\t\t$check = ($username && $apikey && $project_id ? true : false);\n \n\t\tif(!$check) {\n\t\t\techo '<h4 style=\"text-align:right; padding-right: 40px; padding-top: 10px\">' . __( 'Bitte prüfe die Einstellungen ∧', 'affiliatetheme-backend' ) . '</h4> ';\n ?>\n <div class=\"rankalyst-text\">\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\"><img src=\"<?php echo get_template_directory_uri(); ?>/_/img/rankalyst.png\"></a>\n <p><?php printf(__('Mit <a href=\"%s\" target=\"_blank\">Rankalyst</a> kannst du 10 Keywords kostenlos tracken!', 'affiliatetheme-backend'), $ref_url); ?></p>\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\" class=\"button button-primary\"><?php _e('Kostenlos starten', 'affiliatetheme-backend'); ?></a>\n </div>\n <?php\n\t\t}\n\t\t\n\t\t/* @TODO Rankingchange <span class=\"plus\">+</span> bzw Minus ausgeben, jenachdem ob Change positiv oder negativ. */\n\n ?>\n <div class=\"rankalyst-data\">\n <ul class=\"rankalyst-tabs\">\n <li><a href=\"#\" data-type=\"organic\" class=\"active\"><?php _e('Organic', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"mobile\"><?php _e('Mobile', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"local\"><?php _e('Local', 'affiliatetheme-backend'); ?></a></li>\n </ul>\n\n <div class=\"rankalyst-tab active\" data-type=\"organic\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 1);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"mobile\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 2);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"local\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 3);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n </div>\n <?php\n }",
"function getDisplay() {\n\t\t$content = \"<h3>\" . $this->widgetTitle . \"</h3>\";\n\n\t\tif (!empty($this->facebookUrl) && \n\t\t\ttrim($this->facebookUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-facebook\"><a href=\"' . $this->facebookUrl . '\" ><i class=\"fa fa-facebook\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->twitterUrl) && \n\t\t\t\ttrim($this->twitterUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-twitter\"><a href=\"' . $this->twitterUrl . '\" ><i class=\"fa fa-twitter\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->googleplusUrl) && \n\t\t\ttrim($this->googleplusUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-google\"><a href=\"' . $this->googleplusUrl . '\" ><i class=\"fa fa-google\"></i></a></span>';\n\t\t}\n\n\t\treturn $content;\n\t}",
"public function renderWidgets()\r\n {\r\n foreach ($this->_widgets as $widget)\r\n {\r\n echo current($widget);\r\n }\r\n\r\n }",
"public function dashboard_widget_content() {\n\t\t$is_authed = ( MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed() );\n\n\t\tif ( ! $is_authed ) {\n\t\t\t$this->widget_content_no_auth();\n\t\t} else {\n\t\t\tmonsterinsights_settings_error_page( 'monsterinsights-dashboard-widget', '', '0' );\n\t\t\tmonsterinsights_settings_inline_js();\n\t\t}\n\n\t}",
"public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}",
"public function output(WidgetInterface $widget);",
"public function render_content() {\n\t\t?>\n\t\t\t<input\n\t\t\t\tid=\"_customize-input-gutenberg_widget_blocks\"\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tvalue=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t<?php $this->link(); ?>\n\t\t\t/>\n\t\t<?php\n\t\tthe_gutenberg_widgets( 'gutenberg_customizer' );\n\t}",
"public function renderWidget()\n {\n $id = $this->attr['id'];\n $name = $this->attr['name'];\n $contents = '';\n $values = $this->getValue();\n foreach ( $this->params['choices'] as $key => $label )\n {\n $options = $this->params;\n $options['attr'] = $this->attr;\n $options['attr']['id'] = $id . \"_$key\";\n $options['attr']['name'] = $name . \"[$key]\";\n $options['attr']['value'] = $key;\n if ( isset( $values[$key] ) && $values[$key] )\n {\n $options['attr']['checked'] = 'checked';\n }\n $widget = new InputCheckboxWidget( $options );\n $contents .= HtmlToolkit::buildTag( 'label', array(), false, $widget->render() . ' ' . $label );\n }\n\n return $contents;\n }",
"private function _render()\n {\n $content = '';\n\n if (is_array($this->widgets)) {\n // clean path vars\n self::_clean_paths();\n\n foreach ($this->widgets as $parts) {\n\n $content = '';\n\n $type = (array_key_exists('type', $parts)) ? $parts['type'] : '';\n $src = (array_key_exists('src', $parts)) ? $parts['src'] : '';\n $title = (array_key_exists('title', $parts)) ? $parts['title'] : '';\n $alt = (array_key_exists('alt', $parts)) ? $parts['alt'] : 1;\n $cols = (array_key_exists('cols', $parts)) ? $parts['cols'] : 1;\n\n // process action commands (these don't follow the convention of standard widgets)\n switch ($type) {\n case 'clear':\n // push content directly into dashboard array\n $content = \"<div style='clear:both'></div>\";\n $this->_dashboard[] = $content;\n continue 2;\n break;\n }\n\n // check if individual keys supplied instead of an array of values\n if (array_key_exists('src', $parts)) {\n\n // individual keys supplied so construct appropriate array\n $parts = array(array('type'=>$type, 'src'=>$src, 'alt'=>$alt));\n }\n\n // process each part\n foreach ($parts as $part) {\n\n if (! is_array($part)) continue;\n\n // add any part-specific sub-headings as <H3>\n $content .= (array_key_exists('title', $part)) ? \"<\".$this->widget_subheading.\">\".$part['title'].\"</\".$this->widget_subheading.\">\" : '';\n\n switch ($part['type']) {\n //======================================\n case 'oop':\n //======================================\n\n // run an external controller to produce widget contents\n if ($this->oop_alt) {\n // alternative location will be:\n // [oop_path]/[dashboard_folder]/[dashboard_name]/[controller_name].[ext]\n // eg. [application/controllers]/[dashboard]/[safety]/[test_dash].[php]\n $file_name = $this->_makepath($this->oop_path, $this->dash_fldr, $this->dash).$part['src'].EXT;\n\n } else {\n\n // normal location will be\n // [oop_path]/[dashboard_name]/[dashboard_folder]/[controller_name].[ext]\n // eg. [application/controllers]/[safety]/[dashboard]/[test_dash].[php]\n $file_name = $this->_makepath($this->oop_path, $this->dash, $this->dash_fldr).$part['src'].EXT;\n }\n\n if (file_exists($file_name)) {\n\n include_once $file_name;\n\n // create an instance of the controller so we can run it\n $cname = ucfirst($part['src']);\n $c = new $cname;\n\n // always run the index() method to build content\n $content .= $c->index();\n\n } else {\n\n $content .= 'WARNING: Unable to find controller: '.$file_name;\n }\n\n break;\n\n //======================================\n case 'html':\n //======================================\n\n // html or text content being directly supplied from controller\n $content .= $part['src'];\n\n break;\n\n //======================================\n case 'curl':\n //======================================\n\n // html or text content being directly supplied from controller\n $content .= $this->_curl_response($part['src']);\n\n break;\n\n //======================================\n case 'img':\n //======================================\n\n // create an <img> tag widget referencing an external image file\n // $img_file = (array_key_exists('src', $part)) ? $this->_makepath($this->asset_path, $this->img_path.PS.$this->dash.PS.$this->dash_fldr.PS.$part['src'] : '';\n $img_file = (array_key_exists('src', $part)) ? $this->_makepath($this->asset_path, $this->img_path, $this->dash, $this->dash_fldr).$part['src'] : '';\n $img_alt = (array_key_exists('alt', $part)) ? $part['alt'] : '';\n\n if (file_exists(FCPATH.$img_file)) {\n\n $content .= \"<img src='\".$img_file.\"' width='100%' alt='{$img_alt}' title='{$img_alt}' class='modalview' type='image' />\";\n\n } else {\n\n $content = 'WARNING: Unable to find img: '.FCPATH.$img_file;\n }\n\n break;\n\n //======================================\n case 'file':\n //======================================\n\n // pull widget contents directly from an external file\n $file_name = (array_key_exists('src', $part)) ? $this->_makepath(FCPATH.$this->asset_path, $this->file_path, $this->dash, $this->dash_fldr).$part['src'] : '';\n\n if (file_exists($file_name)) {\n $content .= file_get_contents($file_name);\n\n } else {\n\n $content .= 'WARNING: Unable to find file: '.$file_name;\n }\n\n break;\n }\n }\n\n // add this widget to dashboard\n $this->_dashboard[] = $this->_widget($title, $content, $cols);\n }\n }\n\n return $content;\n }",
"public function fetchWidget() {\n $html = '';\n $in_dashboard = $readonly = true;\n $store_in_session = false;\n $html .= $this->fetchCharts($this->report->getMatchingIds(), $in_dashboard, $readonly, $store_in_session);\n $html .= $this->fetchWidgetGoToReport();\n return $html;\n }",
"public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver más...</a></div>\n\t\t</div>\n\t\t\");\n\t}",
"public function indexAction()\n {\n $this->view->widget = $this->_getWidget();\n }",
"function display() {\r\n\t\tparent::display ();\r\n\t}",
"abstract public function getWidget() : string;",
"public function view() {\n \n // Get the user's plan\n $user_plan = get_user_option( 'plan', $this->CI->user_id );\n \n // Get plan end\n $plan_end = get_user_option( 'plan_end', $this->CI->user_id );\n \n // Get plan data\n $plan_data = $this->CI->plans->get_plan( $user_plan );\n \n // Set widgets\n $widgets = array();\n \n // Get default widgets\n $default_widgets = array();\n \n if ( get_option('app_dashboard_left_side_position') && get_option('app_dashboard_enable_default_widgets') ) {\n\n $full_size = 'col-xl-5';\n\n $plan_data[0]['size'] = 6;\n\n } else {\n\n $full_size = 'col-xl-12';\n\n $plan_data[0]['size'] = 3;\n\n } \n\n if ( get_option('app_dashboard_enable_default_widgets') ) {\n \n foreach ( glob(MIDRUB_DASHBOARD_APP_PATH . '/widgets/*.php') as $filename ) {\n\n $className = str_replace( array( MIDRUB_DASHBOARD_APP_PATH . '/widgets/', '.php' ), '', $filename );\n\n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n 'Dashboard',\n 'Widgets',\n ucfirst($className)\n ); \n\n // Implode the array above\n $cl = implode('\\\\',$array);\n\n // Instantiate the class\n $response = (new $cl())->display_widget( $this->CI->user_id, $plan_end, $plan_data );\n\n // Add widget to $default_widgets array\n $default_widgets[$response['order']] = $response['widget'];\n\n }\n\n arsort($default_widgets);\n \n if ( $default_widgets ) {\n \n $widgets[0] = '<div class=\"' . $full_size . ' col-lg-12 col-md-12 stats\">'\n . '<div class=\"row\">';\n\n $i = 0;\n \n foreach ( $default_widgets as $widget ) {\n \n if ( get_option('app_dashboard_left_side_position') && $i % 1 ) {\n \n $widgets[0] .= '</div><div class=\"row\">';\n \n }\n \n $widgets[0] .= $widget;\n \n $i++;\n \n }\n \n $widgets[0] .= '</div>'\n . '</div>';\n \n }\n \n }\n \n $apps_widgets = array();\n \n foreach ( glob( MIDRUB_APPS_PATH . '/collection/*') as $directory ) {\n\n $dir = str_replace( MIDRUB_APPS_PATH . '/collection/', '', $directory );\n \n if ( !get_option('app_' . $dir . '_enable') || !plan_feature('app_' . $dir) ) {\n continue;\n }\n\n if ( $dir === 'dashboard' ) {\n \n continue;\n \n } else {\n \n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n ucfirst($dir),\n 'Main'\n ); \n\n // Implode the array above\n $cl = implode('\\\\',$array);\n\n // Instantiate the class\n $response = (new $cl())->widgets( $this->CI->user_id, $plan_end, $plan_data );\n \n foreach ( $response as $key => $value ) {\n \n // Add widget to $apps_widgets array\n $apps_widgets[$key] = $value;\n \n }\n \n }\n\n }\n\n if ( $apps_widgets ) {\n \n arsort($apps_widgets);\n \n $e = 0;\n \n foreach ( $apps_widgets as $key_w => $value_w ) {\n\n if ( $full_size === 'col-xl-5' && $e === 0 ) {\n\n if ( !isset($widgets[0]) ) {\n $widgets[0] = '';\n }\n \n $widgets[0] .= str_replace( '[xl]', '7', $value_w['widget'] );\n \n } else {\n \n $widgets[$key_w] = str_replace( '[xl]', '12', $value_w['widget'] );\n \n }\n \n if ( $value_w['styles_url'] && !in_array( $value_w['styles_url'], $this->css_urls_widgets ) ) {\n $this->css_urls_widgets[] = $value_w['styles_url'];\n }\n \n if ( $value_w['js_url'] && !in_array( $value_w['js_url'], $this->js_urls_widgets ) ) {\n $this->js_urls_widgets[] = $value_w['js_url'];\n } \n \n $e++;\n \n }\n \n }\n \n $this->CI->user_header = user_header();\n \n $this->CI->user_header['app'] = 'dashboard';\n \n $expired = 0;\n \n $expires_soon = 0;\n \n if ( $plan_end ) {\n \n if ( strtotime($plan_end) < time() ) {\n \n $this->CI->plans->delete_user_plan($this->CI->user_id);\n redirect('user/app/dashboard');\n \n } elseif ( strtotime($plan_end) < time() + 432000 ) {\n \n $expires_soon = 1;\n \n }\n \n }\n \n // Making temlate and send data to view.\n $this->CI->template['header'] = $this->CI->load->view('user/layout/header', array('app_styles' => $this->assets_css(), 'title' => $this->CI->lang->line('dashboard')), true);\n $this->CI->template['left'] = $this->CI->load->view('user/layout/left', $this->CI->user_header, true);\n $this->CI->template['body'] = $this->CI->load->ext_view( MIDRUB_DASHBOARD_APP_PATH . '/views', 'main', array('widgets' => $widgets, 'expired' => $expired, 'expires_soon' => $expires_soon), true);\n $this->CI->template['footer'] = $this->CI->load->view('user/layout/footer', array('app_scripts' => $this->assets_js()), true);\n $this->CI->load->ext_view( MIDRUB_DASHBOARD_APP_PATH . '/views/layout', 'index', $this->CI->template);\n \n }",
"function dashboard_widget_display() {\n\t\techo '<div class=\"escalate-dashboard-loading\">Loading Stats</div>';\n\t}",
"public function display() {\n echo $this->render();\n }",
"public static function widget() {\n //require_once( 'widget.php' );\n require_once get_stylesheet_directory() . '/inc/templates/statistics_widget.php';\n }",
"public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}",
"public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"function dashboard_widget() {\n\t\tif(!empty($this->options['stats_last_cache'])):\n\t\t\t$last_cache = '<em>Last Updated ' . date(\"m/d/y @ h:i:s\", $this->options['stats_last_cache']) . '</em>';\n\t\telse:\n\t\t\t$last_cache = '';\n\t\tendif;\n\t\twp_add_dashboard_widget('escalate_network_stats', 'Escalate Network Stats'.$last_cache, array($this,'dashboard_widget_display'));\t\n\t}",
"public function run()\n {\n $categories = \\App\\Models\\Category::with('categories')->where('id_parent', 0)->where('status', 1)->orderBy('sort')->get();\n\n return view(\"widgets.catalog_widget\", [\n 'config' => $this->config, 'categories' => $categories\n ]);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"function widget($args, $instance) {\n $feedData = $this->_collect_data($instance);\n $this->_print_widget($args, $instance, $feedData);\n }",
"function widget( $args, $instance ) {\n\n\t\t\textract( $args );\n\n\t\t\tstatic $counters = array();\n\n\t\t\t$label = $instance['type'].'-'.$instance['rsr-id'];\n\n\n\n\t\t\t/* reset offset counter if rsr-id or type has changed */\n\t\t\tif (!isset($counters[$label])) {\n \t\t\t$counters[$label] = 0;\n \t\t}\n\n\n\n \t\tif(!isset($instance['type-text'])){\n \t\t\t$instance['type-text'] = '';\n \t\t}\n\n \t\t$instance['offset'] = $counters[$label];\n\n \t\t/* get the ajax url for the card widget */\n \t\t$akvo_card_obj = new Akvo_Card;\n \t\t$url = $akvo_card_obj->get_ajax_url('akvo_card', $instance, array('panels_info'));\n\n\n \t\techo \"<div data-behaviour='reload-html' data-url='\".$url.\"'></div>\";\n\n \t\t$counters[$label]++;\n\t\t}",
"public function widget( $args, $instance ){}",
"protected function retrieve_widgets()\n {\n }",
"protected function retrieve_widgets()\n {\n }",
"function ssl_widget() {\r\n $widget_ops = array('classname' => 'ssl_widget', 'description' => __('widget that display a slideshow from all attachments','ssl-plugin') ); \r\n $this->WP_Widget('ssl_widget', __('Siteshow Widget','ssl-plugin'), $widget_ops);\r\n }",
"function docuemtation_dashboard_widget_function() {\n\t// Display whatever it is you want to show\n\techo 'Make sure you watch the videos in 720p resolution.<br/>\n<a href=\"http://youtu.be/vA3fXuhbmjg\" target=\"_blank\">Welcome and Workflow</a> (1:32)<br/>\n<a href=\"http://youtu.be/1EYJ2xuJOB4\" target=\"_blank\">Resize Images</a> (3:55)<br/>\n<a href=\"http://youtu.be/KVGK5FKm-Ng\" target=\"_blank\">Upload Images to Dropbox</a> (1:10)<br/>\n<a href=\"http://youtu.be/g_XfK9iLv7s\" target=\"_blank\">The Dashboard</a> (3:53)<br/>\n<a href=\"http://youtu.be/ZntfnFEocn8\" target=\"_blank\">Writing and Saving a Draft</a> (6:10)<br/>\n<a href=\"http://youtu.be/vSx0xOQms78\" target=\"_blank\">Changing Post Status</a> (0:34)<br/>\n<a href=\"http://youtu.be/GZvMRQlP-9c\" target=\"_blank\">Upload to and Crop Images on Website</a> (5:46)<br/>\n<a href=\"http://youtu.be/zrBjk92WQB4\" target=\"_blank\">Publish Cat Profile</a> (1:12)<br/>\nCreate a PDF of profile (later, I have to make a few modifications first)';\n}",
"public function render_content()\n\t\t{ ?>\n\t\t\t<label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->description ); ?></span>\n <p class=\"description\">\n <span class=\"typography-size-label\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\"><input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}",
"function widget( $args, $instance ) {\n\n\t\t$cache = wp_cache_get( $this->plugin_name, 'widget' );\n\n\t\tif ( ! is_array( $cache ) ) {\n\n\t\t\t$cache = array();\n\n\t\t}\n\n\t\tif ( ! isset ( $args['widget_id'] ) ) {\n\n\t\t\t$args['widget_id'] = $this->plugin_name;\n\n\t\t}\n\n\t\tif ( isset ( $cache[ $args['widget_id'] ] ) ) {\n\n\t\t\treturn print $cache[ $args['widget_id'] ];\n\n\t\t}\n\n\t\textract( $args, EXTR_SKIP );\n\n\t\t$widget_string = $before_widget;\n\n\t\t// Manipulate widget's values based on their input fields here\n\n\t\tob_start();\n\n\t\tinclude( plugin_dir_path( __FILE__ ) . 'partials/job-search-display-widget.php' );\n\n\t\t$widget_string .= ob_get_clean();\n\t\t$widget_string .= $after_widget;\n\n\t\t$cache[ $args['widget_id'] ] = $widget_string;\n\n\t\twp_cache_set( $this->plugin_name, $cache, 'widget' );\n\n\t\tprint $widget_string;\n\n\t}",
"public function render_content() {\n?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}",
"function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}",
"public function index()\n {\n $widgetsFrontend = Widgets::frontend()->all();\n $widgetsBackend = Widgets::backend()->all();\n\n return view_backend('widget.index', compact('widgetsFrontend', 'widgetsBackend'));\n }",
"public function renderWidget()\n {\n if ($this->data !== null) {\n $this->htmlAttributes['value'] = $this->data;\n }\n\n // And to be sure to generate a proper html text input with the proper name...\n $this->htmlAttributes['type'] = $this->type;\n $this->htmlAttributes['name'] = $this->name;\n $this->htmlAttributes['id'] = $this->getId();\n\n $output = '<input ';\n\n $output .= $this->renderHtmlAttributes();\n\n $output .= '/>';\n\n return $output;\n }",
"public function show() {\n echo $this->mountElement();\n }",
"public function get_display() {\n return $this->view->display_handler;\n }",
"public function displayEventWidget($attrs) {\n $widget = new EventsWidget();\n \n ob_start();\n $widget->widget([], $attrs);\n return ob_get_clean();\n }",
"public function tally_rendered_widgets($widget)\n {\n }",
"public function getWidget()\n\t{\n\t\treturn $this->widget;\n\t}",
"function wp_render_widget_control($id)\n {\n }",
"public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}",
"function widget( $args, $instance ) {\n\n \textract($args);\n \t$title = apply_filters('widget_title', $instance['title'] );\n \t$num_articles = $instance['num_articles'];\n \t$display_image = $instance['display_image'];\n\n \t$options = get_option('pgnyt_articles');\n \t$pgnyt_results = $options['pgnyt_results'];\n\n \trequire ('inc/front-end.php');\n }",
"function rad_widget_content(){\n\t//show an RSS feed\n\twp_widget_rss_output( 'http://wordpress.melissacabral.com/feed/', array(\n\t\t'items' \t\t=> 7,\n\t\t'show_summary' \t=> true,\n\t\t'show_date'\t\t=> true,\n\t\t'show_author'\t=> true,\n\t) );\n}",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"function box_widget(){\n\t$CI=& get_instance();\n\treturn $CI->parser->parse('layout/ddi/box_widget.html', $CI->data,true);\n}",
"public function render_content() { ?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">%</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}",
"function display() {\r parent::display();\r }",
"protected function get_widgets()\n {\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"function display()\r\n\t {\r\n\t parent::display();\r\n\t }",
"function widget( $args, $instance ) {\r\n extract( $args );\r\n /* Our variables from the widget settings. */\r\n $title = apply_filters('widget_name', $instance['title'] );\r\n $type = $instance['type'];\r\n $style = $instance['style'];\r\n $limit = $instance['limit'];\r\n echo $before_widget;\r\n echo $this->showWidget($title, $type, $style, $limit);\r\n echo $after_widget;\r\n }",
"public abstract function display();",
"public function render_content()\n\t\t{ ?>\n\t\t\t<label><p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?>\n </span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() );?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span></p></label> <?php // WPCS: XSS ok. ?>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}",
"public function _settings_field_webwidget_display() {\n global $zendesk_support;\n ?>\n <select name=\"zendesk-settings[webwidget_display]\" id=\"zendesk_webwidget_display\">\n <option\n value=\"none\" <?php selected( $zendesk_support->settings['webwidget_display'] == 'none' ); ?> ><?php _e( 'Do not display the Zendesk Widget anywhere', 'zendesk' ); ?></option>\n <option\n value=\"auto\" <?php selected( $zendesk_support->settings['webwidget_display'] == 'auto' ); ?> ><?php _e( 'Display the Zendesk Widget on all posts and pages', 'zendesk' ); ?></option>\n <option\n value=\"manual\" <?php selected( $zendesk_support->settings['webwidget_display'] == 'manual' ); ?> ><?php _e( 'I will decide where the Zendesk Widget displays using a template tag', 'zendesk' ); ?></option>\n </select>\n\n <?php\n }",
"abstract public function widget_markup( $args, $instance );",
"public function actionIndex()\n {\n return $this->render('@gilek/gtreetable/views/widget', ['options'=>[\n 'manyroots' => true,\n 'draggable' => true\n ]]);\n }",
"public function render()\n {\n return view('components.covid-widget');\n }",
"public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}",
"public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}",
"public function output_widget_control_templates()\n {\n }",
"public function html()\n {\n $random_quote = $this->randomQuote();\n $cp_path = CP_ROUTE;\n return $this->view('widget', compact('random_quote','cp_path'))->render();\n }",
"public function widget($args, $instance){\n $this->coreWidget->renderWidget($args, $instance);\n }",
"function wf_template_widget($retData=false) {\n\t\tglobal $post;\n\t\t\n\t\t$error = 'Error while adding the widget, please report to <a href=\"http://blog.wanderfly.com/wordpress-plugin/\">http://blog.wanderfly.com/wordpress-plugin/</a>.';\n\t\t$widgetHTML = false;\n\t\t\n\t\tif($post) {\n\t\t\t//Get the Destination ID from the post's metas,\n\t\t\t$wf_meta = get_post_meta($post->ID, \"wf_destination\", true);\n\t\t\t\n\t\t\t//Display the wanderfly widget,\n\t\t\tif($wf_meta) {\n\t\t\t\t$wf_metas = explode(':', $wf_meta);\n\t\t\t\t$widgetHTML = wf_widget($wf_metas[0]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Echo the widget,\n\t\tif($widgetHTML !== false) {\n\t\t\tif($retData) { return $widgetHTML; }\n\t\t\telse { echo $widgetHTML; }\n\t\t}\n\t\t//Return the widget's HTML,\n\t\telse {\n\t\t\tif($retData) { return $widgetHTML; }\n\t\t\telse { echo $error; }\n\t\t}\n\t\t\n\t}",
"public function dashboard_widget_control() {\n\t\tif ( !$widget_options = get_option( 'vfb_dashboard_widget_options' ) )\n\t\t\t$widget_options = array();\n\n\t\tif ( !isset( $widget_options['vfb_dashboard_recent_entries'] ) )\n\t\t\t$widget_options['vfb_dashboard_recent_entries'] = array();\n\n\t\tif ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['vfb-widget-recent-entries'] ) ) {\n\t\t\t$number = absint( $_POST['vfb-widget-recent-entries']['items'] );\n\t\t\t$widget_options['vfb_dashboard_recent_entries']['items'] = $number;\n\t\t\tupdate_option( 'vfb_dashboard_widget_options', $widget_options );\n\t\t}\n\n\t\t$number = isset( $widget_options['vfb_dashboard_recent_entries']['items'] ) ? (int) $widget_options['vfb_dashboard_recent_entries']['items'] : '';\n\n\t\techo sprintf(\n\t\t\t'<p>\n\t\t\t<label for=\"comments-number\">%1$s</label>\n\t\t\t<input id=\"comments-number\" name=\"vfb-widget-recent-entries[items]\" type=\"text\" value=\"%2$d\" size=\"3\" />\n\t\t\t</p>',\n\t\t\t__( 'Number of entries to show:', 'visual-form-builder-pro' ),\n\t\t\t$number\n\t\t);\n\t}",
"function widget($args, $instance) {\n extract( $args, EXTR_SKIP );\n //echo $before_widget;\n include(plugin_dir_path(__FILE__) . '/views/'. $instance['display'] .'.php' );\n// echo $after_widget;\n}",
"public function widget($hArgs, $hInstance)\n {\n echo $this->generateWidget($hArgs, $hInstance);\n\t}",
"public function toHtml()\n {\n\n return access()->content ? view('admin.widgets.quick')->render() : null;\n\n }",
"function widget( $args, $instance ) {\n extract( $args );\n\n /* Before widget (defined by themes). */\n echo $before_widget;\n\n echo $before_title . 'thunderstorm-stream' . $after_title;\n thunderstorm_stream_box();\n\n /* After widget (defined by themes). */\n echo $after_widget;\n }",
"public function display() {}",
"public function display() {}",
"public function dashboard_widget() {\n\t\tglobal $wpdb;\n\n\t\t// Get the date/time format that is saved in the options table\n\t\t$date_format = get_option( 'date_format' );\n\t\t$time_format = get_option( 'time_format' );\n\n\t\t$widgets = get_option( 'vfb_dashboard_widget_options' );\n\t\t$total_items = isset( $widgets['vfb_dashboard_recent_entries'] ) && isset( $widgets['vfb_dashboard_recent_entries']['items'] ) ? absint( $widgets['vfb_dashboard_recent_entries']['items'] ) : 5;\n\n\t\t$forms = $wpdb->get_var( \"SELECT COUNT(*) FROM {$this->form_table_name}\" );\n\n\t\tif ( !$forms ) :\n\t\t\techo sprintf(\n\t\t\t\t'<p>%1$s <a href=\"%2$s\">%3$s</a></p>',\n\t\t\t\t__( 'You currently do not have any forms.', 'visual-form-builder-pro' ),\n\t\t\t\tesc_url( admin_url( 'admin.php?page=vfb-add-new' ) ),\n\t\t\t\t__( 'Get started!', 'visual-form-builder-pro' )\n\t\t\t);\n\n\t\t\treturn;\n\t\tendif;\n\n\t\t$entries = $wpdb->get_results( $wpdb->prepare( \"SELECT forms.form_title, entries.entries_id, entries.form_id, entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY entries.date_submitted DESC LIMIT %d\", $total_items ) );\n\n\t\tif ( current_user_can( 'vfb_edit_entries' ) )\n\t\t\t$action = 'edit';\n\t\telseif ( current_user_can( 'vfb_view_entries' ) )\n\t\t\t$action = 'view';\n\n\t\tif ( !$entries ) :\n\t\t\techo sprintf( '<p>%1$s</p>', __( 'You currently do not have any entries.', 'visual-form-builder-pro' ) );\n\t\telse :\n\n\t\t\t$content = '';\n\n\t\t\tforeach ( $entries as $entry ) :\n\n\t\t\t\t$content .= sprintf(\n\t\t\t\t\t'<li><a href=\"%1$s\">%4$s</a> via <a href=\"%2$s\">%5$s</a> <span class=\"rss-date\">%6$s</span><cite>%3$s</cite></li>',\n\t\t\t\t\tesc_url( add_query_arg( array( 'action' => $action, 'entry' => absint( $entry->entries_id ) ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_url( add_query_arg( 'form-filter', absint( $entry->form_id ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_html( $entry->sender_name ),\n\t\t\t\t\tesc_html( $entry->sender_email ),\n\t\t\t\t\tesc_html( $entry->form_title ),\n\t\t\t\t\tdate( \"$date_format $time_format\", strtotime( $entry->date_submitted ) )\n\t\t\t\t);\n\n\t\t\tendforeach;\n\n\t\t\techo \"<div class='rss-widget'><ul>$content</ul></div>\";\n\n\t\tendif;\n\t}",
"function scoreboard_widget() {\r\n\r\n\techo\"<div class='widget'><h2>Scoreboard</h2><img src='http://www.bollywoodjalwa.com/cricket-widget.php'></div>\";\r\n\r\n}",
"function render_frontend(){\r\n if ($this -> type == 'textelement' || $this -> type == 'menu' || $this -> type == 'socialicons' || $this -> type == 'copyright' ) {\r\n if ($this -> text_align == 'left') {\r\n $text_align_class = 'align-left';\r\n }elseif ($this -> text_align == 'center'){\r\n $text_align_class = 'align-center';\r\n }elseif ($this -> text_align == 'right'){\r\n $text_align_class = 'align-right';\r\n }\r\n }else { $text_align_class = ''; } \r\n $type = $this -> type;\r\n echo '<div class=\"' . $this -> type . ' ' . $text_align_class . ' ' . LBRenderable::$words[ $this -> element_columns ] . ' columns\">';\r\n call_user_func( array ( $this, \"render_frontend_$type\" ) );\r\n echo '</div>';\r\n }",
"private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}",
"function showWidget($login) {\n\t\t\n\t\t$window = HeadsUpWidget::Create($login);\n\t\t$window->setSize($this->config->width, 50);\n\t\t$window->setText($this->config->text);\n\t\t$window->setUrl($this->config->url);\n\t\t$pos = explode(\",\", $this->config->pos);\n\t\t$window->setPosition($pos[0], $pos[1]);\n\t\t$window->show();\n\t}",
"public function dashboard_widget_control() {\n if (!$widget_options = get_option('swpm_dashboard_widget_options'))\n $widget_options = array();\n\n if (!isset($widget_options['swpm_dashboard_recent_entries']))\n $widget_options['swpm_dashboard_recent_entries'] = array();\n\n if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['swpm-widget-recent-entries'])) {\n $number = absint($_POST['swpm-widget-recent-entries']['items']);\n $widget_options['swpm_dashboard_recent_entries']['items'] = $number;\n update_option('swpm_dashboard_widget_options', $widget_options);\n }\n\n $number = isset($widget_options['swpm_dashboard_recent_entries']['items']) ? (int) $widget_options['swpm_dashboard_recent_entries']['items'] : '';\n\n echo sprintf(\n '<p>\n\t\t\t<label for=\"comments-number\">%1$s</label>\n\t\t\t<input id=\"comments-number\" name=\"swpm-widget-recent-entries[items]\" type=\"text\" value=\"%2$d\" size=\"3\" />\n\t\t\t</p>', __('Number of entries to show:', 'swpm-form-builder'), $number\n );\n }",
"function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}",
"public function getWidget(): \\WP_Widget{\n return $this->widget;\n }",
"public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"function widget( $args, $instance ) {\n // kick things off\n extract( $args );\n echo $before_widget; \n echo $before_title . $after_title; \n\n ?>\n <?php //Example html markup to show on the website ?>\n <ul class=\"infopage-list\">\n <li>\n <div>\n <img src=\"<?php echo get_stylesheet_directory_uri(); ?>/dist/img/ico_phone.svg\" alt=\"\">\n </div>\n <div>\n Llámanos<br><a href=\"tel:<?php echo $instance[\"phone\"]; ?>\"><?php echo $instance[\"phone\"]; ?></a>\n </div>\n </li>\n <li>\n <div>\n <img src=\"<?php echo get_stylesheet_directory_uri(); ?>/dist/img/ico_mail.svg\" alt=\"\">\n </div>\n <div>\n Escríbenos<br><a href=\"mailto:<?php echo $instance[\"email\"]; ?>\"><?php echo $instance[\"email\"]; ?></a>\n </div>\n </li>\n <li>\n <div>\n <img src=\"<?php echo get_stylesheet_directory_uri(); ?>/dist/img/ico_direccion.svg\" alt=\"\">\n </div>\n <div>\n Encuéntranos<br><a target=\"_blank\" href=\"<?php echo $instance[\"gmaps_link\"]; ?>\"><?php echo $instance[\"address\"]; ?></a>\n </div>\n </li>\n </ul>\n\t <?php\n\n }",
"public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"slider-custom-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span><input type=\"number\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-slider-value\" <?php $this->link(); ?> />\n\t\t\t\t<div class=\"slider\" slider-min-value=\"<?php echo esc_attr( $this->input_attrs['min'] ); ?>\" slider-max-value=\"<?php echo esc_attr( $this->input_attrs['max'] ); ?>\" slider-step-value=\"<?php echo esc_attr( $this->input_attrs['step'] ); ?>\"></div><span class=\"slider-reset dashicons dashicons-image-rotate\" slider-reset-value=\"<?php echo esc_attr( $this->value() ); ?>\"></span>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function run()\n {\n $this->render('search-triple-widget');\n }",
"abstract protected function show();",
"public function widgetPopupHtml()\n {\n $widgetId = ipRequest()->getQuery('widgetId');\n $widgetRecord = \\Ip\\Internal\\Content\\Model::getWidgetRecord($widgetId);\n $widgetData = $widgetRecord['data'];\n\n // Populate form with proper fields\n switch ($widgetRecord['name']) {\n case 'ContentSection':\n //create form prepopulated with current widget data\n $form = $this->contentSectionManagementForm($widgetData);\n break;\n case 'ThreeItemListSection':\n $form = $this->threeItemManagementForm($widgetData);\n break;\n\n case 'Slider':\n $form = $this->sliderManagementForm($widgetData);\n break;\n case 'TopThreeSection':\n $form = $this->topThreeSectionManagementForm($widgetData);\n break;\n case 'ThumbnailCard':\n $form = $this->cardManagementForm($widgetData);\n break;\n default:\n $err = new \\Ip\\Response\\Json([\n 'error' => 'Unknown widget',\n 'widget' => $widgetRecord\n ]);\n $err->setStatusCode(400);\n return $err;\n }\n\n //Render form and popup HTML\n $viewData = array(\n 'form' => $form\n );\n $popupHtml = ipView('view/editPopup.php', $viewData)->render();\n $data = array(\n 'popup' => $popupHtml\n );\n //Return rendered widget management popup HTML in JSON format\n return new \\Ip\\Response\\Json($data);\n }",
"public function index()\n\t{\n $widget = Widget::first();\n\n\t\treturn view('admin.widget', compact('widget'));\n\t}",
"public function getDisplay() {\n\t\treturn parent::getDisplay();\n\t}",
"public function addWidget()\r\n {\r\n }",
"public function display()\n {\n }",
"public function display()\n {\n }"
] | [
"0.7524313",
"0.7412757",
"0.7273009",
"0.72217935",
"0.7036741",
"0.70207494",
"0.7011758",
"0.6995235",
"0.6836181",
"0.68110406",
"0.6790932",
"0.67542267",
"0.673366",
"0.67055386",
"0.6681578",
"0.6669653",
"0.6665645",
"0.66538507",
"0.6650898",
"0.6644663",
"0.6637213",
"0.6613517",
"0.65861785",
"0.65855885",
"0.65821815",
"0.6580744",
"0.6580744",
"0.65734977",
"0.65734977",
"0.65734977",
"0.65684015",
"0.6559793",
"0.6540855",
"0.6522917",
"0.6519818",
"0.65183693",
"0.651243",
"0.651243",
"0.65003526",
"0.64884824",
"0.6484309",
"0.6463569",
"0.6442311",
"0.64392096",
"0.6436045",
"0.64279705",
"0.64260465",
"0.6421028",
"0.64203113",
"0.6416126",
"0.6394143",
"0.63855726",
"0.6385049",
"0.63836145",
"0.63803244",
"0.637621",
"0.63696384",
"0.63669014",
"0.63662803",
"0.6363925",
"0.6345844",
"0.6343762",
"0.63394487",
"0.6334668",
"0.6328513",
"0.63103276",
"0.6308202",
"0.63065517",
"0.6297542",
"0.6295268",
"0.62949073",
"0.62907535",
"0.62868947",
"0.6286545",
"0.6283899",
"0.62781173",
"0.6278111",
"0.6273946",
"0.6268168",
"0.62666464",
"0.6260079",
"0.6260079",
"0.6258558",
"0.6255266",
"0.62549555",
"0.6250726",
"0.62355465",
"0.6221209",
"0.6221031",
"0.62198496",
"0.62004095",
"0.6199014",
"0.6197389",
"0.6196427",
"0.6192477",
"0.6186907",
"0.61825126",
"0.61744016",
"0.61731255",
"0.61713356",
"0.61713356"
] | 0.0 | -1 |
Sanitize widget form values as they are saved. | public function update( $new_instance, $old_instance ) {
$instance = array(
'title' => (!empty($new_instance['title'])) ? strip_tags($new_instance['title']) : '',
'rss_feed' => (!empty($new_instance['rss_feed'])) ? strip_tags($new_instance['rss_feed']) : '',
'rss_items' => (!empty($new_instance['rss_items'])) ? strip_tags($new_instance['rss_items']) : '',
'rss_date' => (!empty($new_instance['rss_date'])) ? strip_tags($new_instance['rss_date']) : '',
'rss_summary' => (!empty($new_instance['rss_summary'])) ? strip_tags($new_instance['rss_summary']) : ''
);
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sanitize()\n {\n parent::sanitize();\n\n foreach ($this->_cleanData as $key => $value) {\n $this->_cleanData[$key] = strip_tags($value);\n }\n }",
"public function sanitize_input_fields()\n {\n }",
"protected function sanitize() {}",
"public function sanitize($value);",
"protected function clean_saved_value() {\n\t\tif ( $this->saved_value !== '' ) {\n\t\t\tif ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {\n\t\t\t\tFrmAppHelper::unserialize_or_decode( $this->saved_value );\n\t\t\t}\n\n\t\t\tif ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) {\n\t\t\t\t$this->saved_value = '';\n\t\t\t}\n\t\t}\n\t}",
"function sanitizeFields()\n\t{\n\t\tif(isset($this->sanitize) && isset($this->data[$this->name]))\n\t\t{\n\t\t\tforeach($this->data[$this->name] as $field => $value)\n\t\t\t{\n\t\t\t\tif(isset($this->sanitize[$field]))\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($this->sanitize[$field]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $this->sanitize[$field]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach($this->sanitize[$field] as $action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $action);\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}",
"public function sanitize($value)\n {\n }",
"public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}",
"function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"abstract public function sanitize();",
"public function sanitize() {\n }",
"public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return $purifier->purify($field);\n },\n $this->_data\n );\n }",
"public function sanitizeValueOnSave(): bool\n {\n return true;\n }",
"function sanitize($cleanFramewerkTags)\n {\n if ( $cleanFramewerkTags == true )\n {\n $this->value = preg_replace('/({(@|%|!i18n:)([^{}]*((?1)[^{}]*)*)})/', $this->value);\n }\n }",
"private function sanitize($form_data) {\n $sanitized_data = filter_var_array($form_data, FILTER_SANITIZE_STRING);\n \n // Return the sanitized datas\n return $sanitized_data;\n }",
"function sanitize($dirty){\n return htmlentities($dirty,ENT_QUOTES,\"UTF-8\");\n}",
"function sanitize_post_field($field, $value, $post_id, $context = 'display')\n {\n }",
"function sanitize($val){\n return htmlentities(stripslashes(trim($val)), ENT_QUOTES);\n}",
"public function cleanseFields() {\n $this->dictionary->remove('nospam');\n $this->dictionary->remove('blank');\n $submitVar = $this->controller->getProperty('submitVar');\n if (!empty($submitVar)) {\n $this->dictionary->remove($submitVar);\n }\n }",
"function clean_input( $value ) {\n if ( is_numeric( $value ) ) {\n return( $value );\n }\n // Strip slashes if necessary\n if ( get_magic_quotes_gpc( ) ) {\n $value = stripslashes( $value );\n }\n // Make sure no sql-dangerous code gets through\n $value = mysql_real_escape_string( $value );\n // Strip HTML tags, to be sure\n // May need another routine to allow input of HTML\n $value = strip_tags( $value );\n \n return( $value );\n }",
"public function sanitize( $input ){\n\n\t\t// IMPORTANT : set empty value to unset fields (fixe issue for default value on checkbox items - see custom_get_options())\n\t\tforeach ($this->fields as $field){\n\t\t\tif (!isset($input[$field]))\n\t\t\t\t$input[$field] = '';\n\t\t}\n\n\t\t$input = apply_filters(\"custom_config_options_sanitize_fields\", $input);\n\n\t\treturn $input;\n\t}",
"function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}",
"function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }",
"public static function sanitize_textfield( $value ) {\n\t\tif ( is_object( $value ) || is_array( $value ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$value = (string) $value;\n\t\t$filtered = wp_check_invalid_utf8( $value );\n\n\t\tif ( strpos( $filtered, '<' ) !== false ) {\n\t\t\t$filtered = wp_pre_kses_less_than( $filtered );\n\t\t\t// This will strip extra whitespace for us.\n\t\t\t$filtered = wp_strip_all_tags( $filtered, false );\n\n\t\t\t// Use html entities in a special case to make sure no later\n\t\t\t// newline stripping stage could lead to a functional tag!\n\t\t\t$filtered = str_replace( \"<\\n\", \"<\\n\", $filtered );\n\t\t}\n\t\t$filtered = preg_replace( '/[\\r\\n\\t ]+/', ' ', $filtered );\n\t\t$filtered = trim( $filtered );\n\n\t\t$found = false;\n\t\twhile ( preg_match( '/%[0-9]{2}/i', $filtered, $match ) ) {\n\t\t\t$filtered = str_replace( $match[0], '', $filtered );\n\t\t\t$found = true;\n\t\t}\n\n\t\tif ( $found ) {\n\t\t\t// Strip out the whitespace that may now exist after removing the octets.\n\t\t\t$filtered = trim( preg_replace( '/ +/', ' ', $filtered ) );\n\t\t}\n\n\t\treturn apply_filters( 'sanitize_text_field', $filtered, $value );\n\t}",
"function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}",
"public function sanitize_cmb_fields() {\n\t\t$cmb = $this->get_cmb_object();\n\n\t\t$cmb->data_to_save = $_REQUEST;\n\t\t$object_id = $cmb->object_id( $this->button_slug );\n\t\t$cmb->object_type( 'options-page' );\n\n\t\t$cmb->process_fields();\n\n\t\t// output buffer on the action so we don't pollute our JSON response\n\t\tob_start();\n\t\t// Preserve CMB action\n\t\tdo_action( 'cmb2_save_options-page_fields', $object_id, $cmb->cmb_id, $cmb->updated, $cmb );\n\t\tob_end_clean();\n\n\t\t$updated_fields = cmb2_options( $object_id )->get_options();\n\t\t$cmb_config = $this->get_cmb_config();\n\n\t\t$whitelist_keys = wp_list_pluck( $cmb_config['fields'], 'id' );\n\t\t$whitelist = array();\n\t\t// Keep only the form values that correspond to the CMB2 fields\n\t\tforeach ( $whitelist_keys as $key ) {\n\t\t\t$value = isset( $updated_fields[ $key ] ) && ! empty( $updated_fields[ $key ] ) ? $updated_fields[ $key ] : '';\n\n\t\t\t// Don't keep empty values\n\t\t\tif ( $value ) {\n\t\t\t\t// Make checkbox values boolean\n\t\t\t\t$whitelist[ $key ] = 'on' == $value ? true : $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->filter_form_fields( $whitelist, $updated_fields );\n\t}",
"function cmh_validate_options($input) {\r\n\t // strip html from textboxes\r\n\t$input['textarea_one'] = wp_filter_nohtml_kses($input['textarea_one']); // Sanitize textarea input (strip html tags, and escape characters)\r\n\t$input['txt_one'] = wp_filter_nohtml_kses($input['txt_one']); // Sanitize textbox input (strip html tags, and escape characters)\r\n\treturn $input;\r\n}",
"public static function sanitize($value)\n {\n if (is_array($value) OR is_object($value))\n {\n foreach ($value as $key => $val)\n {\n // Recursively clean each value\n $value[$key] = Kohana::sanitize($val);\n }\n }\n elseif (is_string($value))\n {\n if (Kohana::$magic_quotes === TRUE)\n {\n // Remove slashes added by magic quotes\n $value = stripslashes($value);\n }\n\n if (strpos($value, \"\\r\") !== FALSE)\n {\n // Standardize newlines\n $value = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $value);\n }\n\n //Added strip tags\n $value = strip_tags($value);\n }\n\n return $value;\n }",
"function sanitization() {\n genesis_add_option_filter( 'one_zero', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n genesis_add_option_filter( 'no_html', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n }",
"protected function sanitize_posted_field( $value ) {\r\n\t\t// Santize value\r\n\t\t$value = is_array( $value ) ? array_map( array( $this, 'sanitize_posted_field' ), $value ) : sanitize_text_field( stripslashes( trim( $value ) ) );\r\n\r\n\t\treturn $value;\r\n\t}",
"function postedValues($dirtyPost) {\n $cleanPost = [];\n foreach ($dirtyPost as $key => $value) {\n $cleanValue = sanitize($value);\n $cleanPost[$key] = $cleanValue;\n }\n return $cleanPost;\n}",
"public function sanitizeFormValues ($formValues) {\n \n if (is_array($formValues)) {\n foreach ($formValues as $key => $value) {\n // array of values or a value, make a recursive call to handle each array entry\n $formValues[$key] = $this->sanitizeFormValues($value);\n }\n \n // the formValues provided was a single value not an array\n } else {\n // odd special characters from Word 2010 with Firefox\n $formValues = str_replace(chr(226).chr(128).chr(152), \"'\", $formValues);\n $formValues = str_replace(chr(226).chr(128).chr(153), \"'\", $formValues);\n \n // escape all the HTML characters\n $formValues = htmlentities($formValues);\n }\n \n return $formValues;\n \n }",
"public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_POST) > 0) {\n\n\t\t\t$_POST = $this->clean_input_data($_POST);\n\t\t}\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0) {\n\n\t\t\t$_COOKIE = $this->clean_input_data($_COOKIE);\n\t\t}\n\t\tif (is_array($_FILES) AND count($_FILES) > 0) {\n\n\t\t\t//$_FILES = $this->clean_input_data($_FILES, true);\n\t\t}\n\n\t}",
"function cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitizeInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = strip_tags($data);\n return $data;\n}",
"public function sanitise($value, $isWysiwyg = false);",
"function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize_category_field($field, $value, $cat_id, $context)\n {\n }",
"public function sanitize_widget_instance($value, $id_base = \\null)\n {\n }",
"function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\r\n\t\t\t\t}",
"function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"public function sanitize( $input ) {\n }",
"function sanitize($data){\n$data=trim($data);\n$data=htmlspecialchars($data);\n$data=mysql_real_escape_string($data);\nreturn $data;\n}",
"function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function clean($value = \"\") {\r\n $value = trim($value);\r\n $value = stripslashes($value);\r\n $value = strip_tags($value);\r\n $value = htmlspecialchars($value);\r\n \r\n\t\treturn $value;\t\t\r\n}",
"function cleanInput($data) {\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t\t}",
"function tc_sanitize_textarea( $value) {\r\n $value = esc_html( $value);\r\n return $value;\r\n }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize_text_field($str)\n {\n }",
"private static function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function clean($data){\n\t\t$this->data = $data;\n\t\t$data = trim($data);\n\t\t$data = stripcslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"function sanitizeHTMLValue($value) \n{ \treturn (isset($value) ? trim(htmlentities(stripslashes($value), ENT_QUOTES, 'UTF-8')) : NULL);\n}",
"function clean_input($data){\r\n\t$data = trim($data);\r\n\t$data = stripslashes($data);\r\n\t$data = htmlspecialchars($data);\r\n\treturn $data;\t\r\n}",
"public static function sanitize($value)\n\t{\n\t\tif (is_array($value) OR is_object($value))\n\t\t{\n\t\t\tforeach ($value as $key => $val)\n\t\t\t{\n\t\t\t\t// Recursively clean each value\n\t\t\t\t$value[$key] = self::sanitize($val);\n\t\t\t}\n\t\t}\n\t\telseif (is_string($value))\n\t\t{\n\t\t\tif (self::$magic_quotes === TRUE)\n\t\t\t{\n\t\t\t\t// Remove slashes added by magic quotes\n\t\t\t\t$value = stripslashes($value);\n\t\t\t}\n\n\t\t\tif (strpos($value, \"\\r\") !== FALSE)\n\t\t\t{\n\t\t\t\t// Standardize newlines\n\t\t\t\t$value = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $value);\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}",
"function cleanInput($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"function sanitize_form_input_values(array $fields): array\n{\n $filter_params = [];\n\n foreach ($fields['fields'] as $field_key => $field) {\n $filter_params[$field_key] = $field['filter'] ?? FILTER_SANITIZE_SPECIAL_CHARS;\n }\n\n return filter_input_array(INPUT_POST, $filter_params);\n}",
"public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }",
"public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }",
"function sanitize($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function sanitize($data) {\n return htmlentities(strip_tags(mysql_real_escape_string($data)));\n }",
"function sanitize($data) \n{\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}",
"function sanitize($data){\r\n\t\t\t$data=stripslashes($data); // Remove all slashses\r\n\t\t\t$data=strip_tags($data); //Remove all tags\r\n\t\t\treturn $data;\r\n\t\t}",
"function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"function cleaninput($value, $DB) {\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\t$value = stripslashes( $value );\n\t\t}\n\t\t\n\t\treturn mysql_real_escape_string( $value, $DB );\n\t}",
"function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }",
"function sanitize($input) {\n\t\t$cleaning = $input;\n\t\t\n\t\tswitch ($cleaning) {\n\t\t\tcase trim($cleaning) == \"\":\n\t\t\t\t$clean = false;\n\t\t\t\tbreak;\n\t\t\tcase is_array($cleaning):\n\t\t\t\tforeach($cleaning as $key => $value) {\n\t\t\t\t\t$cleaning[] = sanitize($value);\n\t\t\t\t}\n\t\t\t\t$clean = implode(\",\", $cleaning);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif(get_magic_quotes_gpc()) {\n\t\t\t\t\t$cleaning = stripslashes($cleaning);\n\t\t\t\t}\n\t\t\t\t$cleaning = strip_tags($cleaning);\n\t\t\t\t$clean = trim($cleaning);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $clean;\n\t}",
"public function sanitizeFreeText()\n {\n $this->label = AdapterUtil::reencode($this->label);\n $this->street = AdapterUtil::reencode($this->street);\n $this->locality = AdapterUtil::reencode($this->locality);\n $this->region = AdapterUtil::reencode($this->region);\n $this->country = AdapterUtil::reencode($this->country);\n }",
"public function clean()\n\t{\n\t\tforeach ($this->dirtyFields AS $field)\n\t\t\t$this->cleanField($field);\n\t}",
"function scrubInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function ffw_port_settings_sanitize( $input = array() ) {\n\n global $ffw_port_settings;\n\n parse_str( $_POST['_wp_http_referer'], $referrer );\n\n $output = array();\n $settings = ffw_port_get_registered_settings();\n $tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';\n $post_data = isset( $_POST[ 'ffw_port_settings_' . $tab ] ) ? $_POST[ 'ffw_port_settings_' . $tab ] : array();\n\n $input = apply_filters( 'ffw_port_settings_' . $tab . '_sanitize', $post_data );\n\n // Loop through each setting being saved and pass it through a sanitization filter\n foreach( $input as $key => $value ) {\n\n // Get the setting type (checkbox, select, etc)\n $type = isset( $settings[ $key ][ 'type' ] ) ? $settings[ $key ][ 'type' ] : false;\n\n if( $type ) {\n // Field type specific filter\n $output[ $key ] = apply_filters( 'ffw_port_settings_sanitize_' . $type, $value, $key );\n }\n\n // General filter\n $output[ $key ] = apply_filters( 'ffw_port_settings_sanitize', $value, $key );\n }\n\n\n // Loop through the whitelist and unset any that are empty for the tab being saved\n if( ! empty( $settings[ $tab ] ) ) {\n foreach( $settings[ $tab ] as $key => $value ) {\n\n // settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work\n if( is_numeric( $key ) ) {\n $key = $value['id'];\n }\n\n if( empty( $_POST[ 'ffw_port_settings_' . $tab ][ $key ] ) ) {\n unset( $ffw_port_settings[ $key ] );\n }\n\n }\n }\n\n // Merge our new settings with the existing\n $output = array_merge( $ffw_port_settings, $output );\n\n // @TODO: Get Notices Working in the backend.\n add_settings_error( 'ffw_port-notices', '', __( 'Settings Updated', 'ffw_port' ), 'updated' );\n\n return $output;\n\n}",
"function clean_input( $dirty_data ){\n\t//use the DB connection already established\n\tglobal $db;\n\t//clean the data and 'return' it so we can continue working with it\n\treturn mysqli_real_escape_string($db, strip_tags( $dirty_data ));\n}",
"function mf_sanitize($input){\n\t\tif(get_magic_quotes_gpc() && !empty($input)){\n\t\t\t $input = is_array($input) ?\n\t array_map('mf_stripslashes_deep', $input) :\n\t stripslashes(trim($input));\n\t\t}\n\t\t\n\t\treturn $input;\n\t}",
"function sanitize($input) {\n return htmlspecialchars(strip_tags(trim($input)));\n }",
"function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}",
"function clean($value) {\r\n\r\n\t/*$str = @trim($str);\r\n\r\n\tif(get_magic_quotes_gpc()) {\r\n\r\n\t\t$str = stripslashes($str);\r\n\r\n\t}\r\n\r\n\treturn mysql_real_escape_string($str);*/\r\n\r\n\t\r\n\r\n\t\t//function to check for both sql injection and cross site scripting\r\n\r\n\t\t //Trim the value\r\n\r\n\t\t $value = trim($value);\r\n\r\n\t\t \r\n\r\n\t\t// Stripslashes\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t$value = stripslashes($value);\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t // Convert all <, > etc. to normal html and then strip these\r\n\r\n\t\t $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));\r\n\r\n\t\t\r\n\r\n\t\t // Strip HTML Tags\r\n\r\n\t\t $value = strip_tags($value);\r\n\r\n\t\t\r\n\r\n\t\t// Quote the value\r\n\r\n\t\t$value = mysql_real_escape_string($value);\r\n\r\n\t\t$value = htmlspecialchars ($value);\r\n\r\n\t\treturn $value;\r\n\r\n}",
"public function sanitize($value)\n\t{\n\t\treturn filter_var($value, FILTER_SANITIZE_STRING);\n\t}",
"function getSanitizedValues() {\r\n //TODO: actually clean the values. Could probably put it in the \r\n // case above...\r\n //\r\n //TDOD: consider using $_POST instead of $_GET!\r\n //\r\n // Also, this is probably overkill when we could just copy the\r\n // entirety of $_POST...not that we can guarantee people won't\r\n // jam malicious data into it.\r\n $cleanVals = array();\r\n $cleanVals['datetime'] = date(GlApp::DATE_FORMAT, strtotime($_REQUEST['datetime']));\r\n $cleanVals['mileage'] = $_REQUEST['mileage'];\r\n $cleanVals['location'] = $_REQUEST['location'];\r\n $cleanVals['pricepergallon'] = $_REQUEST['pricepergallon'];\r\n $cleanVals['gallons'] = $_REQUEST['gallons'];\r\n $cleanVals['grade'] = $_REQUEST['grade'];\r\n $cleanVals['pumpprice'] = $_REQUEST['pumpprice'];\r\n $cleanVals['notes'] = htmlspecialchars($_REQUEST['notes']);\r\n \r\n return $cleanVals;\r\n}",
"function sanitizeData($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\n\t\treturn $data;\n\t}",
"public static function sanitize() {\n\n $new_input = self::get_options();\n $default_options = self::default_options();\n $parts = parse_url($_POST['_wp_http_referer']);\n parse_str($parts['query'], $query);\n $tab = (array_key_exists('tab', $query)) ? $query['tab'] : 'general';\n\n switch ($tab) {\n case 'general':\n default:\n $new_input['cris_org_nr'] = isset($_POST[self::option_name]['cris_org_nr']) ? sanitize_text_field($_POST[self::option_name]['cris_org_nr']) : 0;\n break;\n\n case 'layout':\n $new_input['cris_pub_order'] = isset($_POST[self::option_name]['cris_pub_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_pub_order'])) : $default_options['cris_pub_order'];\n $new_input['cris_pub_subtypes_order'] = isset($_POST[self::option_name]['cris_pub_subtypes_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_pub_subtypes_order'])) : $default_options['cris_pub_subtypes_order'];\n $new_input['cris_univis'] = in_array($_POST[self::option_name]['cris_univis'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_univis'] : $default_options['cris_univis'];\n $new_input['cris_bibtex'] = isset($_POST[self::option_name]['cris_bibtex']) ? 1 : 0;\n $new_input['cris_url'] = isset($_POST[self::option_name]['cris_url']) ? 1 : 0;\n $new_input['cris_doi'] = isset($_POST[self::option_name]['cris_doi']) ? 1 : 0;\n $new_input['cris_oa'] = isset($_POST[self::option_name]['cris_oa']) ? 1 : 0;\n $new_input['cris_name_order_plugin'] = (isset($_POST[self::option_name]['cris_name_order_plugin'])\n && $_POST[self::option_name]['cris_name_order_plugin'] == 'lastname-firstname') ? 'lastname-firstname' : 'firstname-lastname';\n $new_input['cris_award_order'] = isset($_POST[self::option_name]['cris_award_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_award_order'])) : $default_options['cris_award_order'];\n $new_input['cris_award_link'] = in_array($_POST[self::option_name]['cris_award_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_award_link'] : $default_options['cris_award_link'];\n $new_input['cris_fields_num_pub'] = isset($_POST[self::option_name]['cris_fields_num_pub']) ? sanitize_text_field($_POST[self::option_name]['cris_fields_num_pub']) : 0;\n\t $new_input['cris_field_link'] = in_array($_POST[self::option_name]['cris_field_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_field_link'] : $default_options['cris_field_link'];\n\t $new_input['cris_project_order'] = isset($_POST[self::option_name]['cris_project_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_project_order'])) : $default_options['cris_project_order'];\n $new_input['cris_project_link'] = in_array($_POST[self::option_name]['cris_project_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_project_link'] : $default_options['cris_project_link'];\n $new_input['cris_patent_order'] = isset($_POST[self::option_name]['cris_patent_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_patent_order'])) : $default_options['cris_patent_order'];\n $new_input['cris_patent_link'] = in_array($_POST[self::option_name]['cris_patent_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_patent_link'] : $default_options['cris_patent_link'];\n $new_input['cris_activities_order'] = isset($_POST[self::option_name]['cris_activities_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_activities_order'])) : $default_options['cris_activities_order'];\n $new_input['cris_activities_link'] = in_array($_POST[self::option_name]['cris_activities_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_activities_link'] : $default_options['cris_activities_link'];\n $new_input['cris_standardizations_order'] = isset($_POST[self::option_name]['cris_standardizations_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_standardizations_order'])) : $default_options['cris_standardizations_order'];\n $new_input['cris_standardizations_link'] = in_array($_POST[self::option_name]['cris_standardizations_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_standardizations_link'] : $default_options['cris_standardizations_link'];\n break;\n case 'sync':\n $new_input['cris_sync_check'] = isset($_POST[self::option_name]['cris_sync_check']) ? 1 : 0;\n if(is_array($_POST[self::option_name]['cris_sync_shortcode_format'])) {\n /*foreach ($_POST[self::option_name]['cris_sync_shortcode_format'] as $_check){\n foreach ($_check as $_k => $_v) {\n $new_input['cris_sync_shortcode_format'][$_k] = $_v;\n }\n }*/\n $new_input['cris_sync_shortcode_format'] = $_POST[self::option_name]['cris_sync_shortcode_format'];\n }\n break;\n }\n return $new_input;\n }",
"function widgetopts_sanitize_array( &$array ) {\n foreach ($array as &$value) {\n if( !is_array($value) ) {\n\t\t\t// sanitize if value is not an array\n $value = sanitize_text_field( $value );\n\t\t}else{\n\t\t\t// go inside this function again\n widgetopts_sanitize_array($value);\n\t\t}\n }\n\n return $array;\n}",
"function clean($value) {\n if (get_magic_quotes_gpc()) $value = stripslashes($value);\n if (!is_numeric($value)) $value = addslashes($value);\n return $value;\n}",
"function sanitation($value) {\n\treturn strip_tags($value);\n}",
"public function sanitize($value)\n\t{\n\t\treturn null;\n\t}",
"function sanitize_input($data)\n {\n $data = trim($data); //remove whitespaces \n $data = stripslashes($data); //such as '\n $data = htmlspecialchars($data); //such as >,<&\n return $data;\n }",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}",
"function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}",
"function filter_mydata($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function sanitize_validate_input($data){\n\t\t \t \t$data = filter_var($data, FILTER_SANITIZE_STRING);\n\t\t \t \t//$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t \t \t$data = stripcslashes($data);\n\t\t \t \t$data = trim($data);\n\t\t \t \t$data = htmlspecialchars($data);\n\t\t \t \t\n\t\t \t \treturn $data; }",
"function sanitize($input){\n $input = strip_tags($input);\n $input = htmlspecialchars($input);\n $input = trim($input);\n return $input;\n}",
"public static function sanitize($value, $sanitizer = 'string', $extraOptions = [])\n {\n switch ($sanitizer) {\n case 'string':\n $value = sanitize_text_field($value);\n break;\n\n case 'html':\n $value = wp_kses_post($value);\n break;\n\n case 'slug':\n $value = sanitize_title($value);\n break;\n\n case 'id':\n $value = sanitize_key($value);\n break;\n\n case 'email':\n $value = sanitize_email($value);\n break;\n\n case 'int':\n $value = absint($value);\n break;\n\n case 'intnull':\n $value = absint($value);\n if (empty($value)) {\n $value = null;\n }\n break;\n\n case 'float':\n $value = floatval($value);\n break;\n\n case 'url':\n $value = esc_url($value, array('http', 'https'));\n break;\n\n case 'bool':\n $value = (is_string($value) ? ($value == 'true' || $value == '1' ? true : false) : ($value ? true : false));\n break;\n\n case 'bool_null':\n if ($value !== null) $value = (is_string($value) ? ($value == 'true' || $value == '1' ? true : false) : ($value ? true : false));\n break;\n\n case 'bool_string':\n $value = (is_string($value) ? ($value == 'true' || $value == '1' ? 'true' : 'false') : ($value ? 'true' : 'false'));\n break;\n\n case 'textarea':\n $value = explode(\"\\r\\n\", $value);\n foreach ($value as $val) {\n $values[] = sanitize_text_field($val);\n }\n $value = implode(\"<br>\", $values);\n break;\n\n case 'logo':\n $value = wp_check_filetype($value);\n if (in_array($value['ext'], array('jpg', 'jpeg', 'png'))) {\n $value = true;\n } else {\n $value = false;\n }\n break;\n\n case 'datetime':\n if ($value instanceof DateTime === false) {\n $result = false;\n try {\n $result = new DateTime($value);\n } catch (Exception $e) {\n }\n $value = $result;\n }\n break;\n\n case 'phone':\n if (class_exists('\\libphonenumber\\PhoneNumberUtil')) {\n $country = isset($extraOptions['country']) ? $extraOptions['country'] : 'FR';\n try {\n $phoneUtil = \\libphonenumber\\PhoneNumberUtil::getInstance();\n $number = $phoneUtil->parse($value, $country);\n if ($phoneUtil->isValidNumber($number)) {\n $number = $phoneUtil->formatInOriginalFormat($number, $country);\n $value = implode('.', explode(' ', $number));\n }\n } catch (Exception $e) {\n // Exception\n }\n }\n break;\n\n case false:\n break;\n }\n return $value;\n }",
"public function sanitize_input_fields(array $args)\n {\n }",
"function sanitize_term_field($field, $value, $term_id, $taxonomy, $context)\n {\n }",
"static function clean_input($dirty)\n\t{\n\t\t//$input = get_magic_quotes_gpc() ? $dirty : addslashes($dirty);\n\n\t\tif( !is_array($dirty) )\n\t\t{\n\t\t\t$dirty = strtr( $dirty, array('<script>'=>'', '</script>'=>'') );\n\t\t\t$dirty = trim( strip_tags( htmlspecialchars($dirty, ENT_QUOTES), '' ) );\n\t\t}else if( is_array($dirty) )\n\t\t{\n\t\t\tforeach($dirty as $k=>$v)\n\t\t\t{\n\t\t\t\tif( is_array($v) )\n\t\t\t\t{\n\t\t\t\t\tforeach($v as $k2=>$v2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif( is_array($v2) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($v2 as $k3=>$v3)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$v3 = strtr( $v3, array('<script>'=>'', '</script>'=>'') );\n\t\t\t\t\t\t\t\t$dirty[ $k ][ $k2 ][ $k3 ] = trim( strip_tags( htmlspecialchars($v3, ENT_QUOTES), '' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$v2 = strtr( $v2, array('<script>'=>'', '</script>'=>'') );\n\t\t\t\t\t\t\t$dirty[ $k ][ $k2 ] = trim( strip_tags( htmlspecialchars($v2, ENT_QUOTES), '' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$v = strtr( $v, array('<script>'=>'', '</script>'=>'') );\n\t\t\t\t\t$dirty[ $k ] = trim( strip_tags( htmlspecialchars($v, ENT_QUOTES), '' ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn $dirty;\n\t}",
"function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}"
] | [
"0.71835464",
"0.7149636",
"0.6942603",
"0.683952",
"0.681107",
"0.6642593",
"0.65851724",
"0.65072626",
"0.6451891",
"0.6451891",
"0.64336884",
"0.64276963",
"0.6426025",
"0.63837826",
"0.63769865",
"0.6295462",
"0.6271859",
"0.62593806",
"0.6257514",
"0.6252859",
"0.6232507",
"0.6213745",
"0.6193622",
"0.6171545",
"0.61694914",
"0.6168259",
"0.61561924",
"0.6136126",
"0.613309",
"0.6117935",
"0.6117855",
"0.611306",
"0.6100161",
"0.6094869",
"0.60801005",
"0.6076507",
"0.60752076",
"0.6048072",
"0.6043433",
"0.6042163",
"0.60368204",
"0.6026149",
"0.60198563",
"0.60085607",
"0.60004216",
"0.5979893",
"0.5976802",
"0.59740263",
"0.5973271",
"0.5973271",
"0.59717906",
"0.59682775",
"0.5965763",
"0.5957039",
"0.5943375",
"0.5941792",
"0.59232515",
"0.59206635",
"0.5903446",
"0.5903446",
"0.589851",
"0.5897438",
"0.5897088",
"0.58967125",
"0.5873306",
"0.58662426",
"0.58650684",
"0.58601844",
"0.58543503",
"0.58455175",
"0.58441764",
"0.5832268",
"0.58300203",
"0.58297485",
"0.5821311",
"0.581647",
"0.5815188",
"0.5814192",
"0.5814001",
"0.58031774",
"0.5800007",
"0.5793613",
"0.57934994",
"0.57763606",
"0.57759863",
"0.5775774",
"0.5774903",
"0.575962",
"0.575962",
"0.575962",
"0.57587516",
"0.5756438",
"0.5754013",
"0.57529825",
"0.5751383",
"0.57512665",
"0.5746837",
"0.5746281",
"0.57443935",
"0.574216",
"0.5741991"
] | 0.0 | -1 |
Executa queries dentro do banco de dados | public function execute($query, $params = [])
{
try {
$stm = $this->conn->prepare($query);
$stm->execute($params);
return $stm;
} catch (PDOException $e) {
die("Erro: ". $e->getMessage());
//Em um projeto real o erros com banco de dados não seriam exibidos, apenas salvos no log por motivos de segurança.
}catch (Exception $e) {
die("Erro genérico: ". $e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function execute () {\n $this->query->execute();\n }",
"private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}",
"protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}",
"public function execute() {\r\n // $this->connecxao = parent::getConnect();\r\n $stmt = $this->connecxao->prepare($this->getQuery());\r\n $this->transition = $stmt->execute($this->getBinds());\r\n $this->error = $stmt->errorInfo();\r\n\r\n if ($this->error[0] == \"00000\") {\r\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\r\n $this->data = $stmt;\r\n } else {\r\n $this->setMsgError(\"Code Aplic Error: \" . $this->error[0] . \"<br />Code BD Error: \" . $this->error[1] . \"<br />Msg BD Error: \" . $this->error[2]);\r\n }\r\n }",
"private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}",
"protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}",
"public function execute()\n {\n return $this->query($this->sSql);\n }",
"private function execute() {\n $this->statement = $this->pdo->prepare($this->queryString);\n\n foreach ($this->params as $boundParam) {\n $this->statement->bindValue($boundParam->name, $boundParam->value, $boundParam->type);\n }\n\n $this->statement->execute();\n }",
"public function execute($query);",
"public function executeAll();",
"function ejecutarConsulta() {\n\t\t$this->openConnection();\n\t\t$res = $this->conn->query($this->consulta);\n\t\t$this->closeConnection();\n\t\treturn $res;\n\t}",
"abstract function executeQuery($cons);",
"function executeQuery($query);",
"public function run () : void\n\t{\n\t\t# Usando constructor de consultas\n\t\t$this->db->table( \"t_autores\" )->insertBatch(\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t\"nombre\"\t\t=> \"Claudia Lars\",\n\t\t\t\t\t\"nacionalidad\"\t=> \"Salvadoreña\",\n\t\t\t\t\t\"genero\"\t\t=> \"F\",\n\t\t\t\t\t\"creado\"\t\t=> date( \"Y-m-d H:i:s\" )\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t\"nombre\"\t\t=> \"Salvador Salazar Arrué\",\n\t\t\t\t\t\"nacionalidad\"\t=> \"Salvadoreña\",\n\t\t\t\t\t\"genero\"\t\t=> \"M\",\n\t\t\t\t\t\"creado\"\t\t=> date( \"Y-m-d H:i:s\" )\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t}",
"public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }",
"protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}",
"private function execute () {\n if($this->_query->execute()) {\n\n // It has been succesful so add the output to $this->results and set it as an object\n $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);\n\n // Set the affected row count to $this->_count\n $this->_count = $this->_query->rowCount();\n\n } else {\n\n // The query failed so set $this->_error to true. MORE WORK NEEDED HERE\n $this->_error = true;\n\n }\n }",
"public function run()\n {\n \\DB::statement(\" INSERT INTO indec.poblacion_departamentos(id_provincia, id_departamento, habitantes, habitantes_sumar)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge2 host=192.6.0.66 user=postgres password=110678',\n\t\t 'SELECT id_provincia, id_departamento, habitantes, coalesce(habitantes_sumar,0)\n\t\t\tFROM\n\t\t\t\tindec.poblacion_departamentos;')\n\t\t AS migracion(id_provincia char(2),\n\t\t\t\t id_departamento char(3),\n\t\t\t\t habitantes integer,\n\t\t\t\t habitantes_sumar integer\n\t\t\t\t)\n\t); \");\n }",
"public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }",
"private function Execute(){\n $this->Connect();\n\n try{\n $this->Create->execute($this->Dados);\n $this->Result = $this->Conn->lastInsertId();\n $this->StatusInsert = true;\n\n }catch (PDOException $e){\n $this->Result = null;\n WSErro(\"<b>Erro ao cadastrar:</b> {$e->getMessage()}\", $e->getCode());\n }\n }",
"protected function executeQuery() {\n return array();\n }",
"public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }",
"public function query()\n {\n }",
"public function query()\n {\n }",
"public function execute() {\n $lastImplementaion = '';\n $finalWhere = ( count($this->_lastWhere) > 0) ? ' WHERE ' . join($this->_currentImplement['where'], ' ' ) : '';\n $finalLimit = ( strlen($this->_lastLimit) > 0 ) ? ' lIMIT ' . $this->_lastLimit : '';\n\n if ( !empty($this->_lastSelect) ) {\n $finalSelect = ' SELECT ' . join( $this->_currentImplement['select'], ',' );\n\n $finalTables = ' FROM ' . join( array_map(function($item ){\n return '`'.$item.'`';\n }, $this->_currentImplement['table']), ',');\n\n $finalOrder = ( strlen($this->_lastOrder) > 0 ) ? ' ORDER BY ' . $this->_lastOrder : '';\n\n $finalJoin = '';\n\n if ( isset($this->_currentImplement['join']) && count($this->_currentImplement['join']) > 0 ) {\n foreach ( $this->_currentImplement['join'] as $key => $value ) {\n $finalJoin[] = ' ' . $value['type'] . ' JOIN `' . $value['table'] . '`' . ' ON ' . $value['on'];\n }\n\n $finalJoin = join( $finalJoin, ' ' );\n }\n\n $lastImplementaion = $finalSelect . $finalTables . $finalJoin . $finalWhere . $finalOrder . $finalLimit;\n } else if ( !empty($this->_lastUpdate) ) {\n if(empty($finalWhere)){\n throw new Exception(\"If you preform this query, you will update all rows in table\", 1);\n }\n\n $lastImplementaion = 'UPDATE ' . $this->_lastTable . ' SET ' . $this->_lastUpdate . $finalWhere . $finalLimit;\n } else if ( !empty($this->_lastInsert) ) {\n $lastImplementaion = 'INSERT INTO `' . $this->_lastTable . '` ' . $this->_lastInsert;\n } else if ( !empty($this->_lastCreate) ) {\n $lastImplementaion = $this->_lastCreate;\n } else if ( !empty($this->_lastDrop) ) {\n $lastImplementaion = $this->_lastDrop;\n }else if( !empty($this->_lastTruncate) ){\n $lastImplementaion = $this->_lastTruncate;\n }else if( !empty($this->_lastDelete) ) {\n if(empty($finalWhere)){\n throw new Exception(\"If you preform this query, you will delete all rows in table, if you want so user truncate() instead.\", 1);\n }\n\n $lastImplementaion = $this->_lastDelete . $finalWhere . $finalLimit;\n }\n\n $lastImplementaion = trim( $lastImplementaion );\n $this->unsetAll();\n\n unset( $this->_currentImplement );\n unset( $finalSelect );\n unset( $finalTables );\n unset( $finalJoin );\n unset( $finalWhere );\n unset( $finalOrder );\n unset( $finalLimit );\n return $lastImplementaion;\n }",
"public function query();",
"public function query();",
"public function query();",
"function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }",
"public function execute($sql);",
"public function execute($sql);",
"function query($query){\r\n if($this->query = $this->connection->prepare($query)){\r\n $this->query->execute();\r\n //cek kalo error\r\n if ($this->query->errno){\r\n die(\"otak anda error: \". $this->query->error);\r\n }\r\n }else{\r\n die(\"Error execution: \". $this->query->error);\r\n }\r\n }",
"public function executeGenericDQLQuery($query){\n try{\n if(!$this->db)\n {\n $this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n }\n $result = mysql_query($query, $this->db);\n /* if(mysqli_errno($con) != 0){\n throw new Exception(\"Error :\".mysqli_errno($con).\" : \".mysqli_error($con));\n } */\n $rows = array();\n while($row = mysql_fetch_array($result)){\n array_push($rows,$row);\n }\n //mysqli_close($con);\n return $rows;\n \n }\n catch(Exception $e){\n $response = array();\n $response['status'] = false;\n $response['message'] = $e->getMessage();\n $this->response($this->json($response), 200);\n }\n \n }",
"public function run()\n {\n \\DB::statement(\" INSERT INTO solicitudes.estados(id, descripcion, css)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge3 host=192.6.0.118 user=postgres password=LatinoSandwich007',\n\t\t 'SELECT id, descripcion, css\n\t\t\t FROM solicitudes.estados')\n\t\t AS migracion( id integer,\n\t\t\t\t\t\t descripcion character varying(50),\n\t\t\t\t\t\t css character varying(20) )\t\t\t\n\t); \");\n }",
"public function executeQuery($q){ $this->makeConnection();\n //check for SQL injection\n\n //execute query\n $results = $this->connection->query($q);\n\n return $results;\n\n }",
"public function query()\n\t{\n\t\t\n\t}",
"public function flushQuery();",
"public function query_trans($lista){\n try {\n $this->conn->beginTransaction();\n $this->conn->query($lista[\"Sql1\"]);\n $this->conn->query($lista[\"Sql2\"]); \n $this->conn->query($lista[\"Sql3\"]); \n $this->conn->commit();\n\n \n echo '<script>alert(\"inserto todo\");</script>';\n\n } catch (PDOException $th) {\n $this->conn->rollback();\n echo '<script>alert(\"Error\");</script>';\n echo $th;\n }\n }",
"function realizarConsultas($sql)\r\n {\r\n $this->resultado = $this->mysqli->multi_query($sql);\r\n }",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}",
"abstract public function execute($query);",
"public function execute()\n\t{\n\t\t$this->executeCall();\n\t\t$this->executeReminder();\n\t}",
"private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }",
"protected function execute_single_query() {\n\t\tif($_POST) {\n\t\t\t$this->open_connection();\n\t\t\t$this->conn->query($this->query);\n\t\t\t\n\t\t} else {\n\t\t\t$this->mensaje = 'Metodo no permitido';\n\t\t}\n\t}",
"public function execute($query)\n {\n }",
"private function runQuery () {\n\n // Prepare the constructed SQL statement\n if ($this->_query = $this->_pdo->prepare($this->_sql)) {\n\n // Set a counter to one to use when binding\n $x = 1;\n \n // Loop through the binding array\n foreach($this->_bindArray as $param) {\n \n // Run the bindValue function to match the correct value to the correct placing\n $this->_query->bindValue($x, $param);\n\n // Increment the counter\n $x++;\n \n }\n \n // Run the execute function\n $this->execute();\n }\n }",
"public function run() {\n\t\t\\DB::statement(\"INSERT INTO pss.codigos_mujer(codigo_prestacion,id_linea_cuidado,id_grupo_etario,embarazo_riesgo,embarazo_normal)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t\t 'SELECT codigo_prestacion,id_linea_cuidado,id_grupo_etario,embarazo_riesgo,embarazo_normal\n\t\t\t FROM pss.codigos_mujer')\n\t\t AS migracion(codigo_prestacion character varying(11),\n\t\t\t\t id_linea_cuidado smallint,\n\t\t\t\t id_grupo_etario smallint,\n\t\t\t\t embarazo_riesgo character varying(1),\n\t\t\t\t embarazo_normal character varying(1))\n\t);\");\n\t}",
"protected abstract function executeQuery(Result $result);",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }",
"abstract public function query();",
"public function run()\n {\n $this->command->comment('Empezando ' . __CLASS__);\n\n DB::statement($this->towns);\n }",
"public function run() {\n\t\t\\DB::statement(\"INSERT INTO pss.codigos_sumar_nacer(codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t\t 'SELECT codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural\n\t\t\t FROM pss.codigos_sumar_nacer')\n\t\t AS migracion(codigo_prestacion character varying(11),\n\t\t\t\t id_grupo_etario smallint,\n\t\t\t\t codigo_prestacion_nacer character varying(6),\n\t\t\t\t codigo_prestacion_rural character varying(11))\n\t);\");\n\t}",
"public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }",
"public function execute($sql){\n\t $query = DB::query(Database::SELECT, $sql);\n\t return $query->execute($this->database);\n\t}",
"public function ejecutar_una_consulta($query){\n $response=self::ConnectDB()->prepare($query);\n $response->execute();\n return $response;\n }",
"private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }",
"private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }",
"protected abstract function executeQuery($query);",
"private function executeQueries(array $data):void{\n if(isset($data['tables'])){\n foreach($data['tables'] as $action => $tables){\n foreach($tables as $table){\n try{\n $query = $action.' TABLE '.$table;\n if($action === 'create'){\n $query .= ' (';\n foreach($data['fields']['add'][$table] as $name => $field){\n $query .= $this->getFieldQuery($name, $field).',';\n }\n unset($data['fields']['add'][$table]);\n if(isset($data['keys']) && isset($data['keys']['primary']) && isset($data['keys']['primary']['add']) && isset($data['keys']['primary']['add'][$table])){\n $query .= 'PRIMARY KEY ('.$data['keys']['primary']['add'][$table][0].'),';\n unset($data['keys']['primary']['add'][$table]);\n }\n if(isset($data['indexes']) && isset($data['indexes']['add']) && isset($data['indexes']['add'][$table])){\n foreach($data['indexes']['add'][$table] as $field){\n $query .= 'KEY '.$field.' ('.$field.'),';\n }\n unset($data['indexes']['add'][$table]);\n }\n if(isset($data['uniques']) && $data['uniques']['add'] && $data['uniques']['add'][$table]){\n foreach($data['uniques']['add'][$table] as $field){\n $query .= 'UNIQUE '.$field.' ('.$field.'),';\n }\n unset($data['uniques']['add'][$table]);\n }\n if(isset($data['keys']) && isset($data['keys']['foreign']) && isset($data['keys']['foreign']['add']) && isset($data['keys']['foreign']['add'][$table])){\n foreach($data['keys']['foreign']['add'][$table] as $info){\n $query .= 'CONSTRAINT fk_'.$table.'_'.$info['column'].' FOREIGN KEY ('.$info['column'].') REFERENCES '.$info['referenced_table'].'('.$info['referenced_column'].') ON UPDATE '.$info['onUpdate'].' ON DELETE '.$info['onDelete'].',';\n\n }\n unset($data['keys']['foreign']['add'][$table]);\n }\n $query = trim($query, ',').')';\n }\n $this->db->execute($query);\n Cli::success($query, true);\n } catch(PDOException $e){\n Cli::error($query.\"\\n\".$e->getMessage());\n }\n }\n }\n } \n if(isset($data['keys'])){ \n foreach(['primary', 'foreign'] as $type){\n if(isset($data['keys'][$type])){\n foreach(['drop', 'add'] as $action){\n if(isset($data['keys'][$type][$action])){\n foreach($data['keys'][$type][$action] as $table => $fields){\n foreach($fields as $field){ \n $query = 'ALTER TABLE '.$table.' '.strtoupper($action).' ';\n switch($type){\n case 'foreign':\n switch($action){\n case 'drop':\n $query .= 'FOREIGN KEY '.$field;\n break;\n case 'add':\n $query .= 'CONSTRAINT fk_'.$table.'_'.$field['column'].' FOREIGN KEY ('.$field['column'].') REFERENCES '.$field['referenced_table'].'('.$field['referenced_column'].') ON UPDATE '.$field['onUpdate'].' ON DELETE '.$field['onDelete'];\n break;\n }\n break;\n case 'primary':\n $query .= 'PRIMARY KEY'.($action === 'add' ? '('.$field.')' : '');\n break;\n }\n try{\n $this->db->execute('SET FOREIGN_KEY_CHECKS=0;'.$query.';SET FOREIGN_KEY_CHECKS=1;');\n Cli::success($query, true);\n } catch(PDOException $e){\n Cli::error($query.\"\\n\".$e->getMessage());\n }\n }\n }\n }\n }\n }\n }\n }\n\n foreach(['indexes', 'uniques'] as $type){\n foreach(['add', 'drop'] as $action){\n if(isset($data[$type]) && isset($data[$type][$action])){\n foreach($data[$type][$action] as $table => $fields){\n foreach($fields as $field){\n switch($type){\n case 'indexes':\n $query = 'ALTER TABLE '.$table.' '.strtoupper($action).' INDEX '.($action==='add' ? '('.$field.')' : $field);\n break;\n case 'uniques':\n $query = 'ALTER TABLE '.$table.' '.strtoupper($action).' ';\n switch($action){\n case 'add':\n $query .= 'UNIQUE ('.$field.')';\n break;\n case 'drop':\n $query .= 'INDEX '.$field;\n break;\n }\n break;\n }\n try{\n $this->db->execute('SET FOREIGN_KEY_CHECKS=0;'.$query.';SET FOREIGN_KEY_CHECKS=1;');\n Cli::success($query, true);\n } catch(PDOException $e){\n Cli::error($query.\"\\n\".$e->getMessage());\n }\n }\n } \n }\n }\n }\n\n if(isset($data['fields'])){\n foreach($data['fields'] as $action => &$tables){\n foreach($tables as $table => &$fields){\n foreach($fields as $name => &$field){\n try{\n if(empty($field)){\n $field = null;\n }\n $query = $this->createAlter($table, $action, $name, $field);\n $this->db->execute($query);\n Cli::success($query, true);\n } catch(PDOException $e){\n Cli::error($query.\"\\n\".$e->getMessage());\n }\n }\n }\n }\n }\n }"
] | [
"0.7270004",
"0.7142566",
"0.69164103",
"0.6901614",
"0.6742385",
"0.66762936",
"0.66324353",
"0.6619268",
"0.6544367",
"0.65282506",
"0.6496744",
"0.6452328",
"0.64160985",
"0.6415992",
"0.63754225",
"0.63688284",
"0.63619995",
"0.6353324",
"0.6343713",
"0.6342602",
"0.633608",
"0.6334274",
"0.6332356",
"0.63230824",
"0.6308276",
"0.6308276",
"0.63077027",
"0.6305957",
"0.6305957",
"0.6305957",
"0.6304677",
"0.6304446",
"0.6304446",
"0.62998164",
"0.6269428",
"0.6263343",
"0.6246216",
"0.6242724",
"0.62296665",
"0.6227837",
"0.6223629",
"0.6203263",
"0.6203263",
"0.6203263",
"0.6203263",
"0.6203263",
"0.6203263",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.6201448",
"0.620074",
"0.620074",
"0.62007225",
"0.6187799",
"0.61798805",
"0.61638105",
"0.6161267",
"0.61537355",
"0.6150238",
"0.6144625",
"0.61366004",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61321455",
"0.61268157",
"0.61268157",
"0.61268157",
"0.61268157",
"0.61138964",
"0.6107883",
"0.6106795",
"0.6105003",
"0.6103476",
"0.60992867",
"0.6096603",
"0.6096363",
"0.60910314",
"0.6088025",
"0.6077984"
] | 0.0 | -1 |
/ $redis = new Redis(); $redis>connect('127.0.0.1', 6379); $redis>auth('pang123'); | public function getAccessToken() {
$data = $this->redis->get('pa_access_token');
if (!$data) {
$data['expire_time'] = 0;
$data['access_token'] = "0";
$this->redis->set('pa_access_token', $data, 7200);
}
if ($data['expire_time'] < time()) {
$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->config['appId'].'&secret='.$this->config['appSecret'];
$res = json_decode($this->httpGet($url));
$access_token = $res->access_token;
if ($access_token) {
$data['expire_time'] = time() + 7000;
$data['access_token'] = $access_token;
}
}
//debug_info("getaccesstoken,b4 storage:".json_encode($data));
$this->redis->set('pa_access_token', $data, 7200);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index(){\n $redis = new Redis();\n// dump($redis);exit;\n $redis->connect('39.98.171.207',6379);\n echo \"Connection to server sucessfully\";\n exit;\n //查看服务是否运行\n echo \"Server is running: \" . $redis->ping();\n }",
"function __construct()\n {\n try \n { \n \n $this->database = new Predis\\Client( [ \n \"scheme\" => \"tcp\", \n \"host\" => \"localhost\", \n \"port\" => 6379] );\n \n }\n catch (Exception $e)\n { \n error_log('error with Redis '. $e->getMessage() ); \n exit; \n \n } \n }",
"function connectToRedis()\n {\n\n Predis\\Autoloader::register();\n try {\n $redis = new Predis\\Client(array(\n \"host\" => \"\",\n \"port\" => \"6379\"\n ));\n } catch (Exception $e) {\n echo (\"Could not connected to Redis \" . $e->getMessage());\n }\n return $redis;\n }",
"function testRedis(){\n// Cache::remember('demo_redis_3',60,function(){\n// return 'hello redis';\n// });\n// Cache::forget('demo_redis_3');\n }",
"protected function setUpRedis() {}",
"public static function getClient(){\n $redis=new \\Redis();\n $redis->connect(self::CLIENT_CONF['host'], self::CLIENT_CONF['port']);\n $redis->auth(self::CLIENT_CONF['password']);\n return $redis;\n }",
"public function index()\n\t{\n\t\t$this->load->library('redis');\n\t\t$redis=$this->redis->config();\n\t\t$redis->set('message', 'Hello world');\n\t\t$value = $redis->get('message');\n\n// Hello world\n\t\tprint($value);\t\n\t}",
"public function __construct()\r\n {\r\n //设置中国时区\r\n date_default_timezone_set('PRC');\r\n $this->hostList = ['163.com'];\r\n $this->proxyLog = '/4T/www/huangj/proxyLog';\r\n\r\n $this->redis = new \\Redis();\r\n $this->redis->connect('127.0.0.1', 6379); //连接Redis\r\n $this->redis->auth('dw5w@%wZx'); //密码验证\r\n $this->redis->select(0);//选择数据库2\r\n }",
"public function __construct()\n {\n // $this->middleware('auth');\n //$this->redis = Redis::connect();\n\n \n\n }",
"function conn_redis() {\n\tglobal $REDIS_HOSTS, $REDIS_PORTS;\n\n\tif (false) {\n\t\t// nrk/Predis, deprecated at 2013.07.25 by performance issue\n\t\t$redis_config = array(\n\t\t\t\t'host' => 'ew_tb_was_3p',\n\t\t\t\t'read_write_timeout' => 60,\n\t\t\t\t'connection_persistent' => true,\n\t\t);\n\n\t\trequire_once 'Predis/Autoloader.php';\n\t\tPredis\\Autoloader::register();\n\n\t\t$redis = new Predis\\Client($redis_config);\n\t} else {\n\t\tglobal $global_redis;\n\n\t\t$host = $REDIS_HOSTS[0];\n\t\t$port = $REDIS_PORTS[0];\n\n\t\ttry {\n\t\t\tif ( $global_redis ) {\n\t\t\t\t# $global_redis->ping();\n\t\t\t\treturn $global_redis;\n\t\t\t}\n\t\t} catch (RedisException $e) {\n\t\t\t$global_redis = null;\n\t\t}\n\n\t\tif ( !$global_redis ) {\n\t\t\t$redis = new Redis();\n\t\t\t$redis->connect($host, $port);\n\t\t\t#$redis->pconnect($host, $port);\n\t\t\t#$redis->setOption(Redis::OPT_READ_TIMEOUT, \"60.0\");\n\t\t\t$global_redis = $redis;\n\t\t}\n\t}\n\n\treturn $redis;\n}",
"public function redis()\n {\n return $this->redis;\n }",
"public function open() {\n $host = Configure::read('RedisSession.hostname');\n $port = Configure::read('RedisSession.port');\n $password = Configure::read('RedisSession.password');\n $database = Configure::read('RedisSession.database');\n\n if ($host !== null && $port !== null) {\n $redis = new iRedisForRedisSession(array('hostname' => $host, 'port' => $port));\n }\n else {\n $redis = new iRedisForRedisSession();\n }\n if (!empty($password)) {\n $redis->auth($password);\n }\n if (!empty($database)) {\n $redis->select($database);\n }\n\n self::$store = $redis;\n }",
"public function index()\n\t{\n\n\t\t// $redisObj->set('JLP', '金立品');\n\n\t\t// dump($redisObj->get('JLP'));\n\t}",
"public function __construct($redis) {\n $this->redis = $redis;\n }",
"public function redis_instance()\n {\n return $this->redis;\n }",
"public function connect() : \\Redis\n {\n $redis = new \\Redis();\n\n $redis->pconnect(\n $this->getIp(),\n $this->getPort(),\n self::TIMEOUT,\n $this->getPersistantId()\n );\n \n if ($this->getPassword() !== null) {\n $redis->auth($this->getPassword());\n }\n\n $redis->setOption(\\Redis::OPT_READ_TIMEOUT, 60);\n $redis->config('SET', 'timeout', '10');\n\n return $redis;\n }",
"static public function connect($index = 'user', $host = null, $port = null)\n\t{\n\n\t\t//----------------------------octopus update 2014-01-03----------------------------------\n\t\t//根据业务,把redis拆分成两部分,user 和 card\n\t//\t\tif (!isset(self::$_dbIndex[$index])) {\n\t//\t\t\tthrow new Exception('DB index not found.');\n\t//\t\t}\n\t\t//$db = self::$_dbIndex[$index];\n\t\tif (!extension_loaded('redis'))\n\t\t\tthrow new Exception('Redis extension not found.');\n\t\t$redisConfig = TZ_Loader::config('redis');\n\t\tif (empty($redisConfig))\t\n\t\t\tthrow new Exception('Reids Configuration error.');\n\t\t$redis = new Redis();\n\t\t$host = (null === $host) ? $redisConfig[$index]['host'] : $host;\n\t\t$port = (null === $port) ? $redisConfig[$index]['port'] : $port;\n\t\t$connection = $redis->pconnect($host, $port);\n if(!empty($redisConfig[$index]['auth'])){\n $redis->auth($redisConfig[$index]['auth']); //设置密码\n }\n\t\tif (!$connection)\n {\n\t\t\tthrow new Exception('Can\\'t connect to Redis server.');\n }\n\t\t//$redis->select($db);\n\t\t//-----------------------------------end ---------------------------------------------------\t\n\t\treturn $redis;\n\t}",
"private function init() {\r\n parent::init();\r\n $this->redisInit();\r\n}",
"public function __construct()\n\t{\n\t\t//\n\t\t$this->redis = \\Illuminate\\Support\\Facades\\Redis::connection();\n\t}",
"private function getRedis()\r\n {\r\n if ($this->redis === null) {\r\n $this->redis = new PredisClient($this->redis_options);\r\n }\r\n\r\n return $this->redis;\r\n }",
"public function __construct()\n\t{\n\t\tif( !$this->redis ) $this->redis = Redis::connection();\n\t}",
"private function setRedis_info($gid){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\t\t$exists = $client->exists($gid);\n\t\tif($exists){\n\t\t\treturn json_decode($client->get($gid), true);\n\t\t}else{\n\t\t\treturn;\n\t\t}\n }",
"private function __construct()\n {\n $this->cache = new \\Redis();\n if ($this->cache->connect('redis')) {\n echo 'Connected to Redis' . PHP_EOL;\n $this->cache->delete(self::CLIENTS_KEY);\n }\n }",
"public function redis(Request $request)\n {\n $value = $request->session()->get('hunan_sy');\n dump($value);\n\n $data = $request->session()->all();\n dump($data);\n\n \n Redis::set('name', 'Taylor');\n echo Redis::get('name');\n }",
"protected function connect()\n {\n $return = false;\n try {\n $this->connection = new Redis();\n if (empty($this->settings['persistent'])) {\n $return = $this->connection->connect(\n $this->settings['server'],\n $this->settings['port'],\n $this->settings['timeout']\n );\n } else {\n $return = $this->connection->pconnect(\n $this->settings['server'],\n $this->settings['port'],\n $this->settings['timeout']\n );\n }\n } catch (RedisException $e) {\n return false;\n }\n if ($return && $this->settings['password']) {\n $return = $this->connection->auth($this->settings['password']);\n }\n return $return;\n }",
"public function testCanWeEvenAccessRedisFromTestEnvironment(): void\n {\n $test = $this->redis->ping();\n $this->assertEquals(\"+PONG\", $test);\n }",
"public function testCanWeEvenAccessRedisFromTestEnvironment(): void\n {\n $test = $this->redis->ping();\n $this->assertEquals(\"+PONG\", $test);\n }",
"public function redis()\n {\n return $this->resque->redis();\n }",
"public function __construct() {\n\n\t\t// Server config\n\t\t$redis_server = array( 'host' => '127.0.0.1', 'port' => 6379 );\n\n\t\t$this->redis = new Redis();\n\t\t$this->redis->connect( $redis_server['host'], $redis_server['port'], 1, NULL, 100 ); # 1s timeout, 100ms delay between reconnections\n\t\tif ( ! empty( $redis_server['auth'] ) ) {\n\t\t\t$this->redis->auth( $redis_server['auth'] );\n\t\t}\n\n\t\t/**\n\t\t * @todo This should be moved to the PHP4 style constructor, PHP5\n\t\t * already calls __destruct()\n\t\t */\n\t\tregister_shutdown_function( array( $this, '__destruct' ) );\n\t}",
"function set_client($db=0) {\n\t\ttry {\n\t\t\t$CI =& get_instance();\n\t\t\t$conf = array(\n\t\t\t\t\"scheme\" => \"tcp\",\n\t\t\t\t\"host\" => '127.0.0.1',\n\t\t\t\t\"port\" => 6379\n\t\t\t);\n\t\t\tif(is_numeric($db)) if($db > 0) $conf['database'] = $db;\n\n\t\t\t$redis = new Predis\\Client($conf);\n\t\t\t\n\t\t\treturn $redis;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t}",
"public function setUp()\n {\n $this->redis = new \\Redis();\n $this->redis->connect('127.0.0.1', 6379);\n $this->redis->flushDB();\n $key = random_bytes(32);\n $hex = bin2hex($key);\n $this->testNotStrict = new \\AWonderPHP\\SimpleCacheRedis\\SimpleCacheRedisSodium($this->redis, $hex);\n }",
"public function getConnection() {\n return $this->redis;\n }",
"public function setUp()\n {\n $this->redis = new \\Redis();\n $this->redis->connect('127.0.0.1', 6379);\n $this->redis->flushDB();\n $this->testNotStrict = new \\AWonderPHP\\SimpleCacheRedis\\SimpleCacheRedis($this->redis);\n }",
"public function getRedisClient( ){\n if( empty( $this->redisHandler ) ){\n $this->redisHandler = new RedisHandler();\n }\n return $this->redisHandler->getConnection();\n }",
"public function GetRedisConn() {\n\t\treturn $this->redis_conn;\n\t}",
"public function auth(){\n if(empty($_COOKIE[\"utoken\"])){\n $cookie_value = $this->uuid();\n $this->utoken = $cookie_value;\n $this->setHeader($this->utoken);\n }else{\n $this->utoken = $_COOKIE[\"utoken\"];\n $this->setHeader($this->utoken);\n }\n }",
"public function postAction(){\n global $Redis;\n $account = trim($this->_post('account'));\n //$account = '13723772347';\n $password = trim($this->_post('password'));\n //$password = '111111';\n $keep_login = intval($this->_post('keep_login'));\n //$keep_login = 1;\n //get the possible admin list\n $condition = [\n 'OR'=>[\n \"passport_user_name\" => $account,\n \"passport_email\" => $account,\n \"passport_mobile\" => $account,\n ]\n ];\n $field = ['user_id','password'];\n $user_list = $GLOBALS['r_db']->select(\"user\", $field, $condition);\n\n $user_id = 0;\n foreach($user_list as $item){\n if( password_verify($password,$item['password']) ){\n $user_id = $item['user_id'];\n break;\n }\n }\n\n if( $user_id ){\n $respond_data['status'] = 1;\n $respond_data['msg'] = '登陆成功!';\n cookie($this->passport_name, $_COOKIE[$this->passport_name], time()+$this->passport_expired,'/',$this->root_domain);\n $Redis->set($_COOKIE[$this->passport_name],$user_id,$this->passport_expired);\n if( $keep_login ){\n $passport_kepp_login_expired = intval(Yaf_Application::app()->getConfig()->passport->kepp_login_expired);\n cookie($this->passport_name, $_COOKIE[$this->passport_name], $passport_kepp_login_expired,'/',$this->root_domain);\n $Redis->set($_COOKIE[$this->passport_name],$user_id,$passport_kepp_login_expired);\n }\n }else{\n if( $user_list ){\n $respond_data['status'] = 0;\n $respond_data['msg'] = '账号或密码错误!';\n }else{\n $respond_data['status'] = -1;\n $respond_data['msg'] = '账号不存在!';\n }\n }\n ajaxReturn($respond_data);\n return false;\n }",
"public function broker()\n {\n \treturn Password::broker('users');\n }",
"public function __construct()\n {\n $this->ci =& get_instance();\n\n $this->redis = new Redis();\n\n $this->redis_ip = $this->ci->config->item('redis_ip');\n $this->redis_port = $this->ci->config->item('redis_port');\n $this->redis_ttl = $this->ci->config->item('redis_ttl');\n\n $this->redis->connect($this->redis_ip, $this->redis_port, $this->redis_ttl);\n }",
"function comicjet_db() {\n\treturn new Redis_DB();\n}",
"function auth();",
"public function redis($options=[])\n {\n if(empty($options)) {\n throw new InvalidArgumentException(\"Redis Config Empty\");\n }\n\n if(isset($options[\"prefix\"])) {\n Redis::setPrefix($options[\"prefix\"]);\n }\n return new Redis($options);\n }",
"public function __construct($redis_name)\n {\n $this->redis_name = $redis_name;\n }",
"public static function createConnection($dsn, array $options = array())\n {\n if (0 !== strpos($dsn, 'redis://')) {\n throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with \"redis://\"', $dsn));\n }\n $params = preg_replace_callback('#^redis://(?:([^@]*)@)?#', function ($m) use (&$auth) {\n if (isset($m[1])) {\n $auth = $m[1];\n }\n\n return 'file://';\n }, $dsn);\n if (false === $params = parse_url($params)) {\n throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn));\n }\n if (!isset($params['host']) && !isset($params['path'])) {\n throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn));\n }\n if (isset($params['path']) && preg_match('#/(\\d+)$#', $params['path'], $m)) {\n $params['dbindex'] = $m[1];\n $params['path'] = substr($params['path'], 0, -strlen($m[0]));\n }\n $params += array(\n 'host' => isset($params['host']) ? $params['host'] : $params['path'],\n 'port' => isset($params['host']) ? 6379 : null,\n 'dbindex' => 0,\n );\n if (isset($params['query'])) {\n parse_str($params['query'], $query);\n $params += $query;\n }\n $params += $options + self::$defaultConnectionOptions;\n $class = null === $params['class'] ? (extension_loaded('redis') ? \\Redis::class : \\Predis\\Client::class) : $params['class'];\n\n if (is_a($class, \\Redis::class, true)) {\n $connect = empty($params['persistent']) ? 'connect' : 'pconnect';\n $redis = new $class();\n @$redis->{$connect}($params['host'], $params['port'], $params['timeout'], null, $params['retry_interval']);\n\n if (@!$redis->isConnected()) {\n $e = ($e = error_get_last()) && preg_match('/^Redis::p?connect\\(\\): (.*)/', $e['message'], $e) ? sprintf(' (%s)', $e[1]) : '';\n throw new InvalidArgumentException(sprintf('Redis connection failed%s: %s', $e, $dsn));\n }\n\n if ((null !== $auth && !$redis->auth($auth))\n || ($params['dbindex'] && !$redis->select($params['dbindex']))\n || ($params['read_timeout'] && !$redis->setOption(\\Redis::OPT_READ_TIMEOUT, $params['read_timeout']))\n ) {\n $e = preg_replace('/^ERR /', '', $redis->getLastError());\n throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e, $dsn));\n }\n } elseif (is_a($class, \\Predis\\Client::class, true)) {\n $params['scheme'] = isset($params['host']) ? 'tcp' : 'unix';\n $params['database'] = $params['dbindex'] ?: null;\n $params['password'] = $auth;\n $redis = new $class((new Factory())->create($params));\n } elseif (class_exists($class, false)) {\n throw new InvalidArgumentException(sprintf('\"%s\" is not a subclass of \"Redis\" or \"Predis\\Client\"', $class));\n } else {\n throw new InvalidArgumentException(sprintf('Class \"%s\" does not exist', $class));\n }\n\n return $redis;\n }",
"public function constructor($options) {\n $this->_redis = new Redis($options->databaseConfig->redis);\n }",
"public function __construct(\\Redis $redis)\n {\n $this->redis = $redis;\n $this->connectRedis(ini_get('session.save_path'));\n\n $this->ttl = $this->getSessionMaxLifetime();\n\n $this->lockMaxWait = ini_get('max_execution_time');\n\n if (!$this->lockMaxWait) {\n $this->lockMaxWait = self::DEFAULT_MAX_EXECUTION_TIME;\n }\n }",
"private function setRedis_set($gid, $object){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\t\t$object = json_encode($object);\n $client->set($gid, $object);\n }",
"public function __construct()\n {\n try\n {\n $this->redis = new Redis();\n $this->redis->connect('127.0.0.1', 6379);\n } catch(RedisException $e)\n {\n return $e->getMessage();\n }\n\n $this->redis->delete('prd');\n\n }",
"public function getRedisClient()\n {\n if (empty($this->redisClient)) {\n $this->redisClient = new Client($this->redisParams, $this->redisOptions);\n }\n return $this->redisClient;\n }",
"public function cheat(){\n\t\t$gameId = $this->input->get('gameId');\n\t\t$game = $this->setRedis_info($gameId);\n\t\techo \"<pre>\";\n\t\tprint_r($game['info']);\n\t\techo \"</pre>\";\n\t}",
"public function connect( $db_params = null )\n\t{\n\t\tself::$connection_params = sha1( serialize( $db_params ) );\n\n\t\tif ( !isset( self::$connected_client[self::$connection_params] ) )\n\t\t{\n\t\t\tinclude_once ROOT_PATH . '/libs/'.Config::getInstance()->getLibrary( 'predis' ).'/lib/Predis.php';\n\n\t\t\tif ( empty( $db_params ) )\n\t\t\t{\n\t\t\t\t$db_params = Domains::getInstance()->getParam( 'redis' );\n\t\t\t}\n\t\t\tself::$connected_client[self::$connection_params] = new Predis_Client( $db_params );\n\t\t}\n\n\t\treturn self::$connected_client[self::$connection_params];\n\t\t//return Predis_Client::create( Config::getInstance()->getConfig( 'redis' ) );\n\t}",
"public function index() {\n // return view('child');\n //Redis::set('name','kola');\n echo Redis::get('name');\n }",
"function connectAuth(){\n //$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"auth\");\n $conn = mysqli_connect(\"localhost\",\"lock\", \"yjrlfeybd\", \"i7source_invent\");\n $conn->set_charset(\"utf8\");\n if (!$conn) {\n die(\"Connection failed: \" . mysqli_connect_error());\n }\n return $conn;\n}",
"protected function connect() \n {\n $this->socket = @stream_socket_client(\n $this->host.':'.$this->port,\n $errorNumber,\n $errorDescription,\n $this->timeout ? $this->timeout : ini_get('default_socket_timeout')\n );\n if ($this->socket) {\n if ($this->password!==null) {\n $this->executeCommand('AUTH', array($this->password)); \n }\n $this->executeCommand('SELECT', array($this->db));\n } else {\n throw new Exception(\n 'Failed to connect to redis: '.$errorDescription,\n (int)$errorNumber\n );\n }\n }",
"public function initializeSingle($host = '127.0.0.1', $port = 6379, $options = null) {\n $redisOptions = [\n 'scheme' => 'tcp',\n 'host' => $host,\n 'port' => $port,\n ];\n\n if ($options != null) {\n $redisOptions = array_merge($redisOptions, $options);\n }\n $this->client = new Client($redisOptions);\n }",
"function __construct(Cache $cache) {\n// $client = RedisAdapter::createConnection('redis://localhost');\n// $this->cache = new RedisTagAwareAdapter($client);\n $this->cache = $cache->getCache();\n\n }",
"public function resolveConnection() {\n if ( !is_null($this->redis) ) return $this->redis;\n\n $parameters = $this->parameters ?: getenv('REDIS_URL') ?: 'tcp://127.0.0.1/6379?database=0';\n\n $this->redis = new Client($parameters);\n\n return $this->redis;\n }",
"public function __construct(array $config)\n {\n // We need the redis extension in order to work further so we check this first\n if (!extension_loaded('redis'))\n {\n throw new Exception('Redis PHP extension not loaded but required to use Redis cache class!');\n }\n\n parent::__construct($config);\n\n // Get Configured Servers\n $servers = Arr::get($this->_config, 'servers', NULL);\n if (empty($servers))\n {\n throw new Exception('No Redis servers defined in configuration. Please define at least one.');\n }\n\n // Now instance the redis server and configure it\n $this->_redis = new \\Redis();\n\n // Global cache prefix so the keys in redis is organized\n $cache_prefix = Arr::get($this->_config, 'cache_prefix', NULL);\n $this->_tag_prefix = Arr::get($this->_config, 'tag_prefix', $this->_tag_prefix). ':';\n\n\n foreach($servers as $server)\n {\n // Determine Connection method and connect\n $method = Arr::get($server, 'persistent', FALSE) ? 'pconnect': 'connect';\n $this->_redis->{$method}($server['host'], $server['port'], 1);\n\n // See if there is a password\n $password = Arr::get($server, 'password', NULL);\n if (!empty($password))\n {\n $this->_redis->auth($password);\n }\n\n // Prefix a name space\n $prefix = Arr::get($server, 'prefix', NULL);\n if (!empty($prefix))\n {\n if (!empty($cache_prefix))\n {\n $prefix .= ':'.$cache_prefix;\n }\n\n $prefix .= ':';\n $this->_redis->setOption(\\Redis::OPT_PREFIX, $prefix);\n }\n }\n\n // Tell redis to serialize using php serializer\n $this->_redis->setOption(\\Redis::OPT_SERIALIZER, \\Redis::SERIALIZER_PHP);\n\n }",
"public function getClient()\n\t{\n\t\treturn $this->redisClient;\n\t}",
"public function __construct(RedisFactory $redis)\n {\n $this->redis = $redis;\n }",
"public function __construct(RedisFactory $redis)\n {\n $this->redis = $redis;\n }",
"public function broker()\n {\n return Password::broker('users');\n }",
"public function cli()\n {\n global $redis_server;\n\n if (empty($redis_server)) {\n # Attempt to automatically load Pantheon's Redis config from the env.\n if (isset($_SERVER['CACHE_HOST'])) {\n $redis_server = [\n 'host' => $_SERVER['CACHE_HOST'],\n 'port' => $_SERVER['CACHE_PORT'],\n 'auth' => $_SERVER['CACHE_PASSWORD'],\n ];\n } else {\n $redis_server = [\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ];\n }\n }\n\n if (!isset($redis_server['database'])) {\n $redis_server['database'] = 0;\n }\n\n $cmd = WP_CLI\\Utils\\esc_cmd('redis-cli -h \"%s\" -p \"%s\" -a \"%s\" -n \"%d\"', $redis_server['host'], $redis_server['port'], $redis_server['auth'], $redis_server['database']);\n WP_CLI::launch($cmd);\n\n }",
"public function test() {\n Sys::app()->redis()->lPush('t2', json_encode(['userPk' => 11, 'title' => 'ok', 'time' => 11111111]));\n }",
"function auth($login, $password){\n\tif (is_null($password)) {\n\t\treturn null;\n\t}\n\t$link = mysqli_connect(USERS_DB_ADRESS, USERS_DB_LOGIN, USERS_DB_PASSWORD, USERS_DB_NAME)\n\t or die('cannot connect: ' . mysqli_error($link));\n\t$stmt = mysqli_prepare($link, 'SELECT id, pass, salt, worker from USERS where login = ? and system = 0');\n\tmysqli_stmt_bind_param($stmt, \"s\", $login);\n\t$result = mysqli_stmt_execute($stmt) or die('request failed: ' . mysqli_error($link));\n\tif (!$result) {\n\t\tmysqli_stmt_close($stmt);\n\t\tmysqli_close($link);\n\t\treturn null;\n\t}\n\tmysqli_stmt_bind_result($stmt, $id, $dbpass, $salt, $worker);\n\t$found = mysqli_stmt_fetch($stmt);\n\tmysqli_stmt_close($stmt);\n\tif ($found && $dbpass == hash(\"sha256\", ($salt .$password)) ) {\n\t\t$session = createSession($id);\n\t\treturn array(\"session\" => $session, \"id\" => $id, \"worker\" => $worker);\n\t}\n\tmysqli_close($link);\n\treturn null;\n}",
"public function __construct($redis, $options = array(), $prefix = 'session')\n {\n $this->redis = $redis;\n $this->ttl = isset($options['lifetime']) ? (int) $options['lifetime'] : 0;\n $this->prefix = $prefix;\n\n parent::__construct($options);\n }",
"public function auth()\n\t{\n\t\t$r = $this->do_auth();\n\t\t$x['status'] = $r;\n\t\techo json_encode($x);die;\n\t}",
"public function __construct()\n {\n throw new Exception(\"RedisClient should not be constructed.\");\n }",
"public function index($qq)\n {\n //\n// config(['app.cipher' => 'AES-128-CBC']);\n// config(['app.key'=>'base64:QUNqWnZNS1o4YnlvVEVEUQ==']);\n $value = config('database.redis.options.prefix');\n $time = time();\n $return = json_encode([$qq,$time]);\n $returns[]=['token'=>Crypt::encryptString($return)];\n $returns[]=['cipher'=>$value];\n return $this->jsonResponse($returns);\n }",
"public function broker()\n {\n return Password::broker('organizers');\n }",
"function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function GetConnectedInstance()\n {\n static $predis = null;\n\n if ($predis === null) {\n Predis\\Autoloader::register();\n $predis = new Predis\\Client('tcp://kong.idlemonkeys.net:6379');\n }\n \n return $predis;\n }",
"public function pusherauthenticate($id) {\n if ( Auth::user()->id === (int) $id ) {\n $pusher = new Pusher(env('PUSHER_APP_KEY'), env('PUSHER_APP_SECRET'), env('PUSHER_APP_ID'));\n echo $pusher->socket_auth($_POST['channel_name'], $_POST['socket_id']);\n } else {\n header('', true, 403);\n echo \"Forbidden\";\n }\n }",
"public function testBasics() {\n\t\t$redis = $this->getConnection();\n\t\t$mutex1 = new ARedisMutex(\"TestMutex2:\".uniqid(),$redis);\n\t\t$mutex2 = new ARedisMutex($mutex1->name,$redis);\n\t\t$mutex1->expiresAfter = 2;\n\t\t$mutex2->expiresAfter = 2;\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$this->assertFalse($mutex2->lock());\n\t\t$this->assertFalse($mutex2->unlock());\n\t\t$this->assertTrue($mutex1->unlock());\n\t\t$this->assertTrue($mutex2->lock());\n\t\tsleep(3);\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$this->assertTrue($mutex1->unlock());\n\t}",
"public function uniqueVia()\n {\n return Cache::driver('redis');\n }",
"public function handle()\n {\n $loop = Factory::create();\n $factory = new \\Clue\\React\\Redis\\Factory($loop);\n $client = $factory->createLazyClient('redis://localhost:6379');\n// $client->set('greeting',\"hello\");\n// $client->append('greeting','!');\n//\n// $client->get('greeting')->then(function($greeting){\n// \\Log::error($greeting);\n// });\n\n $client->publish('greeting', 'msg');\n\n// $client->end();\n $loop->run();\n }",
"public function register()\n {\n if (!extension_loaded('redis')) {\n return null;\n }\n\n $this->app->singleton('redis', function () {\n\n $config = \\Config::parse('redis', [\n 'host' => '127.0.0.1',\n 'port' => 6379,\n 'connect' => 'persistence',\n 'auth' => ''\n ]);\n\n $redis = new Redis;\n\n if ($config['connect'] == 'persistence') {\n $redis->pconnect($config['host'], $config['port']);\n }\n\n if(empty($config['connect']) || $config['connect'] != 'persistence') {\n $redis->connect($config['host'], $config['port']);\n }\n\n if (isset($config['auth'])) {\n $redis->auth($config['auth']);\n }\n\n $redis->setOption(Redis::OPT_PREFIX, isset($config['prefix']) ? $config['prefix'] : '');\n\n return $redis;\n });\n }",
"public static function instance($redis_group = 'default')\r\n {\r\n if ( !isset(Redis_Client::$_instance[$redis_group]))\r\n {\r\n Redis_Client::$_instance[$redis_group] = new Redis_Client($redis_group = 'default');\r\n }\r\n\r\n return Redis_Client::$_instance[$redis_group]->_redis;\r\n }",
"public function redis($endpoint = 'default', $as='storage')\n {\n if($as === 'storage')\n {\n $className = '\\Redis\\RedisMultiStorage';\n }\n else if($as === 'cache')\n {\n $className = '\\Redis\\RedisMultiCache';\n }\n else\n {\n throw new \\Db\\Exception('Redis instance can only be \"as\" \"cache\" or \"storage\".');\n }\n return $className::getInstance($endpoint);\n }",
"public function broker()\n {\n return Password::broker('admins');\n }",
"public function broker()\n\t{\n\t\treturn Password::broker('admins');\n\t}",
"private function userExists($username){ return $this->redis->exists($username);\n }",
"abstract protected function auth();",
"private function setRedis_create($gid, $utoken, $nick, $matrix, $words, $info){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\n $body = ['gameId'=>$gid, 'players'=>[$utoken], 'matrix'=>$matrix, 'words_found'=>[], 'players_nick'=>[$utoken=>$nick], 'info'=>$info,\n\t\t\t\t\t\t 'words'=>$words, 'status'=>'waiting', 'current_player'=>$utoken, 'scores'=>[$utoken=>0], 'turn_seq'=>[$utoken], 'last_played'=>'',\n\t\t\t\t\t 'admin'=>$utoken];\n\t\t$body = json_encode($body);\n $client->set($gid, $body);\n }",
"public function __construct() {\n\t\tlog_message('debug', \"Redis_session Class Initialized\");\n\t\t\n\t\t$instance =& get_instance();\n\t\tforeach (array('sess_save_handler', 'sess_server', 'sess_cookie_name', 'sess_expiration', 'flash_key') as $key) {\n\t\t\t$instance->config->item($key) && $this->$key = $instance->config->item($key);\n\t\t}\n\n\t\tif (!is_array(reset($this->sess_server))) {\n\t\t\t$this->sess_server = array($this->sess_server);\n\t\t}\n\t\tif ($this->sess_expiration == 0) {\n\t\t\t$this->sess_expiration = (60*60*24*14);\n\t\t}\n\n\t\t$this->_sess_run();\n\t}",
"function auth_dosen($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM member_dosen WHERE nip='$username' AND password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}",
"public function redis_version()\n {\n return $this->redis_version;\n }",
"public function __construct(Redis $redis, $connection = null)\n {\n $this->redis = $redis;\n $this->connection = $connection;\n }",
"function auth_mahasiswa($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM member WHERE nim='$username' AND password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}",
"function auth_admin($username,$password){\n $query=$this->db->query(\"SELECT * FROM t_adminpii WHERE username='$username' AND password=md5('$password') LIMIT 1\");\n return $query;\n }",
"function auth(){\n\t\t//TODO auth implementieren\n\t\treturn true;\n\t}",
"public function setAuth($username, $password);",
"public function auth($username, $password)\n {\n\n }",
"public function __construct($host='127.0.0.1', $port=6379, $db=0) \n {\n $this->host = $host;\n $this->port = $port;\n $this->db = $db;\n }",
"protected function connect(array & $resource) {\r\n\t\t$server = $resource ['server'];\r\n\t\t$redis = $resource ['resource'];\r\n\t\tif ($resource ['persistent_id'] !== '') {\r\n\t\t\t// connect or reuse persistent connection\r\n\t\t\t$success = $redis->pconnect ( $server ['host'], $server ['port'], $server ['timeout'], $server ['persistend_id'] );\r\n\t\t} elseif ($server ['port']) {\r\n\t\t\t$success = $redis->connect ( $server ['host'], $server ['port'], $server ['timeout'] );\r\n\t\t} elseif ($server ['timeout']) {\r\n\t\t\t// connect through unix domain socket\r\n\t\t\t$success = $redis->connect ( $server ['host'], $server ['timeout'] );\r\n\t\t} else {\r\n\t\t\t$success = $redis->connect ( $server ['host'] );\r\n\t\t}\r\n\t\t\r\n\t\tif (! $success) {\r\n\t\t\tthrow new Exception\\RuntimeException ( 'Could not estabilish connection with Redis instance' );\r\n\t\t}\r\n\t\t\r\n\t\t$resource ['initialized'] = true;\r\n\t\tif ($resource ['password']) {\r\n\t\t\t$redis->auth ( $resource ['password'] );\r\n\t\t}\r\n\t\t$redis->select ( $resource ['database'] );\r\n\t}",
"public function broker()\n {\n return Password::broker('affiliates');\n }",
"public function __construct()\n {\n // auth here\n }",
"public function __construct($redis, array $options = array(), $prefix = 'session', $locking = true, $spinLockWait = 150000)\n {\n $this->redis = $redis;\n $this->ttl = isset($options['gc_maxlifetime']) ? (int) $options['gc_maxlifetime'] : 0;\n if (isset($options['cookie_lifetime']) && $options['cookie_lifetime'] > $this->ttl) {\n $this->ttl = (int) $options['cookie_lifetime'];\n }\n $this->prefix = $prefix;\n\n $this->locking = $locking;\n $this->locked = false;\n $this->lockKey = null;\n $this->spinLockWait = $spinLockWait;\n $this->lockMaxWait = ini_get('max_execution_time');\n if (!$this->lockMaxWait) {\n $this->lockMaxWait = self::DEFAULT_MAX_EXECUTION_TIME;\n }\n }",
"public function broker()\n {\n return Password::broker();\n }",
"function auth($username,$password)\r\n{\r\n $user = getUserByUsername($username);\r\n if($user){\r\n //return $user[4] == md5($password);\r\n return $user[5] == $password;\r\n\r\n }\r\n}",
"function auth($user, $key) {\n\tglobal $mgmtd;\n\t$sql = \"SELECT \t`mgmt`.`user_pw`, \n\t\t\t\t\t`mgmt`.`user_id`, \n\t\t\t\t\t`mgmt`.`user_username`, \n\t\t\t\t\t`mgmt`.`user_email` \n\t\t\tFROM \t`mgmt`.`user` \n\t\t\tWHERE \t`mgmt`.`user_pw` = '$key' \n\t\t\tLIMIT \t1;\";\n\tif ( $r = $mgmtd->query($sql) ) {\n\t\tif ( $r->num_rows == 1 ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}"
] | [
"0.6625169",
"0.6509125",
"0.6494901",
"0.6472493",
"0.64011395",
"0.63011533",
"0.621293",
"0.6199747",
"0.6158703",
"0.5988137",
"0.592838",
"0.59199363",
"0.5885519",
"0.5865095",
"0.582647",
"0.58195305",
"0.58094",
"0.5808195",
"0.5797825",
"0.5794965",
"0.57631713",
"0.57122636",
"0.5689094",
"0.5650304",
"0.5569077",
"0.55421954",
"0.55421954",
"0.5530749",
"0.5523907",
"0.55197835",
"0.54919255",
"0.5491101",
"0.548734",
"0.54764134",
"0.5470346",
"0.54323703",
"0.540224",
"0.53940904",
"0.5375633",
"0.537147",
"0.53482735",
"0.53480035",
"0.5340776",
"0.5330489",
"0.5299946",
"0.52883226",
"0.5285191",
"0.5259156",
"0.51916265",
"0.5175763",
"0.51515955",
"0.5142774",
"0.5132906",
"0.511626",
"0.51098955",
"0.51071227",
"0.5076295",
"0.5069301",
"0.50541276",
"0.5037343",
"0.5037343",
"0.50300497",
"0.499971",
"0.4998721",
"0.4988589",
"0.49593413",
"0.49583292",
"0.4958036",
"0.49506813",
"0.49479866",
"0.49426696",
"0.49392",
"0.49373564",
"0.49339774",
"0.49322504",
"0.49313742",
"0.49176168",
"0.4906648",
"0.4905257",
"0.48932767",
"0.48744896",
"0.48635554",
"0.48548824",
"0.48504454",
"0.48487446",
"0.4846482",
"0.48266724",
"0.48213097",
"0.48067334",
"0.48016313",
"0.4792719",
"0.47844666",
"0.47812572",
"0.4779433",
"0.47787452",
"0.4778257",
"0.47656196",
"0.47603342",
"0.4754967",
"0.4753198",
"0.47456747"
] | 0.0 | -1 |
The bindings are needed for this test. | protected function getPackageProviders($app)
{
return ['Apitizer\ServiceProvider'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bindings();",
"private function registerBindings()\n {\n foreach($this->bindings as $key => $val)\n {\n $this->app->bind($key, $val);\n }\n }",
"public function testTestBindings(): void\n {\n $testCase = new LaravelServiceProviderTestCaseStub(\n [\n ApplyFuzzinessInterface::class => ApplyFuzziness::class,\n stdClass::class => stdClass::class,\n 'string' => stdClass::class,\n ],\n ServiceProviderStub::class\n );\n\n $testCase->testBindings();\n\n // If no exceptions occurred we're great.\n $this->addToAssertionCount(1);\n }",
"public function bindings()\n {\n $this->_injector->bindImplementation(\n 'Horde_Kolab_FreeBusy_Factory', $this->_factory\n );\n $this->_injector->bindFactory(\n 'Horde_Routes_Mapper', $this->_factory, 'createMapper'\n );\n $this->_injector->bindFactory(\n 'Horde_Kolab_FreeBusy_Controller_RequestConfiguration',\n $this->_factory,\n 'createRequestConfiguration'\n );\n $this->_injector->bindFactory(\n 'Horde_Controller_Request', $this->_factory, 'createRequest'\n );\n $this->_injector->bindFactory(\n 'Horde_View_Base', $this->_factory, 'createView'\n );\n $this->_injector->bindFactory(\n 'Horde_Controller_ResponseWriter',\n $this->_factory,\n 'createResponseWriter'\n );\n $this->_injector->bindFactory(\n 'Horde_Log_Logger', $this->_factory, 'createLogger'\n );\n $this->_injector->bindFactory(\n 'Horde_Kolab_FreeBusy_User', $this->_factory, 'createUser'\n );\n $this->_injector->bindFactory(\n 'Horde_Kolab_FreeBusy_Owner', $this->_factory, 'createOwner'\n );\n $this->_injector->bindFactory(\n 'Horde_Kolab_FreeBusy_Resource', $this->_factory, 'createResource'\n );\n $this->_injector->bindFactory(\n 'Horde_Kolab_FreeBusy_Provider', $this->_factory, 'createProvider'\n );\n }",
"protected function get_bindings(): array {\n\t\treturn [];\n\t}",
"public function setup(array $bindings) : void\n {\n $this->bindings->merge($bindings);\n }",
"protected function buildBindings(): void\n {\n $this->bindings = $this->fieldValueSet->getBoundValues();\n }",
"public function getBindings();",
"protected function setRepositoryBindings()\n\t{\n\t\t$this->aliases = $this->app['config']['app.aliases'];\n\n\t\t// Set the items being bound\n\t\t$bindings = ['Comment', 'Goal', 'Plan', 'Stat'];\n\n\t\tforeach ($bindings as $binding)\n\t\t{\n\t\t\t$this->bindRepository($binding);\n\t\t}\n\t}",
"public function getBindings(): array;",
"public static function getBindings(){\n //Method inherited from \\Illuminate\\Container\\Container \n return \\Illuminate\\Foundation\\Application::getBindings();\n }",
"protected static function bind() {}",
"public function bind(array $bindings);",
"private function registerBinding()\n {\n /**\n * bind Tax Repository to its Eloquent implementation\n */\n $this->app->bind(\n \\Innovate\\Repositories\\Tax\\TaxContract::class,\n \\Innovate\\Repositories\\Tax\\EloquentTaxRepository::class\n );\n /**\n * bind BankTransferInfoContract to its elquent implementation EloquentBankTransferInfoRepository\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\BankTransferInfoContract::class,\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\EloquentBankTransferInfoRepository::class\n );\n\n /**\n *\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\CheckOutAgreementContract::class,\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\EloquentCheckOutAgreementRepository::class\n );\n\n $this->eavAttributeBindings();\n $this->eavAttributeCategoryBindings();\n }",
"protected function bindings()\n\t{\n\t\t$this->app->singleton('anodyne', function ($app) {\n\t\t\treturn new \\App\\Anodyne;\n\t\t});\n\n\t\t// Bind the avatar class into the container\n\t\t$this->app->bind('avatar', function ($app) {\n\t\t\treturn new \\App\\Avatar;\n\t\t});\n\n\t\t// Bind the flash notifier class into the container\n\t\t$this->app->bind('flash', function ($app) {\n\t\t\treturn new \\App\\FlashNotifier;\n\t\t});\n\t}",
"protected function registerBaseBindings()\n {\n $this->container->bind(\n \\Lib\\Contracts\\Http\\Kernel::class,\n \\Lib\\Http\\Kernel::class\n );\n\n $this->container->bind(\n \\Lib\\Contracts\\Support\\Config::class,\n \\Lib\\Support\\Config::class\n );\n }",
"public function getBinds(): array;",
"protected function bind()\n {\n if (!isset($this->di)) {\n return false;\n }\n foreach ($this->di as $contract => $object) {\n $this->app->bind($contract, $object);\n }\n }",
"protected function registerBindings(Collection $bindings)\n {\n $bindings->each(function ($concretion, $abstraction) {\n $this->app->bind($abstraction, $concretion);\n });\n }",
"public function prepareBindings(array $bindings);",
"public function bindings(): array\n {\n return $this->bindings;\n }",
"public function __construct($bindings)\n {\n $this->bindings = $bindings;\n }",
"public function getBind();",
"public function getBindings(): array\n {\n return $this->bindings;\n }",
"public function registerBindings() {\n $this->app->bind(\n 'App\\Repositories\\Backend\\Course\\CourseContract',\n 'App\\Repositories\\Backend\\Course\\EloquentCourseRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Course\\CourseContract',\n 'App\\Repositories\\Frontend\\Course\\EloquentCourseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\CourseContent\\CourseContentContract',\n 'App\\Repositories\\Backend\\CourseContent\\EloquentCourseContentRepository'\n );\n }",
"private function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance(self::class, $this);\n\n $this->singleton('config', \\config\\Repository::class);\n }",
"public function registerBindings() {\n $this->app->bind(\n 'App\\Repositories\\Backend\\Slider\\SliderContract',\n 'App\\Repositories\\Backend\\Slider\\EloquentSliderRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Slider\\SliderContract',\n 'App\\Repositories\\Frontend\\Slider\\EloquentSliderRepository'\n );\n }",
"public function isBound()\n {\n $this->assertTrue($this->app->bound('laravelflutterwave'));\n }",
"public static function prepareBindings(array $bindings)\n {\n }",
"public function getBindings()\n {\n return $this->bindings;\n }",
"public function getBindings()\n {\n return $this->bindings;\n }",
"public function testAddBindingAcceptsDuplicates()\n {\n // case, multiple modules may define the same binding but the order\n // in which the modules is loaded is important. Hence if we load\n // [m1, m2, m3] and m1 and m3 contain the same binding, we cannot simply\n // discard one of the bindings, since the order might be important for\n // the end user.\n\n $binding = new StringBinding('string', Foo::clazz);\n\n $discovery = $this->createDiscovery();\n $discovery->addBindingType(new BindingType(Foo::clazz, self::STRING_BINDING));\n $discovery->addBinding($binding);\n $discovery->addBinding($binding);\n\n $discovery = $this->loadDiscoveryFromStorage($discovery);\n\n $this->assertCount(2, $discovery->findBindings(Foo::clazz));\n $this->assertCount(2, $discovery->getBindings());\n }",
"public function addBindings(array $bindings)\n {\n $this->bindlings = array_merge_recursive($this->bindlings, $bindings);\n }",
"function create_binding() {\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$result = $conn->db->query(\"SELECT OLT_ID from OLT_IP_POOLS where OLT_ID = '$this->olt_id'\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t\twhile ($row = $result->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\tif ($row[\"OLT_ID\"])\r\n\t\t\t\t$error = (\"ERROR: THIS OLT have been ASSIGNED pool ALREADY, Please remove any existing bindings and try to create again!\");\r\n\t\t\t\treturn $error;\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$result = $conn->db->query(\"INSERT INTO OLT_IP_POOLS (OLT_ID, IP_POOL_ID) VALUES ('$this->olt_id', '$this->id')\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t}",
"public function setUp()\n {\n $this->object = new BindParamBuilder();\n }",
"protected function registerDatabaseBindings()\n {\n $this->singleton('db', function () {\n $this->register(\\App\\Providers\\DatabaseServiceProvider::class);\n return $this->make('db');\n });\n }",
"public function provides()\n {\n return array_keys($this->getBindings());\n }",
"private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }",
"protected function registerBaseBindings()\n {\n $container = $this->getContainer();\n\n $container->share(Parser::class, Parser::class);\n }",
"protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n }",
"protected function registerBindings()\n {\n // bind the manager class.\n $this->app->bind(Contracts\\Token\\Manager::class, Manager::class);\n\n // bind the guard class.\n $this->app->bind(Contracts\\Auth\\Guard::class, Guard::class);\n }",
"protected function registerBindings()\n {\n $this->app->bind(\n \\LaravelFlare\\Flare\\Contracts\\Permissions\\Permissionable::class,\n \\Flare::config('permissions')\n );\n }",
"private function registerDefaultEventSourcingBindings() : void\n {\n $this->app->bind(\n AggregateFactory::class,\n PublicConstructorAggregateFactory::class\n );\n\n $this->app->bind(\n Serializer::class,\n SimpleInterfaceSerializer::class\n );\n\n $this->app->singleton(\n EventBus::class,\n SimpleEventBus::class\n );\n }",
"protected function registerBaseBindings() \n {\n static::setInstance($this);\n \n $this->instance('app', $this);\n $this->instance('config', $this[\\Syscodes\\Components\\Config\\Configure::class]);\n }",
"protected function bindExchangesAndQueues()\n {\n $exchanges = static::getConfigurations()['exchanges'];\n\n if (count($exchanges)) {\n\n foreach ($exchanges as $exchangeName => $details) {\n\n foreach ($details['queues'] as $queueName => $routingKeys) {\n\n // bind with routing key.\n if (count($routingKeys)) {\n\n foreach ($routingKeys as $routingKey) {\n $this->node->queue_bind($queueName, $exchangeName, $routingKey);\n }\n\n continue;\n }\n\n // Bind without routing key.\n $this->node->queue_bind($queueName, $exchangeName);\n }\n }\n }\n }",
"public function testTestBindingsEmptyProvider(): void\n {\n $testCase = new LaravelServiceProviderTestCaseStub(\n [],\n EmptyServiceProviderStub::class\n );\n\n $testCase->testBindings();\n\n // If no exceptions occurred we're great.\n $this->addToAssertionCount(1);\n }",
"protected function bindContracts()\n {\n $dir = dirname((new ReflectionClass(get_called_class()))->getFileName());\n $configPath = $dir . '/../resources/config/config.php';\n if (!file_exists($configPath)) {\n return false;\n }\n if (empty($di = require $configPath)) {\n return false;\n }\n\n foreach (array_get($di, 'di', []) as $contract => $class) {\n $this->app->bind($contract, $class);\n }\n }",
"public function registerBindings() {\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\Exam\\ExamContract',\n 'App\\Repositories\\Backend\\Exam\\EloquentExamRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\Group\\GroupContract',\n 'App\\Repositories\\Backend\\Group\\EloquentGroupRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\GroupQuestion\\GroupQuestionContract',\n 'App\\Repositories\\Backend\\GroupQuestion\\EloquentGroupQuestionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\ExamCourse\\ExamCourseContract',\n 'App\\Repositories\\Backend\\ExamCourse\\EloquentExamCourseRepository'\n );\n\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Exam\\ExamContract',\n 'App\\Repositories\\Frontend\\Exam\\EloquentExamRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Question\\QuestionContract',\n 'App\\Repositories\\Frontend\\Question\\EloquentQuestionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Execution\\ExecutionContract',\n 'App\\Repositories\\Frontend\\Execution\\EloquentExecutionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\QuestionsExecution\\QuestionsExecutionContract',\n 'App\\Repositories\\Frontend\\QuestionsExecution\\EloquentQuestionsExecutionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\AnswersExecution\\AnswersExecutionContract',\n 'App\\Repositories\\Frontend\\AnswersExecution\\EloquentAnswersExecutionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Subject\\SubjectContract',\n 'App\\Repositories\\Frontend\\Subject\\EloquentSubjectRepository'\n );\n }",
"protected function registerDefaultBindings() {\n\n\t\t// Add the instance of this application.\n\t\t$this->instance( 'app', $this );\n\n\t\t// Adds the directory path for the framework.\n\t//\t$this->instance( 'path', untrailingslashit( plugin_dir_path( __DIR__ ) ) );\n\t//\t$this->instance( 'uri', untrailingslashit( plugin_dir_url( __DIR__ ) ) );\n\n\t\t// Add the version for the framework.\n\t\t$this->instance( 'version', static::VERSION );\n\t}",
"private function bindFacades()\n {\n foreach ($this->facades as $name => $facade) {\n app()->bind($name, function () use ($facade) {\n return new $facade;\n });\n }\n }",
"function bind($bindings_a,$bindings_b,$arg_list_b) {\n\n // return a list of conjuncts that \n\n if (count($arg_list_b) > 0) {\n\n $arg_b = array_shift($arg_list_b);\n\n if (isset($bindings_a[$arg_b])) {\n\n $val = $bindings_a[$arg_b];\n\n if (isset($bindings_b[$arg_b])) {\n\n\tif ($bindings_b[$arg_b] != $val) {\n\t // binding failed.\n\t return \"FAIL\";\n\t}\n }\n else {\n\t$bindings_b[$arg_b] = $val;\n }\n }\n // do rest of $arg_list_b.\n return bind($bindings_a,$bindings_b,$arg_list_b);\n }\n return $bindings_b;\n}",
"protected function registerApplicationsBaseBindings(): void\n {\n static::setInstance($this);\n\n $this->instance('application', $this);\n $this->instance('container', $this);\n }",
"protected function bindClasses()\n {\n $this->app->bind(FileLoader::class, LaravelFileLoader::class);\n $this->app->bind(Importer::class, DatabaseImporter::class);\n $this->app->bind(Exporter::class, FileExporter::class);\n }",
"private function bindImplementations(): void\n {\n $this->app->bind(RestaurantRepositoryInterface::class, function () {\n return new FileRestaurantRepository(\n storage_path('data/restaurants.json'), Restaurant::class\n );\n });\n\n $this->app->bind(UserFavoriteRestaurantRepositoryInterface::class, function () {\n return new FileUserFavoriteRestaurantRepository(\n storage_path('data/user_favorite_restaurants.json'), UserFavoriteRestaurant::class\n );\n });\n }",
"protected function registerConfigBindings()\n {\n $this->singleton('config', function () {\n return new ConfigRepository;\n });\n }",
"protected function registerModelBindings()\n {\n $this->app->bind('AuzoToolsPermissionRegistrar', config('auzoTools.registrar'));\n $this->app->bind('GenerateAbilities', GenerateAbilities::class);\n }",
"public function getBoundVariables() {}",
"protected function registerDatabaseBindingsConfig()\n {\n if(file_exists($this->basePath(\"config.php\"))){\n $mysql = require_once $this->basePath(\"config.php\");\n $this->make('config')->set(\"database.connections.mysql\",$mysql);\n \n }\n }",
"public function setup() {}",
"private function setup()\r\n\t{ }",
"public function setup()\n {\n }",
"public function setup()\n {\n }",
"public function setup()\n {\n }",
"public function setup()\n {\n }",
"protected function prepareRealTestEnvironment() {}",
"public function testBind(): void\n {\n $request = new Request([]);\n\n $this->assertFalse($request->isComplexQuery());\n\n $this->assertNotNull($request->bind('banana', static function () {\n return 'strawberry';\n }));\n }",
"public function getAllBindings(): array\n {\n return array_merge(\n array_values($this->sockets),\n array_values($this->streams),\n array_values($this->signals),\n array_values($this->timers)\n );\n }",
"public function get_binds(){\n\t\treturn $this->binds;\n\t}",
"public function register()\n {\n foreach ($this->bindings as $abstract => $concrete) {\n $this->app->bind($abstract, $concrete);\n }\n }",
"public function registerBindings() {\n //Admin\n $this->app->bind(\n 'App\\Repositories\\Admin\\AdminUser\\AdminUserRepository',\n 'App\\Repositories\\Admin\\AdminUser\\EloquentAdminUserRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Admin\\User\\UserRepository',\n 'App\\Repositories\\Admin\\User\\EloquentUserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Role\\RoleRepository',\n 'App\\Repositories\\Admin\\Role\\EloquentRoleRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PermissionGroup\\PermissionGroupRepository',\n 'App\\Repositories\\Admin\\PermissionGroup\\EloquentPermissionGroupRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Permission\\PermissionRepository',\n 'App\\Repositories\\Admin\\Permission\\EloquentPermissionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Role\\RoleRepository',\n 'App\\Repositories\\Admin\\Role\\EloquentRoleRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Menu\\MenuRepository',\n 'App\\Repositories\\Admin\\Menu\\EloquentMenuRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Member\\MemberRepository',\n 'App\\Repositories\\Admin\\Member\\EloquentMemberRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Passenger\\PassengerRepository',\n 'App\\Repositories\\Admin\\Passenger\\EloquentPassengerRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Driver\\DriverRepository',\n 'App\\Repositories\\Admin\\Driver\\EloquentDriverRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Merchant\\MerchantRepository',\n 'App\\Repositories\\Admin\\Merchant\\EloquentMerchantRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Address\\AddressRepository',\n 'App\\Repositories\\Admin\\Address\\EloquentAddressRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\CommonTask\\CommonTaskRepository',\n 'App\\Repositories\\Admin\\CommonTask\\EloquentCommonTaskRepository'\n );\n\n// $this->app->bind(\n// 'App\\Repositories\\Admin\\Notification\\NotificationRepository',\n// 'App\\Repositories\\Admin\\Notification\\EloquentNotificationRepository'\n// );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Dashboard\\DashboardRepository',\n 'App\\Repositories\\Admin\\Dashboard\\EloquentDashboardRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Approve\\ApproveRepository',\n 'App\\Repositories\\Admin\\Approve\\EloquentApproveRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\VehicleType\\VehicleTypeRepository',\n 'App\\Repositories\\Admin\\VehicleType\\EloquentVehicleTypeRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Vehicle\\VehicleRepository',\n 'App\\Repositories\\Admin\\Vehicle\\EloquentVehicleRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Setting\\SettingRepository',\n 'App\\Repositories\\Admin\\Setting\\EloquentSettingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PushNotification\\PushNotificationRepository',\n 'App\\Repositories\\Admin\\PushNotification\\EloquentPushNotificationRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PaymentMethod\\PaymentMethodRepository',\n 'App\\Repositories\\Admin\\PaymentMethod\\EloquentPaymentMethodRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Trip\\TripRepository',\n 'App\\Repositories\\Admin\\Trip\\EloquentTripRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PromoCode\\PromoCodeRepository',\n 'App\\Repositories\\Admin\\PromoCode\\EloquentPromoCodeRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Report\\ReportRepository',\n 'App\\Repositories\\Admin\\Report\\EloquentReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\DriverReport\\DriverReportRepository',\n 'App\\Repositories\\Admin\\DriverReport\\EloquentDriverReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PassengerReport\\PassengerReportRepository',\n 'App\\Repositories\\Admin\\PassengerReport\\EloquentPassengerReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\WeekSettle\\WeekSettleRepository',\n 'App\\Repositories\\Admin\\WeekSettle\\EloquentWeekSettleRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\Accounts\\AccountsRepository',\n 'App\\Repositories\\Admin\\Accounts\\EloquentAccountsRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\MerchantReport\\MerchantReportRepository',\n 'App\\Repositories\\Admin\\MerchantReport\\EloquentMerchantReportRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\Emap\\EmapRepository',\n 'App\\Repositories\\Admin\\Emap\\EloquentEmapRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\Quest\\QuestRepository',\n 'App\\Repositories\\Admin\\Quest\\EloquentQuestRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\VehicleMake\\VehicleMakeRepository',\n 'App\\Repositories\\Admin\\VehicleMake\\EloquentVehicleMakeRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\VehicleModel\\VehicleModelRepository',\n 'App\\Repositories\\Admin\\VehicleModel\\EloquentVehicleModelRepository'\n );\n \n $this->app->bind(\n 'App\\Repositories\\Admin\\VehicleRegistrationCity\\VehicleRegistrationCityRepository',\n 'App\\Repositories\\Admin\\VehicleRegistrationCity\\EloquentVehicleRegistrationCityRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Agent\\AgentRepository',\n 'App\\Repositories\\Admin\\Agent\\EloquentAgentRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Company\\CompanyRepository',\n 'App\\Repositories\\Admin\\Company\\EloquentCompanyRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\BookingTripRequest\\BookingTripRequestRepository',\n 'App\\Repositories\\Admin\\BookingTripRequest\\EloquentBookingTripRequestRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\FcmNotification\\FcmNotificationRepository',\n 'App\\Repositories\\Admin\\FcmNotification\\EloquentFcmNotificationRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Feedback\\FeedbackRepository',\n 'App\\Repositories\\Admin\\Feedback\\EloquentFeedbackRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\AgentAccounts\\AgentAccountsRepository',\n 'App\\Repositories\\Admin\\AgentAccounts\\EloquentAgentAccountsRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\LocationPin\\LocationPinRepository',\n 'App\\Repositories\\Admin\\LocationPin\\EloquentLocationPinRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\CustomerQuery\\CustomerQueryRepository',\n 'App\\Repositories\\Admin\\CustomerQuery\\EloquentCustomerQueryRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PartnerCompanies\\PartnerCompaniesRepository',\n 'App\\Repositories\\Admin\\PartnerCompanies\\EloquentPartnerCompaniesRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PartnerCategory\\PartnerCategoryRepository',\n 'App\\Repositories\\Admin\\PartnerCategory\\EloquentPartnerCategoryRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\SystemSettings\\SystemSettingsRepository',\n 'App\\Repositories\\Admin\\SystemSettings\\EloquentSystemSettingsRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Merchant\\MerchantRepository',\n 'App\\Repositories\\Admin\\Merchant\\EloquentMerchantRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Plans\\PlansRepository',\n 'App\\Repositories\\Admin\\Plans\\EloquentPlansRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\PlansAssign\\PlansAssignRepository',\n 'App\\Repositories\\Admin\\PlansAssign\\EloquentPlansAssignRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\CourierZones\\CourierZonesRepository',\n 'App\\Repositories\\Admin\\CourierZones\\EloquentCourierZonesRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Category\\CategoryRepository',\n 'App\\Repositories\\Admin\\Category\\EloquentCategoryRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Delivery\\DeliveryRepository',\n 'App\\Repositories\\Admin\\Delivery\\EloquentDeliveryRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Collected\\CollectedRepository',\n 'App\\Repositories\\Admin\\Collected\\EloquentCollectedRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Stores\\StoresRepository',\n 'App\\Repositories\\Admin\\Stores\\EloquentStoresRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Product\\ProductRepository',\n 'App\\Repositories\\Admin\\Product\\EloquentProductRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Invoice\\InvoiceRepository',\n 'App\\Repositories\\Admin\\Invoice\\EloquentInvoiceRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Hub\\HubRepository',\n 'App\\Repositories\\Admin\\Hub\\EloquentHubRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Notification\\NotificationRepository',\n 'App\\Repositories\\Admin\\Notification\\EloquentNotificationRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Admin\\Expense\\ExpenseRepository',\n 'App\\Repositories\\Admin\\Expense\\EloquentExpenseRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Admin\\FinancialStatement\\FinancialStatementRepository',\n 'App\\Repositories\\Admin\\FinancialStatement\\EloquentFinancialStatementRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Admin\\FCMNotification\\FCMNotificationRepository',\n 'App\\Repositories\\Admin\\FCMNotification\\EloquentFCMNotificationRepository'\n );\n }",
"private function prepareForDB(&$bindings) { //$this ndak berubah, cuma $bindings untuk preparedStatements yang berubah isinyo.\n foreach ($bindings as $k=>$v) if (gettype($v) == \"boolean\") $bindings[$k] = ($v) ? 'true' : '0';\n foreach (static::jsonColumns() as $col) { if (isset($bindings[$col])) $bindings[$col] = json_encode($bindings[$col]); }\n }",
"protected function setUp(): void\n {\n $this->container = new Container();\n $this->appBuilder = new ConsoleApplicationBuilder($this->container);\n $this->input = new Input('foo');\n $this->container->bindInstance(IServiceResolver::class, $this->container);\n $this->container->bindInstance(Input::class, $this->input);\n $this->container->bindInstance(IOutput::class, $this->createMock(IOutput::class));\n }",
"protected function setup(){\n }",
"public function registerRepositoryBindings()\n {\n $this->app->bind('LucaDegasperi\\OAuth2Server\\Repositories\\FluentClient', function ($app) {\n\n $limitClientsToGrants = $app['config']->get('oauth2-server-laravel::oauth2.limit_clients_to_grants');\n return new FluentClient($limitClientsToGrants);\n });\n\n $this->app->bind('LucaDegasperi\\OAuth2Server\\Repositories\\FluentScope', function ($app) {\n\n $limitClientsToScopes = $app['config']->get('oauth2-server-laravel::oauth2.limit_clients_to_scopes');\n $limitScopesToGrants = $app['config']->get('oauth2-server-laravel::oauth2.limit_scopes_to_grants');\n\n return new FluentScope($limitClientsToScopes, $limitScopesToGrants);\n });\n }",
"public function setup()\n {\n // Create our dependencies (test doubles)\n\n // Define test double for PDO\n\n // Define test double for PDOStatement\n\n }",
"public function testBindFunction()\n {\n $randomBoolean = (random_int(0, 1) == 0) ? true : false;\n $randomInt = random_int(1, PHP_INT_MAX);\n $randomString = $this->generateRandomString(10);\n $typesToTest = array(\n PDO::PARAM_INT => $randomInt,\n PDO::PARAM_BOOL => $randomBoolean,\n PDO::PARAM_NULL => null,\n PDO::PARAM_STR => $randomString\n );\n\n $this->database->query(\"SELECT * FROM users WHERE username = (:user)\");\n\n foreach ($typesToTest as $keyType => $type) {\n $typeToAssert = $this->database->bind(':user', $type);\n\n $this->assertEquals($keyType, $typeToAssert);\n }\n }",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"public function setup()\n {\n //\n // we need to make sure that it is empty at the start of every\n // test\n InvokeMethod::onString(AllMatchingTypesList::class, 'resetCache');\n }",
"public function register()\n {\n foreach ($this->simpleBindings as $contract => $service) {\n $this->app->bind($contract, $service);\n }\n }",
"protected function registerRouteBindings()\n {\n //\n }",
"public function setup() {\n\t}",
"public function requires();",
"public function setup()\n {\n }",
"public function setup()\n {\n }",
"protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new ScoringResource($container);\n \n }",
"protected function bindPathsInContainer(): void\n {\n $this->instance('path.base', $this->basePath());\n\n foreach ($this->getApplicationDirectoreis() as $path) {\n $this->instance('path.' . $path, $this->basePath($path));\n }\n }",
"public function bindVariables() {\n foreach($this->response as $key => $val) {\n $this->response_source->bindVariable($key, $val);\n }\n }",
"function getBindVariableName() ;",
"protected function bindPathsInContainer()\n {\n $this->instance('path', $this->path());\n $this->instance('path.base', $this->basePath());\n $this->instance('path.config', $this->configPath());\n $this->instance('path.public', $this->publicPath());\n $this->instance('path.storage', $this->storagePath());\n $this->instance('path.database', $this->databasePath());\n $this->instance('path.resources', $this->resourcePath());\n }",
"protected function registerCustomBindings(): void\n {\n $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);\n\n foreach (config('laravel_entity_services.bindings') as $className => $entityService) {\n $entityServiceFactory->register($className, $entityService);\n }\n }",
"public function setup()\n\t{\n\t\t// we don't do anything here in the base class\n\t}",
"public function getBackendsToTest()\n {\n return array(\n 'file' => array('file'),\n 'database' => array('database'),\n );\n }",
"public function countAllBindings(): int\n {\n return\n count($this->sockets) +\n count($this->streams) +\n count($this->signals) +\n count($this->timers);\n }",
"public function setUp()\n {\n // Create a new Laravel container instance.\n $container = new Container;\n\n // Resolve the pricing calculator (and any type hinted dependencies)\n // and set to class attribute.\n $this->priceHolder = $container->make('PAMH\\\\PriceHolder');\n }",
"protected function setUp()\n {\n if ($this->obj instanceof PHP_CompatInfo_Reference) {\n $this->ref = $this->obj->getAll();\n }\n if (isset($this->ref['extensions'])) {\n foreach ($this->ref['extensions'] as $extname => $opt) {\n if (!extension_loaded($extname)) {\n $this->markTestSkipped(\n \"The '$extname' extension is not available.\"\n );\n }\n }\n }\n }",
"public function getBindVariableName() {}",
"protected function registerComposerBindings()\n {\n $this->singleton('composer', function ($app) {\n return new Composer($app->make('files'), $this->basePath());\n });\n }",
"private function setBindings(array $bindings): void\n\t{\n\t\tEntityBinding::normalizeEntityBindings($this->boundEntityTypeId, $bindings);\n\t\tEntityBinding::removeBindingsWithDuplicatingEntityIDs($this->boundEntityTypeId, $bindings);\n\n\t\t$bindingsCollection = $this->getBindingsCollection();\n\t\t$currentBindings = $bindingsCollection ? $this->bindingsCollectionToArray($bindingsCollection) : [];\n\n\t\t[$add, $update, $delete] = $this->separateBindingsByOperation($currentBindings, $bindings);\n\n\t\t$this->addBindings($add);\n\n\t\t// may be bindings collection was created in entityObject while we were adding new bindings to it\n\t\t$bindingsCollection = $bindingsCollection ? $bindingsCollection : $this->getBindingsCollection();\n\t\tif ($bindingsCollection)\n\t\t{\n\t\t\t$this->updateBindings($bindingsCollection, $update);\n\t\t\t$this->deleteBindings($bindingsCollection, $delete);\n\t\t}\n\n\t\tif (!$bindingsCollection || count($bindingsCollection) <= 0)\n\t\t{\n\t\t\tif ($this->fieldNameMap->isSingleIdFilled())\n\t\t\t{\n\t\t\t\t$this->entityObject->set($this->fieldNameMap->getSingleId(), 0);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t$idOfPrimaryBoundEntity = $this->ensureExactlyOnePrimaryBoundEntityExists($bindingsCollection, $bindings);\n\n\t\tif ($this->fieldNameMap->isSingleIdFilled())\n\t\t{\n\t\t\t$this->entityObject->set($this->fieldNameMap->getSingleId(), $idOfPrimaryBoundEntity);\n\t\t}\n\t}",
"public function setUp()\n {\n $this->_standardLib = new \\App\\OOProgramming\\StandardLibrary;\n $this->_daughter = new \\App\\OOProgramming\\Daughter;\n }",
"public function getBindings()\n {\n $bindings = [];\n\n // We will run through all the bindings and pluck out\n // the component (select, where, etc.)\n foreach ($this->bindings as $component => $binding) {\n if (!empty($binding)) {\n // For every binding there could be multiple\n // values set so we need to add all of them as\n // flat $key => $value item in our $bindings.\n foreach ($binding as $key => $value) {\n $bindings[$key] = $value;\n }\n }\n }\n\n return $bindings;\n }",
"private function setupFacades()\n {\n $this->app->bind('discord-api', function($app) {\n return $app->make(\\App\\Services\\DiscordApi::class);\n });\n\n $this->app->bind('guilds', function($app) {\n return $app->make(\\App\\Support\\Guilds::class);\n });\n }"
] | [
"0.7384024",
"0.6702766",
"0.6649531",
"0.64682204",
"0.6443739",
"0.6443081",
"0.64036846",
"0.6370931",
"0.6334543",
"0.6319543",
"0.628482",
"0.62079275",
"0.6154054",
"0.6132692",
"0.60701877",
"0.6022271",
"0.6020229",
"0.6005124",
"0.59704155",
"0.594596",
"0.59448373",
"0.5923856",
"0.5922044",
"0.5902271",
"0.5897166",
"0.58610183",
"0.5859004",
"0.5845155",
"0.58426297",
"0.584027",
"0.584027",
"0.58298373",
"0.57906467",
"0.5777242",
"0.57100147",
"0.5704652",
"0.56980026",
"0.5669986",
"0.56636",
"0.5662681",
"0.56376386",
"0.5637085",
"0.56310564",
"0.56211233",
"0.5619254",
"0.5617473",
"0.55943537",
"0.55742645",
"0.55342674",
"0.55324787",
"0.55014986",
"0.55002517",
"0.54858583",
"0.5484642",
"0.5461674",
"0.54553825",
"0.54434615",
"0.5418019",
"0.5416186",
"0.53981584",
"0.53840226",
"0.53840226",
"0.53840226",
"0.53840226",
"0.53535604",
"0.53421736",
"0.53012925",
"0.5284201",
"0.52797556",
"0.5276335",
"0.52742714",
"0.5245592",
"0.5236513",
"0.52241015",
"0.52111524",
"0.52105635",
"0.52060854",
"0.52058315",
"0.52052087",
"0.51936513",
"0.51862097",
"0.5181161",
"0.51611596",
"0.51611596",
"0.51473856",
"0.51427543",
"0.51407504",
"0.5127191",
"0.51172054",
"0.51144356",
"0.5107808",
"0.51041013",
"0.5102943",
"0.5099124",
"0.5098032",
"0.50943446",
"0.50647336",
"0.50635475",
"0.5053768",
"0.504508",
"0.5041881"
] | 0.0 | -1 |
Create an http status exception which isnt 200 | public static function createHttpStatus($messageBody = 'Internal Error', $httpCode = self::CODE_HTTP_INTERNAL_ERROR, $resource = null, $previous = null){
$exp = new Exception($messageBody, self::CODE_PRETTY_HTTP_STATUS, $previous);
$exp->setHttpCode($httpCode);
$exp->setWebResource($resource);
return $exp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testImportRawHttpResponseWithADifferentStatusCode()\n {\n $this->testImportingRawHttpResponseString(array('status' => 201));\n }",
"public static function httpStatusException($message)\n {\n return new self($message, self::HTTP_STATUS_EXCEPTION);\n }",
"function statusCode()\n {\n }",
"public function testRespondMethodThrowsExceptionIfGivenInvalidStatusCode()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->responseBuilder->respond($status = 200);\n }",
"public function testSettingStatusOnCreation()\n {\n $response = new Response(array('status' => 404));\n $this->assertEquals(404, $response->getStatus());\n }",
"function getStatusCode();",
"function getHTTPCode() {\n\n return 500;\n\n }",
"public function getStatusCode() {}",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"function throw_exception($message,$statusCode = 1004)\n {\n throw new \\think\\exception\\HttpException($statusCode,$message);\n }",
"public function status_code()\n {\n }",
"public static function error($status,$message){\r\n throw new \\Luracast\\Restler\\RestException($status, $message);\r\n }",
"public function badRequestResponse(){\n $this->response->statusCode(400);\n return $this->response;\n }",
"public function testHttpExceptionPresenter() :void\n {\n $e = new HttpException(500);\n $response = (new HttpExceptionPresenter($e))->response();\n $expected = [[\n 'status' => 500,\n 'title' => 'An unknown error has occurred'\n ]];\n\n $this->assertEquals($expected, $response);\n }",
"private function createBadRequestResponse(): Response\n {\n return new Response(\n $this->getStatusTextForResponseCode(Response::HTTP_BAD_REQUEST),\n Response::HTTP_BAD_REQUEST\n );\n }",
"public static function unexpected(): self\n {\n return new self(299, 200);\n }",
"public static function GenericError() : self{\n\t\treturn new Response('Generic Error', -2, true);\n\t}",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public static function getStatusCode(): int;",
"private function getMockResponseWithInvalidStatusCode()\n {\n $response = $this->getBaseMockResponse();\n\n $apiRawResponse = <<<JSON\n{\n \"data\": {\n \"global_hash\": \"900913\",\n \"hash\": \"ze6poY\",\n \"long_url\": \"http://www.google.com/\",\n \"new_hash\": 0,\n \"url\": \"http://bit.ly/ze6poY\"\n },\n \"status_code\": 500,\n \"status_txt\": \"KO\"\n}\nJSON;\n\n $response\n ->expects($this->once())\n ->method('getBody')\n ->will($this->returnValue($apiRawResponse));\n\n return $response;\n }",
"public static function clientError(): self\n {\n return new self(400, 499);\n }",
"public function getStatusCode()\n {\n }",
"public function http(HttpResponseException $ex);",
"protected function generateHttpError(int $errorCode = 404): void\n {\n\t\t$content =\n '<h1>' .\n $errorCode .\n ' ' .\n Response::$statusTexts[$errorCode] .\n '</h1>';\n\n\t\tResponse::create($content, $errorCode)->send();\n\t\texit();\n\t}",
"public function error(int $status, $message = null, array $headers = []): ResponseInterface;",
"function http_throw($code = 404)\n{\n ob_start();\n\n include(__DIR__ . '/../Exceptions/404/404.html');\n $contents = ob_get_clean();\n\n http_response_code($code);\n\n echo $contents;\n}",
"protected function statusCodeFail(): int\n {\n return 401;\n }",
"function http_get_response_code_error($code)\n\t{\n\t\t$errors = array(\n\t\t200 => 'Success - The request was successful',\n\t\t201 => 'Created (Success) - The request was successful. The requested object/resource was created.',\n\t\t400 => 'Invalid Request - There are many possible causes for this error, but most commonly there is a problem with the structure or content of XML your application provided. Carefully review your XML. One simple test approach is to perform a GET on a URI and use the GET response as an input to a PUT for the same resource. With minor modifications, the input can be used for a POST as well.',\n\t\t401 => 'Unauthorized - This is an authentication problem. Primary reason is that the API call has either not provided a valid API Key, Account Owner Name and Associated Password or the API call attempted to access a resource (URI) which does not match the same as the Account Owner provided in the login credientials.',\n\t\t404 => 'URL Not Found - The URI which was provided was incorrect. Compare the URI you provided with the documented URIs. Start here.',\n\t\t409 => 'Conflict - There is a problem with the action you are trying to perform. Commonly, you are trying to \"Create\" (POST) a resource which already exists such as a Contact List or Email Address that already exists. In general, if a resource already exists, an application can \"Update\" the resource with a \"PUT\" request for that resource.',\n\t\t415 => 'Unsupported Media Type - The Media Type (Content Type) of the data you are sending does not match the expected Content Type for the specific action you are performing on the specific Resource you are acting on. Often this is due to an error in the content-type you define for your HTTP invocation (GET, PUT, POST). You will also get this error message if you are invoking a method (PUT, POST, DELETE) which is not supported for the Resource (URI) you are referencing.\n\t\tTo understand which methods are supported for each resource, and which content-type is expected, see the documentation for that Resource.',\n\t\t500 => 'Server Error',\n\t\t);\n\n\t\tif(array_key_exists($code, $errors)):\n\t\t\treturn $errors[$code];\n\t\tendif;\n\n\t\treturn '';\n\t}",
"public function cant_create_with_wrong_status()\n {\n $project = factory(Project::class)->raw(['status' => $this->faker->word]);\n $this->post('/api/projects', $project)->assertStatus(422)->assertJsonStructure([\n 'errors' => [\n 'status',\n ],\n ]);\n }",
"function HTTPFailWithCode($code,$message)\n{\n\theader(reasonForCode($code));\n\texit($message);\n}",
"public function testStatusDefaultsTo200OnCreation()\n {\n $response = new Response();\n $this->assertEquals(200, $response->getStatus());\n }",
"public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }",
"protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}",
"private function exceptionWithResponseCode($code, $message) {\n $this->httpResponseCode = $code;\n throw new \\Exception($message);\n }",
"function http_send_status($status) {}",
"private function createStatusErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->statusErrors = new stdClass();\n $response->statusErrors->error = new stdClass();\n $response->statusErrors->error->_ = 'Order could not be found with the given key.';\n $response->statusErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }",
"public function youCanOmitStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $meta = [\n 'foo' => 'bar'\n ];\n\n // Act...\n $response = $this->responder->success( $fruit, $meta );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertContains( $meta, $response->getData( true ) );\n }",
"function ReturnServerError()\n{\n header('HTTP/1.1 500 Internal Server Error');\n die(\"A server error occured while saving your request.\\r\\nPlease check our API status page at http://status.prybar.io and try again later\");\n}",
"private function fail() {\n\t\theader('HTTP/1.1 400 BAD REQUEST');\n\t\tdie('400 BAD REQUEST');\n\t}",
"public function testShortenThrowsExceptionIfApiResponseHasInvalidStatusCode()\n {\n $provider = new BitlyProvider($this->getMockClientFactory($this->getMockResponseWithInvalidStatusCode()), $this->getMockAuthentication());\n $provider->shorten($this->getBaseMockLink());\n }",
"public function getErrorStatusCode(): int\n {\n return 403;\n }",
"public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }",
"public function test_receive_throwsBadResponseStatus_ifBadStatus()\n\t{\n\t\t$this->setExpectedException('Jstewmc\\\\Api\\\\Exception\\\\BadResponseStatus');\n\t\t\n\t\t$this->url->getQuery()->setParameter('code', 301);\n\t\t\n\t\t(new Client())\n\t\t\t->send(new Request\\Get((string) $this->url))\n\t\t\t->receive(new Response\\Json());\n\t\t\n\t\treturn;\n\t}",
"function errorMessage($status, $message)\n {\n return response([\n 'status' => $status,\n 'message' => $message\n ]);\n }",
"public function testCreateUnsuccessfulReason()\n {\n }",
"function invalidMethodResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Bad method given\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}",
"public function getHttpStatusCode();",
"private function create404()\n {\n $this->response->setStatusCode(404);\n\n $url = $this->request->originalUrl ?: $this->request->getUrl();\n $escaper = new Escaper();\n $message = sprintf(\n \"Cannot %s %s\\n\",\n $escaper->escapeHtml($this->request->getMethod()),\n $escaper->escapeHtml((string) $url)\n );\n $this->response->end($message);\n }",
"static public function Status($code, $message = null) {\n return new Net_HTTP_Status($code, $message);\n }",
"function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }",
"function throw_user_error($error_code, $error_text) {\n http_response_code($error_code);\n echo $error_text;\n exit;\n}",
"public function getHTTPStatusCode() { return $this->status; }",
"public static function throwRequestNotFoundException()\n {\n return Response::json([\n 'message' => 'Your request could not be found try again'\n ], 300);\n }",
"function status_header($code = 200) {\n $message = [\n 200 => \"OK\",\n 404 => \"Page not found\",\n 302 => \"Moved temporarily\",\n 303 => \"Something something\",\n 500 => \"Server error\"\n ];\n header(\"HTTP/1.0 \".$code.\" \".$message[$code]);\n}",
"function respondWithError($message, $httpCode = 500) {\n header('Content-Type: application/json');\n http_response_code($httpCode);\n $json = json_encode([\n 'ok' => false,\n 'error' => $message,\n ], JSON_PRETTY_PRINT);\n echo $json;\n exit();\n}",
"public static function send_http_error( $data )\n {\n \\HttpResponse::status( 400 );\n \\HttpResponse::setContentType( 'application/json' ); \n \\HttpResponse::setData( $data );\n \\HttpResponse::send();\n }",
"public function createNotFoundResponse()\n {\n return $this->createErrorResponse('Not found', 404);\n }",
"public function getStatusCode(){\n return $this->httpResponseCode;\n }",
"function http_status_code($code, $message = \"\") {\n\n if (!empty($code)) {\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n \n // Append the content if not empty\n if (!empty($message)) $message = \" - \" . $message;\n\n header($protocol . ' ' . $code . ' ' . $text . \"$message\");\n\n $GLOBALS['http_status_code'] = $code;\n\n } else {\n\n $code = (isset($GLOBALS['http_status_code']) ? $GLOBALS['http_status_code'] : 200);\n\n }\n\n // We must kill the requisition\n die($code);\n }",
"public static function dataValidationFailed($status, $message, $code){\n\n throw new \\yii\\web\\HttpException($status, $message, $code);\n }",
"public function throw()\n {\n $response = new JsonResponse($this->getResponse(), $this->code);\n\n die($response->send());\n }",
"public function create()\n {\n return response(null, 404);\n }",
"public function youCanPassInStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit, 201 );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 201 );\n }",
"public function uriError()\n {\n header(\"HTTP/1.0 404\");\n exit();\n }",
"public function testApiError()\n {\n $this->client->shouldReceive('send')->once()->andReturn(\n new Response(200, [], file_get_contents(__DIR__ . '/../Fixtures/access-denied.json'))\n );\n\n $this->expectException(PushwooshException::class);\n $this->expectExceptionMessage('Access denied or application not found');\n\n $this->pushwoosh->createMessage(\n new PushwooshPendingMessage($this->pushwoosh)\n );\n }",
"public function __construct()\n {\n return response([],400);\n }",
"function httpError($code, $message = null, $die = true, $only_headers = false) {\n if($message === null) {\n $errors = array(\n 100 => \"HTTP/1.1 100 Continue\",\n 101 => \"HTTP/1.1 101 Switching Protocols\",\n 200 => \"HTTP/1.1 200 OK\",\n 201 => \"HTTP/1.1 201 Created\",\n 202 => \"HTTP/1.1 202 Accepted\",\n 203 => \"HTTP/1.1 203 Non-Authoritative Information\",\n 204 => \"HTTP/1.1 204 No Content\",\n 205 => \"HTTP/1.1 205 Reset Content\",\n 206 => \"HTTP/1.1 206 Partial Content\",\n 300 => \"HTTP/1.1 300 Multiple Choices\",\n 301 => \"HTTP/1.1 301 Moved Permanently\",\n 302 => \"HTTP/1.1 302 Found\",\n 303 => \"HTTP/1.1 303 See Other\",\n 304 => \"HTTP/1.1 304 Not Modified\",\n 305 => \"HTTP/1.1 305 Use Proxy\",\n 307 => \"HTTP/1.1 307 Temporary Redirect\",\n 400 => \"HTTP/1.1 400 Bad Request\",\n 401 => \"HTTP/1.1 401 Unauthorized\",\n 402 => \"HTTP/1.1 402 Payment Required\",\n 403 => \"HTTP/1.1 403 Forbidden\",\n 404 => \"HTTP/1.1 404 Not Found\",\n 405 => \"HTTP/1.1 405 Method Not Allowed\",\n 406 => \"HTTP/1.1 406 Not Acceptable\",\n 407 => \"HTTP/1.1 407 Proxy Authentication Required\",\n 408 => \"HTTP/1.1 408 Request Time-out\",\n 409 => \"HTTP/1.1 409 Conflict\",\n 410 => \"HTTP/1.1 410 Gone\",\n 411 => \"HTTP/1.1 411 Length Required\",\n 412 => \"HTTP/1.1 412 Precondition Failed\",\n 413 => \"HTTP/1.1 413 Request Entity Too Large\",\n 414 => \"HTTP/1.1 414 Request-URI Too Large\",\n 415 => \"HTTP/1.1 415 Unsupported Media Type\",\n 416 => \"HTTP/1.1 416 Requested range not satisfiable\",\n 417 => \"HTTP/1.1 417 Expectation Failed\",\n 500 => \"HTTP/1.1 500 Internal Server Error\",\n 501 => \"HTTP/1.1 501 Not Implemented\",\n 502 => \"HTTP/1.1 502 Bad Gateway\",\n 503 => \"HTTP/1.1 503 Service Unavailable\",\n 504 => \"HTTP/1.1 504 Gateway Time-out\" \n );\n \n $message = array_var($errors, $code);\n if(trim($message) == '') {\n $message = 'Unknown';\n } // if\n } // if\n \n header(\"HTTP/1.1 $code $message\");\n print '<h1>' . clean($message) . '</h1>';\n \n if($die) {\n die();\n } // if\n }",
"public function test_send_returnsSelf_ifStatusIsBad()\n\t{\n\t\t$this->url->getQuery()->setParameter('code', 301);\n\t\t\n\t\t$request = new Request\\Get((string) $this->url);\n\t\t\n\t\t$client = new Client();\n\t\t\n\t\t$this->assertSame($client, $client->send($request));\n\t\t\n\t\treturn;\n\t}",
"private function notFoundResponse(){\n \n $response['status_code_header'] = 'HTTP/1.1 404 Not Found';\n $response['body'] = null;\n return $response;\n }",
"private function unprocessableResponse() {\r\n $response['status_code_header'] = HTTP_UNPROCESSABLE;\r\n $response['body'] = json_encode([\r\n 'error' => 'Invalid input'\r\n ]);\r\n\r\n return $response;\r\n }",
"public function testWithExpectedExceptionHttpServer(): void\n {\n $this->get('/tests_apps/throw_exception');\n $this->assertResponseCode(500);\n }",
"function bad_request() {\n\treturn show_template('400');\n}",
"public static function invalidResponse($url, $statusCode)\n {\n return new static(sprintf('An error occured while fetching %s (status code: %s).', $url, $statusCode));\n }",
"public static function error_response() {\r\n header(\"HTTP/1.1 404 Recurso no encontrado\");\r\n exit();\r\n }",
"public function getResponseCode()\n {\n return 200;\n }",
"public function error400()\n {\n }",
"public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }",
"static function send_http_status($code) {\n\t\tstatic $_status = array(\n\t\t// Informational 1xx\n\t\t100 => 'Continue',\n\t\t101 => 'Switching Protocols',\n\n\t\t// Success 2xx\n\t\t200 => 'OK',\n\t\t201 => 'Created',\n\t\t202 => 'Accepted',\n\t\t203 => 'Non-Authoritative Information',\n\t\t204 => 'No Content',\n\t\t205 => 'Reset Content',\n\t\t206 => 'Partial Content',\n\n\t\t// Redirection 3xx\n\t\t300 => 'Multiple Choices',\n\t\t301 => 'Moved Permanently',\n\t\t302 => 'Found', // 1.1\n\t\t303 => 'See Other',\n\t\t304 => 'Not Modified',\n\t\t305 => 'Use Proxy',\n\t\t// 306 is deprecated but reserved\n\t\t307 => 'Temporary Redirect',\n\n\t\t// Client Error 4xx\n\t\t400 => 'Bad Request',\n\t\t401 => 'Unauthorized',\n\t\t402 => 'Payment Required',\n\t\t403 => 'Forbidden',\n\t\t404 => 'Not Found',\n\t\t405 => 'Method Not Allowed',\n\t\t406 => 'Not Acceptable',\n\t\t407 => 'Proxy Authentication Required',\n\t\t408 => 'Request Timeout',\n\t\t409 => 'Conflict',\n\t\t410 => 'Gone',\n\t\t411 => 'Length Required',\n\t\t412 => 'Precondition Failed',\n\t\t413 => 'Request Entity Too Large',\n\t\t414 => 'Request-URI Too Long',\n\t\t415 => 'Unsupported Media Type',\n\t\t416 => 'Requested Range Not Satisfiable',\n\t\t417 => 'Expectation Failed',\n\n\t\t// Server Error 5xx\n\t\t500 => 'Internal Server Error',\n\t\t501 => 'Not Implemented',\n\t\t502 => 'Bad Gateway',\n\t\t503 => 'Service Unavailable',\n\t\t504 => 'Gateway Timeout',\n\t\t505 => 'HTTP Version Not Supported',\n\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(array_key_exists($code,$_status)) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}",
"public static function getStatus() {\n\t\treturn http_response_code();\n\t}",
"public static function status400($data=null) {\n\t\tself::response($data,400);\n\t}",
"public function getStatusError($code = false)\n {\n switch ($code) {\n case 204:\n return 204;\n break;\n case 400: //Bad Request\n return 400;\n break;\n case 401:\n return 401;\n break;\n case 403:\n return 403;\n break;\n case 404:\n return 404;\n break;\n case 502:\n return 502;\n break;\n case 504:\n return 504;\n break;\n default:\n return 500;\n break;\n }\n }",
"function getHttpStatus();",
"function missingParamToPostResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Missing params to post.\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}",
"public static function buildInternalServerErrorResponse(): static\n {\n $dto = new static();\n $dto->setCode(Response::HTTP_INTERNAL_SERVER_ERROR);\n $dto->setSuccess(false);\n\n return $dto;\n }",
"protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }",
"function problemResponse(string $message = null, int $status_code = null, Request $request = null, Exception $trace = null)\n{\n $code = ($status_code != null) ? $status_code : '';\n $traceMsg = empty($trace) ? null : $trace->getMessage();\n $traceTrace = empty($trace) ? null : $trace->getTrace();\n\n $body = [\n 'msg' => $message,\n 'code' => $code,\n 'success' => false,\n 'error_debug' => empty($trace) ? null : $trace->getMessage()\n ];\n\n // if (!is_null($request)) {\n // \tsave_log($request, $body);\n // \tif ($code == Constants::SERVER_ERR_CODE && !is_null($trace)) {\n // \t\t$message = 'URL : ' . $request->fullUrl() .\n // \t\t\t'<br /> METHOD: ' . $request->method() .\n // \t\t\t'<br /> DATA_PARAM: ' . json_encode($request->all()) .\n // \t\t\t'<br /> RESPONSE: ' . json_encode($body) .\n // \t\t\t'<br /> Trace Message: ' . $traceMsg .\n // \t\t\t'<br /> <b> Trace: ' . json_encode($traceTrace) . \"</b>\";\n\n // \t\t$logable = ['server_error' => $message];\n // \t\tMeta::newException($logable);\n // \t}\n // }\n\n return response()->json($body)->setStatusCode($code);\n}",
"function setErrorHeader($message){\n\thttp_response_code(404);\n\theader('Content-Type: application/json');\n\techo $message;\n}",
"public static function error($message, $statusCode)\n {\n throw new HttpException($statusCode, $message);\n }"
] | [
"0.69780296",
"0.6932899",
"0.6788924",
"0.6677328",
"0.6641902",
"0.65888387",
"0.65841997",
"0.65726036",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.64832515",
"0.6481767",
"0.64634776",
"0.64490855",
"0.6446592",
"0.6444558",
"0.64247483",
"0.6421474",
"0.64169514",
"0.6390551",
"0.6390551",
"0.6390551",
"0.6390551",
"0.6390025",
"0.63853085",
"0.6383389",
"0.63779366",
"0.63595045",
"0.6351516",
"0.6333842",
"0.6329312",
"0.6303987",
"0.6292694",
"0.6290324",
"0.6281296",
"0.6274188",
"0.6265706",
"0.6245855",
"0.6242249",
"0.623503",
"0.6233801",
"0.6213348",
"0.6204966",
"0.62024194",
"0.6178919",
"0.61775327",
"0.61770916",
"0.6177037",
"0.6175937",
"0.6174475",
"0.61725587",
"0.61663854",
"0.61599964",
"0.61580104",
"0.6155458",
"0.6146387",
"0.61342865",
"0.6131655",
"0.6125353",
"0.61229897",
"0.6117926",
"0.6110342",
"0.6109307",
"0.6108651",
"0.6085856",
"0.6082472",
"0.60636246",
"0.60623306",
"0.6059284",
"0.60582536",
"0.60546726",
"0.6054191",
"0.6051942",
"0.6049332",
"0.60380226",
"0.6032768",
"0.6029264",
"0.6018798",
"0.6010856",
"0.6009316",
"0.5984461",
"0.59842247",
"0.59662694",
"0.59662044",
"0.59590554",
"0.5957564",
"0.595213",
"0.5951504",
"0.5942823",
"0.5936831",
"0.5932216",
"0.5930158",
"0.5922122"
] | 0.6573051 | 7 |
Set http status code | public function setHttpCode($code) {
$this->httpCode = $code;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setStatusCode($code);",
"public function setStatusCode($status);",
"public function setStatusCode($code)\r\n {\r\n http_response_code($code);\r\n }",
"protected function setHTTPstatus($code)\n {\n $realCode = Response::$statusTexts;\n\n if (isset($realCode[$code])) {\n $this->HTTPstatus = $code;\n }\n }",
"protected function set_status( $code ) {\n\t\tstatus_header( $code );\n\t}",
"protected function setHttpCode(Int $code = 200)\n {\n http_response_code($code);\n }",
"private function setStatusCode()\n {\n $this->status_code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);\n }",
"private function setStatus(int $httpStatusCode): void\n {\n $this->statusCode = $httpStatusCode;\n }",
"public function setStatusCode($statusCode);",
"public function setStatus(int $code): void\n {\n http_response_code($code);\n }",
"protected function set_status($code)\n {\n }",
"public function setStatusCode($code)\n {\n $this->statusCode = $code;\n }",
"public function setStatusCode($value)\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] \n = $value;\n }",
"protected function setStatusCode($code)\n {\n $this->statusCode = (int) $code;\n }",
"public function set_status($code)\n {\n }",
"public function set_status($code)\n {\n }",
"public function setHttpStatus(int $http_status): void\n {\n $this->http_status = $http_status;\n }",
"protected static function setStatusCode($code)\n {\n return self::$statusCode = $code;\n\n }",
"public function setStatusCode($code, $text);",
"public static function status(int $httpCode = null)\n {\n if ($httpCode === null) return self::$httpCode;\n self::$httpCode = $httpCode;\n }",
"private function _setHttpResponseHeader($code = null) {\n\t\t$httpCode = $this->controller->response->httpCodes($code);\n\t\tif ($httpCode[$code]) {\n\t\t\t$this->controller->response->statusCode($code);\n\t\t} else {\n\t\t\t$this->controller->response->statusCode(500);\n\t\t\t$code = 500;\n\t\t}\n\t}",
"public function setResponseStatus($status) {}",
"function set_status_header(int $p_code = 200, string $p_text = '') {\n if (flcCommon::is_cli()) {\n return;\n }\n\n /* if (empty($p_code) or !is_numeric($p_code)) {\n $p_text = 'Status code must be numeric';\n $p_code = 500;\n }*/\n\n if (empty($p_text)) {\n is_int($p_code) or $p_code = (int)$p_code;\n\n if (isset(self::$status_codes[$p_code])) {\n $p_text = self::$status_codes[$p_code];\n } else {\n $p_text = '(null)';\n $p_code = 500;\n }\n }\n\n if (strpos(PHP_SAPI, 'cgi') === 0) {\n header('Status: '.$p_code.' '.$p_text, true);\n } else {\n header($this->get_protocol_version().' '.$p_code.' '.$p_text, true, $p_code);\n }\n }",
"public function status($code)\n {\n $this['response']->setStatus($code);\n }",
"function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }",
"function statusCode()\n {\n }",
"public function setResponseCode($code) {}",
"public function status_code()\n {\n }",
"function setStatusCode($code,$message = null){\n\t\tif(preg_match('/^([0-9]{3}) (.+)/',$code,$matches)){\n\t\t\t$code = $matches[1];\n\t\t\t$message = $matches[2];\n\t\t}\n\n\t\tsettype($code,\"integer\");\n\t\t$this->_StatusCode_Redefined = true;\n\t\t$this->_StatusCode = $code;\n\t\t$this->_StatusMessage = $message;\n\t}",
"public function setResponseCode(HttpStatusCode|int|null $code = 200): void\n {\n $codeObject = $code;\n\n if (!$codeObject)\n {\n return;\n }\n\n if (is_int($code))\n {\n $codeObject = HttpStatus::fromInt($code);\n }\n\n http_response_code($codeObject->code);\n }",
"public function status(int $code);",
"public function setStatusCode(int $statusCode): void\n {\n $this->statusCode = $statusCode;\n }",
"static function set_status_header($code = 200, $text = '')\n\t{\n\t\t$stati = array(\n\t\t\t\t\t\t200\t=> 'OK',\n\t\t\t\t\t\t201\t=> 'Created',\n\t\t\t\t\t\t202\t=> 'Accepted',\n\t\t\t\t\t\t203\t=> 'Non-Authoritative Information',\n\t\t\t\t\t\t204\t=> 'No Content',\n\t\t\t\t\t\t205\t=> 'Reset Content',\n\t\t\t\t\t\t206\t=> 'Partial Content',\n\n\t\t\t\t\t\t300\t=> 'Multiple Choices',\n\t\t\t\t\t\t301\t=> 'Moved Permanently',\n\t\t\t\t\t\t302\t=> 'Found',\n\t\t\t\t\t\t304\t=> 'Not Modified',\n\t\t\t\t\t\t305\t=> 'Use Proxy',\n\t\t\t\t\t\t307\t=> 'Temporary Redirect',\n\n\t\t\t\t\t\t400\t=> 'Bad Request',\n\t\t\t\t\t\t401\t=> 'Unauthorized',\n\t\t\t\t\t\t403\t=> 'Forbidden',\n\t\t\t\t\t\t404\t=> 'Not Found',\n\t\t\t\t\t\t405\t=> 'Method Not Allowed',\n\t\t\t\t\t\t406\t=> 'Not Acceptable',\n\t\t\t\t\t\t407\t=> 'Proxy Authentication Required',\n\t\t\t\t\t\t408\t=> 'Request Timeout',\n\t\t\t\t\t\t409\t=> 'Conflict',\n\t\t\t\t\t\t410\t=> 'Gone',\n\t\t\t\t\t\t411\t=> 'Length Required',\n\t\t\t\t\t\t412\t=> 'Precondition Failed',\n\t\t\t\t\t\t413\t=> 'Request Entity Too Large',\n\t\t\t\t\t\t414\t=> 'Request-URI Too Long',\n\t\t\t\t\t\t415\t=> 'Unsupported Media Type',\n\t\t\t\t\t\t416\t=> 'Requested Range Not Satisfiable',\n\t\t\t\t\t\t417\t=> 'Expectation Failed',\n\n\t\t\t\t\t\t500\t=> 'Internal Server Error',\n\t\t\t\t\t\t501\t=> 'Not Implemented',\n\t\t\t\t\t\t502\t=> 'Bad Gateway',\n\t\t\t\t\t\t503\t=> 'Service Unavailable',\n\t\t\t\t\t\t504\t=> 'Gateway Timeout',\n\t\t\t\t\t\t505\t=> 'HTTP Version Not Supported'\n\t\t\t\t\t);\n\n\t\tif ($code == '' OR ! is_numeric($code))\n\t\t{\n\t\t\tself::show_error('Status codes must be numeric', 500);\n\t\t}\n\n\t\tif (isset($stati[$code]) AND $text == '')\n\t\t{\t\t\t\t\n\t\t\t$text = $stati[$code];\n\t\t}\n\t\n\t\tif ($text == '')\n\t\t{\n\t\t\tself::show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n\t\t}\n\t\n\t\t$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n\t\tif (substr(php_sapi_name(), 0, 3) == 'cgi')\n\t\t{\n\t\t\theader(\"Status: {$code} {$text}\", TRUE);\n\t\t}\n\t\telseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')\n\t\t{\n\t\t\theader($server_protocol.\" {$code} {$text}\", TRUE, $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n\t\t}\n\t}",
"protected function setHttpCode( $code)\r\n {\r\n $this->httpcode = $code;\r\n }",
"protected static function statusCode($code=null) {\r\n\t\tstatic $current_status;\r\n\t\t\r\n\t\tif ($code) {\r\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';\r\n\t\t\t$current_status = $code;\r\n\t\t\theader($protocol. ' ' . static::$messages[$code]);\r\n\t\t}\r\n\t\treturn $current_status?:200;\r\n\t}",
"public function setStatusCode($code, $name = null)\n {\n $this->statusCode = $code;\n $this->statusText = null !== $name ? $name : self::$statusTexts[$code];\n }",
"public function setResponseCode($code);",
"public function setStatusCode($statusCode)\n {\n \\http_response_code($statusCode);\n }",
"public function setStatusCode(int $statusCode)\n {\n $this->statusCode = $statusCode;\n }",
"public function getStatusCode(){\n return $this->httpResponseCode;\n }",
"public function setStatusCode(int $statusCode): ResponseInterface;",
"public function setStatusCode($statusCode)\r\n {\r\n $this->_statusCode = $statusCode;\r\n }",
"function set_status_header($code = 200, $text = '') {\n $stati = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n if ($code == '' OR !is_numeric($code)) {\n show_error('Status codes must be numeric', 500);\n }\n\n if (isset($stati[$code]) AND $text == '') {\n $text = $stati[$code];\n }\n\n if ($text == '') {\n show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n }\n\n $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n if (substr(php_sapi_name(), 0, 3) == 'cgi') {\n header(\"Status: {$code} {$text}\", TRUE);\n }\n elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') {\n header($server_protocol . \" {$code} {$text}\", TRUE, $code);\n }\n else {\n header(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n }\n}",
"function http_send_status($status) {}",
"public function setHttpStatus($status)\n {\n $this->httpStatus = $status;\n }",
"public function setStatusCode(int $statusCode)\n {\n $this->meta['status_code'] = $statusCode;\n }",
"public function setStatusCode($code)\n {\n $this->statusCode = $code;\n $this->statusText = HttpCode::getStatusText($code);\n if ($this->statusText === null) {\n throw new InvalidArgumentException(\"invalid HTTP status code '$code'\");\n }\n return $this;\n }",
"public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }",
"public function setStatusCode($code) {\r\n\t\tif (! is_int ( $code ) || (100 > $code) || (599 < $code)) {\r\n\t\t\tthrow new Exception\\InvalidArgumentException ( 'Invalid HTTP response' . ' code:' . $code );\r\n\t\t}\r\n\t\t$this->statusCode = $code;\r\n\t\treturn $this;\r\n\t}",
"public function getHTTPStatusCode() { return $this->status; }",
"function getStatusCode();",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function statusCode($code = null) {\n\t\tif ($code === null) {\n\t\t\treturn $this->_status;\n\t\t}\n\t\tif (!isset($this->_statusCodes[$code])) {\n\t\t\tthrow new CakeException(__d('cake_dev', 'Unknown status code'));\n\t\t}\n\t\treturn $this->_status = $code;\n\t}",
"public static function resetStatus($httpCode = 200)\n {\n return http_response_code($httpCode);\n }",
"public function setStatusCode($statusCode)\n {\n $this->statusCode = $statusCode;\n }",
"static function send_http_status($code) {\n\t\tstatic $_status = array(\n\t\t// Informational 1xx\n\t\t100 => 'Continue',\n\t\t101 => 'Switching Protocols',\n\n\t\t// Success 2xx\n\t\t200 => 'OK',\n\t\t201 => 'Created',\n\t\t202 => 'Accepted',\n\t\t203 => 'Non-Authoritative Information',\n\t\t204 => 'No Content',\n\t\t205 => 'Reset Content',\n\t\t206 => 'Partial Content',\n\n\t\t// Redirection 3xx\n\t\t300 => 'Multiple Choices',\n\t\t301 => 'Moved Permanently',\n\t\t302 => 'Found', // 1.1\n\t\t303 => 'See Other',\n\t\t304 => 'Not Modified',\n\t\t305 => 'Use Proxy',\n\t\t// 306 is deprecated but reserved\n\t\t307 => 'Temporary Redirect',\n\n\t\t// Client Error 4xx\n\t\t400 => 'Bad Request',\n\t\t401 => 'Unauthorized',\n\t\t402 => 'Payment Required',\n\t\t403 => 'Forbidden',\n\t\t404 => 'Not Found',\n\t\t405 => 'Method Not Allowed',\n\t\t406 => 'Not Acceptable',\n\t\t407 => 'Proxy Authentication Required',\n\t\t408 => 'Request Timeout',\n\t\t409 => 'Conflict',\n\t\t410 => 'Gone',\n\t\t411 => 'Length Required',\n\t\t412 => 'Precondition Failed',\n\t\t413 => 'Request Entity Too Large',\n\t\t414 => 'Request-URI Too Long',\n\t\t415 => 'Unsupported Media Type',\n\t\t416 => 'Requested Range Not Satisfiable',\n\t\t417 => 'Expectation Failed',\n\n\t\t// Server Error 5xx\n\t\t500 => 'Internal Server Error',\n\t\t501 => 'Not Implemented',\n\t\t502 => 'Bad Gateway',\n\t\t503 => 'Service Unavailable',\n\t\t504 => 'Gateway Timeout',\n\t\t505 => 'HTTP Version Not Supported',\n\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(array_key_exists($code,$_status)) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}",
"public function setStatusCode(int $status) : static\n {\n $this->status = $status;\n $this->statusText = self::$statusTexts[$status] ?? 'unknown status';\n return $this;\n }",
"function sendHttpStatus($code) \n {\n\t\tstatic $_status = array(\n\t\t\t// Informational 1xx\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\n\t\t\t// Success 2xx\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\n\t\t\t// Redirection 3xx\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found', // 1.1\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t// 306 is deprecated but reserved\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t// Client Error 4xx\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\n\t\t\t// Server Error 5xx\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(isset($_status[$code])) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}",
"public function testAbleToSetStatus()\n {\n $this->response->setStatus(404);\n $this->assertEquals(\n 404, $this->response->getStatus(),\n 'Unable to set Status'\n );\n }",
"public static function getStatusCode(): int;",
"public function setServerStatusCode($code)\n {\n $this->historial->server_status_code = $code;\n }",
"public function getStatusCode(): int\n {\n return $this->code ;\n }",
"public function getStatusCode()\n {\n return $this->statusCode ?: 200;\n }",
"public function & setStatusCode( $a_code )\r\n\t{\r\n\t\t$this->m_code = intval($a_code);\r\n\t\treturn $this;\r\n\t}",
"function http_response_code($newcode = NULL)\n\t\t{\n\t\t\tstatic $code = 200;\n\t\t\tif($newcode !== NULL)\n\t\t\t{\n\t\t\t\theader('X-PHP-Response-Code: '.$newcode, true, $newcode);\n\t\t\t\tif(!headers_sent())\n\t\t\t\t\t$code = $newcode;\n\t\t\t}\n\t\t\treturn $code;\n\t }",
"private function setHttpCode($httpCode) {\n $this->httpCode = $httpCode;\n }",
"public function setStatusCodeMsg($msg)\r\n {\r\n $this->_statusCodeMsg = $msg;\r\n }",
"public function getStatusCode() {}",
"protected function setStatusCode($statusCode)\r\n {\r\n $this->slim->response()->status($statusCode);\r\n }",
"public function setStatusCode($code)\n {\n $this->statusCode = $code;\n\n return $this;\n }",
"public function setStatusCode($code)\n {\n $this->statusCode = $code;\n\n return $this;\n }",
"public function setStatusCode($code)\n {\n $code = (int) $code;\n if ($code < 100 || $code > 600) {\n throw new \\RuntimeException('HTTP Response Code must be between 100 and 600');\n }\n $this->status = (int) $code;\n\n return $this;\n }",
"public static function setHttpResponseCode($code = null)\n {\n if (is_null($code)) {\n return (isset($GLOBALS['http_response_code']))\n ? $GLOBALS['http_response_code']\n : 200;\n }\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']))\n ? $_SERVER['SERVER_PROTOCOL']\n : 'HTTP/1.0';\n\n header($protocol . ' ' . $code . ' ' . $text);\n\n $GLOBALS['http_response_code'] = $code;\n\n return $code;\n }",
"protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}",
"public function setHttpStatus($httpStatus)\n {\n $this->httpStatus = $httpStatus;\n }",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function statusCode($new_value = null)\n {\n // Get\n if ($new_value === null) {\n return $this->status_code;\n }\n\n // Set\n if (is_int($new_value) && $new_value >= 100 && $new_value <= 599) {\n $this->status_code = $new_value;\n return $this;\n }\n\n // If invalid then thrown an Exception\n $error = 'Unhandled Response Status Code of [%s] for [%s->%s()].';\n if (is_int($new_value)) {\n $error = sprintf($error, $new_value, __CLASS__, __FUNCTION__);\n } else {\n $error = sprintf($error, 'type: ' . gettype($new_value), __CLASS__, __FUNCTION__);\n }\n throw new \\Exception($error);\n }",
"public function setHttpResponseCode($code)\n {\n if (!is_int($code) || (100 > $code) || (599 < $code)) {\n require_once 'Zend/Controller/Response/Exception.php';\n throw new Zend_Controller_Response_Exception('Invalid HTTP response code');\n }\n\n if ((300 <= $code) && (307 >= $code)) {\n $this->_isRedirect = true;\n } else {\n $this->_isRedirect = false;\n }\n\n $this->_httpResponseCode = $code;\n return $this;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function setStatusCode(int $statusCode): void\n {\n $this->ngsStatusCode = $statusCode;\n }",
"public function setCode(int $code)\n{\n self::$stored['codes'][] = $code;\n http_response_code($code);\n}",
"function status_header($code = 200) {\n $message = [\n 200 => \"OK\",\n 404 => \"Page not found\",\n 302 => \"Moved temporarily\",\n 303 => \"Something something\",\n 500 => \"Server error\"\n ];\n header(\"HTTP/1.0 \".$code.\" \".$message[$code]);\n}",
"public function setHttpResponseCode($code)\r\n\t{\r\n\t\tif (!is_int($code) || (100 > $code) || (599 < $code)) {\r\n\t\t\tthrow new Syx_Response_Exception('Invalid HTTP response code');\r\n\t\t}\r\n\r\n\t\tif ((300 <= $code) && (307 >= $code)) {\r\n\t\t\t$this->_isRedirect = true;\r\n\t\t} else {\r\n\t\t\t$this->_isRedirect = false;\r\n\t\t}\r\n\r\n\t\t$this->_httpResponseCode = $code;\r\n\t\treturn $this;\r\n\t}",
"function status($new = null)\n {\n static $code = 200;\n if ( ! empty($new) )\n ($code = $new) && hdrs('x-horus-status', 'a horus response', true, $new);\n return $code;\n }"
] | [
"0.8461",
"0.83327407",
"0.82244104",
"0.8077079",
"0.80324346",
"0.80089784",
"0.79900753",
"0.78607595",
"0.7834268",
"0.78296024",
"0.7822765",
"0.78150415",
"0.78038394",
"0.7781591",
"0.77720827",
"0.776933",
"0.7698732",
"0.76858896",
"0.76733965",
"0.7667692",
"0.7617956",
"0.7614431",
"0.75694716",
"0.75527006",
"0.7539956",
"0.74925673",
"0.74794656",
"0.7462858",
"0.74482536",
"0.74421597",
"0.74405164",
"0.7387303",
"0.738317",
"0.7348672",
"0.7331912",
"0.7323826",
"0.73037064",
"0.7278625",
"0.72596204",
"0.72588575",
"0.72545946",
"0.725092",
"0.7245278",
"0.72402126",
"0.72026086",
"0.71895427",
"0.71841556",
"0.71573967",
"0.71431386",
"0.7141467",
"0.7133933",
"0.7132748",
"0.7132748",
"0.7132748",
"0.7132748",
"0.7127329",
"0.71105385",
"0.7088472",
"0.70876944",
"0.70744896",
"0.7073182",
"0.7063517",
"0.70631593",
"0.7058079",
"0.7048397",
"0.70310396",
"0.700531",
"0.6981156",
"0.69729996",
"0.6970611",
"0.696278",
"0.6959272",
"0.69539696",
"0.69539696",
"0.69431525",
"0.6922397",
"0.6907736",
"0.6906498",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.69042116",
"0.6899449",
"0.68979627",
"0.68898153",
"0.68898153",
"0.68898153",
"0.68898153",
"0.68898153",
"0.6881505",
"0.6875593",
"0.68735325",
"0.68687826",
"0.6857515"
] | 0.73344105 | 34 |
Get http status code from this exception | public function getHttpCode() {
return $this->httpCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }",
"public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }",
"public function getHTTPStatusCode() { return $this->status; }",
"public function status() :int\n {\n return (int) $this->exception->getStatusCode();\n }",
"public function getHttpStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public function getStatusCode();",
"public static function getStatusCode(): int;",
"public function getStatusCode()\n {\n return isset($this->headers['statusCode']) ? $this->headers['statusCode']: 500;\n }",
"public function getStatusCode()\n {\n return $this->httpStatusCode;\n }",
"public function getStatusCode(): int\n {\n return (int) $this->response->getStatusCode();\n }",
"public function getStatusCode(): int\n {\n return $this->response->getStatusCode();\n }",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getStatusCode(): int;",
"public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }",
"public function getStatusCode() {}",
"public function getStatusCode() {\n return $this->getResponse()->statuscode;\n }",
"public function getHttpCode()\n {\n return $this->http_code;\n }",
"function getStatusCode();",
"public function getStatusCode(): int\n {\n return $this->code ;\n }",
"public function getStatusCode(){\n return $this->httpResponseCode;\n }",
"public function getHttpCode()\n {\n return $this->code;\n }",
"public function getHttpCode()\r\n {\r\n return $this->http_code;\r\n }",
"public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }",
"public function getHttpCode()\n {\n return $this->httpCode;\n }",
"public function statusCode()\n {\n return $this->meta['http_code'];\n }",
"public function getHttpStatusCode()\n {\n return $this->response->getHttpStatusCode();\n }",
"public function getStatusCode(): int\n {\n return $this->meta['status_code'];\n }",
"public function getHttpCode(): int\n {\n return $this->httpCode;\n }",
"public function getStatusCode(): int\n {\n return $this->status;\n }",
"public function getStatusCode() {\n\t\treturn $this->status['code'];\n\t}",
"public function getStatusCode() {\n\n return $this->result->status_code;\n }",
"public function get_status_code(): int {\n if (empty($this->status_code)) {\n throw new RuntimeException(\"HTTP Response is missing a status code\");\n }\n\n return $this->status_code;\n }",
"public function getStatusCode()\n {\n return \\http_response_code();\n }",
"public function getStatusCode()\n {\n return (int) $this->statusCode;\n }",
"public function getHttpErrorCode()\n {\n return $this->httpErrorCode;\n }",
"public function getHttpCode() {\n return $this->httpCode;\n }",
"public function getStatusCode()\n {\n return $this->status_code;\n }",
"public function getStatusCode()\n {\n return static::STATUS_CODE;\n }",
"public function getStatusCode()\n {\n return $this->status;\n }",
"public function getResponseCode() {\n return $this->client->getHttpStatusCode();\n }",
"public function getHttpCode()\n {\n return $this->information[ self::INFORMATION_HTTP_CODE ];\n }",
"public function getHttpCode()\n {\n return $this->_httpCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int\n {\n return $this->statusCode;\n }",
"public function status()\n {\n return (int)$this->response->getStatusCode();\n }",
"public function getStatusCode(): int\r\n {\r\n return $this->_statusCode;\r\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getHttpStatusCode();",
"public function statusCode()\n {\n return $this->code;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}",
"protected function getStatusCode()\n {\n return $this->statusCode;\n }",
"public function getStatusCode() : int\n {\n return $this->statusCode;\n }",
"public function getStatusCode() : int\n {\n return $this->statusCode;\n }",
"public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}",
"public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}",
"private function getHttpCode() {\n return $this->httpCode;\n }",
"private function getStatusCode()\n {\n return $this->statusCode;\n }",
"function getHttpCode() {\n return $this->httpCode;\n }",
"public function getStatusCode()\n {\n \treturn $this->statusCode;\n }",
"public function getStatusCode()\n {\n }",
"public function getStatusCode() {\r\n\t\treturn $this->statusCode;\r\n\t}",
"public function getHttpStatus(): int\n {\n return $this->http_status;\n }"
] | [
"0.825341",
"0.825341",
"0.81903046",
"0.8188432",
"0.81584764",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8084856",
"0.8054141",
"0.80318743",
"0.8021902",
"0.7994688",
"0.7985929",
"0.79839706",
"0.79839706",
"0.79839706",
"0.79839706",
"0.7974622",
"0.7969723",
"0.7945833",
"0.7918986",
"0.7903394",
"0.7901652",
"0.7896503",
"0.7892723",
"0.78877383",
"0.787932",
"0.7872758",
"0.7864487",
"0.7855166",
"0.78547627",
"0.7852526",
"0.7848675",
"0.78389627",
"0.782631",
"0.78262436",
"0.7826067",
"0.7823787",
"0.7822798",
"0.7821837",
"0.78193134",
"0.780359",
"0.78027624",
"0.778672",
"0.77777225",
"0.7767104",
"0.77597976",
"0.77597976",
"0.77597976",
"0.77597976",
"0.77597976",
"0.77548593",
"0.7750389",
"0.77497196",
"0.7739241",
"0.77388775",
"0.7724585",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77136135",
"0.77134496",
"0.7702282",
"0.76974636",
"0.76974636",
"0.7694393",
"0.7694393",
"0.76925147",
"0.7682367",
"0.766966",
"0.76444364",
"0.76305515",
"0.75965273",
"0.7593262"
] | 0.77977073 | 50 |
Set target web resources | public function setWebResource($webResource) {
$this->webResource = $webResource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTarget( $target )\n\t{\n\t\t$this->setAttribute( \"target\", $target );\n\t}",
"public function set_target( $target_url ) {\n\t\t$this->target = $target_url;\n\t}",
"public function setTarget($target)\n\t{\n\t\t// To do: verify format\n\t\t$this->target = $target;\n\t\t$this->setAttribute('target',$target); // set attribute in DOM\n\t}",
"public function setWritePath( $target );",
"public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }",
"private function setTarget($target) {\r\n $this->target = $target;\r\n }",
"protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}",
"public function setTarget($target)\n\t{\n\t\t$this->target = $this->resolveTarget($this->uri, $target);\n\t\t\n\t\treturn $this;\n\t}",
"private function _setWebConfig()\n {\n $this->map_obj->set(\"name\", \"simplemappr\");\n $this->map_obj->setFontSet($this->font_file);\n $this->map_obj->web->set(\"template\", \"template.html\");\n $this->map_obj->web->set(\"imagepath\", $this->tmp_path);\n $this->map_obj->web->set(\"imageurl\", $this->tmp_url);\n }",
"public function setResources(array $resources): void {\n\t\t$this->resources = $resources;\n\t}",
"public function setTargetResourceLocation($val)\n {\n $this->_propDict[\"targetResourceLocation\"] = $val;\n return $this;\n }",
"function setLinks(&$source, &$target) {\n\t\tglobal $links;\n\t\t\n\t\t$i = rand(0, count($links) - 1);\n\t\t\n\t\t// make sure i and j aren't the same\n\t\tdo {\n\t\t\t$j = rand(0, count($links) - 1);\n\t\t} while ($j == $i);\n\t\t\n\t\t$source = $links[$i];\n\t\t$target = $links[$j];\n\t}",
"public function setPaths()\n\t{\n\t\t$this->componentURL = Request::base() . 'publications/';\n\t\t$this->resourceURL = $this->componentURL . $this->id;\n\n\t\t$database = \\App::get('db');\n\t\t$pub = new \\Components\\Publications\\Tables\\Publication($database);\n\t\t$publication = $pub->getPublication($this->id);\n\t\t$this->resourceSite = \\Components\\Publications\\Helpers\\Html::buildPubPath($this->id, $publication->version_id, '', $publication->secret, 1);\n\t}",
"private function setUrls() {\n\t\t$this->url = ($this->env === 'DEVELOPMENT') ? 'https://test.sagepay.com/gateway/service/direct3dcallback.vsp' : 'https://live.sagepay.com/gateway/service/direct3dcallback.vsp';\n\t}",
"function setTarget($a_target)\n\t{\n\t\t$this->il_target = $a_target;\n\t}",
"private function setupResources()\n {\n // $this->loadViewsFrom(__DIR__ . '/../resources/views', 'marqant-pay');\n }",
"public function setTargetPath($path)\n\t{\n\t\t$this->targetPath = $path;\n\t}",
"abstract protected function setResource(): String;",
"public function SetWebResourcesBasePath(SetWebResourcesBasePath $parameters)\n {\n return $this->__soapCall('SetWebResourcesBasePath', array($parameters));\n }",
"public static function init()\n {\n self::$config = Kohana::$config->load('assets');\n\n if (self::$config->watch)\n {\n foreach (self::ls(self::target_dir(), NULL, TRUE) as $asset)\n {\n // Delete assets whose source files have changed (they'll be recompiled\n // the next time they are requested).\n self::modified($asset) && unlink($asset);\n }\n }\n\n $dir = basename(self::target_dir());\n\n // Set route.\n Route::set('assets', $dir.'<target>', array('target' => '.+'))\n ->defaults(array(\n 'controller' => 'assets',\n 'action' => 'serve'\n ));\n }",
"function set_js_urls($js_url) {\n\n md_set_js_urls($js_url);\n \n }",
"public function setTarget($target)\n {\n // TODO: Implement setTarget() method.\n }",
"public function setSiteUrl()\n {\n }",
"protected function defineResources()\n {\n $this->loadViewsFrom(JUPITER_PATH.'/resources/views', 'jupiter');\n if ($this->app->runningInConsole()) {\n $this->publishes([\n JUPITER_PATH.'/resources/views' => base_path('resources/views/vendor/jupiter'),\n ], 'jupiter-full');\n }\n }",
"private function copyResources()\n {\n $sResourcesDirectory = $this->getViewRootDirectory();\n $sResourcesDirectory = substr($sResourcesDirectory, 0, strrpos($sResourcesDirectory, 'View'));\n $sResourcesDirectory .= 'Resources' . DIRECTORY_SEPARATOR;\n\n // copy css\n foreach (glob($sResourcesDirectory . 'css/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n\n // copy js\n foreach (glob($sResourcesDirectory . 'js/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n }",
"public static function setFullUrl(): void\n\t{\n\t\t$requestUri = urldecode(Server::get('REQUEST_URI'));\n\t\tstatic::$fullUrl = rtrim(preg_replace('#^' . static::$scriptDirectory . '#', '', $requestUri), '/');\n\t}",
"public static function set($target_file)\r\n\r\n {\r\n header('Location: index.php?page=display&filename=' .$target_file );\r\n \r\n }",
"public function setUrl()\n {\n $this->set('url', function() {\n $url = new Url();\n $url->setBaseUri('/');\n return $url;\n });\n }",
"public static function setBaseUrl(): void\n\t{\n\t\tstatic::$scriptDirectory = str_replace('\\\\', '/', dirname(Server::get('SCRIPT_NAME')));\n\t\t$protocol = Server::get('REQUEST_SCHEME') . '://';\n\t\t$hostname = Server::get('HTTP_HOST');\n\t\tstatic::$baseUrl = $protocol . $hostname . static::$scriptDirectory;\n\t}",
"function setServerURLs($serverURLs) {\n\t\t$this->m_serverURLs = $serverURLs;\n\t}",
"private function loadURLs()\r\n\t{\r\n\t\t$status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\t\tforeach ($this->url as $scriptname => $modes)\r\n\t\t\t$this->url_script[$scriptname] = $modes[$status];\r\n\t}",
"public function setTargetElement(FeedsSource $source, $target_file, $target_element, $value) {\n $this->debug(array($source, $target_file, $target_element, $value), 'setTargetElement');\n\n switch ($target_element) {\n case 'uri':\n try {\n // First we extract the filename from the uri and check that it is\n // among the allowed extensions.\n $filename = rawurldecode(drupal_basename($value));\n // Remove leading and trailing whitespace and periods.\n $filename = trim($filename, \" \\t\\n\\r\\0\\x0B.\");\n if (strpos($filename, '.') === FALSE) {\n $extension = FALSE;\n }\n else {\n $extension = drupal_strtolower(substr($filename, strrpos($filename, '.') + 1));\n }\n $allowed_extensions = !empty($this->config['allowed_extensions']) ? $this->config['allowed_extensions'] : $this->allowed_extensions;\n if (!$extension || !in_array($extension, explode(', ', $allowed_extensions), TRUE)) {\n throw new RuntimeException(t('The file @file has an invalid extension.', array('@file' => $filename)));\n }\n\n // Next we get the destination and try to get the file.\n $destination = !empty($this->config['file_destination']) ? $this->config['file_destination'] : $this->file_destination;\n if ($uri = $this->getFile($value, $destination, FILE_EXISTS_RENAME)) {\n $target_file->uri = $uri;\n $target_file->filemime = file_get_mimetype($target_file->uri);\n }\n }\n catch (Exception $e) {\n watchdog_exception('Feeds', $e, nl2br(check_plain($e)));\n }\n break;\n case 'user_name':\n if ($user = user_load_by_name($value)) {\n $target_file->uid = $user->uid;\n }\n else if ($user = $this->user_load_by_realname($value)) {\n $target_file->uid = $user->uid;\n }\n break;\n case 'user_mail':\n if ($user = user_load_by_mail($value)) {\n $target_file->uid = $user->uid;\n }\n break;\n case 'node_usage':\n case 'term_usage':\n $results = array();\n foreach ($value as $usage) {\n // Get the entity using it's feeds guid, add it to the results array.\n $entity_id = db_select('feeds_item', 'fi')\n ->fields('fi', array('entity_id'))\n ->condition('guid', $usage,'=')\n ->execute()\n ->fetchField();\n if (!empty($entity_id)) {\n array_push($results, $entity_id);\n }\n }\n $target_file->$target_element= $results;\n break;\n default:\n parent::setTargetElement($source, $target_file, $target_element, $value);\n break;\n }\n }",
"protected function _setTarget()\n {\n // use the solar system \"include\" directory.\n // that should automatically point to the right vendor for us.\n $target = Solar::$system . \"/include\";\n $this->_target = Solar_Dir::fix($target);\n }",
"public function load_target ($project, $target) {\n\t\t$this->target = new TargetLoader($project, $target);\n\t}",
"public function setTargetPath(string $targetPath): AssetInterface\n {\n }",
"function Define_Resources() : void\n {\n for($i = 0;$i < count($this->Scripts);$i++)\n {\n if($this->Scripts[$i] instanceof stdClass)\n {\n wp_enqueue_script($this->Scripts[$i]->Handle,$this->Scripts[$i]->Src,$this->Scripts[$i]->Deps,$this->Scripts[$i]->Ver,$this->Scripts[$i]->InFooter);\n }\n }\n for($i = 0;$i < count($this->Styles);$i++)\n {\n if($this->Styles[$i] instanceof stdClass)\n {\n wp_enqueue_style($this->Styles[$i]->Handle,$this->Styles[$i]->Src,$this->Styles[$i]->Deps,$this->Styles[$i]->Ver,$this->Styles[$i]->Media);\n }\n }\n }",
"protected function initResources()\n {\n $chain = $this->_config->configChain();\n // Remove default config\n $default = array_pop($chain);\n $default = $default['directories'];\n $namespaces = array_keys($chain);\n Utils_ResourceLocator::setResourcesConfig($default, $namespaces);\n }",
"public function setMedia()\n {\n $loadLibrary = false;\n\n if ($loadLibrary)\n {\n $activeTheme = $this->theme->active();\n $casset = \\Config::get('lb.theme.use_casset');\n $casset and \\Casset::add_path('theme', $activeTheme['asset_base']);\n \n \\Lb\\Backend::addAsset(array(\n 'jquery.min.js',\n 'jquery-ui.min.js',\n ), 'js', 'js_core', $this->theme, $casset);\n \n \\Lb\\Backend::addAsset(array(\n 'bootstrap/css/bootstrap.css',\n 'bootstrap/css/bootstrap-glyphicons.css',\n ), 'css', 'css_plugin', $this->theme, $casset);\n\n \\Lb\\Backend::addAsset(array(\n 'bootstrap.js',\n ), 'js', 'js_core', $this->theme, $casset);\n \n \\Lb\\Backend::addAsset(array(\n 'font-awesome/css/font-awesome.css',\n ), 'css', 'css_plugin', $this->theme, $casset);\n }\n }",
"public function setCDNResourcePrefix($prefix, $target) {\n $this->cdnPrefixes[$prefix] = $target;\n }",
"private function loadURLs() {\r\n $status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\tforeach ($this->_url as $scriptname => $modes)\r\n\t{\r\n\t\t$this->url[$scriptname] = $modes[$status];\r\n\t}\r\n }",
"public function loadResources() {}",
"public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}",
"public function target($value) {\n return $this->setProperty('target', $value);\n }",
"public function target($value) {\n return $this->setProperty('target', $value);\n }",
"function insert_resouces($resources) {\r\n foreach ($resources['css'] as $css) {\r\n echo '<link rel=\"stylesheet\" href=\"'. $css .'\">';\r\n }\r\n foreach ($resources['js'] as $js) {\r\n echo '<script src=\"'. $js .'\"></script>';\r\n }\r\n }",
"public function setTarget($target) {\r\n\t\tif (! file_exists ( dirname ( $target ) )) {\r\n\t\t\tthrow new Exception\\InvalidArgumentException ( \"The directory '$target' does not exist\" );\r\n\t\t}\r\n\t\t\r\n\t\t$target = str_replace ( array (\r\n\t\t\t\t'/',\r\n\t\t\t\t'\\\\' \r\n\t\t), DIRECTORY_SEPARATOR, ( string ) $target );\r\n\t\t$this->options ['target'] = $target;\r\n\t\treturn $this;\r\n\t}",
"private function setUrl()\n {\n curl_setopt($this->curl, CURLOPT_URL, $this->server);\n }",
"public function setTarget($target)\n {\n return $this->setStorage($target);\n }",
"public function setScriptPath()\n\t{\n\t\t$this->scriptPath = Yii::getPathOfAlias('webroot').$this->ds.$this->suffix.$this->ds;\n\t}",
"public function getTargetDirectory();",
"protected function initiateUrl()\n\t{\n\t\t// base url\n\t\tif($this->app->config->has('app.url'))\n\t\t\t$this->setBase($this->app->config->get('app.url'));\n\n\t\t// asset url\n\t\tif($this->app->config->has('asset.url'))\n\t\t\t$this->setAsset($this->app->config->get('asset.url'));\n\t}",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"function setUrl($url);",
"public function setTargetUri(string $targetUri): AssetInterface\n {\n }",
"public static function setUrl(): void\n\t{\n\n\t\tif (strpos(static::$fullUrl, '?')) {\n\t\t\tstatic::$url = substr(static::$fullUrl, 0, strpos(static::$fullUrl, '?'));\n\t\t} else {\n\t\t\tstatic::$url = static::$fullUrl;\n\t\t}\n\n\t}",
"private function copy_resources () {\n\t\t\n\t\t$directory = $this->target_loader->resources;\n\t\t$bundle = $this->target_loader->bundle;\n\t\t\n\t\t$this->print_message(\"Copying resources into $bundle...\");\n\n\t\t// Iterate the target resources directory\n\t\tif ($handle = opendir($directory)) {\n\t\t while (false !== ($file = readdir($handle))) {\n\t\t if ($file != \".\" && $file != \"..\") {\n\t\t\t\t\n\t\t\t\t\t$name_clean = substr($file, 0, strrpos($file, \".\")); \n\t\t\t\t\t$path = \"$directory/$file\";\n\t\t\t\t\t\n\t\t\t\t\t// Copy depending on target platform\n\t\t\t\t\tswitch ($this->target_loader->platform) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase PLATFORM_PPC:\n\t\t\t\t\t\tcase PLATFORM_INTEL: {\n\t\t\t\t\t\t\t// copy .lproj directories from Resource folder into /Contents/Resources\n\t\t\t\t\t\t\t$resource_path = \"$bundle/Contents/Resources\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Copy info.plist\n\t\t\t\t\t\t\tif ($file == \"Info.plist\") $this->copy_info_plist($path, \"$bundle/Contents\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Copy localization folders\n\t\t\t\t\t\t\tif (eregi(\"\\.(lproj)+$\", $file)) $this->copy_localization($path, $resource_path);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Compile XIBs\n\t\t\t\t\t\t\tif (eregi(\"\\.(xib)+$\", $file)) $this->compile_xib(\"$directory/$name_clean.xib\", \"$resource_path/$name_clean.nib\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase PLATFORM_IPHONE_SIMULATOR: {\n\t\t\t\t\t\t\t$resource_path = $bundle;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (eregi(\"\\.(lproj)+$\", $file)) { // Copy localization folders\n\t\t\t\t\t\t\t\t$this->copy_localization($path, $resource_path);\n\t\t\t\t\t\t\t} else if (eregi(\"\\.(xib)+$\", $file)) { // Compile XIB's into bundle\n\t\t\t\t\t\t\t\t$this->compile_xib(\"$directory/$name_clean.xib\", \"$resource_path/$name_clean.nib\");\n\t\t\t\t\t\t\t} else if (is_file($path)) { // Copy files of any type\n\t\t\t\t\t\t\t\t\tcopy($path, \"$resource_path/$file\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase PLATFORM_IPHONE_DEVICE: {\n\t\t\t\t\t\t\t$resource_path = $bundle;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (eregi(\"info\\.plist$\", $file)) { // Convert info.plist to binary\n\t\t\t\t\t\t\t\t// ??? ignore info.plist so Xcode can build it\n\t\t\t\t\t\t\t\t//$dest_path = \"$resource_path/$file\";\n\t\t\t\t\t\t\t\t//copy($path, $dest_path);\n\t\t\t\t\t\t\t\t//exec(\"/usr/bin/plutil -convert binary1 \\\"$dest_path\\\" -o \\\"$dest_path\\\"\");\n\t\t\t\t\t\t\t} else if (eregi(\"\\.(lproj)+$\", $file)) { // Copy localization folders\n\t\t\t\t\t\t\t\t$this->copy_localization($path, $resource_path);\n\t\t\t\t\t\t\t} else if (eregi(\"\\.(xib)+$\", $file)) { // Compile XIB's into bundle\n\t\t\t\t\t\t\t\t$this->compile_xib(\"$directory/$name_clean.xib\", \"$resource_path/$name_clean.nib\");\n\t\t\t\t\t\t\t} else if (is_file($path)) { // Copy files of any type\n\t\t\t\t\t\t\t\t\tcopy($path, \"$resource_path/$file\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t }\n\t\t }\n\t\t closedir($handle);\n\t\t}\n\t\t\n\t}",
"public function getResourceURIs()\n {\n $resources = array();\n\n $resources['logo'] = $this->getUrl('/resources/logo.png');//URI\n $resources['requestHandlerUrl'] = $this->getUrl('requestHandler.php');//URI //TODO: this should be an API URI (not sure if that will break something)\n $resources['self_apiUrl'] = self::$apiUrl;//URI\n\n return $resources;\n }",
"public function setServerRelativeUrl($value)\n {\n $this->setProperty(\"ServerRelativeUrl\", $value, true);\n }",
"public function loadConfigAssets()\r\n {\r\n $this->app->document->addScript('elements:imagebox/assets/js/myimage.js');\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/editoption.css');\r\n $this->app->document->addScript('elements:imagebox/assets/js/myoption.js');\r\n $this->app->document->addStylesheet('elements:option/option.css');\r\n }",
"protected function detectResourcesBaseUri()\n {\n $this->resourcesBaseUri = 'http://baseuri/_Resources/';\n }",
"public function setPaths($url, $destPath) {\n $this->url = $url;\n $this->destPath = $destPath;\n }",
"public function createnewwebAction(){\n\t\t//$this->_appName = $this->getLine(\"please input the name for your project folder:\");\n\t\t$this->handleLocation();\n\t\t$this->copyweb(dirname(__FILE__).DIRECTORY_SEPARATOR.\"templateApp\".DIRECTORY_SEPARATOR,$this->_location);\n\t\t$this->setpermission();\n\t\t$this->ConfigWeb();\n\t\techo \" web installed successfully\\n\";\n\t}",
"private function setResource()\n {\n $path = $_SERVER['PATH_INFO'];\n $params = explode('/', $path);\n $this->_requestResource = $params[2];\n if (!in_array($this->_requestResource, $this->_allowResource)) {\n throw new Exception(\"Request resource not allowed!\", 405);\n }\n\n $this->_version = $params[1];\n\n if (!$this->notValid($params[3])) {\n $this->_requestUri = $params[3];\n }\n }",
"public function setTarget($value)\n\t{\n\t\t$this->setViewState('Target',$value,'');\n\t}",
"function setPath() {\n\n // Wp installation path\n $wp_install_path = str_replace( 'http://' . $_SERVER['HTTP_HOST'], '', site_url());\n\n // Set the instance starting path\n $this->path = $wp_install_path . App::getOption('path');\n\n // Grab the server-passed \"REQUEST_URI\"\n $this->current_uri = $this->request->server()->get('REQUEST_URI');\n\n // Remove the starting URI from the equation\n // ex. /wp/cocoon/mypage -> /mypage\n $this->request->server()->set(\n 'REQUEST_URI', substr($this->current_uri, strlen($this->path))\n );\n\n }",
"private function setBaseUrl()\n {\n if (config(\"redx.sandbox\") == true) {\n $this->baseUrl = \"https://sandbox.redx.com.bd\";\n } else {\n $this->baseUrl = \"https://openapi.redx.com.bd\";\n }\n }",
"public function load_assets() {\n\t\twponion_load_core_assets( $this->option( 'assets' ) );\n\t}",
"function getTargetFile() ;",
"public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }",
"protected function getWebRoot() {}",
"protected function getWebRoot() {}",
"function set_css_urls($css_url) {\n\n md_set_css_urls($css_url);\n \n }",
"public function getResource() {}",
"public function setTargetResourceId($val)\n {\n $this->_propDict[\"targetResourceId\"] = $val;\n return $this;\n }",
"public function setWebUrl($value)\n {\n return $this->setProperty(\"WebUrl\", $value, true);\n }",
"private function setBaseUrl($baseUrl) {\n foreach ($this->activeContexts as $context) {\n $context->setMinkParameter('base_url', $baseUrl);\n }\n }",
"public function setResource($value)\n {\n if (!is_string($value) || empty($value))\n throw new CException(Yii::t('EWebFeed', 'resource must be a non-empty string'));\n EWebFeed::validateURI($value);\n $this->resource = $value;\n }",
"public function setResource( $uri ) {\n\t\tif ( self::validateResource($uri) ) {\n\t\t\t$this->resource = TRUE;\n\t\t\t$this->setParameter( \"info\", htmlentities( $uri ) );\n\t\t}\n\t}",
"public function getResourceSets();",
"private function setUrl(): void\n {\n $completeUrl = $_SERVER['REQUEST_URI'];\n $explodedUrl = \\explode('?', $completeUrl);\n $this->url = trim($explodedUrl[0], '/'); // Cleaned URL\n }",
"private function setup_assets() {\n\t\t$this->prefix = sanitize_title($this->theme_name) . '-';\n\t\t$public_lib = '/lib/pub/';\n\t\t$source_lib = '/lib/src/';\n\n\t\t//IF WP DEBUG Is ON, load source maps and assets\n\t\tif (constant(\"WP_DEBUG\") === true) {\n\t\t\t//Style Resources\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles',\n\t\t\t\t'path' => $source_lib . 'css/master.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\t\t\t\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'scss',\n\t\t\t\t'path' => $source_lib . 'scss/master.scss',\n\t\t\t\t'deps' => array( $this->prefix . 'styles')\n\t\t\t);\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'css-map',\n\t\t\t\t'path' => $source_lib . 'maps/master.css.map',\n\t\t\t\t'deps' => array( $this->prefix . 'styles', $this->prefix . 'scss')\n\t\t\t);\n\t\t\n\t\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'plugins',\n\t\t\t\t'path' => $source_lib . 'js/plugins.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'the-script',\n\t\t\t\t'path' => $source_lib . 'js/script.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\n\n\t\t\t// $this->scripts[] = array(\n\t\t\t// \t'slug' => $this->prefix . 'script-map',\n\t\t\t// \t'path' => $source_lib . 'maps/scripts.js.map',\n\t\t\t// \t'deps' => array(\n\t\t\t// \t\t'jquery',\n\t\t\t// \t\t$this->prefix . 'script'\n\t\t\t// \t)\n\t\t\t// );\n\t\n\t\t// Otherwise load only minified assets\n\t\t} else {\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles-min',\n\t\t\t\t'path' => $public_lib . 'css/master.min.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t\t'slug' => $this->prefix . 'scripts-min',\n\t\t\t\t\t'path' => $public_lib . 'js/master.min.js',\n\t\t\t\t\t'deps' => array(\n\t\t\t\t\t\t'jquery'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->add_wp_script('jquery');\n\t\t\n\t\tadd_action('wp_enqueue_scripts', array( $this, 'theme_assets_handler' ));\n\t}",
"public function testThemeAssetsInMainWebrootPath() {\n\t\tApp::build(array(\n\t\t\t'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)\n\t\t));\n\t\t$webRoot = Configure::read('App.www_root');\n\t\tConfigure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);\n\n\t\t$this->Html->theme = 'test_theme';\n\t\t$result = $this->Html->css('webroot_test');\n\t\t$expected = array(\n\t\t\t'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\\/test_theme\\/css\\/webroot_test\\.css/')\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\t$this->Html->theme = 'test_theme';\n\t\t$result = $this->Html->css('theme_webroot');\n\t\t$expected = array(\n\t\t\t'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\\/test_theme\\/css\\/theme_webroot\\.css/')\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\tConfigure::write('App.www_root', $webRoot);\n\t}",
"public function setBaseUrl($baseUrl);",
"public static function moveDistResources(): void\n {\n $filesystem = new Filesystem();\n $rootDir = getcwd();\n\n $distSourceDir = sprintf('%s/vendor/backbee/toolbar-dist/dist', $rootDir);\n\n if (!is_dir($distSourceDir)) {\n return;\n }\n\n $destDir = sprintf('%s/web/static/back', $rootDir);\n $filesystem->mkdir($destDir);\n $filesystem->mirror(\n $distSourceDir,\n $destDir,\n null, [\n 'override' => true,\n 'delete' => true\n ]\n );\n }",
"function _links_add_target($m)\n {\n }",
"abstract protected function getResources();",
"private function loadResources(): void\n {\n foreach ($this->options['resource_files'] as $locale => $files) {\n foreach ($files as $key => $file) {\n $c = mb_substr_count($file, '.');\n\n if ($c < 2) {\n // filename is domain.format\n list($domain, $format) = explode('.', basename($file), 2);\n } else {\n // filename is domain.locale.format\n list($domain, $locale, $format) = explode('.', basename($file), 3);\n }\n\n $this->addResource($format, $file, $locale, $domain);\n unset($this->options['resource_files'][$locale][$key]);\n }\n }\n }",
"public function setTarget($target) {\n $this->appendAttribute(\"target\", $target);\n return $this;\n }",
"private function setResources() {\r\n\t\t/*\r\n\t\t$dir = new DirectoryIterator(APPLICATION_PATH . '/controllers');\r\n\t\tforeach ($dir as $file) {\r\n\t\t\tif ($file->isDir() || $file->isDot()) continue;\r\n\t\t\t$file = $file->getFileName();\r\n\t\t\t$pos = strpos($file, 'Controller');\r\n\t\t\tif ($pos === false) continue;\r\n\t\t\t$this->getAcl()->add(new Zend_Acl_Resource(strtolower(substr($file, 0, $pos))));\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t//add tabs as resources\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Dashboard'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Welcome'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Inspections'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Building Owners'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('My Company'));\t\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Buildings'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Inspection Companies'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('<i>Online</i> <b>DOOR</b>DATA'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('System Settings'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Log Out'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('User Files'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Help'));\r\n\t\t\r\n\t\t//add grids as resources\r\n\t\t\r\n\t\t/*Building Owners tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_buildings_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_employees_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_inspections_grid'));\r\n\t\t\r\n\t\t\r\n\t\t/*Inspection tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_inspects_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_door_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('hardware_grid', 'inspection_door_grid')); //###\r\n\r\n\t\t/*Buildings tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('building_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('building_inspection_grid'));\r\n\t\t\r\n\t\t/*Systems Settings tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('dictionary_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('users_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('user_roles_grid'));\r\n\t\t\r\n\t\t/*Inspection Company grid*/\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_company_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('emp_grid'));\r\n\t\t\r\n\t\t/*User File grid*/\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('user_file_grid'));\r\n\r\n\t}",
"public function setResource($resource);",
"function rewrite_url($url) {\n $base = str_replace($_SERVER[\"DOCUMENT_ROOT\"], \"\", __DIR__);\n $base = str_replace(\"/resources\", \"\", $base);\n return $base.$url;\n}",
"private function _addResource()\n {\n //Add Resource\n $this->assets->collection('css_header')\n ->addCss('/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css');\n\n $this->assets->collection('js_footer')\n ->addJs('/plugins/nestable/jquery.nestable.js')\n ->addJs('/plugins/nestable/ui-nestable.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modal.js')\n ->addJs('/plugins/bootstrap-modal/js/bootstrap-modalmanager.js')\n ->addJs('/templates/backend/default/js/ui-modals.js');\n }",
"function resources_url($filename = NULL)\n {\n return 'https://resources.crud4.com/v1/' . $filename;\n //return site_url('resources/' . $param);\n }",
"public function assetsCollectionGetSetTargetPath(UnitTester $I)\n {\n $I->wantToTest('Assets\\Collection - getTargetPath() / setTargetPath()');\n\n $collection = new Collection();\n $targetPath = '/assets';\n $collection->setTargetPath($targetPath);\n\n $I->assertSame($targetPath, $collection->getTargetPath());\n }",
"public function setUrl($url) {}"
] | [
"0.5712412",
"0.5692095",
"0.5576863",
"0.5458014",
"0.54302514",
"0.53973955",
"0.5370095",
"0.5344174",
"0.53110564",
"0.53083926",
"0.52649486",
"0.5191557",
"0.5187284",
"0.51769507",
"0.5165854",
"0.5149242",
"0.5123086",
"0.507771",
"0.5069371",
"0.5067489",
"0.5045059",
"0.50267565",
"0.5013092",
"0.49910605",
"0.49766883",
"0.49572787",
"0.4957221",
"0.49384028",
"0.49131304",
"0.48968056",
"0.48937738",
"0.4864085",
"0.48405114",
"0.48260772",
"0.48244682",
"0.48237345",
"0.48198077",
"0.48174813",
"0.479237",
"0.47561952",
"0.47528332",
"0.47512916",
"0.47502795",
"0.47502795",
"0.4747808",
"0.47431773",
"0.47417682",
"0.4739087",
"0.47371227",
"0.47282475",
"0.47178367",
"0.4716341",
"0.4716341",
"0.4716341",
"0.4716341",
"0.4716341",
"0.4716341",
"0.47093284",
"0.47043666",
"0.46983802",
"0.46801585",
"0.4676998",
"0.46725282",
"0.46672726",
"0.46629438",
"0.46621937",
"0.465549",
"0.46540666",
"0.46466523",
"0.4646589",
"0.46403137",
"0.46371093",
"0.4621156",
"0.46167845",
"0.46153468",
"0.46139413",
"0.4613173",
"0.46107844",
"0.46089324",
"0.46041024",
"0.4603638",
"0.4603271",
"0.45890552",
"0.45864177",
"0.45847774",
"0.45845497",
"0.4582258",
"0.45785442",
"0.45776486",
"0.45652846",
"0.4553964",
"0.4553048",
"0.4552107",
"0.4547613",
"0.45458594",
"0.4542304",
"0.45412925",
"0.4534998",
"0.45299685",
"0.45211613"
] | 0.5628316 | 2 |
Get target web resources | public function getWebResource() {
return $this->webResource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getResourceURIs()\n {\n $resources = array();\n\n $resources['logo'] = $this->getUrl('/resources/logo.png');//URI\n $resources['requestHandlerUrl'] = $this->getUrl('requestHandler.php');//URI //TODO: this should be an API URI (not sure if that will break something)\n $resources['self_apiUrl'] = self::$apiUrl;//URI\n\n return $resources;\n }",
"protected function getResources()\n\t{\n\t\treturn $this->arguments->getArgument(static::$RESOURCES_ARGUMENT_NAME)->getValue();\n\t}",
"abstract protected function getResources();",
"protected function getWebRoot() {}",
"protected function getWebRoot() {}",
"public static function get_resources() {\n if (self::$resource_list === NULL) {\n $base = self::$base_url;\n if (!self::$js_path) {\n self::$js_path = $base . 'media/js/';\n }\n elseif (substr(self::$js_path, -1) != \"/\") {\n // Ensure a trailing slash.\n self::$js_path .= \"/\";\n }\n if (!self::$css_path) {\n self::$css_path = $base . 'media/css/';\n }\n elseif (substr(self::$css_path, -1) != '/') {\n // Ensure a trailing slash.\n self::$css_path .= \"/\";\n }\n global $indicia_theme, $indicia_theme_path;\n if (!isset($indicia_theme)) {\n // Use default theme if page does not specify it's own.\n $indicia_theme = 'default';\n }\n if (!isset($indicia_theme_path)) {\n // Use default theme path if page does not specify it's own.\n $indicia_theme_path = preg_replace('/css\\/$/', 'themes/', self::$css_path);\n }\n // Ensure a trailing slash.\n if (substr($indicia_theme_path, -1) !== '/') {\n $indicia_theme_path .= '/';\n }\n self::$resource_list = [\n 'indiciaFns' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"indicia.functions.js\"],\n ],\n 'jquery' => [\n 'javascript' => [\n self::$js_path . 'jquery.js',\n self::$js_path . 'ie_vml_sizzlepatch_2.js',\n ],\n ],\n 'datepicker' => [\n 'deps' => ['jquery_cookie'],\n 'javascript' => [\n self::$js_path . 'indicia.datepicker.js',\n self::$js_path . 'date.polyfill/better-dom/dist/better-dom.min.js',\n self::$js_path . 'date.polyfill/better-dateinput-polyfill/dist/better-dateinput-polyfill.min.js',\n ]\n ],\n 'sortable' => [\n 'javascript' => ['https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.js'],\n ],\n 'openlayers' => [\n 'javascript' => [\n self::$js_path . (function_exists('iform_openlayers_get_file') ? iform_openlayers_get_file() : 'OpenLayers.js'),\n self::$js_path . 'proj4js.js',\n self::$js_path . 'proj4defs.js',\n self::$js_path . 'lang/en.js',\n ],\n ],\n 'graticule' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'indiciaGraticule.js'],\n ],\n 'clearLayer' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'clearLayer.js'],\n ],\n 'hoverControl' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'hoverControl.js'],\n ],\n 'addrowtogrid' => [\n 'deps' => ['validation'],\n 'javascript' => [self::$js_path . \"addRowToGrid.js\"],\n ],\n 'speciesFilterPopup' => [\n 'deps' => ['addrowtogrid'],\n 'javascript' => [self::$js_path . \"speciesFilterPopup.js\"],\n ],\n 'indiciaMapPanel' => [\n 'deps' => ['jquery', 'openlayers', 'jquery_ui', 'jquery_cookie', 'hoverControl'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMapPanel.js\"],\n ],\n 'indiciaMapEdit' => [\n 'deps' => ['indiciaMap'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMap.edit.js\"],\n ],\n 'postcode_search' => [\n 'javascript' => [self::$js_path . \"postcode_search.js\"],\n ],\n 'locationFinder' => [\n 'deps' => ['indiciaMapEdit'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMap.edit.locationFinder.js\"],\n ],\n 'createPersonalSites' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"createPersonalSites.js\"],\n ],\n 'autocomplete' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [self::$css_path . \"jquery.autocomplete.css\"],\n 'javascript' => [self::$js_path . \"jquery.autocomplete.js\"],\n ],\n 'addNewTaxon' => [\n 'javascript' => [self::$js_path . \"addNewTaxon.js\"],\n ],\n 'import' => [\n 'javascript' => [self::$js_path . \"import.js\"],\n ],\n 'indicia_locks' => [\n 'deps' => ['jquery_cookie', 'json'],\n 'javascript' => [self::$js_path . \"indicia.locks.js\"],\n ],\n 'jquery_cookie' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"jquery.cookie.js\"],\n ],\n 'jquery_ui' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [\n self::$css_path . 'jquery-ui.min.css',\n \"$indicia_theme_path$indicia_theme/jquery-ui.theme.min.css\",\n ],\n 'javascript' => [\n self::$js_path . 'jquery-ui.min.js',\n self::$js_path . 'jquery-ui.effects.js',\n ]\n ],\n 'jquery_ui_fr' => [\n 'deps' => ['jquery_ui'],\n 'javascript' => [self::$js_path . \"jquery.ui.datepicker-fr.js\"]\n ],\n 'jquery_form' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"jquery.form.min.js\"],\n ],\n 'reportPicker' => [\n 'deps' => ['treeview', 'fancybox'],\n 'javascript' => [self::$js_path . \"reportPicker.js\"],\n ],\n 'treeview' => ['deps' => ['jquery'], 'stylesheets' => [self::$css_path.\"jquery.treeview.css\"], 'javascript' => [self::$js_path.\"jquery.treeview.js\"]],\n 'treeview_async' => ['deps' => ['treeview'], 'javascript' => [self::$js_path.\"jquery.treeview.async.js\", self::$js_path.\"jquery.treeview.edit.js\"]],\n 'googlemaps' => [\n 'javascript' => [\"https://maps.google.com/maps/api/js?v=3\" . (empty(self::$google_maps_api_key) ? '' : '&key=' . self::$google_maps_api_key)],\n ],\n 'fancybox' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [self::$js_path . 'fancybox/dist/jquery.fancybox.min.css'],\n 'javascript' => [self::$js_path . 'fancybox/dist/jquery.fancybox.min.js'],\n ],\n 'treeBrowser' => [\n 'deps' => ['jquery', 'jquery_ui'],\n 'javascript' => [self::$js_path . 'jquery.treebrowser.js']\n ],\n 'defaultStylesheet' => [\n 'deps' => [''],\n 'stylesheets' => [\n self::$css_path . 'default_site.css',\n self::$css_path . 'theme-generic.css'\n ],\n 'javascript' => []\n ],\n 'validation' => [\n 'deps' => ['jquery'],\n 'javascript' => [\n self::$js_path . 'jquery.metadata.js',\n self::$js_path . 'jquery.validate.js',\n self::$js_path . 'additional-methods.js',\n ],\n ],\n 'plupload' => [\n 'deps' => ['jquery_ui', 'fancybox'],\n 'javascript' => [\n self::$js_path . 'jquery.uploader.js',\n self::$js_path . 'plupload/js/plupload.full.min.js',\n ]\n ],\n 'uploader' => [\n 'deps' => ['jquery', 'dmUploader'],\n 'javascript' => [\n self::$js_path . 'uploader.js',\n ],\n ],\n 'dmUploader' => [\n 'stylesheets' => [\n self::$js_path . 'uploader/dist/css/jquery.dm-uploader.min.css',\n ],\n 'javascript' => [\n self::$js_path . 'uploader/dist/js/jquery.dm-uploader.min.js',\n ]\n ],\n 'jqplot' => [\n 'stylesheets' => [self::$js_path . 'jqplot/jquery.jqplot.min.css'],\n 'javascript' => [\n self::$js_path . 'jqplot/jquery.jqplot.min.js',\n '[IE]' . self::$js_path . 'jqplot/excanvas.js'\n ],\n ],\n 'jqplot_bar' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.barRenderer.js',\n ],\n ],\n 'jqplot_pie' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.pieRenderer.js',\n ],\n ],\n 'jqplot_category_axis_renderer' => [\n 'javascript' => [self::$js_path . 'jqplot/plugins/jqplot.categoryAxisRenderer.js'],\n ],\n 'jqplot_canvas_axis_label_renderer' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.canvasTextRenderer.js',\n self::$js_path . 'jqplot/plugins/jqplot.canvasAxisLabelRenderer.js',\n ],\n ],\n 'jqplot_trendline' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.trendline.js',\n ],\n ],\n 'reportgrid' => [\n 'deps' => ['jquery_ui', 'jquery_cookie'],\n 'javascript' => [\n self::$js_path . 'jquery.reportgrid.js',\n ]\n ],\n 'reportfilters' => [\n 'deps' => ['reportgrid'],\n 'stylesheets' => [self::$css_path . 'report-filters.css'],\n 'javascript' => [self::$js_path . 'reportFilters.js'],\n ],\n 'tabs' => [\n 'deps' => ['jquery_ui'],\n 'javascript' => [self::$js_path . 'tabs.js'],\n ],\n 'wizardprogress' => [\n 'deps' => ['tabs'],\n 'stylesheets' => [self::$css_path . 'wizard_progress.css']\n ],\n 'spatialReports' => [\n 'javascript' => [self::$js_path . 'spatialReports.js'],\n ],\n 'jsonwidget' => [\n 'deps' => ['jquery'],\n 'javascript' => [\n self::$js_path . 'jsonwidget/jsonedit.js',\n self::$js_path . 'jquery.jsonwidget.js',\n ],\n 'stylesheets' => [self::$css_path . 'jsonwidget.css'],\n ],\n 'timeentry' => [\n 'javascript' => [self::$js_path . 'jquery.timeentry.min.js'],\n ],\n 'verification' => [\n 'javascript' => [self::$js_path . 'verification.js'],\n ],\n 'control_speciesmap_controls' => [\n 'deps' => [\n 'jquery',\n 'openlayers',\n 'addrowtogrid',\n 'validation',\n ],\n 'javascript' => [\n self::$js_path . 'controls/speciesmap_controls.js',\n ],\n ],\n 'complexAttrGrid' => [\n 'javascript' => [self::$js_path . 'complexAttrGrid.js'],\n ],\n 'footable' => [\n 'stylesheets' => [self::$js_path . 'footable/css/footable.core.min.css'],\n // Note, the minified version not used as it does not contain bugfixes.\n // 'javascript' => [self::$js_path.'footable/dist/footable.min.js']\n 'javascript' => [self::$js_path . 'footable/js/footable.js'],\n 'deps' => ['jquery'],\n ],\n 'footableSort' => [\n 'javascript' => [self::$js_path . 'footable/dist/footable.sort.min.js'],\n 'deps' => ['footable'],\n ],\n 'footableFilter' => [\n 'javascript' => [self::$js_path . 'footable/dist/footable.filter.min.js'],\n 'deps' => ['footable'],\n ],\n 'indiciaFootableReport' => [\n 'javascript' => [self::$js_path . 'jquery.indiciaFootableReport.js'],\n 'deps' => ['footable'],\n ],\n 'indiciaFootableChecklist' => [\n 'stylesheets' => [self::$css_path . 'jquery.indiciaFootableChecklist.css'],\n 'javascript' => [self::$js_path . 'jquery.indiciaFootableChecklist.js'],\n 'deps' => ['footable']\n ],\n 'html2pdf' => [\n 'javascript' => [\n self::$js_path . 'html2pdf/dist/html2pdf.bundle.min.js',\n ],\n ],\n 'review_input' => [\n 'javascript' => [self::$js_path . 'jquery.reviewInput.js'],\n ],\n 'sub_list' => [\n 'javascript' => [self::$js_path . 'sub_list.js'],\n ],\n 'georeference_default_geoportal_lu' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/geoportal_lu.js'],\n ],\n 'georeference_default_nominatim' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/nominatim.js'],\n ],\n 'georeference_default_google_places' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/google_places.js'],\n ],\n 'georeference_default_indicia_locations' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/indicia_locations.js'],\n ],\n 'sref_handlers_2169' => [\n 'javascript' => [self::$js_path . 'drivers/sref/2169.js'],\n ],\n 'sref_handlers_4326' => [\n 'javascript' => [self::$js_path . 'drivers/sref/4326.js'],\n ],\n 'sref_handlers_osgb' => [\n 'javascript' => [self::$js_path . 'drivers/sref/osgb.js'],\n ],\n 'sref_handlers_osie' => [\n 'javascript' => [self::$js_path . 'drivers/sref/osie.js'],\n ],\n 'font_awesome' => [\n 'stylesheets' => ['https://use.fontawesome.com/releases/v5.15.4/css/all.css']\n ],\n 'leaflet' => [\n 'stylesheets' => ['https://unpkg.com/[email protected]/dist/leaflet.css'],\n 'javascript' => [\n 'https://unpkg.com/[email protected]/dist/leaflet.js',\n 'https://cdnjs.cloudflare.com/ajax/libs/wicket/1.3.3/wicket.min.js',\n 'https://cdnjs.cloudflare.com/ajax/libs/wicket/1.3.3/wicket-leaflet.min.js',\n self::$js_path . 'leaflet.heat/dist/leaflet-heat.js',\n ],\n ],\n 'leaflet_google' => [\n 'deps' => [\n 'googlemaps'\n ],\n 'javascript' => [\n 'https://unpkg.com/leaflet.gridlayer.googlemutant@latest/dist/Leaflet.GoogleMutant.js',\n ],\n ],\n 'datacomponents' => [\n 'deps' => [\n 'font_awesome',\n 'indiciaFootableReport',\n 'jquery_cookie',\n ],\n 'javascript' => [\n self::$js_path . 'indicia.datacomponents/idc.core.js',\n self::$js_path . 'indicia.datacomponents/idc.controlLayout.js',\n self::$js_path . 'indicia.datacomponents/idc.esDataSource.js',\n self::$js_path . 'indicia.datacomponents/idc.pager.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.customScript.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.runCustomVerificationRulesets.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.cardGallery.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.dataGrid.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.esDownload.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.leafletMap.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.recordsMover.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.recordDetailsPane.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.templatedOutput.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.verificationButtons.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.filterSummary.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.permissionFilters.js',\n 'https://unpkg.com/@ungap/url-search-params',\n ],\n ],\n 'file_classifier' => [\n 'deps' => [\n 'plupload',\n 'jquery_ui',\n ],\n 'javascript' => [\n self::$js_path . 'jquery.fileClassifier.js',\n ],\n ],\n 'brc_atlas' => [\n 'deps' => [\n 'd3',\n 'bigr',\n 'leaflet',\n ],\n 'stylesheets' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brcatlas.umd.css',\n ],\n 'javascript' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brcatlas.umd.min.js',\n ],\n ],\n 'brc_charts' => [\n 'deps' => [\n 'd3',\n ],\n 'stylesheets' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brccharts.umd.css',\n ],\n 'javascript' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brccharts.umd.min.js',\n ],\n ],\n 'd3' => [\n 'javascript' => [\n 'https://d3js.org/d3.v5.min.js',\n ],\n ],\n 'bigr' => [\n 'javascript' => [\n 'https://unpkg.com/[email protected]/dist/bigr.min.umd.js',\n ],\n ],\n ];\n }\n return self::$resource_list;\n }",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getResource();",
"public function getWebPath()\n {\n }",
"public function assets()\r\n {\r\n return $this->httpRequest(\"v2/assets\");\r\n }",
"public function getResourceContents()\n {\n $fileName = $this->getUrlParameter('get');\n\n if (!preg_match('/^[a-z-]+\\.(css|gif|js)$/', $fileName)) {\n $this->badRequest('Invalid file name.');\n }\n\n $resourcePath = realpath(Path::getPublicDirPathInLibrary() . $fileName);\n\n if (!is_file($resourcePath)) {\n $this->badRequest(sprintf('File \"%s\" could not be found.', $fileName));\n }\n\n $fileInfo = pathinfo($resourcePath);\n $mimeTypes = ['css' => 'text/css', 'gif' => 'image/gif', 'js' => 'application/x-javascript'];\n\n return (new Response(file_get_contents($resourcePath), 200))\n ->header('Content-Type', $mimeTypes[$fileInfo['extension']])\n ->header('Content-Length', filesize($resourcePath));\n }",
"public function getResources()\n {\n return $this->resources;\n }",
"public function getResources()\n {\n return $this->resources;\n }",
"public function getResources()\n {\n return $this->resources;\n }",
"public function getResources()\n {\n return $this->resources;\n }",
"public function getResource() {}",
"public function webPath();",
"public function getUrls()\r\n {\r\n }",
"function get_the_js_urls() {\n\n md_get_the_js_urls();\n \n }",
"function oz_get_resource_path ()\r\n{\r\n\t//Defaults to \"./res/\" URI path relative to the current url.\r\n\t//This may be changed to point to some other folders in case Apache mod_rewrite or\r\n\t//SEO friendly urls are used and the \"./res/\" path doesn't point to correct location.\r\n\treturn $_REQUEST['oz_res_uri'];\r\n}",
"public function getUrls(): array;",
"public function getUrls(): array;",
"public function obtainWebservers()\n {\n return $this->performRequest('GET', '/webservers');\n }",
"function getSources();",
"protected function get_target_images() {\n return $this->parameters['target_images'];\n }",
"function showResources() {\n $output = $this->outputBoilerplate('resources.html');\n return $output;\n }",
"function get_the_css_urls() {\n\n md_get_the_css_urls();\n \n }",
"public static function assets(){\n return self::adapterURI().\"assets/\";\n }",
"public function loadResources() {}",
"protected function getResourcePath()\n {\n return preg_replace('/\\?.*$/', '?kizilare_debug=1&res=', $_SERVER['REQUEST_URI']);\n }",
"public function getAssets()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('assets');\n }",
"public function getResources(): array\n {\n return $this->resources;\n }",
"public function getClientURLs()\n {\n return $this->clientURLs;\n }",
"public function getWebPathname();",
"public function getMagentoWebsites();",
"function getAssets();",
"public function getResourcesPath()\n {\n return $this->createPath($this->sourcePath, 'Asar', 'Resources');\n }",
"function getWebResources($zone){\n \ttry{\n\n \t\t$nodes = getZoneNodes($zone);\n\n \t\t\t$db = getConnection(); \n \t\t$sql = \"SELECT name,endpoint,value FROM node_resources WHERE node = ?\";\n \t\tforeach($nodes as $node){\n\t\t\t\t$stmt = $db->prepare($sql);\n\t\t\t\t$stmt->execute(array($node['id']));\n\t\t\t\t$result = $stmt->fetchAll();\n\t\t\t\tforeach($result as $row){\n echo \"<tr>\";\n echo \"<td>\".$row['name'].\"</td>\";\n echo \"<td>\".$row['endpoint'].\"</td>\";\n echo \"<td style='text-align:center'>\".$row['value'].\"</td>\";\n echo \"</tr>\";\n\t\t\t\t}\n\t\t\t\t$stmt = null;\n \t\t}\n\t\t\t$db = null;\n\n \t}\n \tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n }",
"function getUrls(){\n $urls = $this->all('schema:url');\n return $urls;\n }",
"public function getResources(): array {\n\t\tif (is_null($this->resources)) {\n\t\t $this->loadResources();\n\t\t}\n\t\treturn $this->resources;\n\t}",
"public function getResourceSets();",
"public function getResources()\n {\n// 18.02.2015 php 5.2\n// $resources = array_map(function ($resource) {\n// return is_array($resource) ? $resource : array($resource);\n// }, $this->getRawResources());\n//\n $resources = array_map(array(\"FikenHal\", \"inner\"), $this->getRawResources());\n\n return $resources;\n }",
"public function getAllImagesUrls() {\n $matches = [];\n preg_match_all('@src=\"([^\"]+)\"@', $this->description, $matches);\n return $matches[1];\n }",
"private function generateUrls(): object\n\t{\n\t\treturn $this->get('gameMediaService/v2/c2s/ugc/' . $this->id() . '/url');\n\t}",
"public function getWebPath()\n {\n// ... $webPath being the full image URL, to be used in templates\n\n return $webPath;\n }",
"protected function _getResource()\n {\n return parent::_getResource();\n }",
"protected function _getResource()\n {\n return parent::_getResource();\n }",
"protected function _getResource()\n {\n return parent::_getResource();\n }",
"public function findFirstWebFolder() {}",
"function sloodle_get_web_path()\n {\n // Check for the protocol\n if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') $protocol = \"http\";\n else $protocol = \"https\";\n // Get the host name (e.g. domain)\n $host = $_SERVER['SERVER_NAME'];\n // Finally, get the script path/name\n $file = $_SERVER['SCRIPT_NAME'];\n \n return $protocol.'://'.$host.$file;\n }",
"public function getResourceUri()\n {\n return $this->resource_uri;\n }",
"public function getWebappPath();",
"public function getResourcePath();",
"public function getUrls() {\n return $this->urls;\n }",
"public function retrieveThemes()\n {\n return $this->start()->uri(\"/api/theme\")\n ->get()\n ->go();\n }",
"function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}",
"protected function includeResources()\n {\n $path = craft()->request->path;\n\n if (preg_match('/^settings\\/sections\\/[0-9]\\/entrytypes\\/([0-9]|new)/', $path))\n {\n $target = 'entrytype';\n }\n else if (preg_match('/^entries\\/.*\\/([0-9]|new)/', $path))\n {\n $target = 'entry';\n } else {\n return false;\n }\n\n // Get revision manifest\n $manifestPath = dirname(__FILE__) . '/resources/rev-manifest.json';\n $manifest = (file_exists($manifestPath) && $manifest = file_get_contents($manifestPath)) ? json_decode($manifest) : false;\n\n switch ($target)\n {\n case 'entry' :\n $url = 'javascripts/EditForm.js';\n break;\n case 'entrytype' :\n $url = 'javascripts/FLD.js';\n break;\n }\n\n craft()->templates->includeJsResource('reasons/' . ($manifest ? $manifest->$url : $url));\n\n // Reasons data. TODO: Could stand to be optimized!\n $data = json_encode(array(\n 'conditionals' => craft()->reasons->getAllConditionals(),\n 'toggleFields' => craft()->reasons->getToggleFields(),\n 'entryTypeIds' => craft()->reasons->getEntryTypeIds(),\n 'fieldIds' => craft()->reasons->getFieldIds(),\n ));\n\n $commonCss = 'stylesheets/reasons.css';\n craft()->templates->includeCssResource('reasons/' . ($manifest ? $manifest->$commonCss : $commonCss));\n craft()->templates->includeJs('window._ReasonsData='.$data.';');\n\n }",
"private static function getWebRoot() {\n if (file_exists(realpath(__DIR__ . '/../../../../../public_html'))) {\n return self::addlSash(\"public_html\");\n } else {\n return self::addlSash(\"web\");\n }\n }",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getDotmailerResources();",
"public function getPageUris();",
"function getScriptUrl() ;",
"public function getTargetPages() {\n\t\treturn $this->targetPages;\n\t}",
"public function GetViewAllURL();",
"public function GetTargetResource()\n {\n return $this->_targetResource;\n }",
"public function allResourcesPath(): string\n {\n return \"/apis/{$this->getApiVersion()}/namespaces/{$this->getNamespace()}/deployments\";\n }",
"public function getSources() {\n return $this->parameterMethod() == self::METHOD_GET ? self::SOURCE_URL : self::SOURCE_REQUEST;\n }",
"public function getCssSources(): string\n {\n return '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'bower_components/jquery-ui/themes/ui-lightness/jquery-ui.min.css\" />'\n . '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'bower_components/jquery-ui/themes/ui-lightness/theme.css\" />'\n . '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'themes/default/style.css\" />';\n }",
"function Assets() {\r\n\t\t\treturn $this->QueryPublic( 'Assets' );\r\n\t\t}",
"function getBaseUrl()\n{\n $doc_root_folders = utf8_explode(\"/\", $_SERVER['DOCUMENT_ROOT']);\n $cwd__folders = utf8_explode(\"/\", getcwd());\n //the difference between those is the path from doc root to the folder where\n //all files for this URI reside\n $path_from_doc_root = implode(\"/\", array_diff($cwd__folders, $doc_root_folders));\n return $_SERVER['HTTP_HOST'].'/'.$path_from_doc_root;\n}",
"public function getResource()\n {\n $path = $this->getPath();\n $query = isset($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n return $path . $query;\n }",
"function scf_resources_dir() {\n $res_modules = array('gene', 'antibody', 'modelorganism', 'researchstatement');\n\n $nodes = array();\n $pagers = array();\n\n $elt = 0;\n foreach ($res_modules as $mod) {\n if (module_exists($mod)) {\n list($n, $pager) = module_invoke($mod, 'load_recent_nodes', 5, $elt++);\n $nodes[$mod] = $n;\n $pagers[$mod] = $pager;\n }\n }\n\n return theme('bio_resources', $nodes, $pagers);\n}",
"public static function runtimeScriptUrls(): array {\n\t\treturn [];\n\t}",
"public function getImages()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('images');\n }",
"public function getResources($inherited = true, $create = false, $entryKey = null) {}",
"public function getWebsites()\n {\n return $this->websites;\n }",
"private function _getResourceCss()\n {\n return array(\n '../libs/css/plugins/validationEngine.jquery.css'\n );\n }",
"public function index()\n {\n $sources = $this->allResources($this->sourceRepository);\n\n return SourceResource::collection($sources);\n }",
"public function myResources()\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $data['resources'] = $this->resourceRepository->getResourcesByUserId($currentUser['id']);\n return APIHandler::response(1, \"My Resources\", $data);\n }",
"function getTargetFile() ;",
"public function getWebURI()\n {\n\t\treturn $this->response[self::FIELD_RESULT][self::FIELD_WEB_URI];\n\t}",
"public function getAssets();",
"public function getAssets();",
"public function getWebsites()\n\t{\n\t\treturn $this->websites;\n\t}",
"protected function getSourcesContent(){\n if(empty($this->sources)){\n return;\n }\n $content = array();\n foreach($this->sources as $sourceFile){\n $content[] = file_get_contents($sourceFile);\n }\n return $content;\n }",
"public function getSrc();",
"function resources_url($filename = NULL)\n {\n return 'https://resources.crud4.com/v1/' . $filename;\n //return site_url('resources/' . $param);\n }",
"public function get_allowed_urls()\n {\n }",
"public function getAssets()\n {\n return $this->getService('assets');\n }"
] | [
"0.6624343",
"0.60120773",
"0.6006819",
"0.59519875",
"0.5951842",
"0.59158397",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5895915",
"0.5873788",
"0.5781682",
"0.5760574",
"0.56977737",
"0.56977737",
"0.56977737",
"0.56977737",
"0.5679254",
"0.56729007",
"0.56544393",
"0.5647196",
"0.55330586",
"0.5503729",
"0.5503729",
"0.54917586",
"0.54643834",
"0.54615843",
"0.545474",
"0.5436084",
"0.5435143",
"0.54056686",
"0.5386288",
"0.5374716",
"0.5347964",
"0.5314125",
"0.5287376",
"0.52810967",
"0.52674955",
"0.5260053",
"0.5249159",
"0.5244761",
"0.5233789",
"0.5219791",
"0.52086097",
"0.52076995",
"0.5206118",
"0.51949596",
"0.51908135",
"0.51908135",
"0.51908135",
"0.51872826",
"0.51803476",
"0.5138171",
"0.51208633",
"0.5116413",
"0.5113336",
"0.5104615",
"0.51025575",
"0.5100346",
"0.5098544",
"0.5093831",
"0.5093831",
"0.5093831",
"0.5093831",
"0.5093831",
"0.5093831",
"0.5093831",
"0.5093831",
"0.50922793",
"0.50894576",
"0.50710917",
"0.5059262",
"0.5056826",
"0.5056255",
"0.5049216",
"0.50433946",
"0.50383353",
"0.5032923",
"0.5022986",
"0.50165457",
"0.5015913",
"0.5011876",
"0.5008711",
"0.5005315",
"0.5001229",
"0.5000652",
"0.49948248",
"0.49903798",
"0.49893546",
"0.49864966",
"0.4982492",
"0.4982492",
"0.4982283",
"0.49808118",
"0.49756205",
"0.4964014",
"0.49624327",
"0.4954592"
] | 0.566205 | 21 |
Set current class loader if exits | public function setClassLoader($classLoader) {
$this->classLoader = $classLoader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initializeClassLoader() {\n\t\tif (t3lib_div::int_from_ver( TYPO3_version ) < 6000000 ) {\n\t\t\tif (!class_exists('Tx_Extbase_Utility_ClassLoader', FALSE)) {\n\t\t\t\trequire(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');\n\t\t\t}\n\n\t\t\t$classLoader = new Tx_Extbase_Utility_ClassLoader();\n\t\t\tspl_autoload_register(\n\t\t\t\tarray(\n\t\t\t\t\t$classLoader,\n\t\t\t\t\t'loadClass'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}",
"public static function __classLoaded()\n {\n\t\tif (empty(static::$layers) && class_exists('Git')) {\n\t\t\tstatic::$layers = \\Git::$repositories;\n\t\t}\n }",
"private function setAutoLoader() {\n \n spl_autoload_register(array('self', 'autoLoader'));\n \n }",
"protected static function getClassLoader() {}",
"public static function registerClassLoadingInformation() {}",
"private function initLoader() {\n $this->_loader = new Loader();\n\t}",
"private function init()\n\t{\n\t\tforeach (isLoadedClass() as $objName)\n\t\t{\n\t\t\t$this->$objName =& loadClass('', '', $objName);\n\t\t}\n\t}",
"public function init()\n {\n // Register the loader method\n spl_autoload_register(array(__CLASS__, '_loadClasses'));\n }",
"public static function init(){\n if( self::$loader == null ){\n self::$loader = new self();\n }\n return self::$loader;\n }",
"private function loadClasses()\n\t\t{\n\t\t\t// foreach($GLOBALS['classes'] as $var => $class)\n\t\t\t// {\n\t\t\t\t// $this->$var = $class;\n\t\t\t// }\n\t\t\t\n\t\t\t// $this->load = _new('loader');\n\t\t\t\n\t\t\t/** Registramos todos os objetos que serão necessários **/\n\t\t\tforeach(Registry::getAll() as $var => $object)\n\t\t\t{\n\t\t\t\t$this->$var = $object;\n\t\t\t}\n\t\t\t\n\t\t\t// E também a classe loader\n\t\t\t$this->load = Registry::get('loader');\n\t\t}",
"protected function autoLoader()\n {\n $bool = file_exists(MAIN_PATH . '/bin/autoload.php');\n\n if ($bool) {\n $this->loader = require_once MAIN_PATH . '/bin/autoload.php';\n }\n\n return $this;\n }",
"protected function registerClassLoader()\n {\n $namespace = $this->active()->get('namespace');\n $loader = new ClassLoader();\n\n $loader->addPsr4(\"Themes\\\\{$namespace}\\\\\", theme_path(\"{$namespace}/src\"));\n $loader->register();\n }",
"public function setLoader($loader) {\n $this->loader= $loader;\n }",
"public function ensureClassLoadingInformationExists() {}",
"static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }",
"#[@test]\n public function after_is_default() {\n $loader= $this->track(\\lang\\ClassLoader::registerPath('.'));\n $loaders= \\lang\\ClassLoader::getLoaders();\n $this->assertEquals($loader, $loaders[sizeof($loaders)- 1]);\n }",
"function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATOR;\n\n # Current Working Directory\n $dir = __DIR__;\n\n # replace namespace separator with directory separator (prolly not required)\n $className = str_replace('\\\\', $ds, $className);\n\n # get full name of file containing the required class\n $file = \"{$dir}{$ds}{$className}.php\";\n\n # get file if it is readable\n if (is_readable($file)) {\n require_once $file;\n }\n });\n }",
"public function registerAutoloader()\n {\n if (!$this->isLoaderRegistered()) {\n $this->_loaderRegistered = spl_autoload_register(array($this, 'loadClass'));\n }\n }",
"public static function __classLoaded()\n {\n if (!self::$issuer) {\n self::$issuer = Site::getConfig('primary_hostname');\n }\n }",
"function rum_class_loader() {\n $loader = new UniversalClassLoader();\n $loader->registerNamespace('Rum', __DIR__ . '/lib');\n $loader->register();\n}",
"protected function loadAutoloader()\n {\n new Autoloader();\n }",
"public function load(): void\n {\n $requested = 0;\n $loaded = 0;\n foreach ($this->storage->loadClassList() as $class) {\n ++$requested;\n if ($this->accept($class) && !class_exists($class, false)) {\n ++$loaded;\n if ($this->verbose) {\n echo \"[Preloader] Loading {$class}\" . PHP_EOL;\n }\n class_exists($class, true);\n }\n }\n\n if ($this->verbose) {\n echo \"[Preloader] Preloaded {$loaded}/{$requested} classes\" . PHP_EOL;\n }\n }",
"public function getClassLoader() {\n return $this->classLoader;\n }",
"private function _enableAutoloader()\n {\n Zend_Loader_Autoloader::getInstance()->pushAutoloader(array('P4Cms_Loader', 'autoload'));\n }",
"public static function LOADER(){\n spl_autoload_register(array(__CLASS__, \"requireClass\"));\n }",
"function my_autoloader($class) {\n if ( $class != \"ACF\" )\n include 'classes/' . $class . '.class.php';\n }",
"public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n }",
"public static function init_autoload() {\n spl_autoload_register(function ($class) {\n self::autoload_path($class);\n });\n }",
"public static function start()\n\t{\n\t\tspl_autoload_register('Autoloader::init', true, true);\n\t}",
"public static function setAutoLoader($loader) {\n self::$autoLoader = $loader;\n }",
"function spl_autoload_call(string $class): void {}",
"public static function setLoader($loader)\n\t{\n\t\tstatic::$_parser_loader = $loader;\n\t}",
"function autoloaderCurrentFolder($className)\n{\n if (file_exists($className . '.php')) {\n include $className . '.php';\n }\n}",
"public function setClassLoaders($classLoaders);",
"protected function getClassLoaderService()\n {\n $this->services['class_loader'] = $instance = new \\phpbb\\class_loader('phpbb\\\\', './../includes/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"protected function includeAndStartCoreBootstrap()\n {\n $classLoaderFilepath = $this->getClassLoaderFilepath();\n\n $classLoader = require $classLoaderFilepath;\n\n $this->bootstrap->initializeClassLoader($classLoader)\n ->baseSetup()\n ->loadConfigurationAndInitialize(true)\n ->loadTypo3LoadedExtAndExtLocalconf(true)\n ->initializeBackendRouter()\n ->setFinalCachingFrameworkCacheConfiguration()\n ->defineLoggingAndExceptionConstants()\n ->unsetReservedGlobalVariables();\n }",
"public function registerAutoloader()\n {\n spl_autoload_register(array($this,'loadClass'),true, false);\n }",
"public function __construct() {\n spl_autoload_register(array($this, 'loader'));\n }",
"protected function initFileLoader() \n\t{\n\t\t$this->fileLoader = new FileLoader();\n\t}",
"public function setLoader(Loader $loader): self;",
"public function start()\n\t{\n\t\t$this->define_home_dir_constant();\n\t\t$this->register_root_namespace();\n\t\tspl_autoload_register(array($this, 'autoload'));\n\t}",
"private function bootload(): void\n {\n $this->bootloader->bootload(static::LOAD);\n }",
"static public function initialize()\r\n {\r\n spl_autoload_register(\"self::load\");\r\n }",
"public static function registerAutoloader() {\n spl_autoload_register(__NAMESPACE__ . \"\\\\Framework::autoload\");\n }",
"public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));\n spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));\n spl_autoload_register(array('AutoLoader', 'autoloadZetaComponents'));\n spl_autoload_register(array('AutoLoader', 'autoloadTcpdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadPdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadMht'));\n }",
"public static function resetClassPath ()\n\t{\n\n\t\tself::$path = \"kanji/app/\";\n\t}",
"function __autoload($className) {\n if (Inform8Context::getClassRegistry()->getClass($className) != NULL) { \n include Inform8Context::getClassRegistry()->getClass($className); \n }\n }",
"public function tearDown() {\n foreach ($this->registered as $l) {\n \\lang\\ClassLoader::removeLoader($l);\n }\n }",
"public static function register_autoloader()\n {\n }",
"function my_class_loader ($class) {\n include 'classes' . DIRECTORY_SEPARATOR . $class . '.class.php';\n}",
"private function loadClass() {\n $this->_instances = array();\n\n $this->_instances['log'] = new Log();\n if(ENVIRONMENT == self::ENVIRONMENT_DEV) {\n $this->_instances['debug'] = new Debug();\n $this->_instances['panel'] = new Panel();\n }\n $this->_instances['controller'] = null;\n $this->_instances['configuration'] = new Configuration();\n $this->_instances['routing'] = new Routing();\n }",
"public function getClassLoaders();",
"static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\t\t\t\n\t\t\tself::loadHelper($type);\n\t\t}\n\n\t\t// Autoload core components.\n\t\tforeach ($autoload['core'] as $type)\n\t\t{\t\t\t\n\t\t\tself::initCoreComponent($type);\n\t\t}\n\n\t\t/*\n\t\tif(SHIN_Core::$_benchmark){\n\t\t\tSHIN_Core::$_benchmark->mark('code_start');\n\t\t}\n\t\t*/\n\t\t\n\t\t// Autoload libraries.\n\t\tforeach ($autoload['libraries'] as $type)\n\t\t{\n\t\t\tself::loadLibrary($type, TRUE);\n\t\t}\n\n\t\t// Autoload models.\n\t\tforeach ($autoload['models'] as $type)\n\t\t{\n\t\t\tself::loadModel($type, TRUE);\n\t\t}\n\t}",
"public function init() {\n if (!class_exists(TableBuilderManager::class)) {\n $loader = new ClassLoader();\n $loader->addPsr4('Drush\\\\dmt_structure_export\\\\', __DIR__ . '/src');\n $loader->register();\n }\n }",
"function classLoader($class){\n $filename = $class . '.class.php';\n $file ='classes'. DIRECTORY_SEPARATOR . $filename;\n\n // Smarty ligger i libs-mappa.\n if ($class == 'Smarty') {\n $file = 'libs' . DIRECTORY_SEPARATOR . $filename;\n }\n if (!file_exists($file))\n {\n return false;\n }\n\n include $file;\n}",
"private function setAllLoaded()\n {\n $class_reflection = new ReflectionClass(get_class($this));\n do {\n if ($class_reflection->isInstantiable())\n $this->setLoadedFromDb($class_reflection->getName());\n\n } while (($class_reflection = $class_reflection->getParentClass()) && # get the parent\n $class_reflection->getName() != __CLASS__); # check that we're not hitting the top\n }",
"protected function getClassLoader_ExtService()\n {\n $this->services['class_loader.ext'] = $instance = new \\phpbb\\class_loader('\\\\', './../ext/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"public static function initLoader()\n\t{\n\t\t$views_paths = \\Config::get('parser.View_Twig.views_paths', array(APPPATH . 'views'));\n static::$_parser_loader = new Twig_Loader_Filesystem($views_paths);\n\t}",
"function glu_class_autoloader($c) {\n include dirname(__FILE__). DIRECTORY_SEPARATOR . strtolower($c) . '.php';\n}",
"public static function __autoload()\n\t{\n\t\tself::$FPATH = dirname(__DIR__);\n\t\tself::$APATH = self::detect_project();\n\n\t\tspl_autoload_register(array(__CLASS__, 'load'));\n\n\t\tself::cache_files();\n\t\tself::import_initializers();\n\t}",
"function setComposerLoader($file)\r\n {\r\n }",
"public static function init()\n {\n // Autoloader.\n spl_autoload_register(\n function ($class) {\n // Does the class use this namespace prefix?\n $found = false;\n $baseDir = '';\n $classLen = 0;\n\n foreach (Autoloader::$registeredNamespaces as $prefix => $path) {\n $len = mb_strlen($prefix);\n if (strncmp($prefix, $class, $len) == 0) {\n $found = true;\n $baseDir = $path;\n $classLen = $len;\n } //end if\n }//end foreach\n\n if ($found === false) {\n // The namespace is not registered for this autoloader.\n return;\n }//end if\n\n $relativeClass = mb_substr($class, $classLen);\n\n $endpath = str_replace('\\\\', '/', $relativeClass).'.php';\n $file = $baseDir.$endpath;\n\n // Try the public folders.\n if (file_exists($file) === true) {\n include $file;\n\n return;\n }\n\n // Try the admin folder.\n if (defined('ADMINPAGE') === true) {\n $file = $baseDir.ADMIN_FOLDER.$endpath;\n if (file_exists($file) === true) {\n include $file;\n\n return;\n }\n }\n\n throw new \\Exception('Class '.$class.' not found.');\n }\n );\n }",
"public static function getClassLoader()\n {\n if (static::$loader === null) {\n\n spl_autoload_register(array('NamespaceClassLoader', 'loadClassLoader'), true, true);\n static::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();\n spl_autoload_unregister(array('NamespaceClassLoader', 'loadClassLoader'));\n static::$loader->register();\n }\n\n return static::$loader;\n }",
"function setClassPath($value) {\n\t\t//$path = realpath($value . '/') . '/';\n\t\t$GLOBALS['amfphp']['classPath'] = $value;\n\t}",
"protected function initLoader()\n {\n $config = $this->di->getShared('config');\n $loader = new Loader;\n $loader->registerNamespaces(\n [\n 'Phosphorum\\Models' => $config->get('application')->modelsDir,\n 'Phosphorum\\Controllers' => $config->get('application')->controllersDir,\n 'Phosphorum\\Forms' => $config->get('application')->formsDir,\n 'Phosphorum' => $config->get('application')->libraryDir\n ]\n );\n\n $loader->register();\n $this->di->setShared('loader', $loader);\n\n return $loader;\n }",
"private function _initAutoloaderConfig()\n {\n require_once __DIR__ . '/Loader/AutoloaderFactory.php';\n \n AutoloaderFactory::factory(array(\n 'Spark\\Loader\\StandardAutoloader' => array(\n 'autoregister_framework' => true\n ),\n ));\n }",
"public function init_component_loaders () {\n\t\t$this->load_active_components( 'bundled' );\n\t\t$this->load_active_components( 'downloadable' );\n\t}",
"public static function autoloader($class)\n {\n }",
"public function setLoader(LoaderInterface $loader)\n {\n $this->loader = $loader;\n }",
"protected function _initAutoload() {\r\n $autoLoader = Zend_Loader_Autoloader::getInstance();\r\n $autoLoader->registerNamespace('CMS_');\r\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => '', 'resourceTypes' => array('form' => array('path' => 'forms/', 'namespace' => 'Form_',), 'model' => array('path' => 'models/', 'namespace' => 'Model_'),),));\r\n // Return it so that it can be stored by the bootstrap\r\n return $autoLoader;\r\n }",
"public function loadClasses(){\n spl_autoload_register(function($className){\n require_once preg_replace(\"/\\\\\\\\/\", \"/\", $className).\".php\";\n });\n }",
"public function __construct()\n\t{\n\t\t$this->_ci_classes =& is_loaded();\n\n\t\taddLog(array('file_name'=>'Loader','content'=>'Loader Class Initialized'));\n\t}",
"public function injectClassLoader(\\F3\\FLOW3\\Resource\\ClassLoader $classLoader) {\n\t\t$this->classLoader = $classLoader;\n\t}",
"public function registerAutoloader(): void\n {\n spl_autoload_register(function(string $class_name): void {\n if (!strpos($class_name, \"Factory\")) {\n return;\n }\n $len = strlen($class_name);\n $facLen = strlen(\"Factory\");\n\n if (substr($class_name, $len - $facLen) !== \"Factory\") {\n return;\n }\n\n // Check if this is a namespace that Magento will create factories for\n $namespaces = static::getModuleNamespaces();\n $validNamespace = false;\n foreach ($namespaces as $namespace) {\n if (strpos($class_name, $namespace) === 0) {\n $validNamespace = true;\n break;\n }\n }\n\n if (!$validNamespace) {\n return;\n }\n\n // Get the class's base name\n $base = substr($class_name, 0, $len - $facLen);\n\n if (!class_exists($base)) {\n return;\n }\n\n $this->createMockFactory($base);\n });\n }",
"public function unregister () {\r\n\t\tspl_autoload_unregister( array( $this, 'loadClass' ) );\r\n\t}",
"public function registerAutoloaders()\n {\n }",
"function __autoload($class_name) {include $class_name . '.php';}",
"public static function initModuleLoading(){\n\n\t}",
"public function unregister()\n\t{\n\t\tspl_autoload_unregister([$this, 'loadClass']);\n\t}",
"function class_loader($class) {\n require('classes/' . $class . '.php');\n}",
"public function setAutoloader(?string $autoloaderPath = null): self\n {\n $options = [$autoloaderPath];\n if (!$autoloaderPath) {\n $options = [\n Helper::getPathApp() . '/cron/autoload.php',\n Helper::getPathApp() . '/run/autoload.php',\n Helper::getPathApp() . '/vendor/autoload.php',\n ];\n }\n\n foreach ($options as $filename) {\n if (file_exists($filename)) {\n $this->autoloaderPath = $filename;\n return $this;\n }\n }\n\n throw new Exception(\"NSUtil Assync: autoload not find\");\n }",
"public function __construct() {\n $this->loader();\n }",
"public static function AutoLoad(){\n spl_autoload_register(function ($file_name){\n $name = preg_replace('~(.*[\\\\\\\\]([A-Z]\\w+))~im', '$2', $file_name);\n MyAutoload::loadControllers($name);//'HomeController'\n MyAutoload::loadModules($name);//'Controller'\n MyAutoload::loadModules($name);//'Model'\n MyAutoload::loadModules($name);//'Config'\n MyAutoload::loadModels($name);//'Tasks'\n MyAutoload::loadRoutes();//'Tasks'\n });\n }",
"function my_autoloader($class_name) \n\t{\n \tinclude '../classes/' . $class_name . '.class.php';\n\t}",
"protected function _initAutoload(){\n\t $autoLoader = Zend_Loader_Autoloader::getInstance();\n\t $autoLoader->registerNamespace('CMS_');\n\t $resourceLoader = new Zend_Loader_Autoloader_Resource(\n\t \tarray(\n\t\t\t 'basePath' => APPLICATION_PATH,\n\t\t\t 'namespace' => '',\n\t\t\t 'resourceTypes' => array(\n\t\t\t \t'form' => array(\n\t\t\t\t \t'path' => 'forms/',\n\t\t\t\t \t'namespace' => 'Form_',\n\t\t\t\t ),\n\t \t\t\t\n\t \t\t),\n\t \t)\n\t );\n\t // Return it so that it can be stored b the bootstrap\n\t return $autoLoader;\n\t }",
"public function get_loader()\n {\n return $this->loader;\n }",
"function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}",
"public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }",
"private function registerAutoloader() {\n\t\t\t// register autoloader\n\t\t\tspl_autoload_extensions(EXT);\n\t\t\tspl_autoload_register(array($this, 'autoload'));\n\t\t}",
"function classLoader($class)\r\n{\r\n $parts = explode('_', $class);\r\n $namespace = $parts[0];\r\n $classname = $parts[1];\r\n \r\n switch($namespace)\r\n {\r\n case 'Base':\r\n $filename = B_PATH . $classname . '.php';\r\n break;\r\n case 'Controller':\r\n $filename = C_PATH . $classname . '.php';\r\n break;\r\n case 'Model':\r\n $filename = M_PATH . $classname . '.php';\r\n break;\r\n }\r\n\r\n if (!file_exists($filename)) {\r\n return false;\r\n }\r\n require_once $filename;\r\n}",
"public static function get_loader() {\n if (self::$loader == null) {\n self::$loader = new Autoloader();\n }\n /**\n * Unlike our previous singleton, in order to have this class automatically load our classes it is necessary to use the spl_autoload_register function before returning the instance.\n * \n * This function takes an array as the first parameter which holds the class name of an autoloading method we want to call, followed by the method name.\n */\n spl_autoload_register(array('Autoloader', 'class_loader'), true, false);\n /**\n * The second and third parameters are boolean values. The first specifies whether the function should throw exceptions (errors) if the class_loader() method can not be registered and should be set to true.\n * \n * The second specifies that this autoloader method should be moved to the top of the queue if there are multiple autoloaders and should beset to false as we will want this autoloader to come after another autoloader we will be importing.\n */\n return self::$loader;\n }",
"function __autoload($cls){\n SUPER::include_file_with_class($cls);\n}",
"function load($classmap, $base = null) {\n spl_autoload_register(function($class) use ($classmap, $base) {\n $class = strtolower($class);\n if(!isset($classmap[$class])) return false;\n if($base) {\n include($base . DS . $classmap[$class]); \n } else {\n include($classmap[$class]);\n }\n });\n}",
"function class_autoloader($class_name) {\n include 'classes/' .$class_name . '.php';\n}",
"function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}",
"public function __construct() {\n if(!file_exists(SYSPATH.\"load_class.php\")){\n\t\t\theader('HTTP/1.1 503 Service Unavailable.', TRUE, 503);\n\t\t\techo 'Your appication folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;\n\t\t\texit(3); // EXIT_CONFIG\n\t\t}\n\t\trequire_once(SYSPATH.\"load_class.php\");\n //Enable auto loading from the classes and libraries folders\n $classLoader = new ClassLoader(Array(APPPATH.'classes', APPPATH.'libraries'));\n $classLoader->register();\n $this->classLoader = $classLoader;\n }",
"private static function onLoad($_class) {\n\t\tforeach (explode('|',self::$global['AUTOLOAD']) as $_auto) {\n\t\t\t// Allow namespaced classes\n\t\t\t$_file=$_auto.self::fixSlashes($_class).'.php';\n\t\t\t// Case-insensitive check for file presence\n\t\t\t$_glob=glob(dirname($_file).'/*.php');\n\t\t\t$_fkey=array_search(\n\t\t\t\tstrtolower($_file),array_map('strtolower',$_glob)\n\t\t\t);\n\t\t\tif (is_int($_fkey)) {\n\t\t\t\tinclude $_glob[$_fkey];\n\t\t\t\tif (method_exists($_class,'onLoad'))\n\t\t\t\t\tcall_user_func(array($_class,'onLoad'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tself::$global['CONTEXT']=$_class;\n\t\ttrigger_error(self::TEXT_Class);\n\t}",
"private function init()\n {\n // ensure the initialize function is called only once\n $k = get_called_class();\n if (!isset(self::$initialized[$k])) {\n $this->initialize();\n self::$initialized[$k] = true;\n }\n }",
"public function autoload($class) {\n if (isset(static::$map[$class])){\n $pathInfo = static::$map[$class];\n Yaf_Loader::import(sprintf('%s%s',$pathInfo[0], $pathInfo[1]));\n } else if (strpos($class, 'Builder') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Pagelet') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/pagelets/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Halo') === 0){\n Yaf_Loader::import(sprintf('%s/halo/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Util') == strlen($class) - 4 || strpos($class, 'Utils') == strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/utils/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Model') === strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/application/models/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'Service') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/service/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'HTMLPurifier') !== false){\n Yaf_Loader::import(sprintf('%s/htmlpurifier/HTMLPurifier.safe-includes.php',LIB_PATH));\n }else if (strpos($class, 'Api') === strlen($class) - 3){\n Yaf_Loader::import(sprintf('%s/application/Api/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'Object') === strlen($class) - 6){\n Yaf_Loader::import(sprintf('%s/application/objects/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'MemCache') === 0){\n// var_dump('================');\n// /Users/worker/php/wk/wcontact_cache/lib/wcontact/MemCacheBase.php\n Yaf_Loader::import(sprintf('%s/wzhaopin/%s.php',LIB_PATH, $class));\n }\n }",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}"
] | [
"0.6449069",
"0.64345604",
"0.6349427",
"0.6285698",
"0.62801504",
"0.6221782",
"0.60605997",
"0.6034293",
"0.5938983",
"0.5936819",
"0.5935965",
"0.5912662",
"0.5877881",
"0.5763958",
"0.57505107",
"0.5740398",
"0.5737271",
"0.5731739",
"0.57288975",
"0.57085896",
"0.5697624",
"0.5679807",
"0.56785303",
"0.56770384",
"0.5676117",
"0.5620742",
"0.56159353",
"0.5601092",
"0.5597095",
"0.55923796",
"0.5586064",
"0.55859566",
"0.5563721",
"0.553998",
"0.55348957",
"0.5528788",
"0.5527168",
"0.55115616",
"0.5508897",
"0.55007344",
"0.54981935",
"0.54470783",
"0.5442473",
"0.5438144",
"0.5437987",
"0.54314667",
"0.54293066",
"0.5427718",
"0.54061073",
"0.5404773",
"0.5402214",
"0.5393396",
"0.53841585",
"0.5384064",
"0.5382952",
"0.5377738",
"0.536801",
"0.5364847",
"0.5361149",
"0.5360132",
"0.53523564",
"0.5340521",
"0.53390706",
"0.5337432",
"0.53329617",
"0.5317212",
"0.5306555",
"0.5300555",
"0.5294584",
"0.5291787",
"0.5291032",
"0.52867484",
"0.52861035",
"0.52829766",
"0.52796626",
"0.5279309",
"0.5269364",
"0.52672446",
"0.5264305",
"0.5262936",
"0.52628595",
"0.52619416",
"0.5258442",
"0.52581424",
"0.5253948",
"0.52498627",
"0.5248164",
"0.52473116",
"0.5245757",
"0.5233735",
"0.52330434",
"0.5231457",
"0.5230069",
"0.52297294",
"0.522662",
"0.5207539",
"0.52068657",
"0.5204458",
"0.52037877",
"0.52024335"
] | 0.6009884 | 8 |
Get current class loader | public function getClassLoader() {
return $this->classLoader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function getClassLoader() {}",
"public function get_loader()\n {\n return $this->loader;\n }",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function getLoader()\n {\n return $this->loader;\n }",
"public static function getClassLoader()\n {\n if (static::$loader === null) {\n\n spl_autoload_register(array('NamespaceClassLoader', 'loadClassLoader'), true, true);\n static::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();\n spl_autoload_unregister(array('NamespaceClassLoader', 'loadClassLoader'));\n static::$loader->register();\n }\n\n return static::$loader;\n }",
"public static function getAppLoader() {\n return self::$appLoader;\n }",
"public static function get_loader() {\n if (self::$loader == null) {\n self::$loader = new Autoloader();\n }\n /**\n * Unlike our previous singleton, in order to have this class automatically load our classes it is necessary to use the spl_autoload_register function before returning the instance.\n * \n * This function takes an array as the first parameter which holds the class name of an autoloading method we want to call, followed by the method name.\n */\n spl_autoload_register(array('Autoloader', 'class_loader'), true, false);\n /**\n * The second and third parameters are boolean values. The first specifies whether the function should throw exceptions (errors) if the class_loader() method can not be registered and should be set to true.\n * \n * The second specifies that this autoloader method should be moved to the top of the queue if there are multiple autoloaders and should beset to false as we will want this autoloader to come after another autoloader we will be importing.\n */\n return self::$loader;\n }",
"public static function loader()\n\t{\n\t\treturn static::$_parser_loader;\n\t}",
"static private function _getLoader() {\n\t\tif(self::isNull(self::$_loader)) {\n\t\t\tself::$_loader = Loader::getImageLoader(self::webiny()->getConfig()->get('components.image'));\n\t\t}\n\n\t\treturn self::$_loader;\n\t}",
"protected function getClassLoaderService()\n {\n $this->services['class_loader'] = $instance = new \\phpbb\\class_loader('phpbb\\\\', './../includes/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"final public static function getClass(){\n return get_called_class();\n }",
"protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }",
"public static function init(){\n if( self::$loader == null ){\n self::$loader = new self();\n }\n return self::$loader;\n }",
"private function getLoader(): FilesystemLoader\n {\n if (null == $this->loader) {\n $this->loader = new FilesystemLoader(\n $this->locations\n );\n }\n return $this->loader;\n }",
"protected function getLoader()\n {\n }",
"public abstract function get_loader_name();",
"public static function getAutoloader()\n {\n if (self::$autoloader !== null) {\n return self::$autoloader;\n } else {\n throw new \\Exception('Autoloader is not registered, cannot be retrieved.');\n }\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"protected function getClass()\n {\n return __CLASS__;\n }",
"public static function loader()\r\n {\r\n if(is_null(self::$instance))\r\n self::$instance = new self();\r\n return self::$instance;\r\n }",
"public static function __getClass()\n {\n return __CLASS__;\n }",
"protected function getClassLoader_ExtService()\n {\n $this->services['class_loader.ext'] = $instance = new \\phpbb\\class_loader('\\\\', './../ext/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"protected static function getSingletonClass()\n {\n return get_called_class();\n }",
"public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n\n return $this->loader;\n }",
"public function getPageLoader() {\n return $this->pageLoader;\n }",
"public function getClassLoaders();",
"public static function __getClass()\r\n\t{\r\n\t\treturn __CLASS__;\r\n\t}",
"public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n return $this->loader;\n }",
"public static function getPluginLoader()\n {\n if (!isset(self::$_pluginLoader)) {\n require_once 'Zend/Loader/PluginLoader.php';\n self::$_pluginLoader = new Zend_Loader_PluginLoader([\n 'Zend_Feed_Reader_Extension_' => 'Zend/Feed/Reader/Extension/',\n ]);\n }\n return self::$_pluginLoader;\n }",
"public static function getClass() {\n return Singleton::$_class;\n }",
"protected function getLanguage_LoaderService()\n {\n $this->services['language.loader'] = $instance = new \\phpbb\\language\\language_file_loader('./../', 'php');\n\n $instance->set_extension_manager(${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n\n return $instance;\n }",
"public static function getInstance() : Loader{\n return self::$instance;\n }",
"public static function className() : string {\n return get_called_class();\n }",
"protected function getStepsLoaderService()\n {\n if (isset($this->shared['steps_loader'])) return $this->shared['steps_loader'];\n\n $class = $this->getParameter('steps_loader.class');\n $instance = new $class($this->getParameter('steps.path'), $this);\n $this->shared['steps_loader'] = $instance;\n\n return $instance;\n }",
"public function config() : LoaderInterface {\n return $this -> loader;\n }",
"public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }",
"public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }",
"function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATOR;\n\n # Current Working Directory\n $dir = __DIR__;\n\n # replace namespace separator with directory separator (prolly not required)\n $className = str_replace('\\\\', $ds, $className);\n\n # get full name of file containing the required class\n $file = \"{$dir}{$ds}{$className}.php\";\n\n # get file if it is readable\n if (is_readable($file)) {\n require_once $file;\n }\n });\n }",
"public function getLoader()\n {\n if ('file' === $this->source) {\n return new DefinitionManagerFileLoader($this->container, $this->definitionFile);\n } else {\n return new DefinitionManagerDoctrineLoader($this->container, $this->emName);\n }\n }",
"protected function getApplicationLoaderPath()\n {\n return './autoload.php';\n }",
"public static function getClassLoader($className)\n {\n foreach (spl_autoload_functions() as $loader) {\n if (! is_array($loader)) {\n continue;\n }\n\n $classLoader = reset($loader);\n\n if ($classLoader instanceof ClassLoader && $classLoader->canLoadClass($className)) {\n return $classLoader;\n }\n }\n\n return null;\n }",
"public function getFramework() {\r\n\t\treturn $this->context->getState('framework');\r\n\t}",
"public static function registerClassLoadingInformation() {}",
"public static function getClass()\n {\n $type = explode('\\\\', get_called_class());\n\n return $type[count($type) - 1];\n }",
"public static function LOADER(){\n spl_autoload_register(array(__CLASS__, \"requireClass\"));\n }",
"public static function get_instance() {\n\n\t\tif ( ! isset( self::$instance ) || ! ( self::$instance instanceof self ) ) {\n\t\t\tself::$instance = new Loader();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public function get_called_class() {\n\n\t\tif ( false !== static::$class_path ) {\n\t\t\treturn static::$class_path;\n\t\t}\n\n\t\t$class_path = get_called_class();\n\t\tstatic::$class_path = $class_path;\n\t\treturn $class_path;\n\n\t}",
"protected function getFilesystemLoader() : PregMatchFilteredLoaderInterface\n {\n return $this->filesystemLoader;\n }",
"static function getAutoload() {\n\t\treturn systemAutoload::getInstance();\n\t}",
"protected function getLoader() : FilteredLoaderInterface\n {\n return $this->loader;\n }",
"public static function staticGetClassName()\n {\n return __CLASS__;\n }",
"public static function getClass()\n {\n return get_class(new static);\n }",
"public function getLoaders()\n {\n return $this->loaders;\n }",
"public function getLoaders()\n {\n return $this->loaders;\n }",
"public function getRuntimeManager () {\n\t\tif (!isset(self::$runtimeManager)) {\n\t\t\tself::$runtimeManager = new phpkit_AutoloadOsidRuntimeManager($this->getConfigPath());\n\t\t}\n\t\t\n\t\treturn self::$runtimeManager;\n\t}",
"protected function getTemplating_LoaderService()\n {\n return $this->services['templating.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader(${($_ = isset($this->services['templating.locator']) ? $this->services['templating.locator'] : $this->getTemplating_LocatorService()) && false ?: '_'});\n }",
"public function getSnippetLoader()\n {\n if (! $this->snippetLoader) {\n $this->loadSnippetLoader();\n }\n\n return $this->snippetLoader;\n }",
"public static function getClassPath();",
"public static function getClassName() {\n return get_called_class();\n }",
"public function getConfigLoader(): ?ConfigLoader;",
"public static function getClassName()\n {\n return get_called_class();\n }",
"public static function isClassLoadingInformationAvailable() {}",
"public function getClass() {\n\t\t$classPath = explode('\\\\', get_class());\n\t\treturn end($classPath);\n\t}",
"public function getClass() {\n\t\t$classPath = explode('\\\\', get_class());\n\t\treturn end($classPath);\n\t}",
"public function getDefaultConfigLoader(): ?ConfigLoader;",
"protected function getFeaturesLoaderService()\n {\n $class = $this->getParameter('features_loader.class');\n $instance = new $class($this->getParameter('features.path'), $this);\n\n return $instance;\n }",
"static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }",
"public function getPlugin(): Plugin {\n\t\treturn $this->loader;\n\t}",
"public function getMonitor()\n {\n return $this->_loadClass('Monitor', true);\n }",
"public static function __classLoaded()\n {\n\t\tif (empty(static::$layers) && class_exists('Git')) {\n\t\t\tstatic::$layers = \\Git::$repositories;\n\t\t}\n }",
"public function getMonitor()\r\n {\r\n return $this->_loadClass('Monitor', true);\r\n }",
"protected function initLoader()\n {\n $config = $this->di->getShared('config');\n $loader = new Loader;\n $loader->registerNamespaces(\n [\n 'Phosphorum\\Models' => $config->get('application')->modelsDir,\n 'Phosphorum\\Controllers' => $config->get('application')->controllersDir,\n 'Phosphorum\\Forms' => $config->get('application')->formsDir,\n 'Phosphorum' => $config->get('application')->libraryDir\n ]\n );\n\n $loader->register();\n $this->di->setShared('loader', $loader);\n\n return $loader;\n }",
"static public function getClass();",
"function classLoader($class)\r\n{\r\n $parts = explode('_', $class);\r\n $namespace = $parts[0];\r\n $classname = $parts[1];\r\n \r\n switch($namespace)\r\n {\r\n case 'Base':\r\n $filename = B_PATH . $classname . '.php';\r\n break;\r\n case 'Controller':\r\n $filename = C_PATH . $classname . '.php';\r\n break;\r\n case 'Model':\r\n $filename = M_PATH . $classname . '.php';\r\n break;\r\n }\r\n\r\n if (!file_exists($filename)) {\r\n return false;\r\n }\r\n require_once $filename;\r\n}",
"public static function getLoader($whichLoader)\n {\n $loaderArray = array(\n Loader::XML_LOADER => __NAMESPACE__ . \"\\\\Loaders\\\\XmlLoader\"\n );\n return new $loaderArray[$whichLoader]();\n }",
"public static function getInternalClass();",
"function get_theme_framework() {\n\treturn \\Classy\\Classy::get_instance();\n}",
"public function newLoader()\n {\n $loader = substr(get_class($this), 0, -9) . 'Loader';\n\n return app()->make($loader, ['extension' => $this]);\n }",
"public static function get_class(){\n return self::class;}",
"public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}",
"public function getTwigLoader(): FilesystemLoader\n {\n return $this->twigLoader;\n }",
"private function getKernelClass()\n {\n $env = getenv('KERNEL_CLASS');\n if (strlen($env)) {\n return $env;\n }\n\n $iterator = (new Finder())\n ->name('*Kernel.php')\n ->depth(0)\n ->in(__DIR__.'/'.$this->args['kernel_options']['kernel.root_dir'])\n ->getIterator();\n $iterator->rewind(); //Seems weird that I have rewind a new iterator, but I do\n /** @var SplFileInfo $file */\n $file = $iterator->current();\n $class = $file->getBasename('.php');\n\n require_once $file;\n\n return $class;\n }",
"public function isLoaderRegistered()\n {\n return $this->_loaderRegistered;\n }",
"public function getProcessorsLoader()\n {\n if ($this->processorsLoader === null)\n {\n $processorsToFilter = $this->parameters['processors'];\n $this->processorsLoader = new PluginLoader(\n 'PieCrust\\\\Baker\\\\Processors\\\\IProcessor',\n PieCrustDefaults::APP_DIR . '/Baker/Processors',\n function ($p1, $p2) { return $p1->getPriority() < $p2->getPriority(); },\n $processorsToFilter == '*' ?\n null :\n function ($p) use ($processorsToFilter) { return in_array($p->getName(), $processorsToFilter); },\n 'SimpleFileProcessor.php'\n );\n foreach ($this->processorsLoader->getPlugins() as $proc)\n {\n $proc->initialize($this->pieCrust);\n }\n }\n return $this->processorsLoader;\n }",
"function classLoader($class){\n $filename = $class . '.class.php';\n $file ='classes'. DIRECTORY_SEPARATOR . $filename;\n\n // Smarty ligger i libs-mappa.\n if ($class == 'Smarty') {\n $file = 'libs' . DIRECTORY_SEPARATOR . $filename;\n }\n if (!file_exists($file))\n {\n return false;\n }\n\n include $file;\n}",
"abstract protected function batchLoaderClass(): string;"
] | [
"0.75710714",
"0.7341214",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.7317648",
"0.710501",
"0.7070505",
"0.6943578",
"0.6754278",
"0.66970307",
"0.6660568",
"0.66097414",
"0.6464757",
"0.6407922",
"0.639319",
"0.6390693",
"0.6272582",
"0.6262229",
"0.62443995",
"0.6214733",
"0.6214733",
"0.6214733",
"0.6214733",
"0.6214733",
"0.6214733",
"0.6214733",
"0.6200434",
"0.61791384",
"0.61496264",
"0.61025906",
"0.61017627",
"0.60305977",
"0.6027961",
"0.6025893",
"0.6005828",
"0.60021436",
"0.5969743",
"0.5969359",
"0.59619886",
"0.5895711",
"0.58730775",
"0.5845147",
"0.58345956",
"0.58276284",
"0.58276284",
"0.5822198",
"0.5813812",
"0.5807244",
"0.5795001",
"0.57830733",
"0.57672524",
"0.57633185",
"0.57525986",
"0.5749771",
"0.5748627",
"0.57476175",
"0.5745332",
"0.574028",
"0.57348484",
"0.57135004",
"0.56935537",
"0.56935537",
"0.5685026",
"0.5672553",
"0.5667972",
"0.5666457",
"0.5588785",
"0.55882984",
"0.55825543",
"0.5580017",
"0.5571673",
"0.5571673",
"0.55715024",
"0.554609",
"0.5545499",
"0.5540828",
"0.5539264",
"0.5531759",
"0.552336",
"0.5521993",
"0.5516538",
"0.5511942",
"0.5510477",
"0.55062777",
"0.5493096",
"0.54804754",
"0.54725575",
"0.5469229",
"0.54639006",
"0.54599947",
"0.5444874",
"0.54182464",
"0.54043275",
"0.53990734"
] | 0.8027073 | 0 |
Adds a key to the array if not allready exists like: $array = array('foo' => 'bar'); $array = array_add($array, 'key', 'value');. | function array_add($array, $key, $value)
{
if (!isset($array[$key])) {
$array[$key] = $value;
}
return $array;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function array_add($array, $key, $value)\n\t{\n\t\tif ( ! isset($array[$key])) $array[$key] = $value;\n\n\t\treturn $array;\n\t}",
"function array_add(array $array, string $key, $value):array\n\t{\n\t\tif (is_null(get($array, $key)))\n\t\t{\n\t\t\tset($array, $key, $value);\n\t\t}\n\n\t\treturn $array;\n\t}",
"static function add(array $array, $key, $value) {\n if (!array_key_exists($key, $array)) {\n $array[$key] = $value;\n }\n\n return $array;\n }",
"function array_add($array, $key, $value)\n {\n return Arr::add($array, $key, $value);\n }",
"function array_add($array, $key, $value)\n {\n return Arr::add($array, $key, $value);\n }",
"function array_add(array &$array, $key, $value) {\n $target = array_get($array, $key, array());\n\n if ( ! is_array($target)) {\n $target = array($target);\n }\n\n $target[] = $value;\n array_set($array, $key, $target);\n\n return $array;\n }",
"function array_push_assoc($array, $key, $value){\n $array[$key] = $value;\n return $array;\n }",
"public static function addIfNotEmpty($key, $value, array &$array = null)\n {\n if (!is_null($array)) {\n Validate::isArray($array, 'array');\n }\n\n if (!empty($value)) {\n $array[$key] = $value;\n }\n }",
"public function array_add($array, $key, $value)\n {\n return Arr::add($array, $key, $value);\n }",
"private function addKey($key)\n {\n $keys = $this->getKeys();\n\n // Don't add duplicate keys into our store\n if (!in_array($key, $keys)) {\n $keys[] = $key;\n }\n\n $this->saveKeys($keys);\n }",
"public function add_key ( $key = '' )\n {\n if ( ! empty( $key ) )\n {\n array_push( $this->key, $key );\n }\n\n return $this->get_key();\n }",
"public static function array_insert_before($key, array &$array, $new_key, $new_value) {\n if (array_key_exists($key, $array)) {\n $new = array();\n foreach ($array as $k => $value) {\n if ($k === $key) {\n $new[$new_key] = $new_value;\n }\n $new[$k] = $value;\n }\n return $new;\n }\n return FALSE;\n }",
"function array_prepend($array, $value, $key = null)\n {\n return Arr::prepend($array, $value, $key);\n }",
"public static function add( $array, $key, $value )\n {\n if ( is_null( static::get( $array, $key ) ) ) {\n static::set( $array, $key, $value );\n }\n\n return $array;\n }",
"public function push($key, $value = '~NULL')\n {\n // Yes, this is stupid, but whatever.\n if ($value === '~NULL') {\n $this->array[] = $key;\n } else {\n $this->array[$key] = $value;\n }\n }",
"public function array_push_assoc($array, $key, $value)\n {\n $array[$key] = $value;\n return $array;\n }",
"public static function add($array, $key, $value)\n {\n if (is_null(static::get($array, $key)))\n {\n static::set($array, $key, $value);\n }\n\n return $array;\n }",
"public static function add($array, $key, $value)\n {\n if (is_null(static::get($array, $key))) {\n static::set($array, $key, $value);\n }\n\n return $array;\n }",
"function acadp_array_insert_after( $key, $array, $new_array ) {\n\n\tif( array_key_exists( $key, $array ) ) {\n \t$new = array();\n \tforeach( $array as $k => $value ) {\n \t\t$new[ $k ] = $value;\n \t\tif( $k === $key ) {\n\t\t\t\tforeach( $new_array as $new_key => $new_value ) {\n \t\t\t$new[ $new_key ] = $new_value;\n\t\t\t\t}\n \t\t}\n \t}\n \treturn $new;\n \t}\n\n \treturn $array;\n\n}",
"function add($key,$value = false) {\n\t\tif(is_array($key))\n\t\t\t$this->_output = array_merge($key, $this->_output);\n\t\telseif(array_key_exists($key,$this->_output)) {\n\t\t\tif(!is_array($this->_output[$key]))\n\t\t\t\t$this->_output[$key] = array($this->_output[$key]);\n\t\t\t\n\t\t\tif(is_array($value))\n\t\t\t\t$this->_output[$key] = array_merge($this->_output[$key],$value);\n\t\t\telse\n\t\t\t\t$this->_output[$key][] = $value;\n\t\t}\n\t\telse\n\t\t\t$this->_output[$key] = $value;\n\t}",
"public function add($key, $value)\n\t{\n\t\tif ($key === null) {\n\t\t\t$this->_d[] = $value;\n\t\t} else {\n\t\t\t$this->_d[$key] = $value;\n\t\t}\n\t}",
"public function add($item, $key = null)\n {\n if(is_null($key))\n {\n $this->list[] = $item;\n }\n else\n {\n if(isset($this->list[$key]))\n {\n throw new CollectionKeyAlreadyExist(\"The key provided has already been used in this collection\");\n }\n else\n {\n $this->list[$key] = $item;\n }\n }\n\n }",
"function array_insert(array $array, $before_key, array $array2) {\n if (!\\array_key_exists($before_key, $array))\n \\trigger_error(\"The key '$before_key' does not exist in \\$array.\", \\E_USER_ERROR);\n $new_array = array();\n foreach ($array as $key => $value) {\n if ($key === $before_key) {\n foreach ($array2 as $key2 => $value2) {\n if (!\\array_key_exists($key2, $new_array))\n $new_array[$key2] = $value2;\n }\n $before_key = null;\n }\n if (!\\array_key_exists($key, $new_array))\n $new_array[$key] = $value;\n }\n return $new_array;\n}",
"function _add_array($array = array(), $keys, $value)\n{\n\t// while fn needs to go deeper into array\n\tif(count($keys) > 1)\n\t{\n\t\t// get current key\n\t\treset($keys);\n\t\t$key = $keys[key($keys)];\n\t\t// remove current key from keys\n\t\tunset($keys[key($keys)]);\n\t\t// if key exists merge\n\t\tif( isset($array[$key]) )\n\t\t{\n\t\t\t$array[$key] = _add_array($array[$key], $keys, $value);\n\t\t}\n\t\t// if key does not exists add\n\t\telse\n\t\t{\n\t\t\t$array[$key] = false;\n\t\t\t$array[$key] = _add_array($array[$key], $keys, $value);\t\n\t\t}\n\t}\n\t// if right depth in array is reached\n\telse\n\t{\n\t\t// get current key\n\t\t$key = $keys[key($keys)];\n\t\t// if key exists merge\n\t\tif( isset($array[$key]) && is_array($array[$key]) )\n\t\t{\n\t\t\t$array[$key] = array_merge($array[$key], (array) $value);\t\t\n\t\t}\n\t\t// if key does not exists add\n\t\telse\n\t\t{\n\t\t\t$array[$key] = $value;\t\t\t\n\t\t}\n\t}\n\t// return new array\n\treturn $array;\n}",
"function array_add_by_key( $array1, $array2 ) {\n foreach ( $array2 as $k => $a ) {\n if ( array_key_exists( $k, $array1 ) ) {\n $array1[$k] += $a;\n } else {\n $array1[$k] = $a;\n }\n }\n return $array1;\n}",
"static function ensure(&$array, $value){\n\t\tif(array_search($value, $array) === false){\n\t\t\t$array[] = $value;\n\t\t}\n\t\treturn $array;\n\t}",
"public function addKey(string $key): void\n {\n if (!in_array($key, $this->keys, true)) {\n $this->keys[] = strtolower($key);\n }\n }",
"public static function array_push(&$array, $key, $var=null) {\n if(func_num_args() === 3) {\n if(is_array($key)) {\n while(count($key) >= 2) {\n $k = array_shift($key);\n if(!array_key_exists($k, $array)) {\n $array[$k] = [];\n }\n $array = &$array[$k];\n }\n $key = reset($key);\n }\n if(array_key_exists($key, $array)) {\n $array[$key][] = $var;\n } else {\n $array[$key] = [$var];\n }\n } else {\n $array[] = $key;\n }\n }",
"public function addAt($key, $value);",
"public function maybe_add_cache_key( $key = '' ) {\n\t\t\tif ( ! empty( $key ) ) {\n\t\t\t\t$all_cache_key = get_option( 'wc_sc_all_cache_key' );\n\t\t\t\tif ( false !== $all_cache_key ) {\n\t\t\t\t\tif ( empty( $all_cache_key ) || ! is_array( $all_cache_key ) ) {\n\t\t\t\t\t\t$all_cache_key = array();\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! in_array( $key, $all_cache_key, true ) ) {\n\t\t\t\t\t\t$all_cache_key[] = $key;\n\t\t\t\t\t\tupdate_option( 'wc_sc_all_cache_key', $all_cache_key, 'no' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function arrayMove(&$array, $key) {\n\t\tif(!array_key_exists($key, $array)) {\n\t\t\tthrow new Exception('Key '.$key.' not found from '.\n\t\t\t\t$this->className.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$append = $array[$key];\n\t\t\t\tarray_splice($array, $key, 1);\n\t\t\t\tarray_unshift($array, $append);\n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}",
"public function addKey($key)\n {\n $this->keys[] = sha1($key);\n return $this->keys;\n }",
"public static function addOrRemoveValueFromArray(string $arrayKey, $value, $add = null): ?bool {\n\t\t$array = self::getArray ( $arrayKey );\n\t\t$_SESSION [$arrayKey] = $array;\n\t\t$search = \\array_search ( $value, $array );\n\t\tif ($search === false && $add) {\n\t\t\t$array [] = $value;\n\t\t\tself::$sessionInstance->set ( $arrayKey, $array );\n\t\t\treturn true;\n\t\t} else if ($add !== true) {\n\t\t\tunset ( $array [$search] );\n\t\t\tself::$sessionInstance->set ( $arrayKey, $array );\n\t\t\treturn false;\n\t\t}\n\t\treturn null;\n\t}",
"public static function addValueToArray(string $arrayKey, $value): ?bool {\n\t\treturn self::addOrRemoveValueFromArray ( $arrayKey, $value, true );\n\t}",
"function array_key_or_exit($key, $arr, $msg) {\n exit_if(!array_key_exists($key, $arr), $msg);\n return $arr[$key];\n}",
"public function append($key, $value) {}",
"public function append($key, $value = null);",
"public function add(string $key, $element): void;",
"function set_array_value(&$array, $ignore_if_blank, $key, $value)\n{\n if ($value || (!$ignore_if_blank && isset($array[$key])))\n {\n if ($value)\n $array[$key] = $value;\n else\n unset($array[$key]);\n }\n}",
"public function array_prepend($array, $value, $key = null)\n {\n return Arr::prepend($array, $value, $key);\n }",
"function array_set(&$array, $key, $value)\n {\n return Arr::set($array, $key, $value);\n }",
"function array_set(&$array, $key, $value)\n {\n return Arr::set($array, $key, $value);\n }",
"function array_set(&$array, $key, $value)\n {\n return Arr::set($array, $key, $value);\n }",
"public function addItem($key, $value);",
"function array_get($arr, $key, $notfound = ''){\r\n\tif (!isset($arr[$key])){\r\n\t\treturn $notfound;\r\n\t}\r\n\treturn $arr[$key];\r\n}",
"function array_unshift_assoc(&$arr, $key, $val) {\n $arr = array_reverse($arr, true);\n $arr[$key] = $val;\n $arr = array_reverse($arr, true);\n return count($arr);\n}",
"public static function prepend($array, $value, $key = null)\n {\n if (is_null($key)) {\n array_unshift($array, $value);\n } else {\n $array = [$key => $value] + $array;\n }\n\n return $array;\n }",
"function acf_add_array_key_prefix($array, $prefix)\n{\n}",
"public function add($obj, $key = NULL) {\n try{\n if ($key == NULL) {\n $this->Items[] = $obj;\n } else {\n $this->Items[$key] = $obj;\n }\n }catch(Exception $e){\n throw $e;\n }\n }",
"public static function array_insert_after($key, array &$array, $new_key, $new_value) {\n if (array_key_exists ($key, $array)) {\n $new = array();\n foreach ($array as $k => $value) {\n $new[$k] = $value;\n if ($k === $key) {\n $new[$new_key] = $new_value;\n }\n }\n return $new;\n }\n return $array;\n }",
"function array_push_ex(array &$arr1,$arr2) {\n foreach ($arr2 as $key => $value) {\n $arr2[$key] = ($value);\n }\n array_push($arr1,$arr2);\n}",
"function array_get($key, $arr, $default = null) {\n return array_key_exists($key, $arr) ? $arr[$key] : $default;\n}",
"function arrayPrepend($array, $value) {\n array_unshift($array, $value);\n return $array;\n}",
"function array_set(&$array, $key, $value)\n {\n return ArrayHelper::set($array, $key, $value);\n }",
"public function prepend( $key, $value )\n\t{\n\t\t$array = $this->get( $key );\n\t\tarray_unshift( $array, $value );\n\t\t$this->set( $key, $array );\n\t}",
"function util_array_fill_keys($keys, $value)\n{\n\tif (!is_array($keys))\n\t\treturn FALSE ;\n\t$filledArray = array();\n\tforeach ($keys as $key)\n\t{\n\t\t$filledArray[$key] = $value ;\n\t}\n\t\n\treturn $filledArray ;\n}",
"public function add($key, $value)\n\t{\n\t\tif ($this->hasKey($key))\n\t\t{\n\t\t\tthrow new \\Exception('Element '.$key.' already exists in Map');\n\t\t}\n\n\t\t$this->set($key, $value);\n\t}",
"public function append($value, $key = null) \n {\n $key ? $this->pushKey($key, $value) : $this->push($value);\n }",
"public static function prepend($key, $value)\n {\n $array = self::get($key);\n\n array_unshift($array, $value);\n\n self::set($key, $array);\n }",
"public function add($key, $value) \r\n {\r\n if(is_null($key)) \r\n {\r\n throw new ArgumentNullException(\"key is null.\");\r\n }\r\n \r\n if($this->containsKey($key)) \r\n {\r\n throw new ArgumentException(\"An element with the same key already exists in the System.Collections.Hashtable.\");\r\n }\r\n\r\n $this->elements[$key] = $value;\r\n }",
"public function prepend($key, $value)\n {\n $array = $this->get($key);\n\n array_unshift($array, $value);\n\n $this->set($key, $array);\n }",
"function arrayExists($array, $key)\n {\n return array_key_exists($key, $array);\n }",
"function safe_array_get($key, $array, $default=NULL) {\n if(!is_array($array)){\n return $default;\n }\n if (array_key_exists($key, $array)) {\n return $array[$key];\n }\n return $default;\n}",
"abstract public function append($keyOrArray, $value = null): self;",
"function arrayGet($array, $key, $default = NULL)\n{\n return isset($array[$key]) ? $array[$key] : $default;\n}",
"function addRet($key, $value){\n\n\t\t$this->arrRet [$key] = $value;\n\t\n\t}",
"function array_get(array $arr, $key, $default = null) {\n\treturn array_key_exists($key, $arr) ? $arr[$key] : $default;\n}",
"function db_add_unique_key(&$ret, $table, $name, $fields) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD UNIQUE KEY '.\n $name .' ('. _db_create_key_sql($fields) .')');\n}",
"function util_array_values_prepend(&$item, $key, $prefix)\n{\n $item = $prefix.$item;\n}",
"function GetEntry($arr, $key, $default = NULL)\n{\n return array_key_exists($key, $arr) ? $arr[$key] : $default;\n}",
"public function add_data($key, $value = false) {\n\n\t\t// is assoc array -> add key->value \n\t\tif (is_array($key)) {\n\t\t\t$this->data = $key;\n\t\t}\n\n\t\telseif ($key !== false && $value !== false) {\n\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}",
"public static function push($key, $value)\n {\n $array = self::get($key);\n\n $array[] = $value;\n\n self::set($key, $array);\n }",
"function array_set($key, $value, &$array)\n {\n return arr::set($key, $value, $array);\n }",
"public function push( $key, $value )\n\t{\n\t\t$array = $this->get( $key );\n\t\t$array[] = $value;\n\t\t$this->set( $key, $array );\n\t}",
"function add(array &$array, $value, $index = 0)\n{\n global $size;\n\n $inputSize = count($array);\n\n if ($inputSize >= $size) {\n resize($array);\n }\n\n $array[$index] = $value;\n\n return ++$index;\n}",
"function array_get(array $a, $key, $default = null) {\n return isset($a[$key]) ? $a[$key] : $default;\n}",
"function array_key_or_default($key, $arr, $default) {\n if(array_key_exists($key, $arr))\n return $arr[$key];\n return $default;\n}",
"function array_access($array, $key, $default) {\n if (array_key_exists($key, $array)) {\n return $array[$key];\n }\n return $default;\n }",
"public function add($key, $value)\n {\n $this->storage[$key] = $value;\n }",
"public static function add($key = string, $value = string)\n {\n // self::delete($key);\n // \\DB::insert('systemsettings')\n // ->set(array(\n // $key => $value,\n // 'updated_at' => date('Y-m-d H:i:s'),\n // ))\n // ->execute();\n\n }",
"public function offsetExists( $key );",
"function set_key($keys,$key_name='')\r\n {\r\n if( isset($keys[$key_name]) and !empty($keys[$key_name]))\r\n {\r\n return $keys[$key_name];\r\n }\r\n else\r\n {\r\n return '';\r\n }\r\n }",
"protected function pushKey($key, $value)\n {\n $this->items[$key] = $this->set($value);\n }",
"function array_get($array, $key, $default = null)\n {\n return isset($array[$key]) ? $array[$key] : $default;\n }",
"function array_element(string $key, array $array) {\n\t\t// We want to take the performance advantage of isset() while keeping\n\t\t// the NULL element correctly detected\n\t\t// See: http://php.net/manual/es/function.array-key-exists.php#107786\n\t\tif (isset($array[$key]) || array_key_exists($key, $array)) {\n\t\t\treturn $array[$key];\n\t\t}\n\n\t\treturn null;\n\t}",
"public function add($key, $message)\n {\n $this->messages[$key][] = $message;\n }",
"public function get_appended_key ( $key = '' )\n {\n $_key = $this->get_key();\n\n // If a key was given, ensure it's appended\n if ( ! empty( $key ) )\n {\n $_key .= ':' . sanitise_key( $key );\n }\n\n return $_key;\n }",
"function insertArray( &$arr, $offset = 0, $value = '', $replace = false ){\n\n consoleLog( 'insertArray() is deprecated. Switching to arr_insert().' );\n consoleLog( debug_backtrace() );\n\n $arr = arr_insert( $arr, $offset, $value, $replace );\n}",
"private function replaceKeyIfExists(array $array, $oldKey, $newKey)\n {\n if (!isset($array[$oldKey])) {\n return $array;\n }\n\n $array[$newKey] = $array[$oldKey];\n unset($array[$oldKey]);\n\n return $array;\n }",
"function addMember($arr, $key, $name, $birthday, $email){\n\t\t$arr[$key]['name'] = $name;\n\t\t$arr[$key]['birthday'] = $birthday;\n\t\t$arr[$key]['email'] = $email;\n\t\treturn $arr;\n\t}",
"function array_val($array,$key,$default=null)\n{\n\tif( array_key_exists($key, $array) )\n\t\treturn $array[$key];\n\treturn $default;\n}",
"public static function addKey(array $input, $keyField = 'key', $valueField = 'value')\n {\n $output = array();\n\n foreach ($input as $key => $value) {\n if (is_array($value)) {\n $output[$key] = $value;\n $output[$key][$keyField] = $key;\n } else {\n $output[$key][$keyField] = $key;\n $output[$key][$valueField] = $value;\n }\n }\n\n return $output;\n }",
"private function set_if_not_null( $key, $value, &$array )\n {\n if ( $value !== null ) {\n $array[ $key ] = $value;\n }\n }",
"public static function insertAfterKey(&$array, $key, $newKey, $newValue) {\n $newArray = [];\n $has_found = FALSE;\n\n foreach ($array as $_key => $_item) {\n $newArray[$_key] = $_item;\n\n if ($_key === $key) {\n $has_found = TRUE;\n $newArray[$newKey] = $newValue;\n }\n }\n\n if (!$has_found) {\n $newArray[$newKey] = $newValue;\n }\n\n $array = $newArray;\n }",
"public function appended(mixed $key, mixed $value): NonEmptyMap;",
"function add_artist(&$artists, $new_artists) {\n foreach($new_artists as $new_artist_name => $new_artist_data) {\n if (!array_key_exists($new_artist_name, $artists)) {\n $artists[$new_artist_name] = $new_artist_data;\n }\n }\n}",
"private function array_unshift_assoc(&$arr, $key, $val)\n {\n $arr = array_reverse($arr, true);\n $arr[$key] = $val;\n return array_reverse($arr, true);\n }",
"function alist($args){\n return array_fill_keys(array_keys($args), array());\n}",
"public function offsetSet($key, $value)\n {\n if (is_null($key)) {\n $this->items[] = $value;\n } else {\n $this->items[$key] = $value;\n }\n }",
"public function offsetSet($key, $value)\n {\n if (is_null($key)) {\n $this->items[] = $value;\n } else {\n $this->items[$key] = $value;\n }\n }"
] | [
"0.81507206",
"0.76679283",
"0.7539807",
"0.7490153",
"0.7490153",
"0.7129647",
"0.7006724",
"0.6836951",
"0.6780913",
"0.64957905",
"0.64640117",
"0.6351146",
"0.6292318",
"0.6284772",
"0.62483805",
"0.6234855",
"0.62160766",
"0.62023747",
"0.61330223",
"0.6118586",
"0.6086336",
"0.60766065",
"0.60651326",
"0.60507566",
"0.60169154",
"0.6014463",
"0.6003519",
"0.5979438",
"0.59359515",
"0.5914321",
"0.59109575",
"0.5895305",
"0.58540404",
"0.58397067",
"0.5838241",
"0.58313376",
"0.5827138",
"0.58100927",
"0.5783966",
"0.5783558",
"0.5771145",
"0.5771145",
"0.5771145",
"0.5767947",
"0.5746709",
"0.5740024",
"0.567978",
"0.56654745",
"0.56323004",
"0.5628529",
"0.5610456",
"0.5601621",
"0.5592173",
"0.5584393",
"0.5573951",
"0.55627054",
"0.5558223",
"0.5507262",
"0.5496162",
"0.54778004",
"0.5454786",
"0.54510295",
"0.54491496",
"0.5446104",
"0.5404378",
"0.53967893",
"0.5396047",
"0.53955764",
"0.538951",
"0.5373588",
"0.5357968",
"0.5356672",
"0.53534245",
"0.5320074",
"0.5309429",
"0.5297092",
"0.5289586",
"0.5277625",
"0.5276384",
"0.527571",
"0.5272873",
"0.5270924",
"0.5269714",
"0.5256801",
"0.5254793",
"0.5242535",
"0.52337724",
"0.52259785",
"0.5225158",
"0.5223795",
"0.5223547",
"0.52101374",
"0.5207593",
"0.520356",
"0.5199786",
"0.5199543",
"0.5193847",
"0.5187317",
"0.5186714",
"0.5186714"
] | 0.8506814 | 0 |
Sets the default pagination options. | function setPaging($paging)
{
if(!empty($paging))
{
$this->link = $paging['link'];
$this->show = $paging['show'];
$this->page = $paging['page'];
$this->style = $paging['style'];
$pageCount = ceil($paging['count'] / $paging['limit'] );
$this->_pageDetails = array(
'page'=>$paging['page'],
'recordCount'=>$paging['count'],
'pageCount' =>$pageCount,
'nextPage'=> ($paging['page'] < $pageCount) ? $paging['page']+1 : '',
'previousPage'=> ($paging['page']>1) ? $paging['page']-1 : '',
'limit'=>$paging['limit']
);
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}",
"protected function _initPaginator()\n {\n Zend_Paginator::setDefaultScrollingStyle('Sliding');\n Zend_Paginator::setDefaultItemCountPerPage(self::DEFAULT_RECORDS_PER_PAGE);\n Zend_View_Helper_PaginationControl::setDefaultViewPartial(\n '/common/pagination/default.phtml'\n );\n }",
"protected function _initPaginator(){\n Zend_Paginator::setDefaultScrollingStyle(\n Zend_Registry::get('config')->paginator->scrolling_style);\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('default.phtml');\n }",
"public function setPagination($limit, $offset = 0);",
"public function setPagination($pagination) {\n $this->pagination_ = $pagination;\n $this->results_ = null;\n }",
"function Pagination() \n { \n $this->current_page = 1; \n $this->mid_range = 7; \n $this->items_per_page = (!empty($_GET['ipp'])) ? $_GET['ipp']:$this->default_ipp; \n }",
"public function render_per_page_options()\n {\n }",
"public function setPaginationLinks(Paginator $paginator);",
"public function getDefaultParams() {\n\t\treturn $this->setWpQueryVars( 'paged', 'posts_per_page' );\n\t}",
"public function setPagination($pagination)\n {\n $this->pagination = (int) $this->checkPagination($pagination);\n }",
"function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}",
"function set_pagination() {\n\t\tglobal $wp_query;\n\n\t\treturn (int) $wp_query->get( 'posts_per_page' );\n\t}",
"abstract public function preparePagination();",
"public function usePagination()\n {\n return $this->option('usePagination');\n }",
"protected function loadDefaultOptions()\r\n {\r\n $this->options = [\r\n 'offsettop' => 0,\r\n 'offsetleft' => 0,\r\n 'merge' => false,\r\n 'backcolor' => 0xffffff,\r\n ];\r\n }",
"function pagination(){}",
"public function setPagination($value)\n {\n if (is_array($value)) {\n $config = ['class' => Pagination::className()];\n if ($this->id !== null) {\n $config['pageParam'] = $this->id . '-page';\n $config['pageSizeParam'] = $this->id . '-per-page';\n }\n $this->_pagination = Yii::createObject(array_merge($config, $value));\n } elseif ($value instanceof Pagination || $value === false) {\n $this->_pagination = $value;\n } else {\n throw new InvalidParamException('Only Pagination instance, configuration array or false is allowed.');\n }\n }",
"public function allowPaginate()\n {\n $this->page = $this->dataProvider->getPaginationParams();\n }",
"public function setPerPage($perPage);",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"public function setConfigPagination(&$config){\n\t\n\t\t$config[\"base_url\"] = base_url(\"Form_56-1.html/\");\n\t\t$config[\"uri_segment\"] = 2;\n\t\t$config[\"per_page\"] = 20;\n\t\t$total_row = $this->db->join(\"language\", \"form_56_1.lang_id = language.lang_id\")->where(\"language.language = '\".$this->session->userdata('lang_id').\"'\")->get(\"form_56_1\")->num_rows();\n\t\t$config[\"total_rows\"] = $total_row;\n\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\" style=\"margin: 0\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t$config['prev_link'] = '«';\n\t\t$config['prev_tag_open'] = '<li>';\n\t\t$config['prev_tag_close'] = '</li>';\n\t\t$config['next_link'] = '»';\n\t\t$config['next_tag_open'] = '<li>';\n\t\t$config['next_tag_close'] = '</li>';\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</a></li>';\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t$config['first_link'] = FALSE;\n\t\t$config['last_link'] = FALSE;\n\t\n\t}",
"protected function getIndexDefaults() {\n return array(\n 'page_id' => 0,\n 'page_size' => 25,\n 'sort_by' => 'update_date',\n 'sort_order' => 'asc'\n );\n }",
"public function setPageLimit($number = null);",
"public function setDefaults($nb_elt_per_page = 25)\n {\n if ($nb_elt_per_page !== null) {\n $this->nb_elt_per_page = $nb_elt_per_page;\n }\n return $this;\n }",
"public function setDefaultOptions(array $options);",
"public function initializeAction()\n {\n $this->totalItems = $this->widgetConfiguration['totalItems'];\n $this->itemsOffset = $this->widgetConfiguration['itemsOffset'];\n $this->itemsPerPage = $this->widgetConfiguration['itemsPerPage'];\n $this->maxPaginationLinks = $this->widgetConfiguration['maxPaginationLinks'];\n\n $this->currentPage = intval($this->itemsOffset / $this->itemsPerPage + 1);\n $this->numberOfPages = $this->itemsPerPage > 0 ? ceil($this->totalItems / $this->itemsPerPage) : 0;\n\n ArrayUtility::mergeRecursiveWithOverrule($this->linkConfiguration, $this->widgetConfiguration['linkConfiguration']);\n }",
"protected function _getDefaultOptions()\n {\n }",
"protected function initCommonListParamOptions()\n {\n \n $this->restRequest = $this->getController()->restRequest;\n $this->restRequest->setParam($this->limit, $this->restRequest->getParam($this->limit, 30));\n $this->restRequest->setParam($this->offset, $this->restRequest->getParam($this->offset, 0));\n $this->restRequest->setParam($this->order, $this->restRequest->getParam($this->order, null));\n \n \n\n }",
"function setRecordsPerPage($count) {\n $this->records_per_page = $count;\n}",
"private function migrate_pagination_options( $options ) {\n\t\t$options['pagination_sizing'] = 'padding';\n\t\treturn $options;\n\t}",
"public function paginate()\n {\n }",
"private function setLimitAndOffset()\n {\n $this->offset = ($this->page - 1) * $this->config->limit;\n if ($this->config->limit == 0) {\n $this->config->limit = count(self::$needles);\n }\n }",
"public function init() {\n $this->registerScript();\n $this->registerCss();\n $classes = array();\n $validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);\n\n if (in_array($this->alignment, $validAlignments))\n $classes[] = 'pagination-' . $this->alignment;\n\n if (!empty($classes)) {\n $classes = implode(' ', $classes);\n if (isset($this->htmlOptions['class']))\n $this->htmlOptions['class'] = ' ' . $classes;\n else\n $this->htmlOptions['class'] = $classes;\n }\n if($this->nextPageLabel===null)\n $this->nextPageLabel=Yii::t('yii','>');\n if($this->prevPageLabel===null)\n $this->prevPageLabel=Yii::t('yii','<');\n if($this->firstPageLabel===null)\n $this->firstPageLabel=Yii::t('yii','<<');\n if($this->lastPageLabel===null)\n $this->lastPageLabel=Yii::t('yii','>>');\n if($this->header===null)\n $this->header=Yii::t('yii','Go to page: ');\n\n parent::init();\n }",
"private function setNumberOfPages(): void\n {\n $this->number_of_pages = (int)ceil($this->number_of_records / $this->per_page);\n }",
"public function getDefaultOptions();",
"public function getDefaultOptions();",
"function addPagination( $pagination )\n {\n $this->pagination = array_merge($this->empty_pagination,$pagination);\n }",
"public function getDefaultOptions(array $options)\n {\n return array(\n 'data_class' => 'Palabre\\WikiBundle\\Model\\Page',\n );\n }",
"protected function setDefaultOptions()\n {\n $this->unsigned = false;\n }",
"public function setPagination(\\message\\common\\Pagination $value=null)\n {\n return $this->set(self::pagination, $value);\n }",
"protected function getSetupPerPageOptions()\n {\n $perPageOptions = [20, 40, 80, 100, 120];\n if (!in_array($this->recordsPerPage, $perPageOptions)) {\n $perPageOptions[] = $this->recordsPerPage;\n }\n\n sort($perPageOptions);\n return $perPageOptions;\n }",
"public function setQueryOptions(array $options): void {\n\t\tif(!isset($options['limit'])) $options['limit'] = 20;\n\t\tif(!isset($options['offset'])) $options['offset'] = false;\n\t\tif(!isset($options['sort'])) $options['sort'] = false;\n\t\tif(!isset($options['sortDirection'])) $options['sortDirection'] = false;\n\t\tif(!isset($options['groupby'])) $options['groupby'] = '';\n\n\t\t$this->_queryOptions = $options;\n\t}",
"public function setPagination($pagination)\n {\n $this->_pagination = $pagination;\n return $this;\n }",
"protected function get_items_per_page($option, $default_value = 20)\n {\n }",
"public function paginate($option = []){\n\t\t$option = array_replace_recursive($this->defaultQuery,$option);\n\t\t$dOption = Config::get('paginator');\n\t\t$option = array_replace_recursive($dOption,$option);\n\t\tif(!$option['page']){\n\t\t\t$option['page'] = 1;\n\t\t}\n\t\t$option['skip'] = $option['limit']*($option['page']-1);\n\t\t$option['count'] = $this->count($option['query']);\n\t\t$result = $this->find($option);\n\t\t$paginator = new Paginator($result);\n\t\tunset($option['query']);\n\t\tunset($option['skip']);\n\t\t$paginator->setOption($option);\n\n\t\treturn $paginator;\n\t}",
"public function SetNumPages()\n\t\t{\n\t\t\t$this->_pricenumpages = ceil($this->GetNumProducts() / GetConfig('CategoryProductsPerPage'));\n\t\t}",
"function pagination_links($options = array())\n{\n if (Zend_Registry::isRegistered('pagination')) {\n // If the pagination variables are registered, set them for local use.\n $p = Zend_Registry::get('pagination');\n } else {\n // If the pagination variables are not registered, set required defaults\n // arbitrarily to avoid errors.\n $p = array('total_results' => 1, 'page' => 1, 'per_page' => 1);\n }\n\n // Set preferred settings.\n $scrollingStyle = isset($options['scrolling_style']) ? $options['scrolling_style'] : 'Sliding';\n $partial = isset($options['partial_file']) ? $options['partial_file'] : 'common/pagination_control.php';\n $pageRange = isset($options['page_range']) ? (int) $options['page_range'] : 5;\n $totalCount = isset($options['total_results']) ? (int) $options['total_results'] : (int) $p['total_results'];\n $pageNumber = isset($options['page']) ? (int) $options['page'] : (int) $p['page'];\n $itemCountPerPage = isset($options['per_page']) ? (int) $options['per_page'] : (int) $p['per_page'];\n\n // Create an instance of Zend_Paginator.\n $paginator = Zend_Paginator::factory($totalCount);\n\n // Configure the instance.\n $paginator->setCurrentPageNumber($pageNumber)\n ->setItemCountPerPage($itemCountPerPage)\n ->setPageRange($pageRange);\n\n return get_view()->paginationControl($paginator, $scrollingStyle, $partial);\n}",
"public function showPagination($bool) {$this->_pagination = (bool) $bool;return $this;}",
"public function init() {\n $this->registerScript();\n $this->registerCss();\n if ($this->nextPageLabel === null)\n $this->nextPageLabel = '';\n\n if ($this->prevPageLabel === null)\n $this->prevPageLabel = '';\n\n $classes = array();\n\n $validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);\n\n if (in_array($this->alignment, $validAlignments))\n $classes[] = 'pagination-' . $this->alignment;\n\n if (!empty($classes)) {\n $classes = implode(' ', $classes);\n if (isset($this->htmlOptions['class']))\n $this->htmlOptions['class'] = ' ' . $classes;\n else\n $this->htmlOptions['class'] = $classes;\n }\n\n parent::init();\n }",
"public function Pager ( array $options ) {\n\t\t# Apply\n\t\t$this->setOptions($options);\n\t\t\n\t\t# Chain\n\t\treturn $this;\n }",
"function register_block_core_query_pagination()\n {\n }",
"function initialize_options()\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$defaults = array(\n\t\t\t\t'minimum_age' => 4,\n\t\t\t\t'maximum_age' => 0,\n\t\t\t);\n\t\t\tforeach ($defaults as $option => $default)\n\t\t\t{\n\t\t\t\tif (!isset($config[$option]))\n\t\t\t\t{\n\t\t\t\t\tset_config($option, $default);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function __construct()\n\t{\n\t\t// Go back to page 1 when adding/removing a facet option\n\t\t$this->unwantedUrlParameters = array(\n\t\t\tMage::getBlockSingleton('page/html_pager')->getPageVarName() => null // reset page browser\n\t\t);\n\n\t\tparent::__construct();\n\t}",
"function register_block_core_query_pagination_numbers()\n {\n }",
"public function getPaginationDataSource();",
"function setPageSize($value)\n {\n $this->_props['PageSize'] = $value;\n }",
"public function setDefaultPage($page) {\n $this->values->put('DefaultPage', $page);\n }",
"public function togglePagination($paginate = false)\n\t{\n\t\tif ($paginate === false) {\n\t\t\t$this->paginate = false;\n\t\t} else {\n\t\t\t$this->paginate = (int) $paginate;\n\t\t}\n\t}",
"protected function setDefaults()\n {\n $this->options['dsn'] = null;\n $this->options['table'] = 'sessiondata';\n $this->options['autooptimize'] = false;\n }",
"public function setDefaultOptions()\n {\n // Set event data\n foreach ($this->events as $event => $handler) {\n $this->options['data']['widget-action-' . $event] = $handler;\n }\n\n if($this->jsWidget) {\n $this->options['data']['ui-widget'] = $this->jsWidget;\n }\n\n if($this->fadeIn) {\n $fadeIn = $this->fadeIn === true ? 'fast' : $this->fadeIn;\n $this->options['data']['widget-fade-in'] = $fadeIn;\n $this->visible = false;\n }\n\n if (!empty($this->init)) {\n $this->options['data']['ui-init'] = $this->init;\n }\n }",
"public function getPaginate(){ }",
"protected static function get_default_options($multirequest = false)\n {\n }",
"private function options($dataset) {\n\t\n\t\t// Shortcut to the current params:\n\t\t$params = $this->controller->params;\n\t\t\n\t\t// Check if any options are set, else set an empty array to prevent errors when merging with defaults:\n\t\t$options = isset($this->options[$dataset]) ? $this->options[$dataset] : array();\n\t\t\n\t\t// Merge the options with the defaults, so all needed keys are set:\n\t\t$options = array_merge($this->defaults, $options);\n\t\t\n\t\t// Check if the session needs to be used and if the session contains a set of options:\n\t\tif ($options['session'] && $session = $this->session->read('DataSort.' . $dataset)) {\n\t\t\t\n\t\t\t// The session contains options, use these instead:\n\t\t\t$options = $session;\n\n\t\t}\n\t\t\n\t\t// Check if the fields option is set and whether it contains the primary key:\n\t\tif (isset($options['fields']) && !in_array($this->model->primaryKey, $options['fields']) && !in_array($this->model->alias . '.' . $this->model->primaryKey, $options['fields'])) {\n\t\t\n\t\t\t// The primary key isn't set in field, appending it:\n\t\t\t$options['fields'][] = $this->model->alias . '.' . $this->model->primaryKey;\n\t\t\t\n\t\t}\n\t\t\n\t\t// Check if the page matches the current option set and if the direction is set:\n\t\tif (isset($params['named']['dataset']) && isset($params['named']['datasort']) && $dataset == $params['named']['dataset']) {\n\t\t\t\n\t\t\t// Check if the named parameter for the sort value is set:\n\t\t\tif (isset($params['named']['datafield'])) {\n\t\t\t\t\n\t\t\t\t// Change the order to what is given in the named parameters:\n\t\t\t\t$options['order'] = array($params['named']['datafield'] => $params['named']['datasort']);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the named parameter for limit is set and if it contains an array of ids:\n\t\t\tif (isset($params['named']['datascope']) && is_array($ids = explode('|', $params['named']['datascope'])) ) {\n\t\t\t\n\t\t\t\t// Replace the conditions to only get the ids in the limit:\n\t\t\t\t$options['conditions'] = array($this->model->alias . '.' . $this->model->primaryKey => $ids);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the session needs to be used:\n\t\t\tif ($options['session']) {\n\t\t\t\n\t\t\t\t// Write the options to the session:\n\t\t\t\t$this->session->write('DataSort.' . $dataset, $options);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Return the ajusted array of options:\n\t\treturn $options;\n\t\t\n\t}",
"protected function getDefaultOptions()\n {\n $this->barcodeLength = 2;\n }",
"private function setFirstPage(){\n global $paged;\n\n if(empty($paged)) {\n\n\t\t$paged = 1;\n\t\t\n\t}\n\t\n\t\treturn $this;\n\t}",
"function init__templates_pagination()\n{\n global $INCREMENTAL_ID_GENERATOR;\n $INCREMENTAL_ID_GENERATOR = 1;\n}",
"function resetOptions()\n {\n $this->options = $this->_defaultOptions;\n }",
"function _setDefaults()\n {\n $this->options['dsn'] = null;\n $this->options['table'] = 'sessiondata';\n $this->options['autooptimize'] = false;\n }",
"private function __paginationRecall() {\n\t\t$paramsUrl = isset($this->Controller->params['url']) ? $this->Controller->params['url'] : array();\n\n\t\t$options = array();\n\t\t//$options = array_merge($this->Controller->params, $paramsUrl, $this->Controller->passedArgs);\n\n\t\t$vars = array('page', 'sort', 'direction', 'limit');\n\t\t$keys = array_keys($options);\n\t\t$count = count($keys);\n\n\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\tif (!in_array($keys[$i], $vars)) {\n\t\t\t\tunset($options[$keys[$i]]);\n\t\t\t}\n\t\t}\n\n\t\t//$this->addToPaginationRecall($options);\n\t}",
"function initDefaultOptions(){\n\n\t\t\t$defaults = $this->defaultOptions();\n\t\t\treturn update_option( $this->optionsKey, $defaults );\n\t\t}",
"function base_pagination() {\n\tglobal $wp_query;\n\n\t$big = 999999999; // This needs to be an unlikely integer\n\n\t// For more options and info view the docs for paginate_links()\n\t// http://codex.wordpress.org/Function_Reference/paginate_links\n\t$paginate_links = paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => __('PREVIOUS'),\n\t\t'next_text' => __('NEXT'),\n\t\t'end_size' => 1,\n\t\t'mid_size' => 2,\n 'before_page_number' => '<span class=\"page-number\">',\n 'after_page_number' => '</span>',\n\t) );\n\n\t// Display the pagination if more than one page is found\n\tif ( $paginate_links ) {\n\t\techo '<div class=\"pagination-wrapper\"><div class=\"pagination\">';\n\t\techo $paginate_links;\n\t\techo '</div><!--// end .pagination --></div>';\n\t}\n}",
"public function setDefaults (array $options = []);",
"protected function initOptions()\n {\n }",
"public function paginate($page = 1, $limit = 10, $all = false)\n {\n }",
"protected function GetDefaultPageSize()\n\t{\n\t\treturn self::$DEFAULT_PAGE_SIZE;\n\t}",
"protected function setupBulkSetLinkDefaults()\n {\n $this->crud->allowAccess('bulkSetLink');\n\n $this->crud->operation('list', function () {\n $this->crud->enableBulkActions();\n $this->crud->addButton('top', 'bulkSetLink', 'view', 'crud::buttons.bulk_set_link');\n });\n }",
"public function setPageSizeForIndex($pageSize);",
"function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }",
"public function setListPerPage($array){\n $this->listPerPage = [];\n if (is_array($array)){\n foreach ($array as $item){\n $this->listPerPage[$item] = $item;\n }\n $this->listPerPage[9999]=\"All\";\n \n }\n }",
"public function saveDefaultValues() {\n\n\t\tforeach ( $this->getOptionsList() as $option_page ) {\n\t\t\t$option_page->setDefaultValue();\n\t\t}\n\t}",
"private function setTotalPages()\n {\n $this->totalPages = ceil($this->totalData / $this->limit);\n }",
"function pagingNone($items, $options)\n\t{\n\t\treturn with(new \\App\\Helpers\\Paging\\CustomPaginationLinks($items->appends(['orderBy'=> $options['orderBy'],'sortedBy'=> $options['sortedBy'], 'items_per_page'=> $options['items_per_page']])))->render();\n\t}",
"public function setPaginationDataSource($postInfos);",
"function audioman_get_pagination_types() {\n\t$pagination_types = array(\n\t\t'default' => esc_html__( 'Default(Older Posts/Newer Posts)', 'audioman' ),\n\t\t'numeric' => esc_html__( 'Numeric', 'audioman' ),\n\t);\n\n\treturn apply_filters( 'audioman_get_pagination_types', $pagination_types );\n}",
"public function setPerPage($value){\n setcookie($this->main->module_mode.'_list_per_page_limit', $value, time() + 3600 * 24 * 365, '/admin/');\n $this->per_page = $value;\n }",
"public function getPagerSettings();",
"public function setPerPage(Request $request)\n {\n $value = $request->query($this->PER_PAGE_INDICATOR);\n\n if (!is_null($value)) {\n if (!is_numeric($value)) {\n return $value;\n }\n\n $this->perPage = $value === '0' ? null : intval($value);\n }\n }",
"public static function instance() {\n\t\treturn new PaginationConfig();\n\t}",
"public function setDefaultPage($defaultPage)\n {\n $this->defaultPage = $defaultPage;\n\n return $this;\n }",
"function base_pagination() {\n\tglobal $wp_query;\n \n\t$big = 999999999; // This needs to be an unlikely integer\n \n\t// For more options and info view the docs for paginate_links()\n\t// http://codex.wordpress.org/Function_Reference/paginate_links\n\t$paginate_links = paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => __('Previous'),\n\t\t'next_text' => __('Next'),\n\t\t'end_size' => 4,\n\t\t'mid_size' => 2\n\t) );\n \n\t// Display the pagination if more than one page is found\n\tif ( $paginate_links ) {\n\t\techo '<div class=\"pagination\">';\n\t\techo $paginate_links;\n\t\techo '</div><!--// end .pagination -->';\n\t}\n}",
"private function initOptions()\n {\n $this->optionsResolver->setDefaults([\n 'collection' => [],\n ]);\n\n $this->optionsResolver->setAllowedTypes('collection', 'array');\n }",
"protected function _initDefaultOptions()\n {\n $this->_options[self::OPT_STOP_PROMPTING_ON_DTMF] = self::STOP_PROMPTING_ON_DTMF_DEFAULT;\n $this->_options[self::OPT_NO_INPUT_PROMPT_PLAYLIST] = array();\n $this->_options[self::OPT_END_READING_KEY] = Streamwide_Engine_Dtmf_Handler::KEY_POUND;\n $this->_options[self::OPT_RETURN_ALL_INPUT] = self::RETURN_ALL_INPUT_DEFAULT;\n $this->_options[self::OPT_TRIES] = self::DEFAULT_NUMBER_OF_TRIES;\n }",
"public function __construct()\n {\n $this->itemsPerPage = 15;\n $this->currentPage = 1;\n $this->previousPage = 1;\n $this->nextPage = 1;\n $this->url = '';\n $this->totalPages = 1;\n $this->renderedItemsMax = 8;\n }",
"private function setPaginatorStyling(): void\n {\n // If Laravel version 8\n if (version_compare(app()->version(), '8.0.0', '>=') === true) {\n // Use bootstrap for the paginator instead of tailwind, since the rest of the interface uses bootstrap\n Paginator::useBootstrap();\n }\n }",
"function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}",
"function setAllowedPager($value) {\n $this->allowedPager = $value;\n }",
"public function paginate($limit, array $params = null);",
"protected function setDefaults(): self\n {\n // Get bulk support and index Exporters by the extension(s) they support\n $bulks = [];\n $exporters = [];\n\n foreach (ExporterFactory::findAll() as $handler) {\n $attributes = $handler::attributes();\n\n if ($attributes['bulk']) {\n $bulks[] = $handler;\n }\n\n foreach ($attributes['extensions'] as $extension) {\n $exporters[$extension][] = $attributes;\n }\n }\n\n $this->setData([\n 'source' => 'index',\n 'layout' => 'files',\n 'model' => $this->model,\n 'files' => null,\n 'selected' => explode(',', $this->request->getVar('selected') ?? ''),\n 'userId' => null,\n 'userName' => '',\n 'ajax' => $this->request->isAJAX(),\n 'search' => $this->request->getVar('search'),\n 'page' => $this->request->getVar('page'),\n 'pager' => null,\n 'access' => $this->model->mayAdmin() ? 'manage' : 'display',\n 'exports' => $exporters,\n 'bulks' => $bulks,\n ]);\n\n // Add preferences\n $this->setPreferences();\n\n foreach (['Files.sort', 'Files.order', 'Files.format', 'Pager.perPage'] as $preference) {\n [,$field] = explode('.', $preference);\n $this->setData([$field => preference($preference)]);\n }\n\n return $this;\n }",
"function SetPageSize($intPageSize=0)\n\t{\n\t\t$this->_intPageSize = $intPageSize;\n\t}",
"public function changePaginationLimit($options = array(), $params = array()) {\n\t\t// remove the current / default value\n\t\tif (isset($params['named']['limit'])) {\n\t\t\tunset($params['named']['limit']);\n\t\t}\n\n\t\t$params['named']['limit'] = $this->paginationHardLimit($options['pagination_limit'], true);\n\n\t\t$this->Controller->redirect(array(\n\t\t\t'plugin' => $params['plugin'],\n\t\t\t'controller' => $params['controller'],\n\t\t\t'action' => $params['action']\n\t\t) + $params['named']);\n\t}"
] | [
"0.7309758",
"0.673497",
"0.67254436",
"0.66409993",
"0.6604133",
"0.6555743",
"0.6369742",
"0.6341143",
"0.63105184",
"0.62757164",
"0.6267342",
"0.6255439",
"0.6246862",
"0.62216645",
"0.6210085",
"0.6136268",
"0.61005235",
"0.60575193",
"0.6051424",
"0.60480833",
"0.60480833",
"0.60345024",
"0.5983402",
"0.59600735",
"0.5955584",
"0.5949629",
"0.59431034",
"0.5931912",
"0.59242064",
"0.592196",
"0.5910385",
"0.5891386",
"0.5859806",
"0.58494294",
"0.5824416",
"0.5818025",
"0.5818025",
"0.5810798",
"0.5802945",
"0.57946074",
"0.57730573",
"0.57716966",
"0.57536024",
"0.5746902",
"0.57346624",
"0.57303584",
"0.57267326",
"0.5716485",
"0.57124245",
"0.570912",
"0.57071257",
"0.56984985",
"0.56984264",
"0.56862515",
"0.5685315",
"0.56662333",
"0.5659411",
"0.5653607",
"0.56486195",
"0.5646869",
"0.5634957",
"0.56286526",
"0.5625139",
"0.56230164",
"0.56229526",
"0.5617071",
"0.560103",
"0.5593003",
"0.5590995",
"0.5589974",
"0.5581142",
"0.55687374",
"0.55636203",
"0.5561167",
"0.5560456",
"0.555459",
"0.5550266",
"0.554856",
"0.5545631",
"0.5542398",
"0.5521634",
"0.55180115",
"0.5515589",
"0.5505037",
"0.5503297",
"0.5501988",
"0.55018204",
"0.5499927",
"0.54960626",
"0.5489405",
"0.5482203",
"0.54753554",
"0.5473439",
"0.54672176",
"0.54544675",
"0.5430647",
"0.5424705",
"0.5424533",
"0.5414353",
"0.54040086",
"0.5398027"
] | 0.0 | -1 |
Displays limits for the query | function show($text=null, $separator=null)
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
$t = '';
if(is_array($this->show))
{
$t = $text.$separator;
foreach($this->show as $value)
{
$link = preg_replace('/show=(.*?)&/','show='.$value.'&',$this->link);
if($this->_pageDetails['limit'] == $value)
{
$t .= '<em>'.$value.'</em>'.$separator;
}
else
{
if($this->style == 'ajax')
{
$t .= $this->Ajax->linkToRemote($value, array("fallback"=>$this->action."#","url" => $link.$this->_pageDetails['page'],"update" => "ajax_update","method"=>"get")).$separator;
}
else
{
$t .= $this->Html->link($value,$link.$this->_pageDetails['page']).$separator;
}
}
}
}
return $t;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_limit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit() {}",
"function getLimit() ;",
"function getLimitBox()\n\t{\n\t\tglobal $mainframe;\n\n\t\t// Initialize variables\n\t\t$limits = array ();\n\n\t\t// Make the option list\n\t\tfor ($i = 5; $i <= 30; $i += 5) {\n\t\t\t$limits[] = JHTML::_('select.option', \"$i\");\n\t\t}\n\t\t$limits[] = JHTML::_('select.option', '50');\n\t\t$limits[] = JHTML::_('select.option', '100');\n\t\t$limits[] = JHTML::_('select.option', '0', JText::_('all'));\n\n\t\t$selected = $this->_viewall ? 0 : $this->limit;\n\n\t\t// Build the select list\n\t\tif ($mainframe->isAdmin()) {\n\t\t\t$html = JHTML::_('select.genericlist', $limits, 'limit', 'class=\"inputbox\" size=\"1\" onchange=\"submitform();\"', 'value', 'text', $selected);\n\t\t} else {\n\t\t\t$html = JHTML::_('select.genericlist', $limits, 'limit', 'class=\"inputbox\" size=\"1\" onchange=\"this.form.submit()\"', 'value', 'text', $selected);\n\t\t}\n\t\treturn $html;\n\t}",
"public function set_display()\n {\n if (isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1') {\n $this->sLimit = \"LIMIT \".mysql_real_escape_string($_GET['iDisplayStart']).\", \".\n mysql_real_escape_string($_GET['iDisplayLength']);\n }\n }",
"function ppl_display_limit($limit) {\r\n\t?>\r\n\t<tr valign=\"top\">\r\n\t\t<th scope=\"row\"><?php _e('Number of posts to show:', 'post_plugins') ?></th>\r\n\t\t<td><input name=\"limit\" type=\"text\" id=\"limit\" value=\"<?php echo $limit; ?>\" size=\"2\" /></td>\r\n\t</tr>\r\n\t<?php\r\n}",
"public function getLimits() {\n\t\t$limits['start'] = ($this->currentPage - 1) * $this->rowsPerPage;\n\t\t$limits['end'] = $this->currentPage * $this->rowsPerPage;\n\t\treturn $limits;\n\t}",
"public function getLimits()\n {\n return $this->limits;\n }",
"function getLimit()\n\t{\n\t\tif ($this->total_records == 0)\n\t\t{\n\t\t\t$lastpage = 0;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$lastpage = ceil($this->total_records/$this->size);\n\t\t}\n\t\t\n\t\t$page = $this->page;\t\t\n\t\t\n\t\tif ($this->page < 1)\n\t\t{\n\t\t\t$page = 1;\n\t\t} \n\t\telse if ($this->page > $lastpage && $lastpage > 0)\n\t\t{\n\t\t\t$page = $lastpage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$page = $this->page;\n\t\t}\n\t\t\n\t\t$sql = ($page - 1) * $this->size . \",\" . $this->size;\n\t\t\n\t\treturn $sql;\n\t}",
"private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->limit=$row->answersperpage;\n }",
"protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }",
"function allWithLimit() {\n\n }",
"function q_limit($query, $limit, $off=0)\n{\n\treturn $query .' LIMIT '. $limit .' OFFSET '. $off;\n}",
"public function limit($limit);",
"public function limit($limit);",
"public static function setQueryLimit($limit){\t\t\n\t\t//reset the queryCount\n\t\tself::$queryCount = 0;\n\t\t\n\t\tself::$queryLimit = $limit;\n }",
"public function get_limit(){\r\n return $this->limit;\r\n }",
"public function limit($limit)\n {\n }",
"public function get_limits()\n\t{\n\t\t$profile_start = microtime(true);\n\n\t\t$limitsData = array(\n\t\t\t\t\t'call_limit' =>\tCALL_LIMIT,\n\t\t\t\t\t'duration_limit' =>\tCALL_DURATION_LIMIT,\n\t\t\t\t\t'listing_limit' =>\tLISTING_LIMIT\n\t\t\t\t\t);\n\n\t\t$this->input->do_put($this->config->base_url.\"/api/limit\",[]);\n\n\t\tif(!empty($limitsData))\n\t\t\t$this->display->success($limitsData,'limits');\n\t\telse\n\t\t\t$this->display->error(1502);\n\n\t\t$profile_start = profiler($profile_start,__CLASS__,__FUNCTION__,'openapi');\n\t}",
"public function setQueryLimit($limit) {\n\t\t$this->queryLimit = (integer) $limit;\n\t}",
"protected function limit(int $limit){\n $this->query .= \"LIMIT \" . $limit . \" \";\n }",
"public function getLimit() {\n return $this->limit;\n }",
"function get_sql_limit(){\r\n\t\t$limit_str='';\r\n\r\n\t\tif($this->items_per_page!='all' and $this->items_per_page!='')\r\n\t\t\t$limit_str=' LIMIT '.($this->page-1)*$this->items_per_page.','.$this->items_per_page;\r\n\r\n\t\treturn $limit_str;\r\n\t}",
"private function _sql_limit() {\n\t\tif ( $this->limit ) {\n\t\t\treturn ' LIMIT ' . $this->limit;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}",
"public function getQueryLimit() {\n\t\treturn $this->queryLimit;\n\t}",
"public function set_limit($limit);",
"public static function limit($limit);",
"public function setLimit($x) { $this->limit = $x; }",
"function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}",
"protected function getLimit() {\n if (isset($this->data['page'])) { // ...in the main table while pagination is used\n $l1 = ($this->data['page'] - 1) * $this->posts_per_page;\n $l2 = $this->posts_per_page;\n $limit = \"$l1, $l2\";\n }\n else $limit = \"0, \".$this->posts_per_page;\n return $limit;\n }",
"private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->questionsPerPage=$row->questionsperpage;\n }",
"public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}",
"private function setLimit()\n {\n if (isset($this->iDisplayStart) && $this->iDisplayLength != '-1') {\n $this->qb->setFirstResult($this->iDisplayStart)->setMaxResults($this->iDisplayLength);\n }\n\n return $this;\n }",
"public function getLimit()\n {\n return $this->getParameter('limit');\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"function selectMaxPage() {\n // 1) get Connection\n $dbInfo = new DBInfo();\n $con = $dbInfo->getConnection();\n if(!$con) {\n echo 'false_selectPageList_connect';\n return;\n }\n\n // 2) set SQL sentence\n $sql = \"SELECT CEIL(COUNT(*) / 10) \n FROM board b\n JOIN user_info u\n ON (writer = id)\";\n $sql .= $this->queryFilter;\n\n // 3) act SQL\n if(!($result = $con->query($sql))) {\n echo 'false_selectPageList_sqlQuery';\n return;\n }\n\n if(!$result) {\n echo 'false_selectPageList_noSelect';\n return;\n }\n $con->close();\n\n return $result->fetch_array()[0];\n }",
"public function limit($limit,$offset);",
"private function _limit($numRows) \n\t{\n\t\t$this->_query .= \" LIMIT \" . ( int ) $numRows;\n\t}",
"public function getLimit() {\n\t\treturn $this->limit;\n\t}",
"public function getLimit()\n {\n return $this->_limit;\n }",
"public function Limit()\n {\n return $this->limit;\n }",
"public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}",
"function index_limit($limit, $start = 0) {\n $this->db->join('tbl_perusahaan','tbl_out.id_perusahaan=tbl_perusahaan.id_perusahaan');\n $this->db->group_by('nomor_permohonan');\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"function setDisplayRange(&$range_limits,$total_pages,$page_index){\n\t\tdefine('PAGES_DISPLAYED',7);\n\t\tdefine('MAX_OFFSET',3);\n\t\t\n\t\tif ($total_pages <= constant('PAGES_DISPLAYED')){\n\t\t\t//range 1 to $total_pages\n\t\t\t$range_limits['min'] = 1;\n\t\t\t$range_limits['max'] = $total_pages;\n\t\t} else {//range $PAGE_NO_MAX buttons required\n\t\t\t//button moves, range is stationary\n\t\t\tif (($page_index <= constant('MAX_OFFSET')) || (($total_pages - $page_index) < constant('MAX_OFFSET'))) {\n\t\t\t\tif ($page_index <= constant('MAX_OFFSET')) {\n\t\t\t\t\t$range_limits['min'] = 1;\n\t\t\t\t\t$range_limits['max'] = constant('PAGES_DISPLAYED');\n\t\t\t\t} else {\n\t\t\t\t\t$range_limits['min'] = $total_pages - (constant('PAGES_DISPLAYED') - 1);\n\t\t\t\t\t$range_limits['max'] = $total_pages;\n\t\t\t\t}\n\t\t\t} else {//($page_index > $max_offset) && (($total_pages - $page_index) > $max_offset)\n\t\t\t\t//button stationary, range moves[$page_index +/- $max_offset] \n\t\t\t\t$range_limits['min'] = $page_index - constant('MAX_OFFSET');\n\t\t\t\t$range_limits['max'] = $page_index + constant('MAX_OFFSET');\n\t\t\t}\t\n\t\t}\n\t\treturn;\t\t\t\n\t}",
"public function render_max_control( $options ) {\n\t\t?>\n\t\t<input type=\"number\" name=\"<?php echo $options['id']; ?>\" value=\"<?php echo get_option( $options['id'] ); ?>\" min=\"0\" max=\"500\" required>\n\t\t<p class=\"description\"><?php echo $options['description']; ?></p>\n\t\t<?php\n\t}",
"protected function getLimitString()\n {\n $str = '';\n if (!empty($this->limit)) {\n $str = self::TAB_SEPARATOR;\n if (!empty($this->skip)) {\n $this->limit = $this->skip . ', ' . $this->limit;\n }\n $str .= 'LIMIT ' . $this->limit . self::LINE_SEPARATOR;\n }\n return $str;\n }",
"public function limit(Request $request);",
"function addLimit( $limit , $offset )\n{\n\tif(!empty($limit))\n\t{\n\t\t$limit = ($limit < 0)?0:$limit;\n\t\tif(!empty($offset) )\n\t\t{\n\t\t\t$offset = ($offset < 0)?0:$offset;\n\t\t\treturn \" LIMIT $offset , $limit \" ;\n\t\t}\n\t\telse\n\t\t\treturn \" LIMIT 0 , $limit \" ;\n\t}\n\telse\n\t\treturn \" LIMIT 0 , 10 \" ;\n}",
"public function getLimit()\n {\n return $this->getRequest()->get('limit');\n }",
"protected function initQueryLimit()\n {\n $url = $this->getBaseUrl(true) . 'accounts/self/capabilities?format=JSON';\n $response = $this->getConnector()->get($url);\n $response = $this->verifyResult($response, $url);\n\n $content = $this->transformJsonResponse($response->getContent());\n\n return $content['queryLimit']['max'];\n }",
"protected function getQueryLimit($request)\n {\n $data = $request->query->all();\n if (isset($data['_per_page']) &&\n $data['_per_page'] <= $this->container->getParameter('acseo_base_rest.listing_max_per_page')\n ) {\n return $data['_per_page'];\n }\n\n return $this->container->getParameter('acseo_base_rest.listing_max_per_page');\n }",
"public function setLimit($value)\n {\n return $this->setParameter('limit', $value);\n }",
"public function setLimit($limit) {\n\t$this->parseQuery->setLimit($limit);\n }",
"private function limit_page()\n {\n $page = $this->define_page();\n $start = $page * $this->count - $this->count;\n $fullnumber = $this->total;\n $total = $fullnumber['count'] / $this->count;\n is_float($total) ? $max = $total + 2 : $max = $total + 1;\n $array = array('start'=>(int)$start,'max'=>(int)$max);\n return $array;\n }",
"protected function buildLimits(Query $query)\n {\n return $query->getLimit() !== null ? ' LIMIT '.$query->getLimit() : '';\n }",
"function sqladdlimit($cpage=1)\r\n{\r\n if($cpage<1||$cpage>$this->page_count)$cpage=1;\r\n $cpage--;\r\n $query=\" Limit \".($cpage * $this->page_set).\",\".$this->page_set ;\r\n return $query;\r\n}",
"protected function compileLimit(Builder $query, $limit)\n\t{\n\t\treturn '';\n\t}",
"private function limits()\n {\n // Calculate the links on the left (for the active link to be in the middle)\n $left = $this->current_page - round($this->max / 2);\n // Compute the reference point\n $start = $left > 0 ? $left : 1;\n // If there is at least $this-> max pages\n if ($start + $this->max <= $this->amount) {\n // Assign the end of the loop forward to $this-> max pages or just a minimum\n $end = $start > 1 ? $start + $this->max : $this->max;\n } else {\n // End - the total number of pages\n $end = $this->amount;\n // Start - minus $this-> max from the end\n $start = $this->amount - $this->max > 0 ? $this->amount - $this->max : 1;\n }\n return\n array($start, $end);\n }",
"function selectLimit ($limit, $offset=null)\n {\n return \" LIMIT {$limit}\".($offset? \" OFFSET {$offset}\": null);\n }",
"function gen_num_limit_msg($num, $limit) {\r\n if ($limit == -1) {\r\n return tr('disabled');\r\n }\r\n if ($limit == 0) {\r\n return $num.' / '.tr('unlimited');\r\n }\r\n return \"$num / $limit\";\r\n}",
"public function limit($limit) {\r\n\t\t$this->query .= \" LIMIT \" . $limit;\r\n\r\n\t\t# Return this instance of the class, so we can chain methods\r\n\t\treturn $this;\r\n\t}",
"public function limit(int $limit, int $offset);",
"public function getLimit()\n {\n return self::LIMIT;\n }",
"public function limit($limit)\n\t{\n\t\t$this->limit = (int) $limit;\n\t}",
"public function get_limit() {\n\t\t// This matches the maximum number of indexables created by this action.\n\t\treturn 4;\n\t}",
"public function getMaxResults();",
"function getLimitSql()\n\t{\n\t\t$sql = \"LIMIT \" . $this->getLimit();\n\t\treturn $sql;\n\t}",
"public function testLimit()\n {\n $obj_query = new \\Search\\Query();\n $this->assertEquals(20, $obj_query->getLimit());\n $obj_query->limit(121);\n $this->assertEquals(121, $obj_query->getLimit());\n $obj_query->limit(-10);\n $this->assertEquals(1, $obj_query->getLimit());\n $obj_query2 = $obj_query->limit(2001);\n $this->assertEquals(1000, $obj_query->getLimit());\n $this->assertSame($obj_query, $obj_query2);\n }",
"public function setLimit($limit) {\n\t\t$this->limit = $limit;\n\t}",
"protected function compileLimit(Builder $query, int $limit)\n {\n return 'limit ' . (int)$limit;\n }",
"protected function getLimit(\\codename\\core\\model\\plugin\\limit $limit) : string {\r\n if ($limit->limit > 0) {\r\n return \" LIMIT \" . $limit->limit . \" \";\r\n }\r\n return '';\r\n }",
"public function limit(?int $limit): self;",
"public function render_per_page_options()\n {\n }",
"public function getLimit()\n {\n return null;\n }",
"function mLIMIT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LIMIT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:186:3: ( 'limit' ) \n // Tokenizer11.g:187:3: 'limit' \n {\n $this->matchString(\"limit\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"public function getLimit()\n {\n return null;\n }",
"function jb_post_content_limit_setting() {\n\techo '<p>' . _e( 'Enter the number of words to display in non featured posts.', 'jb' ) . '</p>';\n\techo \"<input type='text' name='\" . JB_SETTINGS_FIELD . \"[jb_post_content_limit]' size='10' value='\". genesis_get_option( 'jb_post_content_limit', JB_SETTINGS_FIELD ). \"' />\";\n}",
"public function limitClause(){\n try {\n // Sparql11query.g:164:3: ( LIMIT INTEGER ) \n // Sparql11query.g:165:3: LIMIT INTEGER \n {\n $this->match($this->input,$this->getToken('LIMIT'),self::$FOLLOW_LIMIT_in_limitClause592); \n $this->match($this->input,$this->getToken('INTEGER'),self::$FOLLOW_INTEGER_in_limitClause594); \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 }",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id', $q);\n\t$this->db->or_like('id_proyek', $q);\n\t$this->db->or_like('id_sumber', $q);\n\t$this->db->or_like('likelihood', $q);\n\t$this->db->or_like('severity', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"public function setLimit($limit)\n {\n $this->limit = $limit;\n }",
"function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"public function getLimit(): int\n {\n return $this->getQueryPageSize();\n }",
"public function setLimit(int $limit): self;",
"public function set_limit($new_limit){\r\n $this->limit = $new_limit;\r\n }"
] | [
"0.7206182",
"0.69826096",
"0.69826096",
"0.69826096",
"0.69826096",
"0.69826096",
"0.6959581",
"0.69326854",
"0.6905948",
"0.68720835",
"0.6763926",
"0.6734236",
"0.66919106",
"0.66881025",
"0.660505",
"0.65983456",
"0.6580594",
"0.652265",
"0.65064013",
"0.65064013",
"0.65013355",
"0.6489935",
"0.6487589",
"0.64705586",
"0.64544696",
"0.64208746",
"0.6397315",
"0.6396658",
"0.63753134",
"0.6359089",
"0.63536996",
"0.63410664",
"0.6316229",
"0.63002515",
"0.62426865",
"0.62253857",
"0.6195098",
"0.6183835",
"0.6142491",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.61295587",
"0.60840565",
"0.60712767",
"0.6062843",
"0.6060795",
"0.60558695",
"0.60427046",
"0.60313493",
"0.6015533",
"0.5986496",
"0.59860086",
"0.59709024",
"0.5965913",
"0.5962785",
"0.59613705",
"0.5958276",
"0.59575665",
"0.59466755",
"0.59392524",
"0.5934279",
"0.5921988",
"0.59025633",
"0.58961153",
"0.5893848",
"0.58918774",
"0.58888227",
"0.5885143",
"0.5880146",
"0.5878251",
"0.5871283",
"0.5870369",
"0.58565146",
"0.5843036",
"0.584172",
"0.5838816",
"0.5836992",
"0.58243346",
"0.5823913",
"0.5818946",
"0.58148056",
"0.5812603",
"0.5801394",
"0.58002436",
"0.57776344",
"0.5777082",
"0.5768538",
"0.57677925",
"0.57677925",
"0.5763939",
"0.5761273",
"0.57581204"
] | 0.0 | -1 |
Displays limits for the query in selectbox | function myShow()
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
$t = '';
if(is_array($this->show))
{
if($this->style == 'ajax') {
$t = "<select class=\"select\" onChange=\"new Ajax.Updater('ajax_update','".preg_replace("/show=(.*?)&/","show='+this.options[selectedIndex].value+'&",$this->link)."',{asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'ajax_update']})\">";
}else
$t = "<select class=\"select\" onChange=\"window.location.href='".preg_replace("/show=(.*?)&/","show='+this.options[selectedIndex].value+'&",$this->link)."'\">";
foreach($this->show as $value)
{
if($this->_pageDetails['limit'] == $value)
{
$t .= "<option value=\"$value\" selected=\"selected\">$value</option>";
}
else
{
$t .= "<option value=\"$value\">$value</option>";
}
}
$t .= "</select>";
}
return $t;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getLimitBox()\n\t{\n\t\tglobal $mainframe;\n\n\t\t// Initialize variables\n\t\t$limits = array ();\n\n\t\t// Make the option list\n\t\tfor ($i = 5; $i <= 30; $i += 5) {\n\t\t\t$limits[] = JHTML::_('select.option', \"$i\");\n\t\t}\n\t\t$limits[] = JHTML::_('select.option', '50');\n\t\t$limits[] = JHTML::_('select.option', '100');\n\t\t$limits[] = JHTML::_('select.option', '0', JText::_('all'));\n\n\t\t$selected = $this->_viewall ? 0 : $this->limit;\n\n\t\t// Build the select list\n\t\tif ($mainframe->isAdmin()) {\n\t\t\t$html = JHTML::_('select.genericlist', $limits, 'limit', 'class=\"inputbox\" size=\"1\" onchange=\"submitform();\"', 'value', 'text', $selected);\n\t\t} else {\n\t\t\t$html = JHTML::_('select.genericlist', $limits, 'limit', 'class=\"inputbox\" size=\"1\" onchange=\"this.form.submit()\"', 'value', 'text', $selected);\n\t\t}\n\t\treturn $html;\n\t}",
"public function getLimitOptionsSelect()\n {\n /** @var MP_Debug_Helper_Filter $filterHelper */\n $filterHelper = Mage::helper('mp_debug/filter');\n\n /** @var Mage_Core_Block_Html_Select $select */\n $select = $this->getLayout()->createBlock('core/html_select');\n\n $select->setName('limit')\n ->setId('limit')\n ->setValue($this->getRequest()->getParam('limit', $filterHelper->getLimitDefaultValue()))\n ->setOptions($this->getOptionArray($filterHelper->getLimitValues()));\n\n return $select->getHtml();\n }",
"private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->limit=$row->answersperpage;\n }",
"public function get_limit();",
"private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->questionsPerPage=$row->questionsperpage;\n }",
"public function set_display()\n {\n if (isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1') {\n $this->sLimit = \"LIMIT \".mysql_real_escape_string($_GET['iDisplayStart']).\", \".\n mysql_real_escape_string($_GET['iDisplayLength']);\n }\n }",
"protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }",
"function ppl_display_limit($limit) {\r\n\t?>\r\n\t<tr valign=\"top\">\r\n\t\t<th scope=\"row\"><?php _e('Number of posts to show:', 'post_plugins') ?></th>\r\n\t\t<td><input name=\"limit\" type=\"text\" id=\"limit\" value=\"<?php echo $limit; ?>\" size=\"2\" /></td>\r\n\t</tr>\r\n\t<?php\r\n}",
"public function render_max_control( $options ) {\n\t\t?>\n\t\t<input type=\"number\" name=\"<?php echo $options['id']; ?>\" value=\"<?php echo get_option( $options['id'] ); ?>\" min=\"0\" max=\"500\" required>\n\t\t<p class=\"description\"><?php echo $options['description']; ?></p>\n\t\t<?php\n\t}",
"function getLimit() ;",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit() {}",
"public static function setQueryLimit($limit){\t\t\n\t\t//reset the queryCount\n\t\tself::$queryCount = 0;\n\t\t\n\t\tself::$queryLimit = $limit;\n }",
"public function setQueryLimit($limit) {\n\t\t$this->queryLimit = (integer) $limit;\n\t}",
"function selectLimit ($limit, $offset=null)\n {\n return \" LIMIT {$limit}\".($offset? \" OFFSET {$offset}\": null);\n }",
"public function m_menu_page_limits($form)\n\t{\n\n\t\t$this->paging_options =\n\t\t\"\n\t\t<select id=\\\"esrs_menu\\\" class=\\\"esrs_menu\\\" name='esrs_select_limit' onchange=\\\"javascript:esrs_display_per_page($form,this.value);\\\">\n\t\t<option value='25'\".(($this->page_limit == 25) ? \" selected\" : \"\").\">25 / page</option>\n\t\t<option value='50'\".(($this->page_limit == 50) ? \" selected\" : \"\").\">50 / page</option>\n\t\t<option value='75'\".(($this->page_limit == 75) ? \" selected\" : \"\").\">75 / page</option>\n\t\t<option value='100'\".(($this->page_limit == 100) ? \" selected\" : \"\").\">100 / page</option>\n\t\t<option value='150'\".(($this->page_limit == 150) ? \" selected\" : \"\").\">150 / page</option>\n\t\t<option value='200'\".(($this->page_limit == 200) ? \" selected\" : \"\").\">200 / page</option>\n\t\t<option value='250'\".(($this->page_limit == 250) ? \" selected\" : \"\").\">250 / page</option>\n\t\t</select>\n\t\t\";\n\n\t}",
"protected function limit(int $limit){\n $this->query .= \"LIMIT \" . $limit . \" \";\n }",
"function get_sql_limit(){\r\n\t\t$limit_str='';\r\n\r\n\t\tif($this->items_per_page!='all' and $this->items_per_page!='')\r\n\t\t\t$limit_str=' LIMIT '.($this->page-1)*$this->items_per_page.','.$this->items_per_page;\r\n\r\n\t\treturn $limit_str;\r\n\t}",
"private function setLimit()\n {\n if (isset($this->iDisplayStart) && $this->iDisplayLength != '-1') {\n $this->qb->setFirstResult($this->iDisplayStart)->setMaxResults($this->iDisplayLength);\n }\n\n return $this;\n }",
"public function set_limit($limit);",
"function getLimit()\n\t{\n\t\tif ($this->total_records == 0)\n\t\t{\n\t\t\t$lastpage = 0;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$lastpage = ceil($this->total_records/$this->size);\n\t\t}\n\t\t\n\t\t$page = $this->page;\t\t\n\t\t\n\t\tif ($this->page < 1)\n\t\t{\n\t\t\t$page = 1;\n\t\t} \n\t\telse if ($this->page > $lastpage && $lastpage > 0)\n\t\t{\n\t\t\t$page = $lastpage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$page = $this->page;\n\t\t}\n\t\t\n\t\t$sql = ($page - 1) * $this->size . \",\" . $this->size;\n\t\t\n\t\treturn $sql;\n\t}",
"public function setLimit($x) { $this->limit = $x; }",
"function selectMaxPage() {\n // 1) get Connection\n $dbInfo = new DBInfo();\n $con = $dbInfo->getConnection();\n if(!$con) {\n echo 'false_selectPageList_connect';\n return;\n }\n\n // 2) set SQL sentence\n $sql = \"SELECT CEIL(COUNT(*) / 10) \n FROM board b\n JOIN user_info u\n ON (writer = id)\";\n $sql .= $this->queryFilter;\n\n // 3) act SQL\n if(!($result = $con->query($sql))) {\n echo 'false_selectPageList_sqlQuery';\n return;\n }\n\n if(!$result) {\n echo 'false_selectPageList_noSelect';\n return;\n }\n $con->close();\n\n return $result->fetch_array()[0];\n }",
"public function limit($limit)\n {\n }",
"function q_limit($query, $limit, $off=0)\n{\n\treturn $query .' LIMIT '. $limit .' OFFSET '. $off;\n}",
"function allWithLimit() {\n\n }",
"public function get_limit(){\r\n return $this->limit;\r\n }",
"private function _sql_limit() {\n\t\tif ( $this->limit ) {\n\t\t\treturn ' LIMIT ' . $this->limit;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}",
"public function RenderPaginator() {\n $html = '';\n //Insert all in one div tag\n $html.= '<div>';\n //We need this form for sumbitting limit into URL via GET call\n $html.='<form id= \"paginator\" name=\"paginator\" method=\"get\" action=\"\" >';\n //When limit is changed - just submit form\n $html.= '<select name=\"limit\" onchange=\"javascript:document.forms.paginator.submit()\">';\n $html.= '<option value=\"10\" ';\n if ($this->limit == 10) {\n $html.='selected';\n } $html.='>10</option>';\n $html.= '<option value=\"20\" ';\n if ($this->limit == 20) {\n $html.='selected';\n } $html.='>20</option>';\n $html.= '<option value=\"30\" ';\n if ($this->limit == 30) {\n $html.='selected';\n } $html.='>30</option>';\n $html.= '<option value=\"50\" ';\n if ($this->limit == 50) {\n $html.='selected';\n } $html.='>50</option>';\n $html.= '<option value=\"100\" ';\n if ($this->limit == 100) {\n $html.='selected';\n } $html.='>100</option>';\n $html.= '<option value=\"500\" ';\n if ($this->limit == 500) {\n $html.='selected';\n } $html.='>500</option>';\n $html.= '<option value=\"0\" ';\n if ($this->limit == 0) {\n $html.='selected';\n } $html.='>All</option>';\n $html.='</select>';\n $html.='</form>';\n \n $html.= '</div>';\n return $html;\n }",
"public function limit($limit);",
"public function limit($limit);",
"public function getLimits() {\n\t\t$limits['start'] = ($this->currentPage - 1) * $this->rowsPerPage;\n\t\t$limits['end'] = $this->currentPage * $this->rowsPerPage;\n\t\treturn $limits;\n\t}",
"public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}",
"function jb_post_content_limit_setting() {\n\techo '<p>' . _e( 'Enter the number of words to display in non featured posts.', 'jb' ) . '</p>';\n\techo \"<input type='text' name='\" . JB_SETTINGS_FIELD . \"[jb_post_content_limit]' size='10' value='\". genesis_get_option( 'jb_post_content_limit', JB_SETTINGS_FIELD ). \"' />\";\n}",
"function jb_featured_content_limit_setting() {\n\techo '<p>' . _e( 'Enter the number of words to display in homepage featured posts.', 'jb' ) . '</p>';\n\techo \"<input type='text' name='\" . JB_SETTINGS_FIELD . \"[jb_featured_content_limit]' size='10' value='\". genesis_get_option( 'jb_featured_content_limit', JB_SETTINGS_FIELD ). \"' />\";\n}",
"public function render_per_page_options()\n {\n }",
"public function setLimit($limit) {\n\t$this->parseQuery->setLimit($limit);\n }",
"public function getLimit() {\n return $this->limit;\n }",
"public function getLimits()\n {\n return $this->limits;\n }",
"function selectLimit($current = '', $numbers = NULL)\n\t{\n\t\tif (is_null($numbers)) {\n\t\t\t$list = array(50, 150, 300, 500, 'Todos');\n\t\t} else {\n\t\t\t$list = $numbers;\n\t\t}\n\n\t\tforeach ($list as $option) \n\t\t{\n\t\t\t$attr = ($option == $current) ? ' selected=\"selected\"' : '';\n\t\t\t$drop .= \"<option value='\".$option.\"'\".$attr.\">\".$option.\"</option>\\n\";\n\t\t}\n\n\t\treturn $drop;\n\t}",
"protected function initQueryLimit()\n {\n $url = $this->getBaseUrl(true) . 'accounts/self/capabilities?format=JSON';\n $response = $this->getConnector()->get($url);\n $response = $this->verifyResult($response, $url);\n\n $content = $this->transformJsonResponse($response->getContent());\n\n return $content['queryLimit']['max'];\n }",
"function draw_items_per_page(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->items_per_page_init!==false and $this->total_items>0){\r\n\t\t\t$out='<select id=\"'.$this->id.'_items_per_page_change\" name=\"'.$this->id.'_items_per_page_change\" onchange=\"'.$this->change_tags($this->items_per_page_url).'\">';\r\n\r\n\t\t\t// formula $i*10; pow(10,$i)\r\n\t\t\tif(strpos($this->items_per_page_init,'$')!==false){\r\n\r\n\t\t\t\t$i=1;\r\n\r\n\t\t\t\teval('$value='.$this->items_per_page_init.';');\r\n\r\n\t\t\t\twhile ($value<$this->total_items) {\r\n\r\n\t\t\t\t\t$out.='<option value=\"'.$value.'\"'.($value==$this->items_per_page ? ' selected=\"selected\"' : '').'>'.$value.'</option>';\r\n\r\n\t\t\t $i++;\r\n\r\n\t\t\t\t\teval('$value='.$this->items_per_page_init.';');\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\t$i=0;\r\n\r\n\t\t\t\t$arr_items_per_page=explode(',',$this->items_per_page_init);\r\n\r\n\t\t\t\twhile ($i<count($arr_items_per_page) and $arr_items_per_page[$i]<$this->total_items) {\r\n\r\n\t\t\t\t\t$out.='<option value=\"'.$arr_items_per_page[$i].'\"'.($arr_items_per_page[$i]==$this->items_per_page ? ' selected=\"selected\"' : '').'>'.$arr_items_per_page[$i].'</option>';\r\n\r\n\t\t\t $i++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif($this->items_per_page_all!='')\r\n\t\t\t\t$out.='<option value=\"all\"'.('all'==$this->items_per_page ? ' selected=\"selected\"' : '').'>'.$this->change_tags($this->items_per_page_all).'</option>';\r\n\r\n\t\t\t$out.='</select>';\r\n\t\t}\r\n\r\n\t\treturn $out;\r\n\t}",
"public function getQueryLimit() {\n\t\treturn $this->queryLimit;\n\t}",
"public function getLimit()\n {\n return $this->getParameter('limit');\n }",
"public static function limit($limit);",
"public function setLimit($value)\n {\n return $this->setParameter('limit', $value);\n }",
"function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}",
"public function screen_option() {\n add_screen_option( 'per_page', [\n 'label' => __('Entry Per Page', 'wpcf7-entries'),\n 'default' => 15,\n 'option' => 'form_per_page'\n ] );\n }",
"protected function getLimit() {\n if (isset($this->data['page'])) { // ...in the main table while pagination is used\n $l1 = ($this->data['page'] - 1) * $this->posts_per_page;\n $l2 = $this->posts_per_page;\n $limit = \"$l1, $l2\";\n }\n else $limit = \"0, \".$this->posts_per_page;\n return $limit;\n }",
"function get_spaces_options($zero_value = true){\r\n\t\t$available_spaces = $this->get_available_spaces();\r\n\t\tif( $available_spaces >= $this->min || ( empty($this->min) && $available_spaces > 0) ) {\r\n\t\t\tob_start();\r\n\t\t\t?>\r\n\t\t\t<select name=\"em_tickets[<?php echo $this->id ?>][spaces]\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t$min = ($this->min > 0) ? $this->min:1;\r\n\t\t\t\t\t$max = ($this->max > 0) ? $this->max:get_option('dbem_bookings_form_max');\r\n\t\t\t\t?>\r\n\t\t\t\t<?php if($zero_value) : ?><option>0</option><?php endif; ?>\r\n\t\t\t\t<?php for( $i=$min; $i<=$max; $i++ ): ?>\r\n\t\t\t\t\t<option><?php echo $i ?></option>\r\n\t\t\t\t<?php endfor; ?>\r\n\t\t\t</select>\r\n\t\t\t<?php \r\n\t\t\treturn ob_get_clean();\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\t\r\n\t}",
"protected function getAllAvailableNumberOfResultsOptions() {}",
"public function get_limits()\n\t{\n\t\t$profile_start = microtime(true);\n\n\t\t$limitsData = array(\n\t\t\t\t\t'call_limit' =>\tCALL_LIMIT,\n\t\t\t\t\t'duration_limit' =>\tCALL_DURATION_LIMIT,\n\t\t\t\t\t'listing_limit' =>\tLISTING_LIMIT\n\t\t\t\t\t);\n\n\t\t$this->input->do_put($this->config->base_url.\"/api/limit\",[]);\n\n\t\tif(!empty($limitsData))\n\t\t\t$this->display->success($limitsData,'limits');\n\t\telse\n\t\t\t$this->display->error(1502);\n\n\t\t$profile_start = profiler($profile_start,__CLASS__,__FUNCTION__,'openapi');\n\t}",
"public function setLimit($limit) {\n\t\t$this->limit = $limit;\n\t}",
"private function _limit($numRows) \n\t{\n\t\t$this->_query .= \" LIMIT \" . ( int ) $numRows;\n\t}",
"public function set_limit($new_limit){\r\n $this->limit = $new_limit;\r\n }",
"public function getMaxResults();",
"public function limit($limit)\n\t{\n\t\t$this->limit = (int) $limit;\n\t}",
"function perpage_selector()\r\n\t{\r\n\t?>\r\n\t\t<form name=\"per_page2\" action=\"\" method=\"get\">\r\n\t\t\t<select name=\"per_page\" id=\"per_page\" onChange='location.replace(\"<?php\r\n\t\t\t$data= $_GET;\r\n\t\t\tif(isset($data[\"per_page\"]))\r\n\t\t\t{\r\n\t\t\t\tunset($data[\"per_page\"]);\r\n\t\t\t}\r\n\t\t\techo $_SERVER['PHP_SELF'].\"?\".http_build_query($data); ?>&<?php echo \"per_page\";?>=\"+$(\"#per_page\").val() )'>\r\n\t\t\t<?php \r\n\t\t\t/* Adding a Default Value in options if it does not exist. */\r\n\r\n\t\t\tif(($this->rows_per_page%10)!=0)\r\n\t\t\t{\r\n\t\t\t ?>\r\n\t\t\t\t<option selected='selected' value=\"<?php echo $this->rows_per_page; ?>\"><?php echo $this->rows_per_page; ?></option>\r\n\t\t\t<?php \r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t<?php \r\n\t\t\t\tfor ($i=10; $i < 100 ; $i = $i + 10) { \r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t<option <?php \r\n\t\t\t\t\t\t\tif(isset($_GET['per_page']) && $_GET['per_page'] == $i)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \" selected = 'selected' \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!isset($_GET['per_page']) && $this->rows_per_page == $i)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \" selected = 'selected' \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t?> value=\"<?php echo $i; ?>\"><?php echo $i; ?></option>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t ?>\r\n\t\t\t</select>\r\n\t\t</form>\r\n\t\t<?php\r\n\t}",
"public function limit($limit) {\r\n\t\t$this->query .= \" LIMIT \" . $limit;\r\n\r\n\t\t# Return this instance of the class, so we can chain methods\r\n\t\treturn $this;\r\n\t}",
"function addLimit( $limit , $offset )\n{\n\tif(!empty($limit))\n\t{\n\t\t$limit = ($limit < 0)?0:$limit;\n\t\tif(!empty($offset) )\n\t\t{\n\t\t\t$offset = ($offset < 0)?0:$offset;\n\t\t\treturn \" LIMIT $offset , $limit \" ;\n\t\t}\n\t\telse\n\t\t\treturn \" LIMIT 0 , $limit \" ;\n\t}\n\telse\n\t\treturn \" LIMIT 0 , 10 \" ;\n}",
"public function limit($limit = \"\"){\n\t\t\tif(is_numeric($limit)){\n\t\t\t\t$this->limit = \" LIMIT :limit\";\n\t\t\t\t$this->addParam(\"limit\", $limit);\n\t\t\t}else{\n\t\t\t\t$this->limit = false;\n\t\t\t\tunset($this->parameters[\"limit\"]);\n\t\t\t}\n\t\t\treturn $this;\n\t\t}",
"public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}",
"protected function buildLimits(Query $query)\n {\n return $query->getLimit() !== null ? ' LIMIT '.$query->getLimit() : '';\n }",
"protected function getLimit(\\codename\\core\\model\\plugin\\limit $limit) : string {\r\n if ($limit->limit > 0) {\r\n return \" LIMIT \" . $limit->limit . \" \";\r\n }\r\n return '';\r\n }",
"public function setLimit($limit)\n {\n $this->limit = $limit;\n }",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id_langage', $q);\n\t$this->db->or_like('nom_langage', $q);\n\t$this->db->or_like('description', $q);\n\t$this->db->or_like('connaissances_linguistiques_id_langue_parler', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id_jadwal', $q);\n\t$this->db->or_like('id_semester', $q);\n\t$this->db->or_like('id_makul', $q);\n\t$this->db->or_like('id_kelas', $q);\n\t$this->db->or_like('id_dosen', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"public function cpSelectDsclimit($tablename,$value3, $value1=0,$value2=0) {\n /*** The SQL SELECT statement ***/\n /*\n * Prepare the select statement\n */\n $startvalue=($value1-1)*10;\n $sql=\"SELECT * FROM $tablename \";\n if($value2!=0)\n { $key1= key($value2);\n $sql.=\" where $key1='$value2[$key1]'\";\n }\n \n $sql.= \" ORDER BY $value3 DESC LIMIT $startvalue, 10\";\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}",
"protected function getLimitString()\n {\n $str = '';\n if (!empty($this->limit)) {\n $str = self::TAB_SEPARATOR;\n if (!empty($this->skip)) {\n $this->limit = $this->skip . ', ' . $this->limit;\n }\n $str .= 'LIMIT ' . $this->limit . self::LINE_SEPARATOR;\n }\n return $str;\n }",
"protected function getQueryLimit($request)\n {\n $data = $request->query->all();\n if (isset($data['_per_page']) &&\n $data['_per_page'] <= $this->container->getParameter('acseo_base_rest.listing_max_per_page')\n ) {\n return $data['_per_page'];\n }\n\n return $this->container->getParameter('acseo_base_rest.listing_max_per_page');\n }",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $db2 = $this->load->database('database_kedua', TRUE);\n\n $db2->order_by($this->id, $this->order);\n $db2->like('id', $q);\n\t$db2->or_like('kelas', $q);\n\t$db2->limit($limit, $start);\n return $db2->get($this->table)->result();\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function limit($limit)\t{\n\t\t$this->limit = array(\"LIMIT $limit\");\n\t\treturn $this;\n\t}",
"function index_limit($limit, $start = 0) {\n $this->db->join('tbl_perusahaan','tbl_out.id_perusahaan=tbl_perusahaan.id_perusahaan');\n $this->db->group_by('nomor_permohonan');\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"function mLIMIT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LIMIT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:186:3: ( 'limit' ) \n // Tokenizer11.g:187:3: 'limit' \n {\n $this->matchString(\"limit\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"public function getLimit()\n {\n return $this->getRequest()->get('limit');\n }",
"public function limit($limit,$offset);",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('makId', $q);\n\t$this->db->or_like('makKode', $q);\n\t$this->db->or_like('makNama', $q);\n\t// $this->db->or_like('makBiayaSbuId', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"public function limit( $value )\n {\n if( is_numeric( $value ))\n $this->query('limit', $value);\n }",
"function modifyLimitQuery($query, $from, $count)\n {\n $this->limit_from = $from;\n $this->limit_count = $count;\n return $query;\n }",
"private function setCustomLimit()\n\t{\n\t\t$this->limit = $this->customQuery->limit ? $this->customQuery->limit : $this->queryLimit;\n\n\t\treturn $this;\n\t}",
"function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id', $q);\n\t$this->db->or_like('id_proyek', $q);\n\t$this->db->or_like('id_sumber', $q);\n\t$this->db->or_like('likelihood', $q);\n\t$this->db->or_like('severity', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }",
"public function screen_option() {\r\n\t\t$option = 'per_page';\r\n\t\t$args = [\r\n\t\t\t'label' => 'Files',\r\n\t\t\t'default' => 5,\r\n\t\t\t'option' => 'file_per_page'\r\n\t\t];\r\n\r\n\t\tadd_screen_option( $option, $args );\r\n\t\t\r\n\t}",
"public function set_item_limit($limit = 0)\n {\n }",
"public function limitClause(){\n try {\n // Sparql11query.g:164:3: ( LIMIT INTEGER ) \n // Sparql11query.g:165:3: LIMIT INTEGER \n {\n $this->match($this->input,$this->getToken('LIMIT'),self::$FOLLOW_LIMIT_in_limitClause592); \n $this->match($this->input,$this->getToken('INTEGER'),self::$FOLLOW_INTEGER_in_limitClause594); \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 }",
"function sqladdlimit($cpage=1)\r\n{\r\n if($cpage<1||$cpage>$this->page_count)$cpage=1;\r\n $cpage--;\r\n $query=\" Limit \".($cpage * $this->page_set).\",\".$this->page_set ;\r\n return $query;\r\n}"
] | [
"0.78705007",
"0.6926937",
"0.69128007",
"0.66814065",
"0.66652316",
"0.66478413",
"0.6483418",
"0.648327",
"0.6420989",
"0.6358318",
"0.63381815",
"0.63381815",
"0.63381815",
"0.63381815",
"0.63381815",
"0.6309305",
"0.6280352",
"0.62692094",
"0.6237849",
"0.6205195",
"0.6194146",
"0.6146561",
"0.60923433",
"0.608264",
"0.6067332",
"0.6062136",
"0.60449654",
"0.60441023",
"0.6037532",
"0.6026714",
"0.60205656",
"0.60092133",
"0.6005424",
"0.59946436",
"0.59946436",
"0.59927136",
"0.5967738",
"0.5941376",
"0.59374833",
"0.591699",
"0.5902546",
"0.5896877",
"0.5895756",
"0.589434",
"0.5880469",
"0.58656245",
"0.5849891",
"0.5838378",
"0.5822666",
"0.5817447",
"0.5774847",
"0.5755077",
"0.57445765",
"0.57405853",
"0.5712033",
"0.5687577",
"0.5678831",
"0.56766963",
"0.5672851",
"0.56703264",
"0.56685436",
"0.56623656",
"0.56450284",
"0.56406444",
"0.564047",
"0.5631312",
"0.56305",
"0.56142336",
"0.56095797",
"0.56045717",
"0.5600373",
"0.55922055",
"0.55881274",
"0.5584438",
"0.55844045",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.55757195",
"0.5575687",
"0.5555085",
"0.5553846",
"0.55465055",
"0.5544504",
"0.55426425",
"0.5540805",
"0.5534674",
"0.5530422",
"0.55293584",
"0.5522813",
"0.5522213",
"0.55196023",
"0.55163157"
] | 0.0 | -1 |
Displays current result information | function result($text)
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['recordCount']) )
{
if($this->_pageDetails['recordCount'] > $this->_pageDetails['limit'])
{
$start_row = $this->_pageDetails['page'] > 1 ? (($this->_pageDetails['page']-1)*$this->_pageDetails['limit'])+1:'1';
$end_row = ($this->_pageDetails['recordCount'] < ($start_row + $this->_pageDetails['limit']-1)) ? $this->_pageDetails['recordCount'] : ($start_row + $this->_pageDetails['limit']-1);
$t = $text.$start_row.'-'.$end_row.' of '.$this->_pageDetails['recordCount'];
}
else
{
$t = $text.$this->_pageDetails['recordCount'];
}
return $t;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ViewResults() {\n echo \"<pre>\" . print_r($this->rs, TRUE) . \"</pre>\";\n }",
"function showResults(){\n global $ilUser, $tpl, $ilTabs, $ilLocator, $ilToolbar;\n\n $ilTabs->activateTab(\"showResults\");\n\n $ilToolbar->setFormAction($this->ctrl->getFormAction($this));\n $ilToolbar->addFormButton($this->txt(\"results_export\"), 'exportResultData');\n\n $tpl->setContent($this->initResultsTable());\n }",
"public function show(Result $result)\n {\n //\n }",
"public function show(Result $result)\n {\n //\n }",
"public function view_results()\n {\n $obj = new CombinedAnalysis();\n $this->final_results = $obj->fetchResultsFromFiles($this->id);\n\n // show everthing in template\n $this->show_template();\n }",
"public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }",
"function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }",
"public function printResult() {\n $this->result->path = $this->getType() . 's/' . $this->getName() . '#tmp';\n\n // text/plain is used to support IE\n header('Cache-Control: no-cache');\n header('Content-Type: text/plain; charset=utf-8');\n\n print $this->getResult();\n }",
"public function showResults(){\n $this->extractQuestions();\n }",
"public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}",
"public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}",
"public function displayQuery($result)\n\t{\n\n\t\tif(!$result){\n\n\t\t\t$output = 'Database Is Faild :'.mysqli_error($this->connection).'<br>';\n\t\t\t$output .= 'Last Query Is : '.$this->lastQuery;\n\t\t\tdie($output);\n\t\t}else{\n\n\t\t\t$this->affectedRows = mysqli_affected_rows($this->connection);\n\t\t}\n\t}",
"public function outputResults()\r\n {\r\n // loop all products and display results per product\r\n foreach ($this->Products->getAllProducts() as $productId => $productName) {\r\n echo \"Product ID: \" . $productId . \"\\n\";\r\n echo \"Product Name: \" . $productName . \"\\n\";\r\n echo \"Total Units Sold: \" . $this->ProductsSold->getSoldTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Pending: \" . $this->ProductsPurchased->getPurchasedPendingTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Received: \" . $this->ProductsPurchased->getPurchasedReceivedTotal($productId) . \"\\n\";\r\n echo \"Current Stock Level: \" . $this->Inventory->getStockLevel($productId) . \"\\n\\n\";\r\n }\r\n }",
"public function display(){}",
"public function display() {}",
"public function display() {}",
"public function showResults()\n {\n $tracker = Tracker::getInstance();\n\n $tracker->outputStats();\n if (count($tracker->getFailures())) {\n $tracker->output(\"\\nFAILURES\\n\", null, null, true);\n $tracker->outputFailures();\n }\n\n if (count($tracker->getErrors())) {\n $tracker->output(\"\\nERRORS\\n\");\n $tracker->outputErrors();\n }\n\n $tracker->output(\"\\n\");\n\n if (count($tracker->getFailures())) {\n return;\n }\n\n if ($this->coverageDirectory()) {\n $tracker->output('Generating coverage report as html...' . \"\\n\");\n $this->_generateCoverageHtml();\n return $tracker->output('Done' . \"\\n\");\n }\n\n if ($this->showCoverage()) {\n $this->_generateCoverageCommandLine();\n return;\n }\n }",
"public function display()\n {\n }",
"public function display()\n {\n }",
"public function display()\n {\n }",
"public function display()\n {\n }",
"protected function showResult()\n {\n//\n// unset($this->result['missing_advertiser']);\n\n var_dump($this->result);\n }",
"public function execute() {\n\t\t$data = $this->getResultData();\n\t\t$this->printText($data[0]);\n\t}",
"function showResults($results) {\n\t\techo \"<div class='results_column'>\";\n\t\techo \"<h2>\" . $this->name . \"</h2>\";\n\t\techo \"<ul>\";\n\t\t\n\t\tif (count($results) == 0 || !($results instanceof SimpleXMLElement || is_array($results))) {\n\t\t\techo \"<li>No results found.</li>\";\n\t\t} else {\n\t\t\tforeach($results as $result) {\n\t\t\t\t$this->showResult($result);\n\t\t\t}\n\t\t}\n\t\techo \"</ul>\";\n\t\techo \"</div>\";\n\t}",
"public abstract function showInfo();",
"public function show(ResultItem $resultItem)\n {\n //\n }",
"public function display_current()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" display ? ?\");\n\t}",
"public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }",
"public function actionInfo()\n {\n return $this->render('info');\n }",
"public function display() {\n\t}",
"private function showInfo()\n {\n $this->results = array('error' => '');\n $this->countMulticolumnElements();\n $this->findDifferentMCElementConfigs();\n $this->isGridelementsInstalled();\n return $this->returnResults();\n }",
"function displayResult($result, $sql) {\n if ($result->num_rows > 0) {\n echo \"<table border='1'>\\n\";\n // print headings (field names)\n $heading = $result->fetch_assoc( );\n echo \"<tr>\\n\";\n // print field names \n foreach($heading as $key=>$value){\n echo \"<th>\" . $key . \"</th>\\n\";\n }\n echo \"</tr>\\n\";\n \n // Print values for the first row\n echo \"<tr>\\n\";\n foreach($heading as $key=>$value){\n echo \"<td>\" . $value . \"</td>\\n\";\n }\n \n // output rest of the records\n while($row = $result->fetch_assoc()) {\n //print_r($row);\n //echo \"<br />\";\n echo \"<tr>\\n\";\n // print data\n foreach($row as $key=>$value) {\n echo \"<td>\" . $value . \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n } else {\n echo \"<strong>zero results using SQL: </strong>\" . $sql;\n }\n }",
"function printResult($result) {\n\t\t\t\techo \"<div class='Pokeguide'>\n\t\t\t\techo \"<table>\";\n\n\t\t\t\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n\t\t\t\t\tfor ($i = 0; $i < 15; $i++){\n\t\t\t\t\t\techo \"<tr><td>\" . $row[$i] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\techo \"</table>\";\n\t\t\t\techo \"</div>\";\n\t\t\t}",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"protected function resultAction()\n {\n $fullUrl = s('post')->getSafeArray('short')->getString('url');\n $shortId = s('shorter')->getShortId($fullUrl);\n $shortUrl = $this->urlPrefix.$shortId;\n //\n return s('result')->show(template('layout', [\n 'title'=>$this->lang->title,\n 'content'=>template('index/result', [\n 'header'=>$this->lang->header,\n 'text'=>$this->lang->text,\n 'url'=>$fullUrl,\n 'shortUrl'=>$shortUrl\n ])\n ]));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"function show() {\n echo $this->fetch();\n }",
"public function info(){\n $this->display('Main/Person/info') ;\n }",
"function displayResults($results) {\n global $islandora_query;\n\n global $base_url;\n $lines = array();\n\n foreach ($results->response->docs as $doc) {\n $resultsArray = array();\n foreach ($doc as $field => $value) {\n\n if (is_array($value)) {\n $value = implode(\", \", $value);\n }\n $resultsArray[$field] = $value;\n }\n $resultsArray['showAbstract'] = FALSE;\n if (preg_match('/PID:cyct/', $islandora_query)) {\n $resultsArray['showAbstract'] = TRUE;\n }\n $this->resultsArray = $resultsArray;\n $type = $resultsArray['refworks.rt'];\n switch ($type) {\n case \"Journal Article\":\n case \"Magazine Article\":\n $lines[] = array($this->articleDetails());\n break;\n case \"Report\":\n $lines[] = array($this->reportDetails());\n break;\n case \"Book, Whole\":\n case \"Book, Edited\":\n $lines[] = array($this->bookDetails());\n }\n }\n return theme_table(null, $lines);\n }",
"function result()\n\t{\n\t\t$page_data['page_info']\t=\t'Student Result';\n\t\t$page_data['page_name']\t=\t'admin/result';\n\t\t$page_data['page_title']=\t'Student Result';\n\t\t$this->load->view('index' , $page_data);\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function printout()\n\t\t{\tif (isset($this->res) && (mysql_num_rows($this->res) > 0))\n\t\t\t{\tmysql_data_seek($this->res, 0);\n\t\t\t\t$num = mysql_num_fields($this->res);\n\n\t\t\t\techo \"<table border=1>\";\n\t\t\t\techo \"<tr>\";\n\n\t\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t\t{\techo \"<th>\";\n\t\t\t\t\techo mysql_field_name($this->res, $i);\n\t\t\t\t\techo \"</th>\";\n\t\t\t\t}\n\t\t\t\techo \"</tr>\";\n\n\t\t\t\twhile ($row = mysql_fetch_row($this->res))\n\t\t\t\t{\techo \"<tr>\";\n\n\t\t\t\t\tforeach($row as $elem)\n\t\t\t\t\t{\techo \"<td>$elem</td>\";\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\n\n\t\t\t\techo \"</table>\";\n\t\t\t}\n\n\t\t\telse\n\t\t\t\techo \"There is nothing to print! <br />\";\n\t\t}",
"function displayResults($result){\n\t\n\t\t// Récupération des résultats\n\t\tglobal $resultMovieId;\n\t\t\n\t\t$rows = $result->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n\t\tforeach ($rows as $row) {\t\t\n\t\n\t\t\tif(!in_array($row['idmovie'], $resultMovieId)){\n\t\t\t\n\t\t\t\t$movieId = $row['idmovie'];\n\t\t\t\t$englishTitle = $row['enTitle'];\n\t\t\t\t$originalTitle = $row['originalTitle'];\n\t\t\t\t$director = $row['director'];\n\t\t\t\t$region = $row['regionName'];\t\t\t\n\t\t\t\t$year = $row['releaseDate'];\t\n\t\t\t\t\t\n\t\t\t\tinsertResult('<***>',$movieId, $originalTitle, $englishTitle, $director, $region, $year);\n\t\t\t\n\t\t\t\tarray_push($resultMovieId, $movieId);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$nb_lignes = $result->rowCount();\n\t\t$result->closeCursor();\t\n\t\treturn $nb_lignes;\n\t\n\t}",
"public final function display(){\n echo \"Username is{$this->user} and user id is{$this->userId}\";\n }",
"public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}",
"function printResults () {\n\n if (! $this->isActive()) { return; }\n\n $unstoppedTasks = array_keys($this->startTime);\n if (count($unstoppedTasks)) {\n Tht::error('Unstopped Perf task: `' . $unstoppedTasks[0] . '`');\n }\n\n $results = $this->results();\n\n // Have to do this outside of results() or the audit calls will show up in the perf tasks.\n // $results['imageAudit'] = Tht::module('Image')->auditImages(Tht::path('public'));\n\n $thtDocLink = Tht::getThtSiteUrl('/reference/perf-panel');\n $compileMessage = Compiler::getDidCompile() ? '<div class=\"bench-compiled\">Files were updated. Refresh to see compiled results.</div>' : '';\n\n $table = OTypeString::getUntyped(\n Tht::module('Web')->u_table(OList::create($results['single']),\n OList::create([ 'task', 'durationMs', 'memoryMb', 'value' ]),\n OList::create([ 'Task', 'Duration (ms)', 'Peak Memory (MB)', 'Detail' ]),\n OMap::create(['class' => 'bench-result'])\n ), 'html');\n\n $tableGroup = OTypeString::getUntyped(\n Tht::module('Web')->u_table(OList::create($results['group']),\n OList::create([ 'task', 'durationMs', 'memoryMb', 'numCalls' ]),\n OList::create([ 'Task', 'Duration (ms)', 'Memory (MB)', 'Calls' ]),\n OMap::create(['class' => 'bench-result'])\n ), 'html');\n\n\n $opCache = '';\n if (Tht::isOpcodeCacheEnabled()) {\n $opCache = '<span style=\"color: #393\">ON</span>';\n }\n else {\n $opCache = '<span style=\"color: #c33\">OFF</span>';\n }\n\n $appCache = Tht::module('Cache')->u_get_driver();\n if ($appCache == 'file') {\n $appCache = '<span style=\"color: #c33\">' . $appCache . '</span>';\n }\n else {\n $appCache = '<span style=\"color: #393\">' . $appCache . '</span>';\n }\n\n\n\n $phpVersion = phpVersion();\n\n\n echo $this->perfPanelCss();\n echo $this->perfPanelJs($results['scriptTime']);\n\n ?>\n <div id=\"perf-score-container\">\n\n <div class=\"perfSection\">\n <div class='perfHeader'>Perf Score: <span id='perfScoreTotalLabel'></span><span id='perfScoreTotal'></span></div>\n\n <div class=\"perfHelp\"><a href=\"<?= $thtDocLink ?>\" style=\"font-weight:bold\">About This Score</a></div>\n </div>\n\n <?= $compileMessage ?>\n\n <div class=\"perfSection\">\n <div class=\"perfTotals\">\n <div>Server - Page Execution: <span id=\"perfScoreServer\"><?= $results['scriptTime'] ?> ms</span></div>\n <div>Network - Transfer: <span id='perfScoreNetwork'></span></div>\n <div>Browser - window.onload: <span id='perfScoreClient'></span></div>\n </div>\n </div>\n\n <div class=\"perfSection\">\n <div class=\"perfTotals\">\n <div>Server - Peak Memory: <span><?= $results['peakMemory'] ?> MB</span></div>\n </div>\n </div>\n\n <div class=\"perfSection tasksGrouped\">\n <div class=\"perfSubHeader\">Top Tasks (Grouped)</div>\n <?= $tableGroup ?>\n </div>\n\n <div class=\"perfSection\">\n <div class=\"perfSubHeader\">Top Tasks (Individual)</div>\n <?= $table ?>\n <div style='text-align:center; margin-top:48px;'>\n <p style=\"font-size: 80%\"> Sub-task time is not included in parent tasks.</p>\n </div>\n </div>\n\n\n\n <div class=\"perfSection\">\n <div class=\"perfHeader\">PHP Info</div>\n\n <div style=\"text-align: left; width: 300px; display: inline-block; margin-top: 32px\">\n <li>PHP Version: <b><?= $phpVersion ?></b></li>\n <li>Opcode Cache: <b><?= $opCache ?></b></li>\n <li>App Cache Driver: <b><?= $appCache ?></b></li>\n </div>\n </div>\n\n <div class=\"perfSection\">\n Perf Panel only visible to localhost or <code>devIp</code> in <code>config/app.jcon</code>\n </div>\n\n </div>\n <?php\n\n }",
"public function printResultBar() \n { \n \n if( $this->getTotalOfResults() > 0 ) { \n printf(\"\n <div id=\\\"result-bar\\\">\n Showing page <span>%s</span> of <span>\n %s</span> available pages for\n <span>%s</span> \n results. \n </div>\n \"\n , $this->getCurrentPage()\n , $this->getTotalOfPages()\n , $this->getTotalOfResults()\n );\n \n } else { \n print \"<div id=\\\"result-bar-not-found\\\">\n No records were found to your search.</div>\"; \n } \n \n }",
"function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function display ()\n {\n echo $this->as_text ();\n }",
"function display_result_details($branch, $what='all', $html=false)\n{\n\tglobal $db;\n\n\tif ($html) $etag = check_send_etag($branch, $what);\n\n\t$select = $db->prepare(\"SELECT results.*,scripts.label AS script_label,scripts.details AS script_details,suites.label AS suite_label,\nbranch.label AS branch_label,\nCOALESCE(success.label,success) AS success_revision,\nCOALESCE(failed.label,failed) AS failed_revision,\nCOALESCE(first_failed.label,first_failed) AS first_failed_revision\nFROM results\nJOIN labels AS branch ON results.branch=branch.id AND branch.details='***branch***'\nJOIN labels AS scripts ON results.script=scripts.id\nJOIN labels AS suites ON results.suite=suites.id\nLEFT JOIN labels AS success ON results.success=success.id AND success.details='***revision***'\nLEFT JOIN labels AS failed ON results.failed=failed.id AND failed.details='***revision***'\nLEFT JOIN labels AS first_failed ON results.first_failed=first_failed.id AND first_failed.details='***revision***'\nWHERE branch=:branch\".limit_script_sql($what).'\nORDER BY script,suite,test');\n\t$select->setFetchMode(PDO::FETCH_ASSOC);\n\tif ($select->execute(array(\n\t\t'branch' => label2id($branch),\n\t)))\n\t{\n\t\tif ($html)\n\t\t{\n\t\t\techo \"<table class='details' data-etag='\".htmlspecialchars($etag).\"'>\\n\";\n\t\t\techo \"<tr class='header'><th class='expandAll'></th><th>Script</th><th>Suite</th><th>Test</th><th>Branch</th>\".\n\t\t\t\t\"<th>Last success</th><th>Failed</th><th>First failed</th><th>Time</th><th title='Notes' class='notes'>N</th></tr>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Script\\t\\t\\tSuite\\t\\t\\tTest\\tBranch\\tLast success\\tFailed\\tFirst failed\\tTime\\n\\n\";\n\t\t}\n\t\tforeach($select as $result)\n\t\t{\n\t\t\t$result['time'] = isset($result['time']) ? number_format($result['time'], 2, '.', '') : '';\n\t\t\t$description = get_test_description($result['script_label'], $result['suite_label'], $result['test']);\n\t\t\tif (!$html)\n\t\t\t{\n\t\t\t\techo \"\\n$result[script_label]\\t$result[suite_label]\\t\".\n\t\t\t\t\t$result['test'].(!empty($description) ? ': '.$description : '').\"\\t\".\n\t\t\t\t\t\"$result[branch_label]\\t$result[success_revision]\\t\".\n\t\t\t\t\t\"$result[failed_revision]\\t$result[first_failed_revision]\\t$result[time]\\n\";\n\t\t\t\tif (!empty($result['details'])) echo \"$result[details]\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!empty($result['failed']))\n\t\t\t{\n\t\t\t\techo '<tr class=\"red\">';\n\t\t\t}\n\t\t\telseif (!empty($result['success']))\n\t\t\t{\n\t\t\t\techo '<tr class=\"green\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<tr class=\"ignored\">';\n\t\t\t}\n\t\t\tif (!empty($result['details']) || !empty($result['protocol']))\n\t\t\t{\n\t\t\t\techo '<td class=\"expand\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<td>';\n\t\t\t}\n\n\t\t\techo \"</td><td class='script'>\".htmlspecialchars($result['script_label']).\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['suite_label']).\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['test']).(!empty($description) ? ': '.htmlspecialchars($description) : '').\n\t\t\t\t\"</td><td>\".htmlspecialchars($result['branch_label']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['success_revision']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['failed_revision']).\n\t\t\t\t\"</td><td class='revision'>\".htmlspecialchars($result['first_failed_revision']).\n\t\t\t\t\"</td><td class='time' title='\".htmlspecialchars($result['updated']).\"'>\".htmlspecialchars($result['time']).\n\t\t\t\t\"</td><td class='\".(empty($result['notes']) ? 'noNotes' : 'haveNotes').\"'>\".\n\t\t\t\t\"</td></tr>\\n\";\n\n\t\t\tif (!empty($result['details']) || !empty($result['protocol']))\n\t\t\t{\n\t\t\t\techo '<tr style=\"display:none\" class=\"details\"><td></td><td colspan=\"8\" class=\"output\">'.htmlspecialchars($result['details']).htmlspecialchars($result['protocol']).\"</td></tr>\\n\";\n\t\t\t}\n\t\t\techo '<tr style=\"display:none\" class=\"notes\" id=\"'.htmlspecialchars($result['branch'].'-'.$result['script'].'-'.$result['suite'].'-'.$result['test']).\n\t\t\t\t'\"><td/><td colspan=\"7\"><textarea class=\"notes\">'.htmlspecialchars($result['notes']).\"</textarea></td>\".\n\t\t\t\t\"<td colspan='2' class='updateNotes'><button>Update</button></tr>\\n\";\n\t\t}\n\t}\n}",
"function display(){\n\n\t\t\tview::$output = $this->output;\n\n\t\t}",
"public function display_summary() {\n // FIXME\n }",
"abstract function display();",
"abstract function display();",
"public function show()\n {\n $data = [\n 'results' => Result::paginate(15),\n ];\n return view('admin.result.show', $data);\n }",
"public function statisticAction() {\n\t\t\t// @TODO: Check toArray\n\t\t$results = $this->resultRepository->findByFeuser((int) $GLOBALS['TSFE']->fe_user->user['uid'])->toArray();\n\t\t$this->view->assign('results', $results);\n\t\t$this->view->assign('page', $this->settings['certificate']['detailPid']);\n\t}",
"public abstract function display();",
"function printResult($result) {\n while (($row = oci_fetch_array($result)) != false) {\n echo \"<p class=\\\"wrapper\\\">\";\n echo $row[0];\n echo \"</p>\";\n }\n }",
"function printResults(&$results) {\n\t // the profile name and total sessions.\n\t if (count($results->getRows()) > 0) {\n\n\t // Get the profile name.\n\t $profileName = $results->getProfileInfo()->getProfileName();\n\n\t // Get the entry for the first entry in the first row.\n\t $rows = $results->getRows();\n\t $sessions = $rows[0][0];\n\n\t // Print the results.\n\t print \"First view (profile) found: $profileName\\n\";\n\t print \"Total sessions: $sessions\\n\";\n\t } else {\n\t print \"No results found.\\n\";\n\t }\n\t}",
"function printResults(&$results) {\n // the profile name and total sessions.\n if (count($results->getRows()) > 0) {\n\n // Get the profile name.\n $profileName = $results->getProfileInfo()->getProfileName();\n\n // Get the entry for the first entry in the first row.\n $rows = $results->getRows();\n $sessions = $rows[0][0];\n\n // Print the results.\n print \"First view (profile) found: $profileName\\n\";\n print \"Total sessions: $sessions\\n\";\n } else {\n print \"No results found.\\n\";\n }\n}",
"function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}",
"function display()\n {\n view::$output = $this->output;\n }",
"public function display() {\n\t\techo $this->userName . \", \" . $this->firstName . \", \" . $this->lastName . \", \" . $this->yearOfBirth . \"\\n\";\n }",
"function display()\n {\n\n view::$output = $this->output;\n }",
"function show_results()\n\t{\n\t\tglobal $ibforums, $std;\n\n\t\t$this->result_type = $ibforums->input['result_type'];\n\t\t$this->search_in = $ibforums->input['search_in'];\n\n\t\t//------------------------------------------------\n\t\t// We have a search ID, so lets get the parsed results.\n\t\t//------------------------------------------------\n\n\t\t$this->unique_id = $ibforums->input['searchid'];\n\n\t\tif (!$this->unique_id)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$stmt = $ibforums->db->query(\"SELECT *\n\t\t\t\t FROM ibf_search_results\n\t\t\t\t WHERE id='{$this->unique_id}'\");\n\n\t\t$sr = $stmt->fetch();\n\n\t\t$tmp_topics = $sr['topic_id'];\n\t\t$topic_max_hits = \"\"; //$sr['topic_max'];\n\t\t$tmp_posts = $sr['post_id'];\n\t\t$post_max_hits = \"\"; //$sr['post_max'];\n\n\t\t$this->sort_order = $sr['sort_order'];\n\t\t$this->sort_key = $sr['sort_key'];\n\n\t\t//------------------------------------------------\n\t\t// Remove duplicates from the topic_id and post_id\n\t\t//------------------------------------------------\n\n\t\t$topic_max_hits = self::unique_string_items($tmp_topics);\n\t\t$post_max_hits = self::unique_string_items($tmp_posts);\n\n\t\t$topics = $tmp_topics;\n\t\t$posts = $tmp_posts;\n\n\t\t//-------------------------------------\n\n\t\tif (!$topics and !$posts)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$url_words = $this->convert_highlite_words($ibforums->input['highlite']);\n\n\t\t$count = 0;\n\n\t\tif ($this->result_type == 'topics')\n\t\t{\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t FROM\n\t\t\t\t\t\tibf_topics t, ibf_forums f\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND f.id=t.forum_id\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY t.pinned DESC,\";\n\n\t\t\t\t// search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// we have tid and pid to sort out, woohoo NOT\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t// Array for forum id of each message\n\t\t\t\t$forum_posts = array();\n\n\t\t\t\tif ($posts)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tforum_id,\n\t\t\t\t\t\ttopic_id\n\t\t\t\t\tFROM ibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tpid IN({$posts})\n\t\t\t\t\t\tAND queued != 1\");\n\n\t\t\t\t\tif ($topics)\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = explode(',', $topics);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = array();\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!in_array($pr['topic_id'], $topics))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$topics[] = $pr['topic_id'];\n\t\t\t\t\t\t\t$topic_max_hits++;\n\n\t\t\t\t\t\t\t$forum_posts[$pr['topic_id']] = $pr['forum_id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$topics = implode(',', $topics);\n\t\t\t\t}\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t \t FROM ibf_topics t\n\t\t\t\t\t LEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY\n\t\t\t\t\t\tt.pinned DESC,\";\n\n\t\t\t\t// Search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\tif ($stmt->rowCount())\n\t\t\t{\n\t\t\t\twhile ($row = $stmt->fetch())\n\t\t\t\t{\n\t\t\t\t\t// club tool\n\t\t\t\t\tif ($row['club'] and $std->check_perms($ibforums->member['club_perms']) == FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$count++;\n\n\t\t\t\t\t$row['keywords'] = $url_words;\n\n\t\t\t\t\tif ($row['pinned'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderPinnedRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$std->Error(array(\n\t\t\t\t 'LEVEL' => 1,\n\t\t\t\t 'MSG' => 'no_search_results'\n\t\t\t\t ));\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\t$this->output .= View::make(\n\t\t\t\t\"search.end\",\n\t\t\t\t[\n\t\t\t\t\t'Data' => array(\n\t\t\t\t\t\t'SHOW_PAGES' => $this->links,\n\t\t\t\t\t\t'modform_close' => ($this->modfunctions)\n\t\t\t\t\t\t\t? View::make(\"search.modform_close\")\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t)\n\t\t\t\t]\n\t\t\t);\n\n\t\t} else // ( $this->result_type == 'posts' )\n\t\t{\n\n\t\t\t$this->parser = new PostParser();\n\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t\tFROM ibf_topics t\n\t\t\t\t\tLEFT JOIN ibf_posts p\n\t\t\t\t\t\tON (t.tid=p.topic_id\n\t\t\t\t\t\t AND p.new_topic=1\n\t\t\t\t\t\t AND p.use_sig=0)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tt.tid IN({$topics})\n\t\t\t\t\t\tAND p.queued != 1\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t$this->parser->prepareIcons();\n\n\t\t\t\tif ($topics)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tpid\n\t\t\t\t\tFROM\n\t\t\t\t\t\tibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\ttopic_id IN({$topics}) AND\n\t\t\t\t\t\tnew_topic=1 AND\n\t\t\t\t\t\tqueued != 1\");\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!preg_match(\"/,\" . $pr['pid'] . \",/\", $posts))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$posts .= $pr['pid'] . \",\";\n\t\t\t\t\t\t\t$post_max_hits++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$posts = str_replace(\",,\", \",\", $posts);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= $this->start_page($post_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tp.use_emo,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.forum_highlight,\n\t\t\t\t\t\tf.highlight_fid as hid,\n\t\t\t\t\t\tf.name as forum_name,\n\t\t\t\t\t\tf.use_html,\n\t\t\t\t\t\tg.g_dohtml,\n\t\t\t\t\t\tp.ip_address\n\t\t\t\t\tFROM ibf_posts p\n\t\t\t\t\tLEFT JOIN ibf_topics t\n\t\t\t\t\t\tON (t.tid=p.topic_id)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=p.forum_id)\n\t\t\t\t\tLEFT JOIN ibf_members m\n\t\t\t\t\t\tON (m.id=p.author_id)\n\t\t\t\t\tLEFT JOIN ibf_groups g\n\t\t\t\t\t\tON (m.mgroup=g.g_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.pid IN({$posts}) AND\n\t\t\t\t\t\tp.use_sig=0 AND\n\t\t\t\t\t\tp.queued != 1 AND\n\t\t\t\t\t\tt.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\t\t\t}\n\n\t\t\twhile ($row = $stmt->fetch())\n\t\t\t{\n\t\t\t\tif ($ibforums->member['g_is_supmod'])\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"( <a href='{$ibforums->base_url}&act=modcp&CODE=ip&incoming={$row['ip_address']}' target='_blank'>{$row['ip_address']}</a> )\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"\";\n\t\t\t\t}\n\n\t\t\t\tif ($row['club'] and\n\t\t\t\t $std->check_perms($ibforums->member['club_perms']) == FALSE\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$count++;\n\n\t\t\t\t$data = array(\n\t\t\t\t\t'TEXT' => $row['post'],\n\t\t\t\t\t'SMILIES' => $row['use_emo'],\n\t\t\t\t\t'CODE' => 1,\n\t\t\t\t\t'SIGNATURE' => 0,\n\t\t\t\t\t'HTML' => 1,\n\t\t\t\t\t'HID' => ($row['forum_highlight'])\n\t\t\t\t\t\t? $row['hid']\n\t\t\t\t\t\t: -1,\n\t\t\t\t\t'TID' => $row['topic_id'],\n\t\t\t\t\t'MID' => $row['author_id'],\n\t\t\t\t);\n\n\t\t\t\t$row['post'] = $this->parser->prepare($data);\n\n\t\t\t\tif (!trim($row['post']))\n\t\t\t\t{\n\t\t\t\t\t$count--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$row['keywords'] = $url_words;\n\t\t\t\t$row['post_date'] = $std->get_date($row['post_date']);\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Parse HTML tag on the fly\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($row['use_html'] == 1)\n\t\t\t\t{\n\t\t\t\t\t// So far, so good..\n\n\t\t\t\t\tif (stristr($row['post'], '[dohtml]'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// [doHTML] tag found..\n\n\t\t\t\t\t\t$parse = ($row['use_html'] AND $row['g_dohtml'])\n\t\t\t\t\t\t\t? 1\n\t\t\t\t\t\t\t: 0;\n\n\t\t\t\t\t\t$row['post'] = $this->parser->post_db_parse($row['post'], $parse);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Do word wrap?\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($ibforums->vars['post_wordwrap'] > 0)\n\t\t\t\t{\n\t\t\t\t\t$row['post'] = $this->parser->my_wordwrap($row['post'], $ibforums->vars['post_wordwrap']);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= View::make(\"search.RenderPostRow\", ['Data' => $this->parse_entry($row, 1)]);\n\t\t\t}\n\n\t\t\t$this->output .= View::make(\"search.end_as_post\", ['Data' => array('SHOW_PAGES' => $this->links)]);\n\t\t}\n\n\t\tif ($count <= 0)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$this->page_title = $ibforums->lang['search_results'];\n\n\t\tif ($ibforums->input['nav'] == 'lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'my_lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['my_nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'lt')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_lt']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'au')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_au']);\n\t\t} else\n\t\t{\n\t\t\t$this->nav = array(\n\t\t\t\t\"<a href='{$this->base_url}&act=Search'>{$ibforums->lang['search_form']}</a>\",\n\t\t\t\t$ibforums->lang['search_title']\n\t\t\t);\n\t\t}\n\t}",
"function show() {\n // Abort if empty file\n if($this->oParser->oManager->tsCurDate < 1) {\n return;\n }\n \n // We want to process the output later\n ob_start();\n\n $this->printHeading();\n $this->printDailyMessages();\n $this->printAbsentTeachers();\n $this->printStandInTable();\n $this->printStandInTableFooter();\n\n $str = ob_get_clean();\n #debugPrint($str);\n echo vpBeautifyString($str);\n }",
"function showResult($script)\n{\n\tglobal $dbQuery;\n\tglobal $siteSerialID;\n\n\techo $script;\n\techo 'adm.system(' . $siteSerialID . ', ' . (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) . ', ' . $dbQuery . ');';\n\texit;\n}",
"public function show(rc $rc)\n {\n //\n }",
"function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}",
"function result_screen($mode = 'reg')\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$ADMIN->page_title = \"Statistic Center Results\";\r\n\r\n\t\t$ADMIN->page_detail = \" \";\r\n\r\n\t\t//+---------------------\r\n\r\n\t\tif (!checkdate($IN['to_month'], $IN['to_day'], $IN['to_year']))\r\n\t\t{\r\n\t\t\t$ADMIN->error(\"The 'Date To:' time is incorrect, please check the input and try again\");\r\n\t\t}\r\n\r\n\t\tif (!checkdate($IN['from_month'], $IN['from_day'], $IN['from_year']))\r\n\t\t{\r\n\t\t\t$ADMIN->error(\"The 'Date From:' time is incorrect, please check the input and try again\");\r\n\t\t}\r\n\r\n\t\t//+---------------------\r\n\r\n\t\t$to_time = mktime(12, 0, 0, $IN['to_month'], $IN['to_day'], $IN['to_year']);\r\n\t\t$from_time = mktime(12, 0, 0, $IN['from_month'], $IN['from_day'], $IN['from_year']);\r\n\r\n\t\t$human_to_date = getdate($to_time);\r\n\t\t$human_from_date = getdate($from_time);\r\n\r\n\t\t//+---------------------\r\n\r\n\t\tif ($mode == 'reg')\r\n\t\t{\r\n\t\t\t$table = 'Registration Statistics';\r\n\r\n\t\t\t$sql_table = 'ibf_members';\r\n\t\t\t$sql_field = 'joined';\r\n\r\n\t\t\t$ADMIN->page_detail = \"Showing the number of users registered. (Note: All times based on GMT)\";\r\n\t\t} else\r\n\t\t{\r\n\t\t\tif ($mode == 'topic')\r\n\t\t\t{\r\n\t\t\t\t$table = 'New Topic Statistics';\r\n\r\n\t\t\t\t$sql_table = 'ibf_topics';\r\n\t\t\t\t$sql_field = 'start_date';\r\n\r\n\t\t\t\t$ADMIN->page_detail = \"Showing the number of topics started. (Note: All times based on GMT)\";\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tif ($mode == 'post')\r\n\t\t\t\t{\r\n\t\t\t\t\t$table = 'Post Statistics';\r\n\r\n\t\t\t\t\t$sql_table = 'ibf_posts';\r\n\t\t\t\t\t$sql_field = 'post_date';\r\n\r\n\t\t\t\t\t$ADMIN->page_detail = \"Showing the number of posts. (Note: All times based on GMT)\";\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($mode == 'msg')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$table = 'PM Sent Statistics';\r\n\r\n\t\t\t\t\t\t$sql_table = 'ibf_messages';\r\n\t\t\t\t\t\t$sql_field = 'msg_date';\r\n\r\n\t\t\t\t\t\t$ADMIN->page_detail = \"Showing the number of sent messages. (Note: All times based on GMT)\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tswitch ($IN['timescale'])\r\n\t\t{\r\n\t\t\tcase 'daily':\r\n\t\t\t\t$sql_date = \"%w %U %m %Y\";\r\n\t\t\t\t$php_date = \"F jS - Y\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'monthly':\r\n\t\t\t\t$sql_date = \"%m %Y\";\r\n\t\t\t\t$php_date = \"F Y\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// weekly\r\n\t\t\t\t$sql_date = \"%U %Y\";\r\n\t\t\t\t$php_date = \" [F Y]\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t$stmt = $ibforums->db->query(\"SELECT MAX($sql_field) as result_maxdate,\r\n\t\t\t\t COUNT(*) as result_count,\r\n\t\t\t\t DATE_FORMAT(from_unixtime($sql_field),'$sql_date') AS result_time\r\n\t\t\t\t FROM $sql_table\r\n\t\t\t\t WHERE $sql_field > '$from_time'\r\n\t\t\t\t AND $sql_field < '$to_time'\r\n\t\t\t\t GROUP BY result_time\r\n\t\t\t\t ORDER BY $sql_field {$IN['sortby']}\");\r\n\r\n\t\t$running_total = 0;\r\n\t\t$max_result = 0;\r\n\r\n\t\t$results = array();\r\n\r\n\t\t$SKIN->td_header[] = array(\"Date\", \"20%\");\r\n\t\t$SKIN->td_header[] = array(\"Result\", \"70%\");\r\n\t\t$SKIN->td_header[] = array(\"Count\", \"10%\");\r\n\r\n\t\t//+-------------------------------\r\n\r\n\t\t$ADMIN->html .= $SKIN->start_table(ucfirst($IN['timescale']) . \" \" . $table . \" ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} to\" . \" {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})\");\r\n\r\n\t\tif ($stmt->rowCount())\r\n\t\t{\r\n\r\n\t\t\twhile ($row = $stmt->fetch())\r\n\t\t\t{\r\n\r\n\t\t\t\tif ($row['result_count'] > $max_result)\r\n\t\t\t\t{\r\n\t\t\t\t\t$max_result = $row['result_count'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$running_total += $row['result_count'];\r\n\r\n\t\t\t\t$results[] = array(\r\n\t\t\t\t\t'result_maxdate' => $row['result_maxdate'],\r\n\t\t\t\t\t'result_count' => $row['result_count'],\r\n\t\t\t\t\t'result_time' => $row['result_time'],\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($results as $pOOp => $data)\r\n\t\t\t{\r\n\r\n\t\t\t\t$img_width = intval(($data['result_count'] / $max_result) * 100 - 8);\r\n\r\n\t\t\t\tif ($img_width < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$img_width = 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$img_width .= '%';\r\n\r\n\t\t\t\tif ($IN['timescale'] == 'weekly')\r\n\t\t\t\t{\r\n\t\t\t\t\t$date = \"Week #\" . strftime(\"%W\", $data['result_maxdate']) . date($php_date, $data['result_maxdate']);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\t$date = date($php_date, $data['result_maxdate']);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t\t\t $date,\r\n\t\t\t\t \"<img src='{$SKIN->img_url}/bar_left.gif' width='4' height='11' alt=''><img src='{$SKIN->img_url}/bar.gif' width='$img_width' height='11' alt=''><img src='{$SKIN->img_url}/bar_right.gif' width='4' height='11' alt=''>\",\r\n\t\t\t\t \"<div class='center'>{$data['result_count']}</div>\",\r\n\t\t\t\t ));\r\n\t\t\t}\r\n\r\n\t\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t\t ' ',\r\n\t\t\t \"<div class='right'><b>Total</b></div>\",\r\n\t\t\t \"<div class='center'><b>$running_total</b></div>\",\r\n\t\t\t ));\r\n\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$ADMIN->html .= $SKIN->add_td_basic(\"No results found\", \"center\");\r\n\t\t}\r\n\r\n\t\t$ADMIN->html .= $SKIN->end_table();\r\n\r\n\t\t$ADMIN->output();\r\n\r\n\t}",
"function show()\r\n {\r\n $script = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&sort='.$this->sort.'&fltr='.$this->fltr.'&fln='.$this->fln;\r\n $script = $_SERVER['PHP_SELF'].\"?$script\";\r\n\r\n if( !$this->sort ) $this->sort='id';\r\n\t\tif($this->sort=='result') $this->sort='`result` desc';\r\n //if( strstr( $this->sort, 'seria' ) )$this->sort = $this->sort.' desc';\r\n $q = \"SELECT * FROM \".TblModSearchResult.\" where 1 order by \".$this->sort.\"\";\r\n //if( $this->srch ) $q = $q.\" and (name LIKE '%$this->srch%' OR email LIKE '%$this->srch%')\";\r\n if( $this->fltr ) $q = $q.\" and $this->fltr\";\r\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\r\n //echo '<br>$q='.$q.' $res='.$res.'$this->Right->result='.$this->Right->result.' $this->user_id='.$this->user_id;\r\n if( !$res )return false;\r\n $rows = $this->Right->db_GetNumRows();\r\n\r\n /* Write Form Header */\r\n $this->Form->WriteHeader( $script );\r\n\r\n /* Write Table Part */\r\n AdminHTML::TablePartH();\r\n\r\n /* Write Links on Pages */\r\n echo '<TR><TD COLSPAN=17>';\r\n $script1 = 'module='.$this->module.'&fltr='.$this->fltr;\r\n $script1 = $_SERVER['PHP_SELF'].\"?$script1\";\r\n\t\tif( !$this->display ) $this->display = 20;\r\n //$this->Form->WriteLinkPages( $script1, $rows, $this->display, $this->start, $this->sort );\r\n\t\t$this->Form->WriteLinkPages( $script1.'&fltr='.$this->fltr, $rows, $this->display, $this->start, $this->sort );\r\n\r\n echo '<TR><TD COLSPAN=5>';\r\n $this->Form->WriteTopPanel( $script );\r\n\r\n echo '<td colspan=5>';\r\n echo $this->Form->TextBox('srch', $this->srch, 25);\r\n echo '<input type=submit value='.$this->Msg->show_text('_BUTTON_SEARCH',TblSysTxt).'>';\r\n\r\n /*\r\n echo '<td><td><td><td><td colspan=2>';\r\n $this->Form->WriteSelectLangChange( $script, $this->fln);\r\n */\r\n\r\n $script2 = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&task=show&fltr='.$this->fltr;\r\n $script2 = $_SERVER['PHP_SELF'].\"?$script2\";\r\n ?>\r\n <TR>\r\n <td class=\"THead\">*</Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=id><?=$this->Msg->show_text('FLD_ID')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=query><?=$this->Msg->show_text('FLD_QUERY')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=ip><?=$this->Msg->show_text('FLD_IP')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=date><?=$this->Msg->show_text('FLD_DATE')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=time><?=$this->Msg->show_text('FLD_TIME')?></A></Th>\r\n \r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=result><?=$this->Msg->show_text('FLD_RESULT')?></A></Th>\r\n \r\n <?\r\n\r\n $up = 0;\r\n $down = 0;\r\n $a = $rows;\r\n $j = 0;\r\n $row_arr = NULL;\r\n for( $i = 0; $i < $rows; $i++ )\r\n {\r\n $row = $this->Right->db_FetchAssoc();\r\n if( $i >= $this->start && $i < ( $this->start+$this->display ) )\r\n {\r\n $row_arr[$j] = $row;\r\n $j = $j + 1;\r\n }\r\n }\r\n\r\n $style1 = 'TR1';\r\n $style2 = 'TR2';\r\n for( $i = 0; $i < count( $row_arr ); $i++ )\r\n {\r\n $row = $row_arr[$i];\r\n\r\n if ( (float)$i/2 == round( $i/2 ) )\r\n {\r\n echo '<TR CLASS=\"'.$style1.'\">';\r\n }\r\n else echo '<TR CLASS=\"'.$style2.'\">';\r\n\r\n echo '<TD>';\r\n $this->Form->CheckBox( \"id_del[]\", $row['id'] );\r\n\r\n echo '<TD>';\r\n $this->Form->Link( $script.\"&task=edit&id=\".$row['id'], stripslashes( $row['id'] ) );\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['query'] )!='' ) echo $row['query'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['ip'] )!='' ) echo $row['ip'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['date'] )!='' ) echo $row['date'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['time'] )!='' ) echo $row['time'];\r\n\r\n echo '<TD align=center>';\r\n if( trim($row['result'])!='' ) echo $row['result'];\r\n\r\n } //-- end for\r\n\r\n AdminHTML::TablePartF();\r\n $this->Form->WriteFooter();\r\n return true;\r\n\r\n \r\n}",
"Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}",
"public function displayMatches()\n {\n echo \"<h1>List of matches found</h1>\";\n print_r($this->matches);\n }",
"private function show_result_after(){\n ?>\n </ol>\n </div>\n </body>\n </html>\n <?php\n }",
"public function display()\n {\n echo \"temperature:{$this->_subject->getTemperature()},humidity:{$this->_subject->getHumidity()},pressure:{$this->_subject->getPressure()}\" . PHP_EOL;\n }",
"public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }",
"function viewresult($rendered=false){\n\t\tif($rendered){\n\t\t\treturn $this->view->renderresultsimple($this->result);\n\t\t}\n\t\treturn $this->view->returnresultsimple($this->result);\n\t}",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}",
"public static function output()\n {\n return self::display(Message_Core::DEFAULT_VIEW); \n }",
"public function display(){\r\n echo \"Unique Row Id: \" . $this->getUnique_studentKey() . \"<br/>\";\r\n echo \"User Id: \" . $this->getStudentUserID() . \"<br/>\";\r\n echo \"Password: \" . $this->getStudentPassword() . \"<br/>\";\r\n echo \"First Name: \" . $this->getFirstName() . \"<br/>\";\r\n echo \"Middle Name: \" . $this->getMiddleName() . \"<br/>\";\r\n echo \"Last Name: \" . $this->getLastName() . \"<br/>\";\r\n echo \"Email: \" . $this->getEmail() . \"<br/>\"; \r\n echo \"School Name: \" . $this->getSchoolName() . \"<br/>\"; \r\n echo \"Grade: \" . $this->getGrade() . \"<br/>\";\r\n echo \"Role: \" . $this->getRole() . \"<br/>\";\r\n }",
"public function index()\n\t{\n\t\t/*\n\t\t|\tnot a logical function since GramStainResult\n\t\t|\tshould be specific to a particular result\n\t\t*/\n\t}",
"public function show()\n {\n echo 'Value: ' . $this->value . '<br>';\n }",
"function printResultForAggregation($result) {\n while (($row = oci_fetch_array($result)) != false) {\n echo \"<p class=\\\"wrapper\\\">\";\n echo $row[1];\n echo \": \";\n echo $row[0];\n echo \"</p>\";\n }\n }",
"function display_results($branch, $html=false)\n{\n\tglobal $commit_url, $revision;\n\n\tif (!$html)\n\t{\n\t\techo \"Percent\\tSuccess\\tFailed\\tScript\\t(Features)\\tFile\\tUpdated\\tTime\\n\";\n\t}\n\telse\n\t{\n\t\t$etag = check_send_etag($branch);\n\t\thtml_header();\n\t\techo \"<div class='topmenu'>\".\n\t\t\t\"<input type='button' id='serverinfo' value='Edit serverinfo' onclick='location.href=\\\"/serverinfo.php\\\";'/>\\n\".\n\t\t\t\"Revision: <input id='revision' size='10' placeholder='\".htmlspecialchars($revision).\"' title='Set revision, if it can not be determined from git'/></div>\\n\";\n\t\techo \"<table class='results' data-commit-url='\".htmlspecialchars($commit_url).\"' data-etag='\".htmlspecialchars($etag).\"'>\\n\";\n\t\techo \"<tr class='header'><th></th><th>Percent</th><th>Success</th><th>Failed</th><th>Script (Features)</th><th>File</th><th>Updated</th><th class='time'>Time</th><th class='notes'>N</th></tr>\\n\";\n\t}\n\tforeach(get_script_results($branch) as $script)\n\t{\n\t\tif (empty($script['description']))\n\t\t{\n\t\t\t$script['description'] = strtr($script['name'], array(\n\t\t\t\t'/' => ' ',\n\t\t\t\t'.xml' => '',\n\t\t\t));\n\t\t}\n\t\tif ($script['ignore-all']) $script['require-feature'][] = 'ignore-all';\n\n\t\t$script['time'] = isset($script['time']) ? number_format($script['time'], 2, '.', '') : '';\n\n\t\tif (!$html)\n\t\t{\n\t\t\techo \"$script[percent]\\t$script[success]\\t$script[failed]\\t$script[description] (\".\n\t\t\t\timplode(', ', $script['require-feature']).\")\\t$script[name]\\t$script[updated]\\t$script[time]t$script[notes]\\n\";\n\t\t\tcontinue;\n\t\t}\n\t\t// todo html\n\t\tif (empty($script['name']))\n\t\t{\n\t\t\techo \"<tr class='footer'><td></td>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<tr id='\".htmlspecialchars($script['name']).\"' class='\".\n\t\t\t\t((string)$script['percent'] === '' ? 'ignored' :\n\t\t\t\t($script['percent']==100.0?'green':($script['percent'] < 50.0 ? 'red' : 'yellow'))).\"'>\".\n\t\t\t\t\"<td class='expand'></td>\";\n\t\t}\n\t\techo \"<td class='percent'>\".htmlspecialchars($script['percent']).\n\t\t\t\"</td><td class='success'>\".htmlspecialchars($script['success']).\n\t\t\t\"</td><td class='failed'>\".htmlspecialchars($script['failed']).\n\t\t\t\"</td><td>\".htmlspecialchars($script['description']).\n\t\t\t\t($script['require-feature'] ? ' ('.htmlspecialchars(implode(', ', $script['require-feature'])).')' : '').\n\t\t\t\"</td><td class='script'>\".htmlspecialchars($script['name']).\n\t\t\t\"</td><td class='updated'>\".htmlspecialchars(substr($script['updated'], 0, -3)).\n\t\t\t\"</td><td class='time'>\".htmlspecialchars($script['time']).\n\t\t\t\"</td><td class='notes'>\".htmlspecialchars($script['notes']).\n\t\t\t\"</td><tr>\\n\";\n\t}\n\tif ($html)\n\t{\n\t\techo \"</table>\\n</body>\\n</html>\\n\";\n\t}\n}",
"public function show()\n\t{\n\t\t\n\t}",
"public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }",
"function render()\n\t{\n\t\tif (isset($this->result)) {\n\t\t\t$this->usageError('Nothing to render!');\n\t\t}\n\t\t// @todo render\n\t}",
"public function show(ResultAtividade $resultAtividade)\n {\n //\n }",
"public function show() {\n Logger::debug(\"url:{$this->header}, replace: {$this->replace}, responseCode: {$this->responseCode}\");\n }",
"function Results() {\r\n\t\t/*RGB begin*/\r\n\t\tglobal $variables;\r\n\t\tif (!$variables)\r\n\t\t{\r\n\t\t\tchangeVariables();\r\n\t\t\t$variables = 1;\r\n\t\t}\r\n\t\t/*RGB end*/\r\n\r\n\t\r\n\t\t// Alteração VVB - 28/10/2008\r\n\t\t$results = Obter_Resultados();\r\n\t\t// ----------------------------------------- end VVB\r\n\r\n\t\tglobal $totales, $lang, $wcag, $param, $marcos, $fecha, $nombre, $lang, $software;\r\n\t\tglobal $emag, $area, $desc;\r\n\t\t$note_a = '<p class=\"nota\"><img src=\"img/nota.gif\" alt=\"'.$lang['ico_alt_aviso'].'\" class=\"ico\" /> ';\r\n\t\t$note_b = \"</p>\\n\";\r\n\r\n\t\techo '<div class=\"caja\">'.\"\\n\";\r\n\t\tif ($totales['url_redir']) {\r\n\t\t\techo '<p class=\"nota\" style=\"color:#666\">'.sprintf($lang['nota_uri'], $totales['url_redir'], URL).'</p>';\r\n\t\t}\r\n\t\tif ($totales['meta_redir']) {\r\n\t\t\techo $note_a.sprintf($lang['nota_meta'], $totales['meta_redir'], URL).$note_b;\r\n\t\t}\r\n\t\tif (count($marcos) > 0) {\r\n\t\t\techo $note_a;\r\n\t\t\tprintf($lang['frame_aviso'], count($marcos));\r\n\t\t\techo $note_b.\"<ol class=\\\"nota_f\\\">\\n\";\r\n\t\t\tforeach ($marcos as $links) {\r\n\t\t\t\techo '<li>'.$links.\"</li>\\n\";\r\n\t\t\t}\r\n\t\t\techo \"</ol>\\n\";\r\n\t\t\t$nota_marcos = '<br />'.$lang['frame_aviso2'];\r\n\t\t} else {\r\n\t\t\tif ($totales['body'] != 1) {\r\n\t\t\t\tif ($totales['body'] > 1) {\r\n\t\t\t\t\t$err1 = sprintf($lang['err_body_a'], $totales['body']);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$err1 = $lang['err_body_b'];\r\n\t\t\t\t}\r\n\t\t\t\techo $note_a.$err1.' '.$lang['err_body_c'].$note_b;\r\n\t\t\t}\r\n\t\t\tif ($totales['redirect'] > 0) {\r\n\t\t\t\techo $note_a.$lang['nota_redirect'].$note_b;\r\n\t\t\t} else if ($totales['refresh'] > 0) {\r\n\t\t\t\techo $note_a.$lang['nota_refresh'].$note_b;\r\n\t\t\t}\r\n\t\t\tif ($totales['script'] > 0) {\r\n\t\t\t\techo $note_a.$lang['nota_scripts'].$note_b;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo \"\\n\\n\".'<div style=\"display:none\">';\r\n\t\tforeach ($totales as $k => $v) {\r\n\t\t\techo $k.' : '.$v.\"\\n\";\r\n\t\t}\r\n\t\techo \"</div>\\n\";\r\n\r\n?>\r\n<h2 style=\"margin: 0px 5%;text-align:left\"><img src=\"img/heraico.gif\" class=\"pag\" alt=\"<?php echo $lang['logo_alt']; ?>\" /> <?php echo $lang['h2_sumario']; ?></h2>\r\n\r\n<ul class=\"resumen\">\r\n<li><em>URL</em>: <?php echo URL.$this->accesibilidad; ?></li>\r\n<li><em><?php echo $lang['li_fecha']; ?></em>: <?php echo gmdate($lang['formato_fecha'], strtotime($fecha)); ?></li>\r\n<li><?php echo sprintf($lang['li_total'], $totales['total']); ?></li>\r\n<li><?php echo sprintf($lang['li_tiempo'], $totales['tiempo']); ?></li>\r\n<?php\r\n\t\tif ($this->t_mal > 0) {\r\n\t\t\techo '<li><em>'.$lang['li_error'].'</em>: ';\r\n\t\t\techo '<strong class=\"mal\"> '.sprintf($lang['li_error_vs'], $this->t_mal).'</strong></li>';\r\n\t\t}\r\n/* Alterações VVB 29/10/2008*/\t\r\n?> \r\n<li><strong class=\"duda\"><?php echo $lang['li_manual']; ?>: \r\n<?php\r\n\t\tif ($this->t_duda > 0) {\r\n\t\t\techo sprintf($lang['li_manual_vs'], $this->t_duda).'</strong>';\r\n\t\t} else {\r\n\t\t\techo $lang['li_manual_no'].'</strong>';\r\n\t\t}\r\n\t\techo $nota_marcos;\r\n\t\t$autor = ($nombre == '')? $lang['li_autor_no'] : $nombre;\r\n?></li>\r\n<li><em><?php echo $lang['li_autor']; ?></em>: <?php echo $autor; ?></li>\r\n<?/*-------------------------------------------end VVB*/ ?>\r\n\r\n<li><em>Navegador</em>: <?php $this->_UA($software); ?></li>\r\n</ul>\r\n\r\n<h3><?php echo $lang['h3_nav_res']; ?></h3>\r\n<p><em><?php echo $lang['p_nav_res']; ?></em></p>\r\n\r\n<table summary=\"<?php echo $lang['res_summary']; ?>\" cellspacing=\"0\" cellpadding=\"3\" class=\"totales\">\r\n<caption><?php echo $lang['res_caption']; ?></caption>\r\n<tr>\r\n<th style=\"width:90px\" scope=\"col\"><?php echo $lang['res_th_a']; ?></th>\r\n<th scope=\"col\"><?php echo $lang['res_th_c']; ?></th>\r\n<th scope=\"col\"><?php echo $lang['res_th_b']; ?></th>\r\n<th scope=\"col\"><?php echo $lang['res_th_d']; ?></th>\r\n<th scope=\"col\"><?php echo stripslashes($lang['res_th_e']); ?></th>\r\n<?php\r\n\t\tif ($this->t_parcial > 0) {\r\n?>\r\n<th scope=\"col\"><?php echo $lang['res_th_f']; ?></th>\r\n<?php\r\n\t\t}\r\n\t\tif ($this->t_nose > 0) {\r\n?>\r\n<th scope=\"col\"><?php echo $lang['res_th_g']; ?></th>\r\n<?php\r\n\t\t}\r\n?>\r\n</tr>\r\n<?php\r\n\t\t$cel = array ( 2 => 'duda', 1 => 'bien', 3 => 'mal', 4 => 'na', 5 => 'parcial', 6 => 'nose' );\r\n\t\t\t$prx = 'A';\r\n\t\t\t$num = 1;\r\n\t\t\tfor ($x=1; $x < 4; $x++) {\r\n\t\t\t\t$txt = 'res_alt_'.$prx;\r\n\t\t\t\techo '<tr>'.\"\\n\".'<th scope=\"row\" class=\"thpri\"><img src=\"img/wcag1'.$prx.'.gif\" class=\"wcag\" alt=\"'.$lang[$txt].'\" /></th>'.\"\\n\";\r\n\t\t\t\tforeach ($cel as $key => $val) {\r\n\t\t\t\t\tif (($key < 5) || (($key == 5) && ($this->t_parcial > 0)) || (($key == 6) && ($this->t_nose > 0))) {\r\n\t\t\t\t\t\techo '<td class=\"'.$val.'\">'.$this->ico_res($prx, $val).'</td>'.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\techo \"</tr>\\n\";\r\n\t\t\t\t$prx = $prx.'A';\r\n\t\t\t\t$num++;\r\n\t\t\t}\r\n?>\r\n</table>\r\n\r\n<h3><?php echo $lang['h3_nav_pautas']; ?></h3>\r\n<p><em><?php echo $lang['p_nav_pautas']; ?></em></p>\r\n<ul class=\"pr_lista\">\r\n<?php\r\n\t\t/*RGB begin*/\r\n\t\tif($_SESSION['emag'] == false)\r\n\t\t{\r\n\t\t\tfor ($x=1; $x < 15; $x++) {\r\n\t\t\t\t$wc = $x * 10;\r\n\t\t\t\techo '<li><a href=\"'.PHP_SELF.$param.'&pt='.$x.'\" title=\"'.$wcag[$wc].'\">'.sprintf($lang['li_nav_pautas'], $x).'</a></li>'.\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor ($x=1; $x < 9; $x++) {\r\n\t\t\t\t$wc = $x * 10;\r\n\t\t\t\techo '<li><a href=\"'.PHP_SELF.$param.'&pt='.$x.'\" title=\"'.$emag[$wc].'\">'.sprintf($lang['li_nav_pautas'], $x).'</a></li>'.\"\\n\";\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t/*RGB end*/\r\n?>\r\n</ul>\r\n\r\n<?php\r\n/*RGB begin - Áreas de visão do cidadão*/\r\n\tif($_SESSION['emag'] == true)\r\n\t{\r\n\t\techo \"<hr><h3>\".$lang['h3_nav_area'].\"</h3>\";\r\n\t\techo\"<p><em>\".$lang['p_nav_area'].\"</em></p>\";\r\n\t\techo '<ul class=\"pr_lista\">';\r\n\t\tfor ($x=1; $x < 5; $x++) {\r\n\t\t\t$wc = $x * 10;\r\n\t\t\techo '<li><a href=\"'.PHP_SELF.$param.'&pa='.$x.'\" title=\"'.$desc[$wc].'\">'.$area[$wc].'</a></li>'.\"\\n\";\r\n\t\t}\r\n\t\techo \"</ul>\";\r\n\t}\r\n/*RGB end*/ \r\n?>\r\n\r\n<? // Alteração VVB - 28/10/2008 ?>\r\n\r\n<h3 id=\"metrics\"><?php echo $lang['met_avl']; ?></h3>\r\n<ul class=\"resumen_met\">\r\n<li><em>URL</em>: <?php echo URL.$this->accesibilidad; ?></li>\r\n<li><?php echo sprintf($lang['li_total'], $totales['total']); ?></li>\r\n<?php\r\n\t\tif ($this->t_mal > 0) {\r\n\t\t\techo '<li><em>'.$lang['li_error'].'</em>: ';\r\n\t\t\techo '<strong class=\"mal\"> '.sprintf($lang['li_error_vs'], $this->t_mal).'</strong></li>';\r\n\t\t}\r\n?> \r\n<li><em>Erros por total de elementos</em>: \r\n<?php \r\n\t$numero = sprintf(\"%d\", $this->t_mal); \r\n\t//echo $numero;\r\n\t$resultado = $numero / $totales['total'] ;\r\n\techo '<strong>';\r\n echo number_format($resultado, 2, '.', '');\r\n\techo '</strong>';\t\r\n?></li>\t\r\n</ul>\r\n\r\n<table summary=\"<?php echo $lang['met_summary']; ?>\" cellspacing=\"0\" cellpadding=\"3\" class=\"total\">\r\n<caption><?php echo $lang['met_caption']; ?></caption>\r\n<tr>\r\n<th style=\"width:140px\" scope=\"col\"><?php echo $lang['met_th_a']; ?></th>\r\n<th scope=\"col\"><?php echo $lang['met_th_b']; ?></th>\r\n</tr>\r\n<tr> <td scope=\"row\" class=\"na\"> POT </td> <td class=\"bien\"><?php echo number_format($results[0], 2, '.', ''); ?></td> </tr>\r\n<tr> <td scope=\"row\" class=\"na\"> WAB </td> <td class=\"bien\"><?php echo number_format($results[1], 2, '.', ''); ?></td> </tr>\r\n<tr> <td scope=\"row\" class=\"na\"> UWEM </td> <td class=\"bien\"><?php echo number_format($results[2], 2, '.', ''); ?></td> </tr>\r\n<tr> <td scope=\"row\" class=\"na\"> A3 </td> <td class=\"bien\"><?php echo number_format($results[3], 2, '.', ''); ?></td> </tr>\r\n<tr> <td scope=\"row\" class=\"na\"> WAQM </td> <td class=\"bien\"><?php echo number_format($results[4], 2, '.', ''); ?></td> </tr>\r\n</table>\r\n\r\n<h3 id=\"metrics\"><?php echo $lang['h3_met_result']; ?></h3>\r\n<ul class=\"resumen_met\">\r\n<li id=\"metrics\"><em><?php echo $lang['li_met_pot']; ?></em>: <?php echo $lang['li_met_pot_exp']; ?>\r\n\t<ul><li id=\"sub\"><?php echo $lang['li_met_pot_exp_v']; ?></li></ul></li>\r\n<li id=\"metrics\"><em><?php echo $lang['li_met_wab']; ?></em>: <?php echo $lang['li_met_wab_exp']; ?>\r\n\t<ul><li id=\"sub\"><?php echo $lang['li_met_wab_exp_v']; ?></li></ul></li>\r\n<li id=\"metrics\"><em><?php echo $lang['li_met_uwem']; ?></em>: <?php echo $lang['li_met_uwem_exp']; ?>\r\n\t<ul><li id=\"sub\"><?php echo $lang['li_met_uwem_exp_v']; ?></li></ul></li>\r\n<li id=\"metrics\"><em><?php echo $lang['li_met_a3']; ?></em>: <?php echo $lang['li_met_a3_exp']; ?>\r\n\t<ul><li id=\"sub\"><?php echo $lang['li_met_a3_exp_v']; ?></li></ul></li>\r\n<li id=\"metrics\"><em><?php echo $lang['li_met_waqm']; ?></em>: <?php echo $lang['li_met_waqm_exp']; ?>\r\n\t<ul><li id=\"sub\"><?php echo $lang['li_met_waqm_exp_v']; ?></li></ul></li>\r\n</ul>\r\n\r\n<?// ----------------------------------------- end VVB?>\r\n</div>\r\n\r\n<?php\r\n\t}",
"function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}",
"public function toolShow()\n {\n return $this->render('statistic-tool');\n }",
"public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}",
"function printResultsSummary($jobId) {\n $this->printDebugMessage('printResultsSummary', 'Begin', 1);\n echo \"<p>Results:</p>\\n\";\n echo \"<ul>\\n\";\n $resultTypes = $this->getResultTypes($jobId);\n foreach($resultTypes as $resultType) {\n $resultUrl = \"?jobId=$jobId&resultType=\" . $resultType->identifier;\n print \"<li><a href=\\\"$resultUrl\\\">\" . $resultType->label . \"</a>\";\n if(isset($resultType->description)) {\n\tprint \": \" . $resultType->description . \"\\n\";\n }\n print \"</li>\\n\";\n }\n echo \"</ul>\\n\";\n $this->printDebugMessage('printResultsSummary', 'End', 1);\n }",
"public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}",
"public function display()\n {\n return $this->page->output();\n }",
"public function display()\n {\n if ($this->_query == '')\n {\n WCFDataServicesEntity::displayEntities();\n }\n else\n {\n WCFDataServicesEntity::displayEntityData();\n }\n }"
] | [
"0.7782846",
"0.7450255",
"0.734988",
"0.734988",
"0.7349644",
"0.7302574",
"0.698796",
"0.6970239",
"0.6864085",
"0.68610084",
"0.68517977",
"0.67623997",
"0.67567486",
"0.6752688",
"0.67295384",
"0.67295384",
"0.672166",
"0.67204386",
"0.67204386",
"0.6720275",
"0.6720275",
"0.67079484",
"0.6701492",
"0.6644524",
"0.6643177",
"0.6628346",
"0.6599867",
"0.65996367",
"0.6593928",
"0.65441567",
"0.6524974",
"0.65188247",
"0.6493982",
"0.64902246",
"0.64901954",
"0.64801055",
"0.64666444",
"0.6465742",
"0.6464284",
"0.6456995",
"0.6454739",
"0.64457333",
"0.64195037",
"0.6407868",
"0.64077216",
"0.6405794",
"0.639744",
"0.63959265",
"0.63950586",
"0.63950586",
"0.63950586",
"0.63807464",
"0.6376362",
"0.63561416",
"0.63550276",
"0.63447404",
"0.63447404",
"0.6332428",
"0.631677",
"0.6313302",
"0.6307579",
"0.63058466",
"0.6305222",
"0.62674487",
"0.62598956",
"0.62574226",
"0.62569165",
"0.62495553",
"0.62466264",
"0.62401205",
"0.6237405",
"0.62332135",
"0.6228982",
"0.6223218",
"0.6216276",
"0.62140703",
"0.6201937",
"0.62014437",
"0.61977065",
"0.61902034",
"0.6184868",
"0.61818177",
"0.6169447",
"0.616623",
"0.6160384",
"0.6159143",
"0.6157732",
"0.6137317",
"0.6134786",
"0.6132955",
"0.61320686",
"0.61318153",
"0.61243284",
"0.6101419",
"0.6101265",
"0.60881925",
"0.60870004",
"0.60786",
"0.6075906",
"0.6072993",
"0.60536784"
] | 0.0 | -1 |
Returns a list of page numbers separated by $separator | function pageNumbers($separator=null)
{
if (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }
$t = array();
$text = '';
$pc = 1;
do
{
if($pc == $this->_pageDetails['page'])
{
$text = '<span>'.$pc.'</span>';
}
else
{
if($this->style == 'ajax')
{
$text = $this->Ajax->link($pc, array("fallback"=>$this->action."#","url" =>$this->link.$pc,"update" => "ajax_update","method"=>"get"));
}
else
{
$text = $this->Html->link($pc,$this->link.$pc);
}
}
$t[] = $text;
$pc++;
}
while ($pc<=$this->_pageDetails['pageCount']);
$t = implode($separator, $t);
return $t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function myPageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span class=numberlinkon> '.$pc.'</span>';\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t{\n\t\t\t\t\t$text = \" \".$this->Ajax->link($pc, $this->link.$pc, array(\"update\" => \"ajax_update\",\"method\"=>\"get\",\"class\"=>\"numberlink\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$text = \" \".$this->Html->link($pc,$this->link.$pc,array(\"class\"=>\"numberlink\"));\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\t $t[] = $text;\n\t\t\t $pc++;\n\t\t } \n\t\t while ($pc<=$this->_pageDetails['pageCount']);\n\t\t \n\t\t $t = implode($separator, $t);\n \n\t\treturn $t;\n\t}",
"public function getPageNumbers();",
"public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}",
"public function page_list() {\n\n\t\t\t$output = \"\";\n\t\t\t$cur_page = $this->current_page;\n\t\t\t$tot_page = $this->total_pages();\n\n\t\t\tif( $cur_page <= $tot_page ) {\n\t\t\t\t$output .= \"<h3 class=\\\"pagelist\\\">Page {$cur_page} of \" ;\n\t\t\t\t$output .= \"{$tot_page}</h3>\";\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $output;\n\n\t\t}",
"public function page_numbers() {\n $pages = $this->total_pages();\n $query = htmlentities($this->term);\n $page = $this->pagenumber;\n $next = get_string('next', 'search');\n $back = get_string('back', 'search');\n\n $ret = \"<div align='center' id='search_page_links'>\";\n\n //Back is disabled if we're on page 1\n if ($page > 1) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page-1).\"'>< {$back}</a> \";\n } else {\n $ret .= \"< {$back} \";\n } \n\n //don't <a href> the current page\n for ($i = 1; $i <= $pages; $i++) {\n if ($page == $i) {\n $ret .= \"($i) \";\n } else {\n $ret .= \"<a href='query.php?query_string={$query}&page={$i}'>{$i}</a> \";\n } \n } \n\n //Next disabled if we're on the last page\n if ($page < $pages) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page+1).\"'>{$next} ></a> \";\n } else {\n $ret .= \"{$next} > \";\n } \n\n $ret .= \"</div>\";\n\n //shorten really long page lists, to stop table distorting width-ways\n if (strlen($ret) > 70) {\n $start = 4;\n $end = $page - 5;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n\n $start = $page + 5;\n $end = $pages - 3;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n }\n\n return $ret;\n }",
"public function getPages($framework, $currentPage = 1, $numPages = 1, $limit = 7, $separator = '...', $breakpoint = 4) {\n\t\t$this->currentPage = $currentPage;\n\t\t$this->numPages = $numPages;\n\t\t$this->limit = $limit;\n\t\t$this->separator = $separator;\n\t\t$this->breakpoint = $breakpoint;\n\n\n\t\t$items = array();\n\n\t\t/**\n\t\t * Less than or 7 pages. We know all the keys, and we put them in the array\n\t\t * that we will use to generate the actual pagination.\n\t\t */\n\t\tif($this->numPages <= $this->limit) {\n\t\t\tfor($i = 1-(bool)$this->logicNumbers; $i <= $this->numPages-(bool)$this->logicNumbers; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t}\n\n\t\t// more than 7 pages\n\t\telse {\n\t\t\t// first page\n\t\t\tif($this->currentPage == 1-(bool)$this->logicNumbers) {\n\t\t\t\t// [1] 2 3 4 5 6 7 8 9 10 11 12 13\n\t\t\t\tfor($i = 1; $i <= $this->limit; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t\t$items[$this->limit + 1] = $this->separator;\n\t\t\t}\n\n\n\t\t\t// last page\n\t\t\telse\n\t\t\tif($this->currentPage == $this->numPages) {\n\t\t\t\t// 1 2 3 4 5 6 7 8 9 10 11 12 [13]\n\t\t\t\t$items[$this->numPages - $this->limit - 1] = $this->separator;\n\t\t\t\tfor($i = ($this->numPages - $this->limit); $i <= $this->numPages; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t}\n\n\t\t\t// other page\n\t\t\telse\n\t\t\t{\n\t\t\t\t// 1 2 3 [4] 5 6 7 8 9 10 11 12 13\n\n\t\t\t\t// define min & max\n\t\t\t\t$min = $this->currentPage - $this->breakpoint + 1;\n\t\t\t\t$max = $this->currentPage + $this->breakpoint - 1;\n\n\t\t\t\t// minimum doesnt exist\n\t\t\t\twhile($min <= 0)\n\t\t\t\t{\n\t\t\t\t\t$min++;\n\t\t\t\t\t$max++;\n\t\t\t\t}\n\n\t\t\t\t// maximum doesnt exist\n\t\t\t\twhile($max > $this->numPages)\n\t\t\t\t{\n\t\t\t\t\t$min--;\n\t\t\t\t\t$max--;\n\t\t\t\t}\n\n\t\t\t\t// create the list\n\t\t\t\tif($min != 1) $items[$min - 1] = $this->separator;\n\t\t\t\tfor($i = $min; $i <= $max; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t\tif($max != $numPages) $items[$max + 1] = $this->separator;\n\t\t\t}\n\t\t}\n\n\t\treturn $items;\n\t}",
"protected function getPageIds()\n {\n return (array)explode(',', $this->getData('pages'));\n }",
"public function getStyledPageNumbers($dbQuery = NULL)\n {\n $pageNumsArray = $this->getPageNumbers($dbQuery);\n \n if($pageNumsArray === 0)\n {\n return 0;\n }\n \n $currentPageNum = $this->currentPageNumber();\n \n $finalString = \"\\n<ul id=\\\"pagenumbersid\\\">\\n\";\n \n if($currentPageNum !== 1)\n {\n $finalString .= \"<li id=\\\"firstpageid\\\"><a href=\\\"{$this->getNewPageAddress(1)}\\\">{$this->firstPageName}</a></li>\\n\";\n $finalString .= \"<li id=\\\"previouspageid\\\"><a href=\\\"{$this->getNewPageAddress($currentPageNum - 1)}\\\">{$this->previousPageName}</a></li>\\n\";\n }\n \n $decreaseTwoPoint = $currentPageNum-2;\n /**\n * Because it can not be lower that 1 and the 1 is the lowest number then we will check whether it's lower that 1 or not.\n * If its lower than then we can set it to 1 manually.\n */\n if($decreaseTwoPoint < 1)\n {\n $decreaseTwoPoint = 1;\n }\n \n $increaseTwoPoint = $currentPageNum+2;\n /**\n * Because it can not be more bigger than our total page numbers then we will check it to see whether it's bigger that our total page numbers or not.\n * If it's bigger then we will set it to the total page numbers manually.\n */\n if($increaseTwoPoint > $this->totalPages)\n {\n $increaseTwoPoint = $this->totalPages;\n }\n \n for($i = $decreaseTwoPoint; $i <= $increaseTwoPoint; $i++)\n {\n if($i == $currentPageNum)\n {\n $finalString .= \"<li>{$i}</li>\\n\";\n }\n else\n {\n $finalString .= \"<li><a href=\\\"{$this->getNewPageAddress($i)}\\\">{$i}</a></li>\\n\";\n }\n }\n \n if($currentPageNum !== $this->totalPages)\n {\n $finalString .= \"<li id=\\\"nextpageid\\\"><a href=\\\"{$this->getNewPageAddress($currentPageNum + 1)}\\\">{$this->nextPageName}</a></li>\\n\";\n $finalString .= \"<li id=\\\"lastpageid\\\"><a href=\\\"{$this->getNewPageAddress($this->totalPages)}\\\">{$this->lastPageName}</a></li>\\n\";\n }\n \n $finalString .= '</ul>';\n \n return $finalString;\n }",
"function _getAllPageNumbers($current_page, $last_page)\n{\n $page_ix = 1;\n $pages = array();\n while($page_ix <= $last_page){\n if($page_ix == $current_page){\n $pages[$page_ix] = 'current';\n } else {\n $pages[$page_ix] = $page_ix;\n } \n $page_ix++;\n }\n return $pages;\n}",
"private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function _getSelectedPageNumbers($current_page, $last_page)\n{\n //-----------//\n // constants //\n //-----------//\n\n //defines the offset pattern to repeat for each level of $base\n //array(1, 2, 5) will make offsets into 1, 2, 5, 10, 20, 50, etc.\n //array(1, 5) will make offsets into 1, 5, 10, 50, 100, 500, etc.\n $multipliers = array(1, 2, 5);\n\n $base = 10; //10 looks best\n\n //----------------//\n // initialization //\n //----------------//\n $exponent = 0;\n $pages = array($current_page => 0);\n $offsets = array();\n $offset = 1;\n $multiplier = reset($multipliers);\n $max_offset = $last_page - $current_page;\n if($current_page > $max_offset){\n $max_offset = $current_page;\n }\n\n //calculate offsets that increase (semi-)logarithmically\n while($offset <= $max_offset){\n $offset = $multiplier * pow($base, $exponent);\n $offsets[] = $offset;\n if(!($multiplier = next($multipliers))){\n $multiplier = reset($multipliers);\n $exponent++;\n }\n }\n\n foreach($offsets as $offset){\n if(0 == $offset){\n $pages[$pagenum] = 'current';\n } else {\n $exact_pagenum = $current_page - $offset;\n $adj_pagenum = round($exact_pagenum / $offset) * $offset;\n if($adj_pagenum > 0){\n $pages[$adj_pagenum] = $offset;\n }\n\n $exact_pagenum = $current_page + $offset;\n $adj_pagenum = round($exact_pagenum / $offset) * $offset;\n if($adj_pagenum <= $last_page){\n $pages[$adj_pagenum] = $offset;\n }\n }\n }\n\n if(!isset($pages[1])){\n $pages[1] = 'first';\n }\n if(!isset($pages[$last_page])){\n $pages[$last_page] = 'last';\n }\n $pages[$current_page] = 'current';\n\n ksort($pages);\n return $pages;\n\n}",
"private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }",
"public function getPages();",
"public function generatePHPPaginator()\n {\n $sHTML = '';\n \n $iNumOfPages = ceil($this->iLength / $this->iNumOfPosAtPage);\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=1\"><</a></li>';\n \n for($i = 0;$i < $iNumOfPages;$i++)\n {\n if(($i + 1) == $this->iActualPage)\n {\n $sHTML .= '<li class=\"active\"><a href=\"?' . $this->sActualParams . '&p=' . $this->iActualPage . '\">' . ($i + 1) . '</a></li>';\n }\n else\n {\n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . ($i + 1) . '\">' . ($i + 1) . '</a></li>';\n }\n }\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . $iNumOfPages . '\">></a></li>';\n \n $this->oTemplate->assign['paginator'] = $sHTML;\n $this->oTemplate->assign['scripts-path'] = SCRIPTS_PATH;\n \n return $this->oTemplate->parse(INCLUDES_PATH . 'paginator.html');\n }",
"public function getPageNumber() {}",
"public function getPageNumber() {}",
"public function generate($strSeparator = '')\n {\n $this->determineValues();\n\n // Return if there is only one page\n if ($this->intTotalPages < 2 || $this->intRows < 1) {\n return '';\n }\n\n if ($this->intPage == -1) {\n return '';\n }\n\n $template = new TwigFrontendTemplate('pagination');\n\n $template->hasFirst = $this->hasFirst();\n $template->hasPrevious = $this->hasPrevious();\n $template->hasNext = $this->hasNext();\n $template->hasLast = $this->hasLast();\n\n $template->items = $this->getItems();\n $template->page = $this->intPage;\n $template->total = $this->intTotalPages;\n\n $template->first = array\n (\n 'page' => 1,\n 'link' => $this->lblFirst,\n 'href' => $this->arrLinks[0],\n );\n\n $template->previous = array\n (\n 'page' => $this->intPage - 1,\n 'link' => $this->lblPrevious,\n 'href' => $this->arrLinks[($this->intPage - 2)],\n );\n\n $template->next = array\n (\n 'page' => $this->intPage + 1,\n 'link' => $this->lblNext,\n 'href' => $this->arrLinks[$this->intPage],\n );\n\n $template->last = array\n (\n 'page' => $this->intTotalPages,\n 'link' => $this->lblLast,\n 'href' => $this->arrLinks[(count($this->arrLinks) - 1)],\n );\n\n $this->setHeadTags();\n\n return $template->parse();\n }",
"public function getItemsAsString($strSeparator=' ')\n\t{\n\t\t$arrLinks = array();\n\n\t\t$intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n\t\t$intFirstOffset = $this->intItem - $intNumberOfLinks - 1;\n\n\t\tif ($intFirstOffset > 0)\n\t\t{\n\t\t\t$intFirstOffset = 0;\n\t\t}\n\n\t\t$intLastOffset = $this->intItem + $intNumberOfLinks - $this->intTotalItems;\n\n\t\tif ($intLastOffset < 0)\n\t\t{\n\t\t\t$intLastOffset = 0;\n\t\t}\n\n\t\t$intFirstLink = $this->intItem - $intNumberOfLinks - $intLastOffset;\n\n\t\tif ($intFirstLink < 1)\n\t\t{\n\t\t\t$intFirstLink = 1;\n\t\t}\n\n\t\t$intLastLink = $this->intItem + $intNumberOfLinks - $intFirstOffset;\n\n\t\tif ($intLastLink > $this->intTotalItems)\n\t\t{\n\t\t\t$intLastLink = $this->intTotalItems;\n\t\t}\n\n\t\tfor ($i=$intFirstLink; $i<=$intLastLink; $i++)\n\t\t{\t\n\t\t\tif ($i == $this->intItem)\n\t\t\t{\n\t\t\t\t$arrLinks[] = sprintf('<li class=\"active\"><span class=\"current active\">%s</span></li>',\n\t\t\t\t\t\t\t\t\t '<span class=\"index\">' . $i . '</span>' . '<span class=\"title\">' . $this->getItemTitle($i) . '</span>');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t$arrLinks[] = sprintf('<li><a href=\"%s\" class=\"link\" title=\"%s\">%s</a></li>',\n\t\t\t\t\t\t\t\t$this->linkToItem($i),\n\t\t\t\t\t\t\t\tsprintf(specialchars($GLOBALS['TL_LANG']['MSC']['readerpaginations']['goTo']), $this->getItemTitle($i)),\n\t\t\t\t\t\t\t \t '<span class=\"index\">' . $i . '</span>' . '<span class=\"title\">' . $this->getItemTitle($i) . '</span>'\n\t\t\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn implode($strSeparator, $arrLinks);\n\t}",
"public function pageNumbers($rowCount, $perPage, $pageRange, $rangeLimit, $page, $return=false, $additionalString='')\n\t{\n\t\tif($page == null OR $page == 0) $page = 1;\n\t\tif(!$perPage) $perPage = 100;\n\t\tif($page == 1) $pageRange = $pageRange + 2;\n\t\t$totalPages = ceil($rowCount/$perPage);\n\t\t$rangeLimit = ceil($pageRange/2);\n\t\t$output = '';\n\n\t\t$output .= '\n\t\t<div class=\"Pages\">\n\t\t\t<div class=\"Paginator\"> <b>Pages</b>\n\t\t\t';\n\n\t\tif($page > $rangeLimit)\n\t\t\t$output .= \"<a href='$PHP_SELF?page=1\".$additionalString.\"' class='Prev'>< First</a>\n\t\t\t<span class='break'>...</span>\n\t\t\t\"; \n\t\t\t\n\t\t\t\n\n\t\tfor($pageCounter=1; $pageCounter <= $totalPages; $pageCounter++)\n\t\t{\n\t\t\tif($pageCounter > $page - $rangeLimit AND $pageCounter < $page + $rangeLimit)\n\t\t\t{\n\t\t\t\tif($page == $pageCounter)\n\t\t\t\t\t$output .= \"<span class='this-page'>$pageCounter</span>\n\t\t\t\t\t\t\";\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($totalPages != 1)\n\t\t\t\t\t\t$output .= \"<a href='$PHP_SELF?page=$pageCounter\".$additionalString.\"'>$pageCounter</a>\n\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($totalPages > $page + $pageRange)\n\t\t\t$output .= \"<span class='break'>...</span>\n\t\t\t\"; \n\n\t\tif($page < $totalPages - $rangeLimit AND $totalPages > $rangeLimit)\n\t\t\t$output .= \"<a href='$PHP_SELF?page=$totalPages\".$additionalString.\"' class='Next'>Last ></a>\n\t\t\t\"; \n\t\t//status=$status& <- removed 2007-03-26\n\n\t\t$output .= \"\n\t\t\t</div>\n\t\t</div>\n\t\t\";\n\t\tif($rowCount>1)\n\t\t{\n\t\t\tif($return) return $output;\n\t\t\telse echo $output;\n\t\t}\n\t}",
"function numbered_in_page_links( $args = array () )\n{\n $defaults = array(\n 'before' => '<div class=\"page-links\"><i class=\"icon-menu-3 pageLinksToggle\"></i><ul class=\"subpage-list\">' \n , 'after' => '</ul></div>'\n , 'link_before' => '<li>'\n , 'link_after' => '</li>'\n , 'pagelink' => '%'\n , 'echo' => 1\n // element for the current page\n , 'highlight' => 'b'\n );\n\n $r = wp_parse_args( $args, $defaults );\n $r = apply_filters( 'wp_link_pages_args', $r );\n extract( $r, EXTR_SKIP );\n\n global $page, $numpages, $multipage, $more, $pagenow;\n\n if ( ! $multipage )\n {\n return;\n }\n\n $output = $before;\n\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\n {\n $j = str_replace( '%', $i, $pagelink );\n $output .= ' ';\n\n if ( $i != $page || ( ! $more && 1 == $page ) )\n {\n $output .= \"{$link_before}\". _wp_link_page( $i ) . \"{$j}</a>{$link_after}\";\n }\n else\n { // highlight the current page\n // not sure if we need $link_before and $link_after\n $output .= \"{$link_before}<$highlight>{$j}</$highlight>{$link_after}\";\n }\n }\n\n print $output . $after;\n}",
"public function pages()\n\t{\n\t\treturn ceil($this->_count_total / $this->config['total_items']);\n\t}",
"function get_all_page_ids()\n {\n }",
"public function getNombrePages() \r\n\t{\r\n\t\tvar_dump($this->_db);\r\n\t\treturn ceil(count($this->_db)/self::NOMBRE_PAR_PAGE);\r\n\t\t\r\n\t\t//return $aBiere[$nPage-1];\r\n\t}",
"function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }",
"public function rangeToPaginate()\n {\n $pages = array();\n\n if ( $this->lastPage <= $this->maxPagesToList) {\n for ($i = 1; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else if ($this->currentPage <= floor($this->maxPagesToList/2)+1) {\n for ($i = 1; $i <= $this->maxPagesToList; $i++) {\n $pages[] = $i;\n }\n } else if ($this->lastPage <= floor($this->maxPagesToList/2)+$this->currentPage) {\n $begin = $this->lastPage - $this->maxPagesToList + 1;\n for ($i = $begin; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else {\n $begin = $this->currentPage - floor($this->maxPagesToList/2);\n $end = $this->currentPage + floor($this->maxPagesToList/2);\n for ($i = $begin; $i <= $end; $i++) {\n $pages[] = $i;\n }\n }\n return $pages;\n\n }",
"function show_pages($amount, $rowamount, $id = '') {\n if ($amount > $rowamount) {\n $num = 8;\n $poutput = '';\n $lastpage = ceil($amount / $rowamount);\n $startpage = 1;\n\n if (!isset($_GET[\"start\"]))\n $_GET[\"start\"] = 1;\n $start = $_GET[\"start\"];\n\n if ($lastpage > $num & $start > ($num / 2)) {\n $startpage = ($start - ($num / 2));\n }\n\n echo _('Show page') . \":<br>\";\n\n if ($lastpage > $num & $start > 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start - 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ < ]';\n $poutput .= '</a>';\n }\n if ($start != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=1';\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ 1 ]';\n $poutput .= '</a>';\n if ($startpage > 2)\n $poutput .= ' .. ';\n }\n\n for ($i = $startpage; $i <= min(($startpage + $num), $lastpage); $i++) {\n if ($start == $i) {\n $poutput .= '[ <b>' . $i . '</b> ]';\n } elseif ($i != $lastpage & $i != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $i;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $i . ' ]';\n $poutput .= '</a>';\n }\n }\n\n if ($start != $lastpage) {\n if (min(($startpage + $num), $lastpage) < ($lastpage - 1))\n $poutput .= ' .. ';\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $lastpage;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $lastpage . ' ]';\n $poutput .= '</a>';\n }\n\n if ($lastpage > $num & $start < $lastpage) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start + 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ > ]';\n $poutput .= '</a>';\n }\n\n echo $poutput;\n }\n}",
"public function getPageNumber();",
"public function getPageNumber();",
"public function pagination_numbers_set(){\n\t\t\t$this->pages_show_array = array();\n\t\t\t$this->pages_show_array['middle'] = array();\n\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t$this->pages_show_array['first'] = null;\n\t\t\t$this->pages_show_array['last'] = null;\n\n\t\t\t\n\t\t\tfor ($i=0; $i < sizeof($this->pages_array) ;$i++){\n\n\t\t\t\t//first iteration\n\t\t\t\tif ($i == 0){\n\t\t\t\t\t//prev\n\t\t\t\t\tif ($this->current_page <= 1){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->total_pages - 1;\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$this->pages_show_array['prev'] = $this->current_page - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->current_page > $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['first'] = \"1 ...\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t\t//last iteration\n\t\t\t\telse if ($i == sizeof($this->pages_array)-1){\n\n\t\t\t\t\tif ($this->current_page < $this->total_pages - $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['last'] = \"...\" . $this->total_pages;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//next\n\t\t\t\t\tif ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['next'] = $this->current_page + 1;\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//middle iterations\n\t\t\t\telse {\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (empty($this->pages_show_array['next'])){\n\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t}\n\t\t\t\n\n\t\t}",
"protected function num() {\n $this->siblings = $this->siblings->not($this->page)->sortBy('num', 'asc');\n\n // special keywords and sanitization\n if($this->to == 'last') {\n $this->to = $this->siblings->count() + 1;\n } else if($this->to == 'first') {\n $this->to = 1;\n } else if($this->to === false) {\n $this->to = false;\n } else if($this->to < 1) {\n $this->to = 1; \n }\n\n // start the index\n $n = 0;\n\n if($this->to === false) {\n foreach($this->siblings as $sibling) {\n $n++; $sibling->_sort($n);\n }\n } else {\n\n // go through all items before the selected page\n foreach($this->siblings->slice(0, $this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n // add the selected page\n $n++; $this->page->_sort($n);\n\n // go through all the items after the selected page\n foreach($this->siblings->slice($this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n }\n\n }",
"public function page_links()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pagination = '';\n\t\t\n\t\t// Let's get the starting page number, this is determined using num_links\n\t\t$start = (($this->current_page - $this->num_links) > 0) ? $this->current_page - ($this->num_links - 1) : 1;\n\n\t\t// Let's get the ending page number\n\t\t$end = (($this->current_page + $this->num_links) < $this->total_pages) ? $this->current_page + $this->num_links : $this->total_pages;\n\n\t\tfor ($i = $start; $i <= $end; $i++)\n\t\t{\n\t\t\t$text = $i;\n\t\t\t$url = '#';\n\t\t\t$state = $this->template['state']['current_page'];\n\n\t\t\tif ($this->current_page != $i)\n\t\t\t{\n\t\t\t\t// detect if anchor attribute is presented in the template \n\t\t\t\tif (stripos('<a ', $this->template['page_start']) < 0)\n\t\t\t\t{\n\t\t\t\t\t$text = '<a href=\":url\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$url = $this->build_url($i);\n\t\t\t\t$state = '';\n\t\t\t}\n\n\t\t\t$pagination .= Str::tr($this->template['page_start'].$text.$this->template['page_end'], array(\n\t\t\t\t'state' => $state,\n\t\t\t\t'url' => $url,\n\t\t\t));\n\t\t}\n\n\t\treturn $pagination;\n\t}",
"public function view()\n {\n $pages = explode(' ', $this->list);\n\n if ($this->current_page < 1 || $this->current_page > $this->total_pages) {\n $this->current_page = 1;\n }\n $output = null;\n\n $output .= '<ul class=\"pagination\">';\n $output .= $this->beginning();\n $output .= $this->middle($pages);\n $output .= $this->ending();\n $output .= '</ul>';\n \n return $output;\n }",
"public function getPages() {}",
"function getPageSegment($separator = null, $offset = 0) {\n $page = $this->getCurrentPage();\n if (!$separator) {\n if (file_exists($this->getPagePath($page))) {\n require_once $this->getPagePath($page);\n }\n return;\n }\n $path = $this->getPagePath($page);\n $string = file_get_contents($path);\n $segments = explode($separator, $string);\n if(array_key_exists($offset, $segments)){\n $segment = $segments[$offset];\n if (substr($segment, 0, 5) !== \"<?php\") {\n $segment = \"?>\" . $segment;\n }\n eval($segment);\n }\n }",
"public function getPerPage();",
"public function get_pages($total,$current,$nb_per_page,$rub,$array_submitted=array())\n {\n $str_return = '';\n $arr_return = '';\n \n $get = '';\n \n foreach($array_submitted as $keysubmitted => $valuesubmitted)\n {\n if(!empty($valuesubmitted))\n {\n $get .= strtolower('&'.$keysubmitted.'='.$valuesubmitted);\n }\n }\n \n if($total>$nb_per_page)\n {\n $nbpage = ceil($total/$nb_per_page);\n\n if($current>1)\n {\n $prec = $current-1;\n $href = \"index.php?rub=\".$rub.\"&p=\".$prec.$get;\n\n $arr_return[] = array('link' => $href, 'number' => 'fa fa-arrow-left', 'active' => 0, 'bnumber' => 0);\n }\n\n if($nbpage <10)\n {\n $linkstart = 1;\n $linkstop = $nbpage;\n }\n else if($current<=5)\n { \n $linkstart = 1;\n $linkstop = 10;\n }\n else if( $current>5 && $current<($nbpage-5) )\n { \n $linkstart = $current-4;\n $linkstop = $current+5;\n }\n else if( $current>=($nbpage-5) )\n { \n $linkstart = $nbpage-9;\n $linkstop = $nbpage;\n }\n \n\n for($ipage=$linkstart;$ipage<=$linkstop;$ipage++)\n {\n $href = \"index.php?rub=\".$rub.\"&p=\".$ipage.$get; \n if($current==$ipage)\n {\n $arr_return[] = array('link' => '#', 'number' => $ipage, 'active' => 1, 'bnumber' => 1);\n }\n else\n {\n $arr_return[] = array('link' => $href, 'number' => $ipage, 'active' => 0, 'bnumber' => 1);\n }\n }\n\n if($current<$nbpage)\n {\n $suiv = $current+1;\n $href = \"index.php?rub=\".$rub.\"&p=\".$suiv.$get;\n\n $arr_return[] = array('link' => $href, 'number' => 'fa fa-arrow-right', 'active' => 0, 'bnumber' => 0);\n }\n \n \n } \n return $arr_return;\n }",
"private function retrieve_pagenumber() {\n\t\t$replacement = null;\n\n\t\t$nr = $this->determine_pagenumbering( 'nr' );\n\t\tif ( isset( $nr ) && $nr > 0 ) {\n\t\t\t$replacement = (string) $nr;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"public function getPaginated();",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"function numbered_in_page_links( $args = array () )\r\n{\r\n $defaults = array(\r\n 'before' => '<p>' . __('Pages:', 'framework')\r\n , 'after' => '</p>'\r\n , 'link_before' => ''\r\n , 'link_after' => ''\r\n , 'pagelink' => '%'\r\n , 'echo' => 1\r\n // element for the current page\r\n , 'highlight' => 'span'\r\n );\r\n\r\n $r = wp_parse_args( $args, $defaults );\r\n $r = apply_filters( 'wp_link_pages_args', $r );\r\n extract( $r, EXTR_SKIP );\r\n\r\n global $page, $numpages, $multipage, $more, $pagenow;\r\n\r\n if ( ! $multipage )\r\n {\r\n return;\r\n }\r\n\r\n $output = $before;\r\n\r\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\r\n {\r\n $j = str_replace( '%', $i, $pagelink );\r\n $output .= ' ';\r\n\r\n if ( $i != $page || ( ! $more && 1 == $page ) )\r\n {\r\n $output .= _wp_link_page( $i ) . \"{$link_before}{$j}{$link_after}</a>\";\r\n }\r\n else\r\n { // highlight the current page\r\n // not sure if we need $link_before and $link_after\r\n $output .= \"<$highlight>{$link_before}{$j}{$link_after}</$highlight>\";\r\n }\r\n }\r\n\r\n print $output . $after;\r\n}",
"function render_block_core_query_pagination_numbers($attributes, $content, $block)\n {\n }",
"public function getPaginationHtml();",
"public function numbers(array $options = []): string\n {\n $paging = $this->params();\n\n $first = $last = $current = 1;\n\n if ($paging) {\n $first = $paging['current'] > 5 ? ($paging['current'] - 4) : 1;\n $last = $first + 7;\n if ($last > $paging['pages']) {\n $last = $paging['pages'];\n }\n $current = $paging['current'];\n }\n\n $output = '';\n $query = $this->request()->query();\n for ($i = $first; $i < $last + 1; ++$i) {\n $template = 'number';\n if ($current == $i) {\n $template = 'numberActive';\n }\n $query['page'] = $i;\n\n $options['url'] = $this->request()->path() . '?' . http_build_query($query);\n $options['text'] = $i;\n $output .= $this->templater()->format($template, $options);\n }\n\n return $output;\n }",
"function get_page_number() {\n\t if ( get_query_var('paged') ) {\n\t print ' | ' . __( 'Page ' , 'hbd-theme') . get_query_var('paged');\n\t }\n\t}",
"function show_page_links($base_url, $num_items, $per_page, $page)\n{\n //$base_url contains the address of the page and the order it is called with\n //e.g., 'asc' or 'desc' - the page handles this so we have to worry about it.\n\n $total_pages = ceil($num_items/$per_page);\n\n if ($total_pages == 1)\n {\n return '';\n }\n\n //initialize our $page_string variable wich will hold the links\n $page_string = '<p><span class=\"page_numbers\">';\n\n //SHOW UP TO 4 LINKS ON EITHER SIDE OF THE CURRENT PAGE\n\n //get the number of page links are available after the current page\n $num_succeeding_links = $total_pages - $page;\n\n //get the number of preceding links available before the current page\n $num_preceding_links = $page -1;\n\n //calculate our start and end values\n $start = $page - 4;\n if ( $start < 1)\n {\n $start = 1;\n }\n //if we have less than 10 total_page, use the number we have ($total_pages)\n $end = $total_pages;\n //but if end is more than 9 higher than $start, make $end 9 higher than $start\n //we only want to show 10 records per page (e.g., 1..10)\n if ( ($end - $start) > 9 )\n {\n $end= $start + 9;\n }\n\n //if the total number of succeeding links exceeds 4 show 4 and a >> at the end\n //the >> at the end is just the 5th succeeding link\n //do the same for preceding links if they are more than 4\n if ($total_pages > 10 && $page > 1) //don't show first page link except when we're not the first page\n {\n //create a << which points to the first page\n $page_string .= '<a title=\"first page\" href=\"'.$base_url.'&page=1\"><<</a> ';\n //create a < which points to the current page -1 (shifts us left one)\n $val = $page-1;\n $page_string .= '<a title=\"previous page\" href=\"'.$base_url.'&page='.$val.'\"><</a> ';\n }\n for ($i=$start; $i<=$end; $i++)\n {\n if ($i == $page)\n {\n $page_string .= \" <b>[$i]</b> \";\n }\n else\n {\n $page_string .= ' <a title=\"page ' . $i . '\" href=\"'.$base_url.'&page='.$i.'\">'.$i.'</a> ';\n }\n }\n if ($total_pages > 10 && $page < $total_pages) //don't show last page link except when we're not on the last page\n {\n //create a > which points to the current page +1 (shifts us right one)\n $val = $page + 1;\n $page_string .= ' <a title=\"next page\" href=\"'.$base_url.'&page='.$val.'\">></a>';\n\n //create a >> which point to the last page\n $page_string .= ' <a title=\"last page\" href=\"'.$base_url.'&page='.$total_pages.'\">>></a> ';\n }\n\n $page_string .= '</span></p>';\n\n return $page_string;\n\n}",
"public function get_pagenum()\n {\n }",
"public function getNombrePages() \r\n\t{\r\n\t\treturn ceil(count($this->_bieres)/self::NOMBRE_PAR_PAGE);\r\n\t}",
"private function compilePager() {\n \t\n \t\n \t$this->_tmp_page = '<p '.$this->_config['css_page'].'>';\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].'1\">'.$this->_config['first'].'</a>';\n \t}\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] - 1).'\">'.$this->_config['previous'].'</a>';\n \t}\n \t\n \tif ($this->_all_page <= $this->_config['scr_page']) {\n \tif($this->_config['all_recs'] <= $this->_config['per_page']) {\n \t$this->_start = 1;\n $this->_stop = $this->_all_page;\n } else {\n \t\t$this->_start = 1;\n $this->_stop = $this->_all_page;\n }\n } else {\n \tif($this->_config['cur_page'] < intval($this->_config['scr_page'] / 2) + 1) {\n\t $this->_start = 1; \n\t \t$this->_stop = $this->_config['scr_page'];\n } else {\n \t$this->_start = $this->_config['cur_page'] - intval($this->_config['scr_page'] / 2);\n $this->_stop = $this->_config['cur_page'] + intval($this->_config['scr_page'] / 2);\n if($this->_stop > $this->_all_page) $this->_stop = $this->_all_page;\n }\n }\n if ($this->_all_page > 1) {\n\t for ($i = $this->_start; $i <= $this->_stop; $i++) {\n\t \tif ($i == $this->_config['cur_page']) {\n\t \t$this->_tmp_page .= '<span '.$this->_config['act_page'].'>'.$i.'</span>';\n\t } else {\n\t $this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$i.'\">'.$i.'</a>';\n\t }\n\t }\n }\n \n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] + 1).'\">'.$this->_config['next'].'</a>';\n \t}\n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$this->_all_page.'\">'.$this->_config['last'].'</a>';\n \t}\n \treturn $this->_tmp_page.'</p>';\n }",
"public function numbers(array $options = [])\n {\n $class = 'pagination';\n\n $options += [\n 'class' => $class,\n 'after' => '</ul>',\n 'size' => null,\n ];\n\n $options['class'] = implode(' ', (array)$options['class']);\n\n if (!empty($options['size'])) {\n $options['class'] .= \" {$class}-{$options['size']}\";\n }\n\n $options += [\n 'before' => '<ul class=\"' . $options['class'] . '\">',\n ];\n\n unset($options['class'], $options['size']);\n\n if (isset($options['prev'])) {\n if ($options['prev'] === true) {\n $options['prev'] = $this->config('labels.prev');\n }\n $options['before'] .= $this->prev($options['prev'], ['escape' => false]);\n }\n\n if (isset($options['next'])) {\n if ($options['next'] === true) {\n $options['next'] = $this->config('labels.next');\n }\n $options['after'] = $this->next($options['next'], ['escape' => false]) . $options['after'];\n }\n\n return parent::numbers($options);\n }",
"public function getGridPerPageValues()\n {\n return explode(\",\", $this->_klevuConfig->getCatalogGridPerPageValues());\n }",
"public static function paginationList(array $params, View $view): string\n {\n $pagination = $view['pagination'];\n if (!($pagination instanceof Pagination)) {\n trigger_error(__FUNCTION__ . '(): No Pagination object set', E_USER_ERROR);\n }\n\n if (!isset($params['url'])) {\n return '';\n }\n\n $str = '';\n $delimiter = $params['delimiter'] ?? ' ';\n $urlParams = $pagination->generateUrlParamsString($params);\n $pageList = $pagination->getPageList();\n $current = $pagination->getCurrentPage();\n foreach ($pageList as $page) {\n $str .= ($page == $current)\n ? $page\n : '<a href=\"' . $params['url'] . '?page=' . $page . $urlParams . '\">' . $page . '</a>';\n $str .= $delimiter;\n }\n $str = substr($str, 0, -strlen($delimiter));\n\n return $str;\n }",
"function get_pageNavHtml($page, $totalPages, $urlPrefix, $showPagesNums = 11)\n{\n if ($totalPages <= 0 || $page <= 0)\n return \"\";\n if ($showPagesNums <3 || $showPagesNums%2 === 0)\n return \"\";\n $pageNavHtml = \"\";\n\n $sideShowPages = floor($showPagesNums/2);\n $start = ($page - $sideShowPages) > 1? $page-$sideShowPages : 1;\n $end = ($page + $sideShowPages) < $totalPages? $page+$sideShowPages : $totalPages;\n\n for ($i = $start; $i<=$end; $i++)\n {\n $eachPageUrl = $urlPrefix.\"page=\".$i;\n $pageNavHtml .= \"<a href='$eachPageUrl' id='page_num_$i'>$i</a> \";\n }\n return $pageNavHtml;\n}",
"private function retrieve_page() {\n\t\t$replacement = null;\n\n\t\t$max = $this->determine_pagenumbering( 'max' );\n\t\t$nr = $this->determine_pagenumbering( 'nr' );\n\t\t$sep = $this->retrieve_sep();\n\n\t\tif ( $max > 1 && $nr > 1 ) {\n\t\t\t/* translators: 1: current page number, 2: total number of pages. */\n\t\t\t$replacement = sprintf( $sep . ' ' . __( 'Page %1$d of %2$d', 'wordpress-seo' ), $nr, $max );\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function pager($margin=10)\n {\n $path = $_GET;\n $newpath = $PHP_SELF.\"?\";\n foreach($path as $key => $value)\n {\n if($key!=$this->getvar)\n {\n $newpath .= $key.\"=\".$value;\n $newpath .=\"&\";\n }\n }\n $newpath .= $this->getvar;\n\n $linkpaths = array();\n $current = $this->start / $this->length + 1;\n $pages = ceil(($this->rows/$this->length));\n $pagerstart = $current-$margin;\n $pagerstart = ($pagerstart<1)?1:$pagerstart;\n $pagerend = $current+$margin;\n \n $pagerend = ( $pagerend > $pages ) ? ( ceil( ( $this->rows / $this->length ) ) ): $pagerend;\n\n for($i=$pagerstart;$i < ($pagerend+1);$i++)\n {\n $linkpaths[$i] = $newpath.\"=\".($i);\n }\n if($linkpaths[($current+1)]!=null)\n {\n $linkpaths['next']=$linkpaths[($current+1)];\n }\n if($linkpaths[($current-1)]!=null)\n {\n $linkpaths['last']=$linkpaths[($current-1)];\n }\n return $linkpaths;\n }",
"function register_block_core_query_pagination_numbers()\n {\n }",
"public function getPages()\n\t{\n\t\treturn $this->getOptionData('tl_page');\n\t}",
"public function paginate_numbers($count_of_entries, $items_per_page, $current_page, $pages_to_show){\n\t\t\t$this->pages_array = array();\n\t\t\t\n\t\t\t$this->pages_to_show = $pages_to_show;\n\t\t\t$this->current_page = $current_page;\n\t\t\t\n\t\t\t//ceiling to round fraction up to nearest whole number - total number of pages also = last page number\n\t\t\t$this->total_pages = ceil($count_of_entries / $items_per_page);\n\t\t\t\n\t\t\t//if the total number of pages is fewer than the limit, return only those pages\n\t\t\tif ($this->total_pages < $pages_to_show){\n\t\t\t\tfor ($i=0; $i < $this->total_pages;$i++){\n\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t//if the current page is less than the number of pages to show, then only show the first amount of pages to show\n\t\t\t\tif ($this->current_page < $pages_to_show){\n\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//if the current page is not in the first batch of pages:\n\t\t\t\telse {\n\n\t\t\t\t\tif ($this->total_pages - $this->current_page < $pages_to_show){\n\n\t\t\t\t\t\t//with x pages of the last page\n\t\t\t\t\t\t$setpage = $this->total_pages - $pages_to_show+1;\n\t\t\t\t\t\t$counter = $pages_to_show;\n\n\t\t\t\t\t\tfor ($i=0; $i < $counter; $i++){\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//nowhere near the last page\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$setpage = $this->current_page - ($pages_to_show / 2);\n\t\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\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}\n\n\t\t\t\n\t\t\t\n\n\t\t}",
"static function explodeUrl($path, $separator)\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'return url parameters',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $pages = array();\n $params = array();\n\n foreach ($path as $value) {\n if (preg_match('#[' . $separator . ']{1}#', $value)) {\n $params[] = $value;\n } elseif ($value) {\n $pages[] = $value;\n }\n }\n\n return array('pages' => $pages, 'params' => $params);\n }",
"function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }",
"function getPagingSup($refUrl, $aryOpts, $pgCnt, $curPg) {\n if (in_array('[__atuvc]', $aryOpts)) {\n unset($aryOpts[array_search('[__atuvc]')]);\n array_values($aryOpts);\n }\n $return = '';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n //$return.='<li class=\"pre\"><a href=\"'.$refUrl.getQueryString($aryOpts).'\">First</a></li>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<li ><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"pre\">Previous</a></li>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n if ($pgCnt == $i && $curPg >= $pgCnt)\n $class.=' bordernone';\n $return.='<li class=\"' . $class . '\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.=' active';\n $return.='\" >' . $i . '</a></li>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<li class=\"last\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"nextal\">Next</a></li>';\n $aryOpts['pg'] = $pgCnt;\n //$return.='<li class=\"last\"><a href=\"'.$refUrl.getQueryString($aryOpts).'\" class=\"nextal\">Last</a></li>';\n }\n return $return;\n}",
"function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')\n{\n\tglobal $template, $user;\n\n\t// Make sure $per_page is a valid value\n\t$per_page = ($per_page <= 0) ? 1 : $per_page;\n\n\t$seperator = '<span class=\"page-sep\">' . $user->lang['COMMA_SEPARATOR'] . '</span>';\n\t$total_pages = ceil($num_items / $per_page);\n\n\tif ($total_pages == 1 || !$num_items)\n\t{\n\t\treturn false;\n\t}\n\n\t$on_page = floor($start_item / $per_page) + 1;\n\t$url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&');\n\n\t$page_string = ($on_page == 1) ? '<strong>1</strong>' : '<a href=\"' . $base_url . '\">1</a>';\n\n\tif ($total_pages > 5)\n\t{\n\t\t$start_cnt = min(max(1, $on_page - 4), $total_pages - 5);\n\t\t$end_cnt = max(min($total_pages, $on_page + 4), 6);\n\n\t\t$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;\n\n\t\tfor ($i = $start_cnt + 1; $i < $end_cnt; $i++)\n\t\t{\n\t\t\t$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($i - 1) * $per_page) . '\">' . $i . '</a>';\n\t\t\tif ($i < $end_cnt - 1)\n\t\t\t{\n\t\t\t\t$page_string .= $seperator;\n\t\t\t}\n\t\t}\n\n\t\t$page_string .= ($end_cnt < $total_pages) ? ' ... ' : $seperator;\n\t}\n\telse\n\t{\n\t\t$page_string .= $seperator;\n\n\t\tfor ($i = 2; $i < $total_pages; $i++)\n\t\t{\n\t\t\t$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($i - 1) * $per_page) . '\">' . $i . '</a>';\n\t\t\tif ($i < $total_pages)\n\t\t\t{\n\t\t\t\t$page_string .= $seperator;\n\t\t\t}\n\t\t}\n\t}\n\n\t$page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($total_pages - 1) * $per_page) . '\">' . $total_pages . '</a>';\n\n\tif ($add_prevnext_text)\n\t{\n\t\tif ($on_page != 1)\n\t\t{\n\t\t\t$page_string = '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($on_page - 2) * $per_page) . '\">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string;\n\t\t}\n\n\t\tif ($on_page != $total_pages)\n\t\t{\n\t\t\t$page_string .= ' <a href=\"' . $base_url . \"{$url_delim}start=\" . ($on_page * $per_page) . '\">' . $user->lang['NEXT'] . '</a>';\n\t\t}\n\t}\n\n\t$template->assign_vars(array(\n\t\t$tpl_prefix . 'BASE_URL'\t\t=> $base_url,\n\t\t'A_' . $tpl_prefix . 'BASE_URL'\t=> addslashes($base_url),\n\t\t$tpl_prefix . 'PER_PAGE'\t\t=> $per_page,\n\n\t\t$tpl_prefix . 'PREVIOUS_PAGE'\t=> ($on_page == 1) ? '' : $base_url . \"{$url_delim}start=\" . (($on_page - 2) * $per_page),\n\t\t$tpl_prefix . 'NEXT_PAGE'\t\t=> ($on_page == $total_pages) ? '' : $base_url . \"{$url_delim}start=\" . ($on_page * $per_page),\n\t\t$tpl_prefix . 'TOTAL_PAGES'\t\t=> $total_pages,\n\t));\n\n\treturn $page_string;\n}",
"public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}",
"function paginationNames($page = 1, $page_count)\n{\n if($page < 3){\n return [\n 'first' => 1,\n 'second' => 2,\n 'third' => 3\n ];\n }elseif($page == $page_count){\n return [\n 'first' => ($page_count - 2),\n 'second' => ($page_count - 1),\n 'third' => $page_count\n ];\n }else{\n return [\n 'first' => ($page - 1),\n 'second' => $page,\n 'third' => ($page + 1)\n ];\n }\n}",
"function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}",
"public function getSeparator();",
"public function returnPaginationSerial(){\n\n return self::$oPaginator->return_pagination_serial();\n\n }",
"function get_page_number() {\n\t if ( get_query_var('paged') ) {\n\t print ' | ' . __( 'Page ' , 'deinegeestblog-theme') . get_query_var('paged');\n\t }\n\t}",
"function get_pager()\n\t{\n\t\tinclude_once('Pager/Pager.php');\n\t\t$pager_options = array();\n\t\t$pager_options['mode'] = 'Sliding';\n\t\t$pager_options['urlVar'] = 'page';\n\t\t$pager_options['delta'] = 2;\n\t\t$pager_options['perPage'] = (int) $this->rows_per_page;\n\t\t$pager_options['separator'] = '|';\n\t\t$pager_options['prev'] = '«';\n\t\t$pager_options['next'] = '»';\n\t\t$pager_options['append'] = false;\n\t\t$pager_options['fileName'] = $this->pager_file_name;\n\t\t\n\t\t$pager_options['totalItems'] = $this->totalItems;\n\t\t\n\t\t$currentPage = common::arg($this->pager_arg_no);\n\t\t//$this->content->debug .= ' currentPage: '.$currentPage .' argno: '.$this->pager_arg_no .' a:'.(int)common::arg(3);\n\t\tif (! isset($currentPage) || ! $currentPage) { $currentPage = 1; }\n\t\tif ($currentPage > ceil($this->totalItems/$this->rows_per_page)) { $currentPage = 1; }\n\t\t\n\t\t$pager_options['currentPage'] = $currentPage;\n\t\t\n\t\t$pager =& Pager::factory($pager_options);\n\t\treturn $pager->links;\n\t}",
"public function pagination() {\n\t\tglobal $post, $page, $numpages, $multipage;\n\t\t$post = $this;\n\t\t$ret = array();\n\t\tif ( $multipage ) {\n\t\t\tfor ( $i = 1; $i <= $numpages; $i++ ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link);\n\t\t\t\tif ( $i == $page ) {\n\t\t\t\t\t$data['current'] = true;\n\t\t\t\t}\n\t\t\t\t$ret['pages'][] = $data;\n\t\t\t}\n\t\t\t$i = $page - 1;\n\t\t\tif ( $i ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['prev'] = array('link' => $link);\n\t\t\t}\n\t\t\t$i = $page + 1;\n\t\t\tif ( $i <= $numpages ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['next'] = array('link' => $link);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"function wp_get_list_item_separator()\n {\n }",
"public static function links()\n\t{\n\t\t$all_pages = ceil(self::$total / self::$limit);\n\t\t$current_page = ceil(self::$offset / self::$limit);\n\n\t\t$string = '<nav class=\"paginator\"><ul>';\n\n\t\tif($current_page > 1)\n\t\t{\n\t\t\t$string .= '<li>' . self::link(\"Précédente\", ($current_page - 1) * self::$limit) . '</li>';\n\t\t}\n\n\t\t$from_page = max($current_page - 3, 0);\n\t\t$to_page = min($current_page + 3, $all_pages-1);\n\n\t\tfor($i = $from_page; $i < $to_page; $i++)\n\t\t{\n\t\t\t$string .= '<li ' . ($current_page == $i ? 'class=\"current\"' : '') . '>' . self::link($i + 1, $i * self::$limit) . '</li>';\n\t\t}\n\t\t\n\n\t\tif(($current_page + 1) !== $all_pages)\n\t\t{\n\t\t\t$string .=\"<li>...</li>\";\n\t\t\t$string .= '<li>' . self::link(round(self::$total/self::$limit)+1, round(self::$total/self::$limit)*self::$limit ) . '</li>';\n\t\t\t$string .= '<li>' . self::link(\"Suivante\", ($current_page + 1) * self::$limit) . '</li>';\n\t\t}\t\t\n\n\t\t//self::$url=preg_replace(\"/\\&offset=[0-9]*/\",\"\",self::$url);\n\t\t//$string .='<li><a href=\"' . self::$url . '?offset=' . round(self::$total/self::$limit)*self::$limit . '\"> Dernière </a>';\n\t\t$string .= '</ul></nav>';\n\t\t//$string .= self::$total . \" \" .self::$offset . \" \" . self::$url . \" \" . self::$limit;\n\n\t\treturn $string;\n\t}",
"public function get(): array\n\t{\n\t\t$roundedNumber = $this->count();\n\t\t$page = 1;\n\t\t\n\t\t$arrayPage = array();\n\t\t\n\t\tfor ($i = 0; $i < $roundedNumber; $i++) {\n\t\t\t$arrayPage[] = $page;\n\t\t\t$page++;\n\t\t}\n\t\treturn $arrayPage;\n\t}",
"function getListaPags() {\n\t\t\t\n\t\t$arrPaginas = array();\n\t\t\t\n\t\t$inf = NULL;\n\t\t$sup = NULL;\n\t\t\t\n\t\t$tmp01 = floor($this->listap/2);\n\t\t\t\n\t\t// se o highlight estiver no meio da seleção\n\t\tif ($this->pagina - $tmp01 >= 1 && $this->pagina + $tmp01 <= $this->totalp){\n\t\t\t$inf = $this->pagina-$tmp01;\n\t\t\t$sup = $this->pagina+$tmp01;\n\t\t}\n\t\telse {\n\t\t\t// se estiver no lado esquerdo\n\t\t\tif ($this->pagina - $tmp01 < 1) {\n\t\t\t\t$inf = 1;\n\t\t\t\t$sup = ($this->totalp < $this->listap) ? $this->totalp : $this->listap ;\n\t\t\t}\n\t\t\t// se estiver no lado direito\n\t\t\telse if ($this->pagina + $tmp01 > $this->totalp) {\n\t\t\t\t$inf = ($this->totalp < $this->listap) ? 1 : $this->totalp-($this->listap-1) ;\n\t\t\t\t$sup = $this->totalp;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\t\n\t\tfor ($x=$inf,$y=0;$x<=$sup;$x++,$y++) {\n\t\t\t$arrPaginas[$y] = $x;\n\t\t}\n\t\t\n\t\treturn $arrPaginas;\n\t\t\t\t\n\t\t// ALGORITMO LISTA DE PAGINAS - FIM\n\t}",
"function getlist($pagecount,$page)\n{\n\t$echo = \"<select size=1 class='page_select' name=page onchange=javascript:location.href='\".getparam(\"page\",\"\").\"'+this.options[this.selectedIndex].value>\";\n\tfor($i=1;$i<=$pagecount;$i++)\n\t{\n\t\t$result = $pagecount/15;\n\t\tif($i>=$page-20 && $i<=$page+15){// ||\n\t\t\t$echo .= \"<option value=$i\".($page==$i ? ' selected' : '').\">\".$i.\"</option>\";\n\t\t}elseif($i%$result ==0 || $i==1 || $i==$pagecount){\n\t\t\t$echo .= \"<option value=$i>\".$i.\"</option>\";\n\t\t}\n\t}\n\t$echo.= \"</select>\";\n\treturn $echo;\n}",
"function ubc_collab_loop_pagination( $pagination ) {\n\treturn str_replace( \"<li><span class='page-numbers current'\", \"<li class='active'><span class='page-numbers current'\", $pagination );\n\n}",
"public function getBar()\n\t{\n\t\t$neighbours = 2;\n\n\t\t$page = $this->getPageNo();\n\n\t\t$next = $page + 1;\n\t\t$lastPage = $this->getPagesTotal();\n\t\t$lpm1 = $lastPage - 1;\n\n\t\t$bar = array();\n\t\t$counter = 0;\n\n\t\tif ($lastPage < 2)\n\t\t{\n\t\t\treturn $bar;\n\t\t}\n\n\t\t$bar[] = '<ul class=\"trackerPagination\">';\n\n\t\tif ($lastPage < 7 + ($neighbours * 2))\n\t\t{\n\t\t\tfor ($counter = 1; $counter <= $lastPage; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t{\n\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($lastPage > 5 + ($neighbours * 2))\n\t\t{\n\t\t\tif ($page < 1 + ($neighbours * 2))\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($neighbours * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$bar[] = '<li class=\"dot\">...</li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lpm1) . '\">' . $lpm1 . '</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . $lastPage . '</a></li>';\n\t\t\t}\n\t\t\telseif ($lastPage - ($neighbours * 2) > $page && $page > ($neighbours * 2))\n\t\t\t{\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(1) . '\">1</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(2) . '\">2</a></li>';\n\t\t\t\t$bar[] = '<li class=\"dot\">...</li>';\n\n\t\t\t\tfor ($counter = $page - $neighbours; $counter <= $page + $neighbours; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$bar[] = '<li class=\"dot\">..</li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lpm1) . '\">' . $lpm1 . '</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . $lastPage . '</a></li>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(1) . '\">1</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(2) . '\">2</a></li>';\n\t\t\t\t$bar[] = '<li class=\"dot\">..</li>';\n\n\t\t\t\tfor ($counter = $lastPage - (2 + ($neighbours * 2)); $counter <= $lastPage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($page < $counter - 1)\n\t\t{\n\t\t\t$bar[] = '<li><a href=\"' . $this->uri($next) . '\">' . g11n3t('Next') . '</a></li>';\n\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . g11n3t('Last') . '</a></li>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bar[] = '<li><a class=\"current\">' . g11n3t('Next') . '</a></li>';\n\t\t\t$bar[] = '<li><a class=\"current\">' . g11n3t('Last') . '</a></li>';\n\t\t}\n\n\t\t$bar[] = '</ul>';\n\n\t\treturn implode(\"\\n\", $bar);\n\t}",
"protected static function handle_pagination($content) { \n\n\t\tpreg_match('/{- BEGIN PAGINATION -}.*?{- END PAGINATION -}/s', $content, $pnation);\n\n\t\t$autolink = BlogPad::has_setting('auto_link');\n\n\t\t$p_processed = '';\n\n\t\tif( !empty($pnation[0]) ) {\n\n\t\t\t$txt = $pnation[0];\n\n\t\t\tif(preg_match('/{- BEGIN COUNTDOWN -}.*?{- END COUNTDOWN -}/s', $pnation[0], $cdown) ) {\n\t\t\t\t$_cdown = str_replace('{- BEGIN COUNTDOWN -}', '<div class=\"bp-countdown\"><?php $i = 1; while($i <= $paginate[\"last_page\"]): ?>', $txt);\n\n\t\t\t\t$_cdown = preg_replace('/(.*?){- number -}(.*)/', ($autolink ? '$1<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $i, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo $i;?></a>$2': '$1<?php echo $i;?>$2'), $_cdown);\n\n\t\t\t\t$_cdown = str_replace('{- END COUNTDOWN -}', '<?php $i++; endwhile; ?></div>', $_cdown);\n\n\t\t\t\t$txt = str_replace($pnation[0], $_cdown, $txt);\n\t\t\t}\n\n\t\t\t// Support the placement of custom text that will be used as a label, else display the relevant page numbers.\n\t\t\t$rplace = preg_replace('/(.*?){- previous:?([A-z0-9\\s]+)? -}(.*)/', '<?php if( !($pagenum - 1 <= 0) ): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum - 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum - 1;?></a>': '<?php echo (trim(\"$2\" !== \"\")) ? \"$2\": $pagenum - 1;?>').'$3<?php endif;?>', $txt);\n\n\n\t\t\t$rplace = preg_replace('/(.*?){- next:?([A-z0-9\\s]+)? -}(.*)/', '<?php if($pagenum + 1 > 1 && $pagenum < $paginate[\"last_page\"]): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum + 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?></a>': '<?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?>').'$3<?php endif;?>', $rplace);\n\n\t\t\t$p_processed .= $rplace;\n\n\t\t\t$p_processed = str_replace('{- BEGIN PAGINATION -}', '<div class=\"bp-pagination\">', $p_processed);\n\t\t\t$p_processed = str_replace('{- END PAGINATION -}', '</div>', $p_processed);\n\n\t\t\t$content = str_replace($pnation[0], $p_processed, $content);\n\t\t}\n\n\t\treturn $content;\n\t}",
"static function page_list($startpage, $config, $first2last=true)\n {\n global $bodyreader;\n if ($first2last) $continue = \"next\"; \n else $continue = \"previous\";\n $items = $bodyreader->parse_advance($startpage, $config, array($continue));\n $pages[] = $startpage; \n while (!empty($items[0][$continue]))\n {\n $link = static::match_url($startpage, $items[0][$continue]);\n $pages[] = $link;\n $items = $bodyreader->parse_advance($link, $config, array($continue));\n }\n \n return $pages;\n }",
"abstract public function preparePagination();",
"function get_pagenum_link($pagenum = 1, $escape = \\true)\n {\n }",
"function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}",
"public function countPages() {\n\t\t$splitContent = explode(\"<!-- pagebreak -->\", $this->content);\t\t\n\t\treturn count($splitContent);\n\t}",
"protected function buildPagination()\n {\n $this->calculateDisplayRange();\n $pages = [];\n for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {\n $pages[] = [\n 'number' => $i,\n 'offset' => ($i - 1) * $this->itemsPerPage,\n 'isCurrent' => $i === $this->currentPage\n ];\n }\n $pagination = [\n 'linkConfiguration' => $this->linkConfiguration,\n 'pages' => $pages,\n 'current' => $this->currentPage,\n 'numberOfPages' => $this->numberOfPages,\n 'lastPageOffset' => ($this->numberOfPages - 1) * $this->itemsPerPage,\n 'displayRangeStart' => $this->displayRangeStart,\n 'displayRangeEnd' => $this->displayRangeEnd,\n 'hasLessPages' => $this->displayRangeStart > 2,\n 'hasMorePages' => $this->displayRangeEnd + 1 < $this->numberOfPages\n ];\n if ($this->currentPage < $this->numberOfPages) {\n $pagination['nextPage'] = $this->currentPage + 1;\n $pagination['nextPageOffset'] = $this->currentPage * $this->itemsPerPage;\n }\n if ($this->currentPage > 1) {\n $pagination['previousPage'] = $this->currentPage - 1;\n $pagination['previousPageOffset'] = ($this->currentPage - 2) * $this->itemsPerPage;\n }\n return $pagination;\n }",
"function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}",
"function emm_paginate_loop($start, $max, $page = 0) {\n\t$output = \"\";\n\tfor ($i = $start; $i <= $max; $i++) {\n\t\t$output .= ($page === intval($i)) \n\t\t\t? \"<li class='current'><a href='#'>$i</a></li>\" \n\t\t\t: \"<li><a href='\" . get_pagenum_link($i) . \"'>$i</a></li>\";\n\t}\n\treturn $output;\n}",
"function emm_paginate_loop($start, $max, $page = 0) {\n\t$output = \"\";\n\tfor ($i = $start; $i <= $max; $i++) {\n\t\t$output .= ($page === intval($i)) \n\t\t\t? \"<li class='current'><a href='#'>$i</a></li>\" \n\t\t\t: \"<li><a href='\" . get_pagenum_link($i) . \"'>$i</a></li>\";\n\t}\n\treturn $output;\n}",
"function paginate($perpage=50)\n\t{\n\t\tif($perpage == 0) return ''; // zero means unlimited\n\n\t\t$page = $this->page->param('p_p', 1);\n\t\t$perpage = $this->page->param('p_pp', $perpage);\n\t\t$offset = max(0,($page-1) * $perpage);\n \n\t\treturn \"$perpage OFFSET $offset\";\n\t}",
"function pager($page, $total, $pnumber, $page_link, $parameters)\n {\n $number = (int)($total/$pnumber);\n if((float)($total/$pnumber) - $number != 0) $number++;\n // Check on left links\n if($page - $page_link > 1)\n {\n echo \"<a href=$_SERVER[PHP_SELF]?page=1{$parameters}> <nobr>[1-$pnumber]</nobr></a> <em class=currentpage><nobr> ... </nobr> </em> \";\n // Have one\n for($i = $page - $page_link; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n else\n {\n // Have no\n for($i = 1; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n // Check on right links\n if($page + $page_link < $number)\n {\n // Have one\n for($i = $page; $i<=$page + $page_link; $i++)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n echo \"<em class=currentpage><nobr> ... </nobr> </em> <a href=$_SERVER[PHP_SELF]?page=$number{$parameters}> <nobr>[\".(($number - 1)*$pnumber + 1).\"-$total]</nobr></a> \";\n }\n else\n {\n // Have no\n for($i = $page; $i<=$number; $i++)\n {\n if($number == $i)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-$total] </nobr></em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}>[\".(($i - 1)*$pnumber + 1).\"-$total]</a> \";\n }\n else\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n }\n //echo \"<br><br>\";\n }",
"public function getPageAndRootline() {}",
"protected function createPageLinks()\n {\n $pageLinks = array();\n\n if ($this->totalPages > 10) {\n $startRange = $this->page - floor($this->range/2);\n $endRange = $this->page + floor($this->range/2);\n\n //Start range\n if ($startRange <= 0) {\n $startRange = 1;\n $endRange += abs($startRange) + 1;\n }\n\n // End range\n if ($endRange > $this->totalPages) {\n $startRange -= $endRange - $this->totalPages;\n $endRange = $this->totalPages;\n }\n\n // Range\n $range = range($startRange, $endRange);\n\n // Add first page\n $this->pageLinks[] = array(\n 'page' => 1,\n 'uri' => $this->createUri(1)\n );\n\n foreach ($range as $page) {\n // Skip for first and last page\n if ($page == 1 or $page == $this->totalPages) {\n continue;\n }\n\n $this->pageLinks[] = array(\n 'page' => $page,\n 'uri' => $this->createUri($page)\n );\n }\n\n // Add last page\n $this->pageLinks[] = array(\n 'page' => $this->totalPages,\n 'uri' => $this->createUri($this->totalPages)\n );\n } else {\n for ($i = 1; $i <= $this->totalPages; $i++) {\n $this->pageLinks[] = array(\n 'page' => $i,\n 'uri' => $this->createUri($i)\n );\n }\n }\n }",
"function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }",
"public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin; $i <= $end && $i <= $total_pages; $i++) {\n $pagination[] = $this->getNewPage($i);\n }\n\n if ($this->show_ends) {\n $this->addEnds($pagination);\n }\n\n return $pagination;\n }",
"function page_func(){\n\t\t?>\n\t\t\t\t<div class=\"wrap\">\n\t\t\t\t\t<div class=\"tablenav\">\n\t\t\t\t\t\t<div class=\"tablenav-pages\">\n\t\t\t\t\t\t\t<span class=\"displaying-num\">\n\t\t\t\t\t\t\t\tDisplaying 1-20 of 69\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"page-number-current\">1</span>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">2</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">3</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">4</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">5</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">6</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t<?php \n\t\t\t}",
"#[Pure] public function generatePagination(): string\n {\n return $this->dbc->generatePagination($this->pageSize, $this->pageNumber);\n }",
"function smarty_function_pager($params, &$smarty) {\n $result = '';\n \n if (!isset($params['delta'])) {\n $params['delta'] = 3;\n }\n \n if ($params && $params['pages'] > 1) {\n $result = '<div class=\"dg_pager_container\">';\n \n if ($params['current'] > 1) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"1\">First</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] - 1).'\">Prev</a> ';\n }\n \n $pager_start = $params['current'] <= $params['delta'] ? 1 : $params['current'] - $params['delta'];\n $pager_stop = $params['current'] > $params['pages'] - $params['delta'] ? $params['pages'] : $params['current'] + $params['delta'];\n \n if ($params['current'] > $params['delta'] + 1) {\n /*for ($i = 1; $i <= $params['delta'] + 1; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n $result .= ' ... ';\n }\n \n for ($i = $pager_start; $i <= $pager_stop; ++$i) {\n if ($i == $params['current']) {\n $result .= ' <span>['.$i.']</span> ';\n } else {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }\n }\n \n if ($params['current'] < $params['pages'] - $params['delta']) {\n $result .= ' ... ';\n /*for ($i = $params['pages'] - $params['delta']; $i <= $params['pages']; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n }\n\n if ($params['current'] < $params['pages']) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] + 1).'\">Next</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$params['pages'].'\">Last</a> ';\n }\n \n $result .= '</div>';\n }\n \n return $result;\n}",
"function pager_find_page($element = 0) {\n $page = isset($_GET['page']) ? $_GET['page'] : '';\n $page_array = explode(',', $page);\n if (!isset($page_array[$element])) {\n $page_array[$element] = 0;\n }\n return (int) $page_array[$element];\n}",
"public function getItemsPerPage();",
"public function getItemsPerPage();"
] | [
"0.8161145",
"0.67474955",
"0.62342",
"0.6144174",
"0.60108674",
"0.5964183",
"0.595724",
"0.594568",
"0.5809402",
"0.5756099",
"0.56740075",
"0.55723804",
"0.5505724",
"0.5476217",
"0.5471395",
"0.54218286",
"0.54218286",
"0.54006463",
"0.5388477",
"0.53874815",
"0.5366174",
"0.5362139",
"0.53613955",
"0.5359467",
"0.5347186",
"0.5339466",
"0.5325821",
"0.53222054",
"0.53222054",
"0.53133273",
"0.52908766",
"0.527849",
"0.52779865",
"0.5274288",
"0.5269072",
"0.5230903",
"0.52183384",
"0.5215541",
"0.52143097",
"0.521247",
"0.521247",
"0.5210634",
"0.5201294",
"0.5196857",
"0.51761687",
"0.5167338",
"0.5160169",
"0.51599514",
"0.51490206",
"0.5141377",
"0.5139605",
"0.51350564",
"0.51175004",
"0.51117545",
"0.5109232",
"0.50976014",
"0.5095671",
"0.5086802",
"0.5085483",
"0.50840324",
"0.50828123",
"0.5081435",
"0.5081333",
"0.50791055",
"0.5078949",
"0.5073384",
"0.50695795",
"0.50608313",
"0.5037552",
"0.50367427",
"0.50351065",
"0.50278914",
"0.5014595",
"0.50133693",
"0.5013299",
"0.5004408",
"0.49872845",
"0.49794447",
"0.49773782",
"0.497382",
"0.49688023",
"0.49635178",
"0.49627545",
"0.49618435",
"0.4960292",
"0.49441144",
"0.49390015",
"0.49390015",
"0.49363345",
"0.49360573",
"0.49356964",
"0.4932125",
"0.4926724",
"0.49251243",
"0.49216685",
"0.4916407",
"0.49097243",
"0.49063376",
"0.49030012",
"0.49030012"
] | 0.82875407 | 0 |
Returns a list of page numbers separated by $separator | function myPageNumbers($separator=null)
{
if (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }
$t = array();
$text = '';
$pc = 1;
do
{
if($pc == $this->_pageDetails['page'])
{
$text = '<span class=numberlinkon> '.$pc.'</span>';
}
else
{
if($this->style == 'ajax')
{
$text = " ".$this->Ajax->link($pc, $this->link.$pc, array("update" => "ajax_update","method"=>"get","class"=>"numberlink"));
}
else
{
$text = " ".$this->Html->link($pc,$this->link.$pc,array("class"=>"numberlink"));
}
}
$t[] = $text;
$pc++;
}
while ($pc<=$this->_pageDetails['pageCount']);
$t = implode($separator, $t);
return $t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span>'.$pc.'</span>';\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t{\n\t\t\t\t\t$text = $this->Ajax->link($pc, array(\"fallback\"=>$this->action.\"#\",\"url\" =>$this->link.$pc,\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$text = $this->Html->link($pc,$this->link.$pc);\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\t $t[] = $text;\n\t\t\t $pc++;\n\t\t } \n\t\t while ($pc<=$this->_pageDetails['pageCount']);\n\t\t \n\t\t $t = implode($separator, $t);\n \n\t\treturn $t;\n\t}",
"public function getPageNumbers();",
"public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}",
"public function page_list() {\n\n\t\t\t$output = \"\";\n\t\t\t$cur_page = $this->current_page;\n\t\t\t$tot_page = $this->total_pages();\n\n\t\t\tif( $cur_page <= $tot_page ) {\n\t\t\t\t$output .= \"<h3 class=\\\"pagelist\\\">Page {$cur_page} of \" ;\n\t\t\t\t$output .= \"{$tot_page}</h3>\";\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $output;\n\n\t\t}",
"public function page_numbers() {\n $pages = $this->total_pages();\n $query = htmlentities($this->term);\n $page = $this->pagenumber;\n $next = get_string('next', 'search');\n $back = get_string('back', 'search');\n\n $ret = \"<div align='center' id='search_page_links'>\";\n\n //Back is disabled if we're on page 1\n if ($page > 1) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page-1).\"'>< {$back}</a> \";\n } else {\n $ret .= \"< {$back} \";\n } \n\n //don't <a href> the current page\n for ($i = 1; $i <= $pages; $i++) {\n if ($page == $i) {\n $ret .= \"($i) \";\n } else {\n $ret .= \"<a href='query.php?query_string={$query}&page={$i}'>{$i}</a> \";\n } \n } \n\n //Next disabled if we're on the last page\n if ($page < $pages) {\n $ret .= \"<a href='query.php?query_string={$query}&page=\".($page+1).\"'>{$next} ></a> \";\n } else {\n $ret .= \"{$next} > \";\n } \n\n $ret .= \"</div>\";\n\n //shorten really long page lists, to stop table distorting width-ways\n if (strlen($ret) > 70) {\n $start = 4;\n $end = $page - 5;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n\n $start = $page + 5;\n $end = $pages - 3;\n $ret = preg_replace(\"/<a\\D+\\d+\\D+>$start<\\/a>.*?<a\\D+\\d+\\D+>$end<\\/a>/\", '...', $ret);\n }\n\n return $ret;\n }",
"public function getPages($framework, $currentPage = 1, $numPages = 1, $limit = 7, $separator = '...', $breakpoint = 4) {\n\t\t$this->currentPage = $currentPage;\n\t\t$this->numPages = $numPages;\n\t\t$this->limit = $limit;\n\t\t$this->separator = $separator;\n\t\t$this->breakpoint = $breakpoint;\n\n\n\t\t$items = array();\n\n\t\t/**\n\t\t * Less than or 7 pages. We know all the keys, and we put them in the array\n\t\t * that we will use to generate the actual pagination.\n\t\t */\n\t\tif($this->numPages <= $this->limit) {\n\t\t\tfor($i = 1-(bool)$this->logicNumbers; $i <= $this->numPages-(bool)$this->logicNumbers; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t}\n\n\t\t// more than 7 pages\n\t\telse {\n\t\t\t// first page\n\t\t\tif($this->currentPage == 1-(bool)$this->logicNumbers) {\n\t\t\t\t// [1] 2 3 4 5 6 7 8 9 10 11 12 13\n\t\t\t\tfor($i = 1; $i <= $this->limit; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t\t$items[$this->limit + 1] = $this->separator;\n\t\t\t}\n\n\n\t\t\t// last page\n\t\t\telse\n\t\t\tif($this->currentPage == $this->numPages) {\n\t\t\t\t// 1 2 3 4 5 6 7 8 9 10 11 12 [13]\n\t\t\t\t$items[$this->numPages - $this->limit - 1] = $this->separator;\n\t\t\t\tfor($i = ($this->numPages - $this->limit); $i <= $this->numPages; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t}\n\n\t\t\t// other page\n\t\t\telse\n\t\t\t{\n\t\t\t\t// 1 2 3 [4] 5 6 7 8 9 10 11 12 13\n\n\t\t\t\t// define min & max\n\t\t\t\t$min = $this->currentPage - $this->breakpoint + 1;\n\t\t\t\t$max = $this->currentPage + $this->breakpoint - 1;\n\n\t\t\t\t// minimum doesnt exist\n\t\t\t\twhile($min <= 0)\n\t\t\t\t{\n\t\t\t\t\t$min++;\n\t\t\t\t\t$max++;\n\t\t\t\t}\n\n\t\t\t\t// maximum doesnt exist\n\t\t\t\twhile($max > $this->numPages)\n\t\t\t\t{\n\t\t\t\t\t$min--;\n\t\t\t\t\t$max--;\n\t\t\t\t}\n\n\t\t\t\t// create the list\n\t\t\t\tif($min != 1) $items[$min - 1] = $this->separator;\n\t\t\t\tfor($i = $min; $i <= $max; $i++) $items[$i] = $i+(bool)$this->logicNumbers;\n\t\t\t\tif($max != $numPages) $items[$max + 1] = $this->separator;\n\t\t\t}\n\t\t}\n\n\t\treturn $items;\n\t}",
"protected function getPageIds()\n {\n return (array)explode(',', $this->getData('pages'));\n }",
"public function getStyledPageNumbers($dbQuery = NULL)\n {\n $pageNumsArray = $this->getPageNumbers($dbQuery);\n \n if($pageNumsArray === 0)\n {\n return 0;\n }\n \n $currentPageNum = $this->currentPageNumber();\n \n $finalString = \"\\n<ul id=\\\"pagenumbersid\\\">\\n\";\n \n if($currentPageNum !== 1)\n {\n $finalString .= \"<li id=\\\"firstpageid\\\"><a href=\\\"{$this->getNewPageAddress(1)}\\\">{$this->firstPageName}</a></li>\\n\";\n $finalString .= \"<li id=\\\"previouspageid\\\"><a href=\\\"{$this->getNewPageAddress($currentPageNum - 1)}\\\">{$this->previousPageName}</a></li>\\n\";\n }\n \n $decreaseTwoPoint = $currentPageNum-2;\n /**\n * Because it can not be lower that 1 and the 1 is the lowest number then we will check whether it's lower that 1 or not.\n * If its lower than then we can set it to 1 manually.\n */\n if($decreaseTwoPoint < 1)\n {\n $decreaseTwoPoint = 1;\n }\n \n $increaseTwoPoint = $currentPageNum+2;\n /**\n * Because it can not be more bigger than our total page numbers then we will check it to see whether it's bigger that our total page numbers or not.\n * If it's bigger then we will set it to the total page numbers manually.\n */\n if($increaseTwoPoint > $this->totalPages)\n {\n $increaseTwoPoint = $this->totalPages;\n }\n \n for($i = $decreaseTwoPoint; $i <= $increaseTwoPoint; $i++)\n {\n if($i == $currentPageNum)\n {\n $finalString .= \"<li>{$i}</li>\\n\";\n }\n else\n {\n $finalString .= \"<li><a href=\\\"{$this->getNewPageAddress($i)}\\\">{$i}</a></li>\\n\";\n }\n }\n \n if($currentPageNum !== $this->totalPages)\n {\n $finalString .= \"<li id=\\\"nextpageid\\\"><a href=\\\"{$this->getNewPageAddress($currentPageNum + 1)}\\\">{$this->nextPageName}</a></li>\\n\";\n $finalString .= \"<li id=\\\"lastpageid\\\"><a href=\\\"{$this->getNewPageAddress($this->totalPages)}\\\">{$this->lastPageName}</a></li>\\n\";\n }\n \n $finalString .= '</ul>';\n \n return $finalString;\n }",
"function _getAllPageNumbers($current_page, $last_page)\n{\n $page_ix = 1;\n $pages = array();\n while($page_ix <= $last_page){\n if($page_ix == $current_page){\n $pages[$page_ix] = 'current';\n } else {\n $pages[$page_ix] = $page_ix;\n } \n $page_ix++;\n }\n return $pages;\n}",
"private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function _getSelectedPageNumbers($current_page, $last_page)\n{\n //-----------//\n // constants //\n //-----------//\n\n //defines the offset pattern to repeat for each level of $base\n //array(1, 2, 5) will make offsets into 1, 2, 5, 10, 20, 50, etc.\n //array(1, 5) will make offsets into 1, 5, 10, 50, 100, 500, etc.\n $multipliers = array(1, 2, 5);\n\n $base = 10; //10 looks best\n\n //----------------//\n // initialization //\n //----------------//\n $exponent = 0;\n $pages = array($current_page => 0);\n $offsets = array();\n $offset = 1;\n $multiplier = reset($multipliers);\n $max_offset = $last_page - $current_page;\n if($current_page > $max_offset){\n $max_offset = $current_page;\n }\n\n //calculate offsets that increase (semi-)logarithmically\n while($offset <= $max_offset){\n $offset = $multiplier * pow($base, $exponent);\n $offsets[] = $offset;\n if(!($multiplier = next($multipliers))){\n $multiplier = reset($multipliers);\n $exponent++;\n }\n }\n\n foreach($offsets as $offset){\n if(0 == $offset){\n $pages[$pagenum] = 'current';\n } else {\n $exact_pagenum = $current_page - $offset;\n $adj_pagenum = round($exact_pagenum / $offset) * $offset;\n if($adj_pagenum > 0){\n $pages[$adj_pagenum] = $offset;\n }\n\n $exact_pagenum = $current_page + $offset;\n $adj_pagenum = round($exact_pagenum / $offset) * $offset;\n if($adj_pagenum <= $last_page){\n $pages[$adj_pagenum] = $offset;\n }\n }\n }\n\n if(!isset($pages[1])){\n $pages[1] = 'first';\n }\n if(!isset($pages[$last_page])){\n $pages[$last_page] = 'last';\n }\n $pages[$current_page] = 'current';\n\n ksort($pages);\n return $pages;\n\n}",
"private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }",
"public function getPages();",
"public function generatePHPPaginator()\n {\n $sHTML = '';\n \n $iNumOfPages = ceil($this->iLength / $this->iNumOfPosAtPage);\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=1\"><</a></li>';\n \n for($i = 0;$i < $iNumOfPages;$i++)\n {\n if(($i + 1) == $this->iActualPage)\n {\n $sHTML .= '<li class=\"active\"><a href=\"?' . $this->sActualParams . '&p=' . $this->iActualPage . '\">' . ($i + 1) . '</a></li>';\n }\n else\n {\n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . ($i + 1) . '\">' . ($i + 1) . '</a></li>';\n }\n }\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . $iNumOfPages . '\">></a></li>';\n \n $this->oTemplate->assign['paginator'] = $sHTML;\n $this->oTemplate->assign['scripts-path'] = SCRIPTS_PATH;\n \n return $this->oTemplate->parse(INCLUDES_PATH . 'paginator.html');\n }",
"public function getPageNumber() {}",
"public function getPageNumber() {}",
"public function generate($strSeparator = '')\n {\n $this->determineValues();\n\n // Return if there is only one page\n if ($this->intTotalPages < 2 || $this->intRows < 1) {\n return '';\n }\n\n if ($this->intPage == -1) {\n return '';\n }\n\n $template = new TwigFrontendTemplate('pagination');\n\n $template->hasFirst = $this->hasFirst();\n $template->hasPrevious = $this->hasPrevious();\n $template->hasNext = $this->hasNext();\n $template->hasLast = $this->hasLast();\n\n $template->items = $this->getItems();\n $template->page = $this->intPage;\n $template->total = $this->intTotalPages;\n\n $template->first = array\n (\n 'page' => 1,\n 'link' => $this->lblFirst,\n 'href' => $this->arrLinks[0],\n );\n\n $template->previous = array\n (\n 'page' => $this->intPage - 1,\n 'link' => $this->lblPrevious,\n 'href' => $this->arrLinks[($this->intPage - 2)],\n );\n\n $template->next = array\n (\n 'page' => $this->intPage + 1,\n 'link' => $this->lblNext,\n 'href' => $this->arrLinks[$this->intPage],\n );\n\n $template->last = array\n (\n 'page' => $this->intTotalPages,\n 'link' => $this->lblLast,\n 'href' => $this->arrLinks[(count($this->arrLinks) - 1)],\n );\n\n $this->setHeadTags();\n\n return $template->parse();\n }",
"public function getItemsAsString($strSeparator=' ')\n\t{\n\t\t$arrLinks = array();\n\n\t\t$intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n\t\t$intFirstOffset = $this->intItem - $intNumberOfLinks - 1;\n\n\t\tif ($intFirstOffset > 0)\n\t\t{\n\t\t\t$intFirstOffset = 0;\n\t\t}\n\n\t\t$intLastOffset = $this->intItem + $intNumberOfLinks - $this->intTotalItems;\n\n\t\tif ($intLastOffset < 0)\n\t\t{\n\t\t\t$intLastOffset = 0;\n\t\t}\n\n\t\t$intFirstLink = $this->intItem - $intNumberOfLinks - $intLastOffset;\n\n\t\tif ($intFirstLink < 1)\n\t\t{\n\t\t\t$intFirstLink = 1;\n\t\t}\n\n\t\t$intLastLink = $this->intItem + $intNumberOfLinks - $intFirstOffset;\n\n\t\tif ($intLastLink > $this->intTotalItems)\n\t\t{\n\t\t\t$intLastLink = $this->intTotalItems;\n\t\t}\n\n\t\tfor ($i=$intFirstLink; $i<=$intLastLink; $i++)\n\t\t{\t\n\t\t\tif ($i == $this->intItem)\n\t\t\t{\n\t\t\t\t$arrLinks[] = sprintf('<li class=\"active\"><span class=\"current active\">%s</span></li>',\n\t\t\t\t\t\t\t\t\t '<span class=\"index\">' . $i . '</span>' . '<span class=\"title\">' . $this->getItemTitle($i) . '</span>');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t$arrLinks[] = sprintf('<li><a href=\"%s\" class=\"link\" title=\"%s\">%s</a></li>',\n\t\t\t\t\t\t\t\t$this->linkToItem($i),\n\t\t\t\t\t\t\t\tsprintf(specialchars($GLOBALS['TL_LANG']['MSC']['readerpaginations']['goTo']), $this->getItemTitle($i)),\n\t\t\t\t\t\t\t \t '<span class=\"index\">' . $i . '</span>' . '<span class=\"title\">' . $this->getItemTitle($i) . '</span>'\n\t\t\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn implode($strSeparator, $arrLinks);\n\t}",
"public function pageNumbers($rowCount, $perPage, $pageRange, $rangeLimit, $page, $return=false, $additionalString='')\n\t{\n\t\tif($page == null OR $page == 0) $page = 1;\n\t\tif(!$perPage) $perPage = 100;\n\t\tif($page == 1) $pageRange = $pageRange + 2;\n\t\t$totalPages = ceil($rowCount/$perPage);\n\t\t$rangeLimit = ceil($pageRange/2);\n\t\t$output = '';\n\n\t\t$output .= '\n\t\t<div class=\"Pages\">\n\t\t\t<div class=\"Paginator\"> <b>Pages</b>\n\t\t\t';\n\n\t\tif($page > $rangeLimit)\n\t\t\t$output .= \"<a href='$PHP_SELF?page=1\".$additionalString.\"' class='Prev'>< First</a>\n\t\t\t<span class='break'>...</span>\n\t\t\t\"; \n\t\t\t\n\t\t\t\n\n\t\tfor($pageCounter=1; $pageCounter <= $totalPages; $pageCounter++)\n\t\t{\n\t\t\tif($pageCounter > $page - $rangeLimit AND $pageCounter < $page + $rangeLimit)\n\t\t\t{\n\t\t\t\tif($page == $pageCounter)\n\t\t\t\t\t$output .= \"<span class='this-page'>$pageCounter</span>\n\t\t\t\t\t\t\";\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($totalPages != 1)\n\t\t\t\t\t\t$output .= \"<a href='$PHP_SELF?page=$pageCounter\".$additionalString.\"'>$pageCounter</a>\n\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($totalPages > $page + $pageRange)\n\t\t\t$output .= \"<span class='break'>...</span>\n\t\t\t\"; \n\n\t\tif($page < $totalPages - $rangeLimit AND $totalPages > $rangeLimit)\n\t\t\t$output .= \"<a href='$PHP_SELF?page=$totalPages\".$additionalString.\"' class='Next'>Last ></a>\n\t\t\t\"; \n\t\t//status=$status& <- removed 2007-03-26\n\n\t\t$output .= \"\n\t\t\t</div>\n\t\t</div>\n\t\t\";\n\t\tif($rowCount>1)\n\t\t{\n\t\t\tif($return) return $output;\n\t\t\telse echo $output;\n\t\t}\n\t}",
"function numbered_in_page_links( $args = array () )\n{\n $defaults = array(\n 'before' => '<div class=\"page-links\"><i class=\"icon-menu-3 pageLinksToggle\"></i><ul class=\"subpage-list\">' \n , 'after' => '</ul></div>'\n , 'link_before' => '<li>'\n , 'link_after' => '</li>'\n , 'pagelink' => '%'\n , 'echo' => 1\n // element for the current page\n , 'highlight' => 'b'\n );\n\n $r = wp_parse_args( $args, $defaults );\n $r = apply_filters( 'wp_link_pages_args', $r );\n extract( $r, EXTR_SKIP );\n\n global $page, $numpages, $multipage, $more, $pagenow;\n\n if ( ! $multipage )\n {\n return;\n }\n\n $output = $before;\n\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\n {\n $j = str_replace( '%', $i, $pagelink );\n $output .= ' ';\n\n if ( $i != $page || ( ! $more && 1 == $page ) )\n {\n $output .= \"{$link_before}\". _wp_link_page( $i ) . \"{$j}</a>{$link_after}\";\n }\n else\n { // highlight the current page\n // not sure if we need $link_before and $link_after\n $output .= \"{$link_before}<$highlight>{$j}</$highlight>{$link_after}\";\n }\n }\n\n print $output . $after;\n}",
"public function pages()\n\t{\n\t\treturn ceil($this->_count_total / $this->config['total_items']);\n\t}",
"function get_all_page_ids()\n {\n }",
"public function getNombrePages() \r\n\t{\r\n\t\tvar_dump($this->_db);\r\n\t\treturn ceil(count($this->_db)/self::NOMBRE_PAR_PAGE);\r\n\t\t\r\n\t\t//return $aBiere[$nPage-1];\r\n\t}",
"function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }",
"public function rangeToPaginate()\n {\n $pages = array();\n\n if ( $this->lastPage <= $this->maxPagesToList) {\n for ($i = 1; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else if ($this->currentPage <= floor($this->maxPagesToList/2)+1) {\n for ($i = 1; $i <= $this->maxPagesToList; $i++) {\n $pages[] = $i;\n }\n } else if ($this->lastPage <= floor($this->maxPagesToList/2)+$this->currentPage) {\n $begin = $this->lastPage - $this->maxPagesToList + 1;\n for ($i = $begin; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else {\n $begin = $this->currentPage - floor($this->maxPagesToList/2);\n $end = $this->currentPage + floor($this->maxPagesToList/2);\n for ($i = $begin; $i <= $end; $i++) {\n $pages[] = $i;\n }\n }\n return $pages;\n\n }",
"function show_pages($amount, $rowamount, $id = '') {\n if ($amount > $rowamount) {\n $num = 8;\n $poutput = '';\n $lastpage = ceil($amount / $rowamount);\n $startpage = 1;\n\n if (!isset($_GET[\"start\"]))\n $_GET[\"start\"] = 1;\n $start = $_GET[\"start\"];\n\n if ($lastpage > $num & $start > ($num / 2)) {\n $startpage = ($start - ($num / 2));\n }\n\n echo _('Show page') . \":<br>\";\n\n if ($lastpage > $num & $start > 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start - 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ < ]';\n $poutput .= '</a>';\n }\n if ($start != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=1';\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ 1 ]';\n $poutput .= '</a>';\n if ($startpage > 2)\n $poutput .= ' .. ';\n }\n\n for ($i = $startpage; $i <= min(($startpage + $num), $lastpage); $i++) {\n if ($start == $i) {\n $poutput .= '[ <b>' . $i . '</b> ]';\n } elseif ($i != $lastpage & $i != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $i;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $i . ' ]';\n $poutput .= '</a>';\n }\n }\n\n if ($start != $lastpage) {\n if (min(($startpage + $num), $lastpage) < ($lastpage - 1))\n $poutput .= ' .. ';\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $lastpage;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $lastpage . ' ]';\n $poutput .= '</a>';\n }\n\n if ($lastpage > $num & $start < $lastpage) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start + 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ > ]';\n $poutput .= '</a>';\n }\n\n echo $poutput;\n }\n}",
"public function getPageNumber();",
"public function getPageNumber();",
"public function pagination_numbers_set(){\n\t\t\t$this->pages_show_array = array();\n\t\t\t$this->pages_show_array['middle'] = array();\n\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t$this->pages_show_array['first'] = null;\n\t\t\t$this->pages_show_array['last'] = null;\n\n\t\t\t\n\t\t\tfor ($i=0; $i < sizeof($this->pages_array) ;$i++){\n\n\t\t\t\t//first iteration\n\t\t\t\tif ($i == 0){\n\t\t\t\t\t//prev\n\t\t\t\t\tif ($this->current_page <= 1){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->total_pages - 1;\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$this->pages_show_array['prev'] = $this->current_page - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->current_page > $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['first'] = \"1 ...\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t\t//last iteration\n\t\t\t\telse if ($i == sizeof($this->pages_array)-1){\n\n\t\t\t\t\tif ($this->current_page < $this->total_pages - $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['last'] = \"...\" . $this->total_pages;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//next\n\t\t\t\t\tif ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['next'] = $this->current_page + 1;\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//middle iterations\n\t\t\t\telse {\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (empty($this->pages_show_array['next'])){\n\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t}\n\t\t\t\n\n\t\t}",
"protected function num() {\n $this->siblings = $this->siblings->not($this->page)->sortBy('num', 'asc');\n\n // special keywords and sanitization\n if($this->to == 'last') {\n $this->to = $this->siblings->count() + 1;\n } else if($this->to == 'first') {\n $this->to = 1;\n } else if($this->to === false) {\n $this->to = false;\n } else if($this->to < 1) {\n $this->to = 1; \n }\n\n // start the index\n $n = 0;\n\n if($this->to === false) {\n foreach($this->siblings as $sibling) {\n $n++; $sibling->_sort($n);\n }\n } else {\n\n // go through all items before the selected page\n foreach($this->siblings->slice(0, $this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n // add the selected page\n $n++; $this->page->_sort($n);\n\n // go through all the items after the selected page\n foreach($this->siblings->slice($this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n }\n\n }",
"public function page_links()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pagination = '';\n\t\t\n\t\t// Let's get the starting page number, this is determined using num_links\n\t\t$start = (($this->current_page - $this->num_links) > 0) ? $this->current_page - ($this->num_links - 1) : 1;\n\n\t\t// Let's get the ending page number\n\t\t$end = (($this->current_page + $this->num_links) < $this->total_pages) ? $this->current_page + $this->num_links : $this->total_pages;\n\n\t\tfor ($i = $start; $i <= $end; $i++)\n\t\t{\n\t\t\t$text = $i;\n\t\t\t$url = '#';\n\t\t\t$state = $this->template['state']['current_page'];\n\n\t\t\tif ($this->current_page != $i)\n\t\t\t{\n\t\t\t\t// detect if anchor attribute is presented in the template \n\t\t\t\tif (stripos('<a ', $this->template['page_start']) < 0)\n\t\t\t\t{\n\t\t\t\t\t$text = '<a href=\":url\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$url = $this->build_url($i);\n\t\t\t\t$state = '';\n\t\t\t}\n\n\t\t\t$pagination .= Str::tr($this->template['page_start'].$text.$this->template['page_end'], array(\n\t\t\t\t'state' => $state,\n\t\t\t\t'url' => $url,\n\t\t\t));\n\t\t}\n\n\t\treturn $pagination;\n\t}",
"public function view()\n {\n $pages = explode(' ', $this->list);\n\n if ($this->current_page < 1 || $this->current_page > $this->total_pages) {\n $this->current_page = 1;\n }\n $output = null;\n\n $output .= '<ul class=\"pagination\">';\n $output .= $this->beginning();\n $output .= $this->middle($pages);\n $output .= $this->ending();\n $output .= '</ul>';\n \n return $output;\n }",
"public function getPages() {}",
"function getPageSegment($separator = null, $offset = 0) {\n $page = $this->getCurrentPage();\n if (!$separator) {\n if (file_exists($this->getPagePath($page))) {\n require_once $this->getPagePath($page);\n }\n return;\n }\n $path = $this->getPagePath($page);\n $string = file_get_contents($path);\n $segments = explode($separator, $string);\n if(array_key_exists($offset, $segments)){\n $segment = $segments[$offset];\n if (substr($segment, 0, 5) !== \"<?php\") {\n $segment = \"?>\" . $segment;\n }\n eval($segment);\n }\n }",
"public function getPerPage();",
"public function get_pages($total,$current,$nb_per_page,$rub,$array_submitted=array())\n {\n $str_return = '';\n $arr_return = '';\n \n $get = '';\n \n foreach($array_submitted as $keysubmitted => $valuesubmitted)\n {\n if(!empty($valuesubmitted))\n {\n $get .= strtolower('&'.$keysubmitted.'='.$valuesubmitted);\n }\n }\n \n if($total>$nb_per_page)\n {\n $nbpage = ceil($total/$nb_per_page);\n\n if($current>1)\n {\n $prec = $current-1;\n $href = \"index.php?rub=\".$rub.\"&p=\".$prec.$get;\n\n $arr_return[] = array('link' => $href, 'number' => 'fa fa-arrow-left', 'active' => 0, 'bnumber' => 0);\n }\n\n if($nbpage <10)\n {\n $linkstart = 1;\n $linkstop = $nbpage;\n }\n else if($current<=5)\n { \n $linkstart = 1;\n $linkstop = 10;\n }\n else if( $current>5 && $current<($nbpage-5) )\n { \n $linkstart = $current-4;\n $linkstop = $current+5;\n }\n else if( $current>=($nbpage-5) )\n { \n $linkstart = $nbpage-9;\n $linkstop = $nbpage;\n }\n \n\n for($ipage=$linkstart;$ipage<=$linkstop;$ipage++)\n {\n $href = \"index.php?rub=\".$rub.\"&p=\".$ipage.$get; \n if($current==$ipage)\n {\n $arr_return[] = array('link' => '#', 'number' => $ipage, 'active' => 1, 'bnumber' => 1);\n }\n else\n {\n $arr_return[] = array('link' => $href, 'number' => $ipage, 'active' => 0, 'bnumber' => 1);\n }\n }\n\n if($current<$nbpage)\n {\n $suiv = $current+1;\n $href = \"index.php?rub=\".$rub.\"&p=\".$suiv.$get;\n\n $arr_return[] = array('link' => $href, 'number' => 'fa fa-arrow-right', 'active' => 0, 'bnumber' => 0);\n }\n \n \n } \n return $arr_return;\n }",
"private function retrieve_pagenumber() {\n\t\t$replacement = null;\n\n\t\t$nr = $this->determine_pagenumbering( 'nr' );\n\t\tif ( isset( $nr ) && $nr > 0 ) {\n\t\t\t$replacement = (string) $nr;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"public function getPaginated();",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"function numbered_in_page_links( $args = array () )\r\n{\r\n $defaults = array(\r\n 'before' => '<p>' . __('Pages:', 'framework')\r\n , 'after' => '</p>'\r\n , 'link_before' => ''\r\n , 'link_after' => ''\r\n , 'pagelink' => '%'\r\n , 'echo' => 1\r\n // element for the current page\r\n , 'highlight' => 'span'\r\n );\r\n\r\n $r = wp_parse_args( $args, $defaults );\r\n $r = apply_filters( 'wp_link_pages_args', $r );\r\n extract( $r, EXTR_SKIP );\r\n\r\n global $page, $numpages, $multipage, $more, $pagenow;\r\n\r\n if ( ! $multipage )\r\n {\r\n return;\r\n }\r\n\r\n $output = $before;\r\n\r\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\r\n {\r\n $j = str_replace( '%', $i, $pagelink );\r\n $output .= ' ';\r\n\r\n if ( $i != $page || ( ! $more && 1 == $page ) )\r\n {\r\n $output .= _wp_link_page( $i ) . \"{$link_before}{$j}{$link_after}</a>\";\r\n }\r\n else\r\n { // highlight the current page\r\n // not sure if we need $link_before and $link_after\r\n $output .= \"<$highlight>{$link_before}{$j}{$link_after}</$highlight>\";\r\n }\r\n }\r\n\r\n print $output . $after;\r\n}",
"function render_block_core_query_pagination_numbers($attributes, $content, $block)\n {\n }",
"public function getPaginationHtml();",
"public function numbers(array $options = []): string\n {\n $paging = $this->params();\n\n $first = $last = $current = 1;\n\n if ($paging) {\n $first = $paging['current'] > 5 ? ($paging['current'] - 4) : 1;\n $last = $first + 7;\n if ($last > $paging['pages']) {\n $last = $paging['pages'];\n }\n $current = $paging['current'];\n }\n\n $output = '';\n $query = $this->request()->query();\n for ($i = $first; $i < $last + 1; ++$i) {\n $template = 'number';\n if ($current == $i) {\n $template = 'numberActive';\n }\n $query['page'] = $i;\n\n $options['url'] = $this->request()->path() . '?' . http_build_query($query);\n $options['text'] = $i;\n $output .= $this->templater()->format($template, $options);\n }\n\n return $output;\n }",
"function get_page_number() {\n\t if ( get_query_var('paged') ) {\n\t print ' | ' . __( 'Page ' , 'hbd-theme') . get_query_var('paged');\n\t }\n\t}",
"function show_page_links($base_url, $num_items, $per_page, $page)\n{\n //$base_url contains the address of the page and the order it is called with\n //e.g., 'asc' or 'desc' - the page handles this so we have to worry about it.\n\n $total_pages = ceil($num_items/$per_page);\n\n if ($total_pages == 1)\n {\n return '';\n }\n\n //initialize our $page_string variable wich will hold the links\n $page_string = '<p><span class=\"page_numbers\">';\n\n //SHOW UP TO 4 LINKS ON EITHER SIDE OF THE CURRENT PAGE\n\n //get the number of page links are available after the current page\n $num_succeeding_links = $total_pages - $page;\n\n //get the number of preceding links available before the current page\n $num_preceding_links = $page -1;\n\n //calculate our start and end values\n $start = $page - 4;\n if ( $start < 1)\n {\n $start = 1;\n }\n //if we have less than 10 total_page, use the number we have ($total_pages)\n $end = $total_pages;\n //but if end is more than 9 higher than $start, make $end 9 higher than $start\n //we only want to show 10 records per page (e.g., 1..10)\n if ( ($end - $start) > 9 )\n {\n $end= $start + 9;\n }\n\n //if the total number of succeeding links exceeds 4 show 4 and a >> at the end\n //the >> at the end is just the 5th succeeding link\n //do the same for preceding links if they are more than 4\n if ($total_pages > 10 && $page > 1) //don't show first page link except when we're not the first page\n {\n //create a << which points to the first page\n $page_string .= '<a title=\"first page\" href=\"'.$base_url.'&page=1\"><<</a> ';\n //create a < which points to the current page -1 (shifts us left one)\n $val = $page-1;\n $page_string .= '<a title=\"previous page\" href=\"'.$base_url.'&page='.$val.'\"><</a> ';\n }\n for ($i=$start; $i<=$end; $i++)\n {\n if ($i == $page)\n {\n $page_string .= \" <b>[$i]</b> \";\n }\n else\n {\n $page_string .= ' <a title=\"page ' . $i . '\" href=\"'.$base_url.'&page='.$i.'\">'.$i.'</a> ';\n }\n }\n if ($total_pages > 10 && $page < $total_pages) //don't show last page link except when we're not on the last page\n {\n //create a > which points to the current page +1 (shifts us right one)\n $val = $page + 1;\n $page_string .= ' <a title=\"next page\" href=\"'.$base_url.'&page='.$val.'\">></a>';\n\n //create a >> which point to the last page\n $page_string .= ' <a title=\"last page\" href=\"'.$base_url.'&page='.$total_pages.'\">>></a> ';\n }\n\n $page_string .= '</span></p>';\n\n return $page_string;\n\n}",
"public function get_pagenum()\n {\n }",
"public function getNombrePages() \r\n\t{\r\n\t\treturn ceil(count($this->_bieres)/self::NOMBRE_PAR_PAGE);\r\n\t}",
"private function compilePager() {\n \t\n \t\n \t$this->_tmp_page = '<p '.$this->_config['css_page'].'>';\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].'1\">'.$this->_config['first'].'</a>';\n \t}\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] - 1).'\">'.$this->_config['previous'].'</a>';\n \t}\n \t\n \tif ($this->_all_page <= $this->_config['scr_page']) {\n \tif($this->_config['all_recs'] <= $this->_config['per_page']) {\n \t$this->_start = 1;\n $this->_stop = $this->_all_page;\n } else {\n \t\t$this->_start = 1;\n $this->_stop = $this->_all_page;\n }\n } else {\n \tif($this->_config['cur_page'] < intval($this->_config['scr_page'] / 2) + 1) {\n\t $this->_start = 1; \n\t \t$this->_stop = $this->_config['scr_page'];\n } else {\n \t$this->_start = $this->_config['cur_page'] - intval($this->_config['scr_page'] / 2);\n $this->_stop = $this->_config['cur_page'] + intval($this->_config['scr_page'] / 2);\n if($this->_stop > $this->_all_page) $this->_stop = $this->_all_page;\n }\n }\n if ($this->_all_page > 1) {\n\t for ($i = $this->_start; $i <= $this->_stop; $i++) {\n\t \tif ($i == $this->_config['cur_page']) {\n\t \t$this->_tmp_page .= '<span '.$this->_config['act_page'].'>'.$i.'</span>';\n\t } else {\n\t $this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$i.'\">'.$i.'</a>';\n\t }\n\t }\n }\n \n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] + 1).'\">'.$this->_config['next'].'</a>';\n \t}\n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$this->_all_page.'\">'.$this->_config['last'].'</a>';\n \t}\n \treturn $this->_tmp_page.'</p>';\n }",
"public function numbers(array $options = [])\n {\n $class = 'pagination';\n\n $options += [\n 'class' => $class,\n 'after' => '</ul>',\n 'size' => null,\n ];\n\n $options['class'] = implode(' ', (array)$options['class']);\n\n if (!empty($options['size'])) {\n $options['class'] .= \" {$class}-{$options['size']}\";\n }\n\n $options += [\n 'before' => '<ul class=\"' . $options['class'] . '\">',\n ];\n\n unset($options['class'], $options['size']);\n\n if (isset($options['prev'])) {\n if ($options['prev'] === true) {\n $options['prev'] = $this->config('labels.prev');\n }\n $options['before'] .= $this->prev($options['prev'], ['escape' => false]);\n }\n\n if (isset($options['next'])) {\n if ($options['next'] === true) {\n $options['next'] = $this->config('labels.next');\n }\n $options['after'] = $this->next($options['next'], ['escape' => false]) . $options['after'];\n }\n\n return parent::numbers($options);\n }",
"public function getGridPerPageValues()\n {\n return explode(\",\", $this->_klevuConfig->getCatalogGridPerPageValues());\n }",
"public static function paginationList(array $params, View $view): string\n {\n $pagination = $view['pagination'];\n if (!($pagination instanceof Pagination)) {\n trigger_error(__FUNCTION__ . '(): No Pagination object set', E_USER_ERROR);\n }\n\n if (!isset($params['url'])) {\n return '';\n }\n\n $str = '';\n $delimiter = $params['delimiter'] ?? ' ';\n $urlParams = $pagination->generateUrlParamsString($params);\n $pageList = $pagination->getPageList();\n $current = $pagination->getCurrentPage();\n foreach ($pageList as $page) {\n $str .= ($page == $current)\n ? $page\n : '<a href=\"' . $params['url'] . '?page=' . $page . $urlParams . '\">' . $page . '</a>';\n $str .= $delimiter;\n }\n $str = substr($str, 0, -strlen($delimiter));\n\n return $str;\n }",
"function get_pageNavHtml($page, $totalPages, $urlPrefix, $showPagesNums = 11)\n{\n if ($totalPages <= 0 || $page <= 0)\n return \"\";\n if ($showPagesNums <3 || $showPagesNums%2 === 0)\n return \"\";\n $pageNavHtml = \"\";\n\n $sideShowPages = floor($showPagesNums/2);\n $start = ($page - $sideShowPages) > 1? $page-$sideShowPages : 1;\n $end = ($page + $sideShowPages) < $totalPages? $page+$sideShowPages : $totalPages;\n\n for ($i = $start; $i<=$end; $i++)\n {\n $eachPageUrl = $urlPrefix.\"page=\".$i;\n $pageNavHtml .= \"<a href='$eachPageUrl' id='page_num_$i'>$i</a> \";\n }\n return $pageNavHtml;\n}",
"private function retrieve_page() {\n\t\t$replacement = null;\n\n\t\t$max = $this->determine_pagenumbering( 'max' );\n\t\t$nr = $this->determine_pagenumbering( 'nr' );\n\t\t$sep = $this->retrieve_sep();\n\n\t\tif ( $max > 1 && $nr > 1 ) {\n\t\t\t/* translators: 1: current page number, 2: total number of pages. */\n\t\t\t$replacement = sprintf( $sep . ' ' . __( 'Page %1$d of %2$d', 'wordpress-seo' ), $nr, $max );\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function pager($margin=10)\n {\n $path = $_GET;\n $newpath = $PHP_SELF.\"?\";\n foreach($path as $key => $value)\n {\n if($key!=$this->getvar)\n {\n $newpath .= $key.\"=\".$value;\n $newpath .=\"&\";\n }\n }\n $newpath .= $this->getvar;\n\n $linkpaths = array();\n $current = $this->start / $this->length + 1;\n $pages = ceil(($this->rows/$this->length));\n $pagerstart = $current-$margin;\n $pagerstart = ($pagerstart<1)?1:$pagerstart;\n $pagerend = $current+$margin;\n \n $pagerend = ( $pagerend > $pages ) ? ( ceil( ( $this->rows / $this->length ) ) ): $pagerend;\n\n for($i=$pagerstart;$i < ($pagerend+1);$i++)\n {\n $linkpaths[$i] = $newpath.\"=\".($i);\n }\n if($linkpaths[($current+1)]!=null)\n {\n $linkpaths['next']=$linkpaths[($current+1)];\n }\n if($linkpaths[($current-1)]!=null)\n {\n $linkpaths['last']=$linkpaths[($current-1)];\n }\n return $linkpaths;\n }",
"function register_block_core_query_pagination_numbers()\n {\n }",
"public function getPages()\n\t{\n\t\treturn $this->getOptionData('tl_page');\n\t}",
"public function paginate_numbers($count_of_entries, $items_per_page, $current_page, $pages_to_show){\n\t\t\t$this->pages_array = array();\n\t\t\t\n\t\t\t$this->pages_to_show = $pages_to_show;\n\t\t\t$this->current_page = $current_page;\n\t\t\t\n\t\t\t//ceiling to round fraction up to nearest whole number - total number of pages also = last page number\n\t\t\t$this->total_pages = ceil($count_of_entries / $items_per_page);\n\t\t\t\n\t\t\t//if the total number of pages is fewer than the limit, return only those pages\n\t\t\tif ($this->total_pages < $pages_to_show){\n\t\t\t\tfor ($i=0; $i < $this->total_pages;$i++){\n\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t//if the current page is less than the number of pages to show, then only show the first amount of pages to show\n\t\t\t\tif ($this->current_page < $pages_to_show){\n\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//if the current page is not in the first batch of pages:\n\t\t\t\telse {\n\n\t\t\t\t\tif ($this->total_pages - $this->current_page < $pages_to_show){\n\n\t\t\t\t\t\t//with x pages of the last page\n\t\t\t\t\t\t$setpage = $this->total_pages - $pages_to_show+1;\n\t\t\t\t\t\t$counter = $pages_to_show;\n\n\t\t\t\t\t\tfor ($i=0; $i < $counter; $i++){\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//nowhere near the last page\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$setpage = $this->current_page - ($pages_to_show / 2);\n\t\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\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}\n\n\t\t\t\n\t\t\t\n\n\t\t}",
"static function explodeUrl($path, $separator)\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'return url parameters',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $pages = array();\n $params = array();\n\n foreach ($path as $value) {\n if (preg_match('#[' . $separator . ']{1}#', $value)) {\n $params[] = $value;\n } elseif ($value) {\n $pages[] = $value;\n }\n }\n\n return array('pages' => $pages, 'params' => $params);\n }",
"function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }",
"function getPagingSup($refUrl, $aryOpts, $pgCnt, $curPg) {\n if (in_array('[__atuvc]', $aryOpts)) {\n unset($aryOpts[array_search('[__atuvc]')]);\n array_values($aryOpts);\n }\n $return = '';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n //$return.='<li class=\"pre\"><a href=\"'.$refUrl.getQueryString($aryOpts).'\">First</a></li>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<li ><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"pre\">Previous</a></li>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n if ($pgCnt == $i && $curPg >= $pgCnt)\n $class.=' bordernone';\n $return.='<li class=\"' . $class . '\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.=' active';\n $return.='\" >' . $i . '</a></li>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<li class=\"last\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"nextal\">Next</a></li>';\n $aryOpts['pg'] = $pgCnt;\n //$return.='<li class=\"last\"><a href=\"'.$refUrl.getQueryString($aryOpts).'\" class=\"nextal\">Last</a></li>';\n }\n return $return;\n}",
"function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')\n{\n\tglobal $template, $user;\n\n\t// Make sure $per_page is a valid value\n\t$per_page = ($per_page <= 0) ? 1 : $per_page;\n\n\t$seperator = '<span class=\"page-sep\">' . $user->lang['COMMA_SEPARATOR'] . '</span>';\n\t$total_pages = ceil($num_items / $per_page);\n\n\tif ($total_pages == 1 || !$num_items)\n\t{\n\t\treturn false;\n\t}\n\n\t$on_page = floor($start_item / $per_page) + 1;\n\t$url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&');\n\n\t$page_string = ($on_page == 1) ? '<strong>1</strong>' : '<a href=\"' . $base_url . '\">1</a>';\n\n\tif ($total_pages > 5)\n\t{\n\t\t$start_cnt = min(max(1, $on_page - 4), $total_pages - 5);\n\t\t$end_cnt = max(min($total_pages, $on_page + 4), 6);\n\n\t\t$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;\n\n\t\tfor ($i = $start_cnt + 1; $i < $end_cnt; $i++)\n\t\t{\n\t\t\t$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($i - 1) * $per_page) . '\">' . $i . '</a>';\n\t\t\tif ($i < $end_cnt - 1)\n\t\t\t{\n\t\t\t\t$page_string .= $seperator;\n\t\t\t}\n\t\t}\n\n\t\t$page_string .= ($end_cnt < $total_pages) ? ' ... ' : $seperator;\n\t}\n\telse\n\t{\n\t\t$page_string .= $seperator;\n\n\t\tfor ($i = 2; $i < $total_pages; $i++)\n\t\t{\n\t\t\t$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($i - 1) * $per_page) . '\">' . $i . '</a>';\n\t\t\tif ($i < $total_pages)\n\t\t\t{\n\t\t\t\t$page_string .= $seperator;\n\t\t\t}\n\t\t}\n\t}\n\n\t$page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($total_pages - 1) * $per_page) . '\">' . $total_pages . '</a>';\n\n\tif ($add_prevnext_text)\n\t{\n\t\tif ($on_page != 1)\n\t\t{\n\t\t\t$page_string = '<a href=\"' . $base_url . \"{$url_delim}start=\" . (($on_page - 2) * $per_page) . '\">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string;\n\t\t}\n\n\t\tif ($on_page != $total_pages)\n\t\t{\n\t\t\t$page_string .= ' <a href=\"' . $base_url . \"{$url_delim}start=\" . ($on_page * $per_page) . '\">' . $user->lang['NEXT'] . '</a>';\n\t\t}\n\t}\n\n\t$template->assign_vars(array(\n\t\t$tpl_prefix . 'BASE_URL'\t\t=> $base_url,\n\t\t'A_' . $tpl_prefix . 'BASE_URL'\t=> addslashes($base_url),\n\t\t$tpl_prefix . 'PER_PAGE'\t\t=> $per_page,\n\n\t\t$tpl_prefix . 'PREVIOUS_PAGE'\t=> ($on_page == 1) ? '' : $base_url . \"{$url_delim}start=\" . (($on_page - 2) * $per_page),\n\t\t$tpl_prefix . 'NEXT_PAGE'\t\t=> ($on_page == $total_pages) ? '' : $base_url . \"{$url_delim}start=\" . ($on_page * $per_page),\n\t\t$tpl_prefix . 'TOTAL_PAGES'\t\t=> $total_pages,\n\t));\n\n\treturn $page_string;\n}",
"public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}",
"function paginationNames($page = 1, $page_count)\n{\n if($page < 3){\n return [\n 'first' => 1,\n 'second' => 2,\n 'third' => 3\n ];\n }elseif($page == $page_count){\n return [\n 'first' => ($page_count - 2),\n 'second' => ($page_count - 1),\n 'third' => $page_count\n ];\n }else{\n return [\n 'first' => ($page - 1),\n 'second' => $page,\n 'third' => ($page + 1)\n ];\n }\n}",
"function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}",
"public function getSeparator();",
"public function returnPaginationSerial(){\n\n return self::$oPaginator->return_pagination_serial();\n\n }",
"function get_page_number() {\n\t if ( get_query_var('paged') ) {\n\t print ' | ' . __( 'Page ' , 'deinegeestblog-theme') . get_query_var('paged');\n\t }\n\t}",
"function get_pager()\n\t{\n\t\tinclude_once('Pager/Pager.php');\n\t\t$pager_options = array();\n\t\t$pager_options['mode'] = 'Sliding';\n\t\t$pager_options['urlVar'] = 'page';\n\t\t$pager_options['delta'] = 2;\n\t\t$pager_options['perPage'] = (int) $this->rows_per_page;\n\t\t$pager_options['separator'] = '|';\n\t\t$pager_options['prev'] = '«';\n\t\t$pager_options['next'] = '»';\n\t\t$pager_options['append'] = false;\n\t\t$pager_options['fileName'] = $this->pager_file_name;\n\t\t\n\t\t$pager_options['totalItems'] = $this->totalItems;\n\t\t\n\t\t$currentPage = common::arg($this->pager_arg_no);\n\t\t//$this->content->debug .= ' currentPage: '.$currentPage .' argno: '.$this->pager_arg_no .' a:'.(int)common::arg(3);\n\t\tif (! isset($currentPage) || ! $currentPage) { $currentPage = 1; }\n\t\tif ($currentPage > ceil($this->totalItems/$this->rows_per_page)) { $currentPage = 1; }\n\t\t\n\t\t$pager_options['currentPage'] = $currentPage;\n\t\t\n\t\t$pager =& Pager::factory($pager_options);\n\t\treturn $pager->links;\n\t}",
"public function pagination() {\n\t\tglobal $post, $page, $numpages, $multipage;\n\t\t$post = $this;\n\t\t$ret = array();\n\t\tif ( $multipage ) {\n\t\t\tfor ( $i = 1; $i <= $numpages; $i++ ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link);\n\t\t\t\tif ( $i == $page ) {\n\t\t\t\t\t$data['current'] = true;\n\t\t\t\t}\n\t\t\t\t$ret['pages'][] = $data;\n\t\t\t}\n\t\t\t$i = $page - 1;\n\t\t\tif ( $i ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['prev'] = array('link' => $link);\n\t\t\t}\n\t\t\t$i = $page + 1;\n\t\t\tif ( $i <= $numpages ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['next'] = array('link' => $link);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"function wp_get_list_item_separator()\n {\n }",
"public static function links()\n\t{\n\t\t$all_pages = ceil(self::$total / self::$limit);\n\t\t$current_page = ceil(self::$offset / self::$limit);\n\n\t\t$string = '<nav class=\"paginator\"><ul>';\n\n\t\tif($current_page > 1)\n\t\t{\n\t\t\t$string .= '<li>' . self::link(\"Précédente\", ($current_page - 1) * self::$limit) . '</li>';\n\t\t}\n\n\t\t$from_page = max($current_page - 3, 0);\n\t\t$to_page = min($current_page + 3, $all_pages-1);\n\n\t\tfor($i = $from_page; $i < $to_page; $i++)\n\t\t{\n\t\t\t$string .= '<li ' . ($current_page == $i ? 'class=\"current\"' : '') . '>' . self::link($i + 1, $i * self::$limit) . '</li>';\n\t\t}\n\t\t\n\n\t\tif(($current_page + 1) !== $all_pages)\n\t\t{\n\t\t\t$string .=\"<li>...</li>\";\n\t\t\t$string .= '<li>' . self::link(round(self::$total/self::$limit)+1, round(self::$total/self::$limit)*self::$limit ) . '</li>';\n\t\t\t$string .= '<li>' . self::link(\"Suivante\", ($current_page + 1) * self::$limit) . '</li>';\n\t\t}\t\t\n\n\t\t//self::$url=preg_replace(\"/\\&offset=[0-9]*/\",\"\",self::$url);\n\t\t//$string .='<li><a href=\"' . self::$url . '?offset=' . round(self::$total/self::$limit)*self::$limit . '\"> Dernière </a>';\n\t\t$string .= '</ul></nav>';\n\t\t//$string .= self::$total . \" \" .self::$offset . \" \" . self::$url . \" \" . self::$limit;\n\n\t\treturn $string;\n\t}",
"public function get(): array\n\t{\n\t\t$roundedNumber = $this->count();\n\t\t$page = 1;\n\t\t\n\t\t$arrayPage = array();\n\t\t\n\t\tfor ($i = 0; $i < $roundedNumber; $i++) {\n\t\t\t$arrayPage[] = $page;\n\t\t\t$page++;\n\t\t}\n\t\treturn $arrayPage;\n\t}",
"function getListaPags() {\n\t\t\t\n\t\t$arrPaginas = array();\n\t\t\t\n\t\t$inf = NULL;\n\t\t$sup = NULL;\n\t\t\t\n\t\t$tmp01 = floor($this->listap/2);\n\t\t\t\n\t\t// se o highlight estiver no meio da seleção\n\t\tif ($this->pagina - $tmp01 >= 1 && $this->pagina + $tmp01 <= $this->totalp){\n\t\t\t$inf = $this->pagina-$tmp01;\n\t\t\t$sup = $this->pagina+$tmp01;\n\t\t}\n\t\telse {\n\t\t\t// se estiver no lado esquerdo\n\t\t\tif ($this->pagina - $tmp01 < 1) {\n\t\t\t\t$inf = 1;\n\t\t\t\t$sup = ($this->totalp < $this->listap) ? $this->totalp : $this->listap ;\n\t\t\t}\n\t\t\t// se estiver no lado direito\n\t\t\telse if ($this->pagina + $tmp01 > $this->totalp) {\n\t\t\t\t$inf = ($this->totalp < $this->listap) ? 1 : $this->totalp-($this->listap-1) ;\n\t\t\t\t$sup = $this->totalp;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\t\n\t\tfor ($x=$inf,$y=0;$x<=$sup;$x++,$y++) {\n\t\t\t$arrPaginas[$y] = $x;\n\t\t}\n\t\t\n\t\treturn $arrPaginas;\n\t\t\t\t\n\t\t// ALGORITMO LISTA DE PAGINAS - FIM\n\t}",
"function getlist($pagecount,$page)\n{\n\t$echo = \"<select size=1 class='page_select' name=page onchange=javascript:location.href='\".getparam(\"page\",\"\").\"'+this.options[this.selectedIndex].value>\";\n\tfor($i=1;$i<=$pagecount;$i++)\n\t{\n\t\t$result = $pagecount/15;\n\t\tif($i>=$page-20 && $i<=$page+15){// ||\n\t\t\t$echo .= \"<option value=$i\".($page==$i ? ' selected' : '').\">\".$i.\"</option>\";\n\t\t}elseif($i%$result ==0 || $i==1 || $i==$pagecount){\n\t\t\t$echo .= \"<option value=$i>\".$i.\"</option>\";\n\t\t}\n\t}\n\t$echo.= \"</select>\";\n\treturn $echo;\n}",
"function ubc_collab_loop_pagination( $pagination ) {\n\treturn str_replace( \"<li><span class='page-numbers current'\", \"<li class='active'><span class='page-numbers current'\", $pagination );\n\n}",
"public function getBar()\n\t{\n\t\t$neighbours = 2;\n\n\t\t$page = $this->getPageNo();\n\n\t\t$next = $page + 1;\n\t\t$lastPage = $this->getPagesTotal();\n\t\t$lpm1 = $lastPage - 1;\n\n\t\t$bar = array();\n\t\t$counter = 0;\n\n\t\tif ($lastPage < 2)\n\t\t{\n\t\t\treturn $bar;\n\t\t}\n\n\t\t$bar[] = '<ul class=\"trackerPagination\">';\n\n\t\tif ($lastPage < 7 + ($neighbours * 2))\n\t\t{\n\t\t\tfor ($counter = 1; $counter <= $lastPage; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t{\n\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($lastPage > 5 + ($neighbours * 2))\n\t\t{\n\t\t\tif ($page < 1 + ($neighbours * 2))\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($neighbours * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$bar[] = '<li class=\"dot\">...</li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lpm1) . '\">' . $lpm1 . '</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . $lastPage . '</a></li>';\n\t\t\t}\n\t\t\telseif ($lastPage - ($neighbours * 2) > $page && $page > ($neighbours * 2))\n\t\t\t{\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(1) . '\">1</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(2) . '\">2</a></li>';\n\t\t\t\t$bar[] = '<li class=\"dot\">...</li>';\n\n\t\t\t\tfor ($counter = $page - $neighbours; $counter <= $page + $neighbours; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$bar[] = '<li class=\"dot\">..</li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lpm1) . '\">' . $lpm1 . '</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . $lastPage . '</a></li>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(1) . '\">1</a></li>';\n\t\t\t\t$bar[] = '<li><a href=\"' . $this->uri(2) . '\">2</a></li>';\n\t\t\t\t$bar[] = '<li class=\"dot\">..</li>';\n\n\t\t\t\tfor ($counter = $lastPage - (2 + ($neighbours * 2)); $counter <= $lastPage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bar[] = '<li><a class=\"current\">' . $counter . '</a></li>';\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$bar[] = '<li><a href=\"' . $this->uri($counter) . '\">' . $counter . '</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($page < $counter - 1)\n\t\t{\n\t\t\t$bar[] = '<li><a href=\"' . $this->uri($next) . '\">' . g11n3t('Next') . '</a></li>';\n\t\t\t$bar[] = '<li><a href=\"' . $this->uri($lastPage) . '\">' . g11n3t('Last') . '</a></li>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bar[] = '<li><a class=\"current\">' . g11n3t('Next') . '</a></li>';\n\t\t\t$bar[] = '<li><a class=\"current\">' . g11n3t('Last') . '</a></li>';\n\t\t}\n\n\t\t$bar[] = '</ul>';\n\n\t\treturn implode(\"\\n\", $bar);\n\t}",
"protected static function handle_pagination($content) { \n\n\t\tpreg_match('/{- BEGIN PAGINATION -}.*?{- END PAGINATION -}/s', $content, $pnation);\n\n\t\t$autolink = BlogPad::has_setting('auto_link');\n\n\t\t$p_processed = '';\n\n\t\tif( !empty($pnation[0]) ) {\n\n\t\t\t$txt = $pnation[0];\n\n\t\t\tif(preg_match('/{- BEGIN COUNTDOWN -}.*?{- END COUNTDOWN -}/s', $pnation[0], $cdown) ) {\n\t\t\t\t$_cdown = str_replace('{- BEGIN COUNTDOWN -}', '<div class=\"bp-countdown\"><?php $i = 1; while($i <= $paginate[\"last_page\"]): ?>', $txt);\n\n\t\t\t\t$_cdown = preg_replace('/(.*?){- number -}(.*)/', ($autolink ? '$1<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $i, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo $i;?></a>$2': '$1<?php echo $i;?>$2'), $_cdown);\n\n\t\t\t\t$_cdown = str_replace('{- END COUNTDOWN -}', '<?php $i++; endwhile; ?></div>', $_cdown);\n\n\t\t\t\t$txt = str_replace($pnation[0], $_cdown, $txt);\n\t\t\t}\n\n\t\t\t// Support the placement of custom text that will be used as a label, else display the relevant page numbers.\n\t\t\t$rplace = preg_replace('/(.*?){- previous:?([A-z0-9\\s]+)? -}(.*)/', '<?php if( !($pagenum - 1 <= 0) ): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum - 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum - 1;?></a>': '<?php echo (trim(\"$2\" !== \"\")) ? \"$2\": $pagenum - 1;?>').'$3<?php endif;?>', $txt);\n\n\n\t\t\t$rplace = preg_replace('/(.*?){- next:?([A-z0-9\\s]+)? -}(.*)/', '<?php if($pagenum + 1 > 1 && $pagenum < $paginate[\"last_page\"]): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum + 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?></a>': '<?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?>').'$3<?php endif;?>', $rplace);\n\n\t\t\t$p_processed .= $rplace;\n\n\t\t\t$p_processed = str_replace('{- BEGIN PAGINATION -}', '<div class=\"bp-pagination\">', $p_processed);\n\t\t\t$p_processed = str_replace('{- END PAGINATION -}', '</div>', $p_processed);\n\n\t\t\t$content = str_replace($pnation[0], $p_processed, $content);\n\t\t}\n\n\t\treturn $content;\n\t}",
"static function page_list($startpage, $config, $first2last=true)\n {\n global $bodyreader;\n if ($first2last) $continue = \"next\"; \n else $continue = \"previous\";\n $items = $bodyreader->parse_advance($startpage, $config, array($continue));\n $pages[] = $startpage; \n while (!empty($items[0][$continue]))\n {\n $link = static::match_url($startpage, $items[0][$continue]);\n $pages[] = $link;\n $items = $bodyreader->parse_advance($link, $config, array($continue));\n }\n \n return $pages;\n }",
"abstract public function preparePagination();",
"function get_pagenum_link($pagenum = 1, $escape = \\true)\n {\n }",
"function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}",
"public function countPages() {\n\t\t$splitContent = explode(\"<!-- pagebreak -->\", $this->content);\t\t\n\t\treturn count($splitContent);\n\t}",
"protected function buildPagination()\n {\n $this->calculateDisplayRange();\n $pages = [];\n for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {\n $pages[] = [\n 'number' => $i,\n 'offset' => ($i - 1) * $this->itemsPerPage,\n 'isCurrent' => $i === $this->currentPage\n ];\n }\n $pagination = [\n 'linkConfiguration' => $this->linkConfiguration,\n 'pages' => $pages,\n 'current' => $this->currentPage,\n 'numberOfPages' => $this->numberOfPages,\n 'lastPageOffset' => ($this->numberOfPages - 1) * $this->itemsPerPage,\n 'displayRangeStart' => $this->displayRangeStart,\n 'displayRangeEnd' => $this->displayRangeEnd,\n 'hasLessPages' => $this->displayRangeStart > 2,\n 'hasMorePages' => $this->displayRangeEnd + 1 < $this->numberOfPages\n ];\n if ($this->currentPage < $this->numberOfPages) {\n $pagination['nextPage'] = $this->currentPage + 1;\n $pagination['nextPageOffset'] = $this->currentPage * $this->itemsPerPage;\n }\n if ($this->currentPage > 1) {\n $pagination['previousPage'] = $this->currentPage - 1;\n $pagination['previousPageOffset'] = ($this->currentPage - 2) * $this->itemsPerPage;\n }\n return $pagination;\n }",
"function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}",
"function emm_paginate_loop($start, $max, $page = 0) {\n\t$output = \"\";\n\tfor ($i = $start; $i <= $max; $i++) {\n\t\t$output .= ($page === intval($i)) \n\t\t\t? \"<li class='current'><a href='#'>$i</a></li>\" \n\t\t\t: \"<li><a href='\" . get_pagenum_link($i) . \"'>$i</a></li>\";\n\t}\n\treturn $output;\n}",
"function emm_paginate_loop($start, $max, $page = 0) {\n\t$output = \"\";\n\tfor ($i = $start; $i <= $max; $i++) {\n\t\t$output .= ($page === intval($i)) \n\t\t\t? \"<li class='current'><a href='#'>$i</a></li>\" \n\t\t\t: \"<li><a href='\" . get_pagenum_link($i) . \"'>$i</a></li>\";\n\t}\n\treturn $output;\n}",
"function paginate($perpage=50)\n\t{\n\t\tif($perpage == 0) return ''; // zero means unlimited\n\n\t\t$page = $this->page->param('p_p', 1);\n\t\t$perpage = $this->page->param('p_pp', $perpage);\n\t\t$offset = max(0,($page-1) * $perpage);\n \n\t\treturn \"$perpage OFFSET $offset\";\n\t}",
"function pager($page, $total, $pnumber, $page_link, $parameters)\n {\n $number = (int)($total/$pnumber);\n if((float)($total/$pnumber) - $number != 0) $number++;\n // Check on left links\n if($page - $page_link > 1)\n {\n echo \"<a href=$_SERVER[PHP_SELF]?page=1{$parameters}> <nobr>[1-$pnumber]</nobr></a> <em class=currentpage><nobr> ... </nobr> </em> \";\n // Have one\n for($i = $page - $page_link; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n else\n {\n // Have no\n for($i = 1; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n // Check on right links\n if($page + $page_link < $number)\n {\n // Have one\n for($i = $page; $i<=$page + $page_link; $i++)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n echo \"<em class=currentpage><nobr> ... </nobr> </em> <a href=$_SERVER[PHP_SELF]?page=$number{$parameters}> <nobr>[\".(($number - 1)*$pnumber + 1).\"-$total]</nobr></a> \";\n }\n else\n {\n // Have no\n for($i = $page; $i<=$number; $i++)\n {\n if($number == $i)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-$total] </nobr></em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}>[\".(($i - 1)*$pnumber + 1).\"-$total]</a> \";\n }\n else\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n }\n //echo \"<br><br>\";\n }",
"public function getPageAndRootline() {}",
"protected function createPageLinks()\n {\n $pageLinks = array();\n\n if ($this->totalPages > 10) {\n $startRange = $this->page - floor($this->range/2);\n $endRange = $this->page + floor($this->range/2);\n\n //Start range\n if ($startRange <= 0) {\n $startRange = 1;\n $endRange += abs($startRange) + 1;\n }\n\n // End range\n if ($endRange > $this->totalPages) {\n $startRange -= $endRange - $this->totalPages;\n $endRange = $this->totalPages;\n }\n\n // Range\n $range = range($startRange, $endRange);\n\n // Add first page\n $this->pageLinks[] = array(\n 'page' => 1,\n 'uri' => $this->createUri(1)\n );\n\n foreach ($range as $page) {\n // Skip for first and last page\n if ($page == 1 or $page == $this->totalPages) {\n continue;\n }\n\n $this->pageLinks[] = array(\n 'page' => $page,\n 'uri' => $this->createUri($page)\n );\n }\n\n // Add last page\n $this->pageLinks[] = array(\n 'page' => $this->totalPages,\n 'uri' => $this->createUri($this->totalPages)\n );\n } else {\n for ($i = 1; $i <= $this->totalPages; $i++) {\n $this->pageLinks[] = array(\n 'page' => $i,\n 'uri' => $this->createUri($i)\n );\n }\n }\n }",
"function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }",
"public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin; $i <= $end && $i <= $total_pages; $i++) {\n $pagination[] = $this->getNewPage($i);\n }\n\n if ($this->show_ends) {\n $this->addEnds($pagination);\n }\n\n return $pagination;\n }",
"function page_func(){\n\t\t?>\n\t\t\t\t<div class=\"wrap\">\n\t\t\t\t\t<div class=\"tablenav\">\n\t\t\t\t\t\t<div class=\"tablenav-pages\">\n\t\t\t\t\t\t\t<span class=\"displaying-num\">\n\t\t\t\t\t\t\t\tDisplaying 1-20 of 69\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"page-number-current\">1</span>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">2</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">3</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">4</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">5</a>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"page-numbers\">6</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t<?php \n\t\t\t}",
"#[Pure] public function generatePagination(): string\n {\n return $this->dbc->generatePagination($this->pageSize, $this->pageNumber);\n }",
"function smarty_function_pager($params, &$smarty) {\n $result = '';\n \n if (!isset($params['delta'])) {\n $params['delta'] = 3;\n }\n \n if ($params && $params['pages'] > 1) {\n $result = '<div class=\"dg_pager_container\">';\n \n if ($params['current'] > 1) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"1\">First</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] - 1).'\">Prev</a> ';\n }\n \n $pager_start = $params['current'] <= $params['delta'] ? 1 : $params['current'] - $params['delta'];\n $pager_stop = $params['current'] > $params['pages'] - $params['delta'] ? $params['pages'] : $params['current'] + $params['delta'];\n \n if ($params['current'] > $params['delta'] + 1) {\n /*for ($i = 1; $i <= $params['delta'] + 1; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n $result .= ' ... ';\n }\n \n for ($i = $pager_start; $i <= $pager_stop; ++$i) {\n if ($i == $params['current']) {\n $result .= ' <span>['.$i.']</span> ';\n } else {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }\n }\n \n if ($params['current'] < $params['pages'] - $params['delta']) {\n $result .= ' ... ';\n /*for ($i = $params['pages'] - $params['delta']; $i <= $params['pages']; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n }\n\n if ($params['current'] < $params['pages']) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] + 1).'\">Next</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$params['pages'].'\">Last</a> ';\n }\n \n $result .= '</div>';\n }\n \n return $result;\n}",
"function pager_find_page($element = 0) {\n $page = isset($_GET['page']) ? $_GET['page'] : '';\n $page_array = explode(',', $page);\n if (!isset($page_array[$element])) {\n $page_array[$element] = 0;\n }\n return (int) $page_array[$element];\n}",
"public function getItemsPerPage();",
"public function getItemsPerPage();"
] | [
"0.82875407",
"0.67474955",
"0.62342",
"0.6144174",
"0.60108674",
"0.5964183",
"0.595724",
"0.594568",
"0.5809402",
"0.5756099",
"0.56740075",
"0.55723804",
"0.5505724",
"0.5476217",
"0.5471395",
"0.54218286",
"0.54218286",
"0.54006463",
"0.5388477",
"0.53874815",
"0.5366174",
"0.5362139",
"0.53613955",
"0.5359467",
"0.5347186",
"0.5339466",
"0.5325821",
"0.53222054",
"0.53222054",
"0.53133273",
"0.52908766",
"0.527849",
"0.52779865",
"0.5274288",
"0.5269072",
"0.5230903",
"0.52183384",
"0.5215541",
"0.52143097",
"0.521247",
"0.521247",
"0.5210634",
"0.5201294",
"0.5196857",
"0.51761687",
"0.5167338",
"0.5160169",
"0.51599514",
"0.51490206",
"0.5141377",
"0.5139605",
"0.51350564",
"0.51175004",
"0.51117545",
"0.5109232",
"0.50976014",
"0.5095671",
"0.5086802",
"0.5085483",
"0.50840324",
"0.50828123",
"0.5081435",
"0.5081333",
"0.50791055",
"0.5078949",
"0.5073384",
"0.50695795",
"0.50608313",
"0.5037552",
"0.50367427",
"0.50351065",
"0.50278914",
"0.5014595",
"0.50133693",
"0.5013299",
"0.5004408",
"0.49872845",
"0.49794447",
"0.49773782",
"0.497382",
"0.49688023",
"0.49635178",
"0.49627545",
"0.49618435",
"0.4960292",
"0.49441144",
"0.49390015",
"0.49390015",
"0.49363345",
"0.49360573",
"0.49356964",
"0.4932125",
"0.4926724",
"0.49251243",
"0.49216685",
"0.4916407",
"0.49097243",
"0.49063376",
"0.49030012",
"0.49030012"
] | 0.8161145 | 1 |
Displays a link to the previous page, where the page doesn't exist then display the $text | function prevPage($text='prev')
{
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['previousPage']) )
{
if($this->style == 'ajax')
{
//$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['previousPage'],"update" => "ajax_update","method"=>"get"));
$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['previousPage'],array("update" => "ajax_update","method"=>"get"));
}
else
{
$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['previousPage'], false, false, false);
}
return $t;
}
//return '<span><strong>' . $text . '</strong></span>';
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function previous($text)\n\t{\n\t\treturn $this->backwards(__FUNCTION__, $text, $this->page - 1);\n\t}",
"function PreviousUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id - 1;\n\t\t// if id=0 this is the first article, so don't show text\n\t\tif ($new_id == 0){\n\t\t\treturn \"\";\n\t\t// jump an article because this is deleted\n\t\t}else if (file_exists($path . $new_id) == false){\n\t\t\treturn PreviousUrl($new_id, $text);\n\t\t}else{\n\t\t\t$string = '<a href=\"' . ARTICLE_HOME . '?id=' . $new_id . '\">' . $text . '</a>';\n\t\t\treturn $string;\n\t\t}\n \t}",
"public function prev(string $text = 'Previous', array $options = []): string\n {\n return $this->generateLink($text, 'prevPage', $options);\n }",
"function link_to_previous_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __('← Previous Item');\n }\n $item = get_current_record('item');\n if ($previous = $item->previous()) {\n return link_to($previous, 'show', $text, $props);\n }\n}",
"private function prev() {\n if ($this->currentPage > 1) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage - 1) . '\"><</a></li>';\n }\n }",
"private function print_previous_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( max( 1, $this->current_page - 1 ) ),\n\t\t\t__( 'Go to the previous page', 'multilingual-press' ),\n\t\t\t'prev-page' . $this->disable_first,\n\t\t\t'‹'\n\t\t);\n\t}",
"function prevPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n\t\n\t$root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the prev button should be inactive\n\tif( $currentView == 'home' ) {\n\t\treturn false;\n\t}\n\t// If we're on the credits page, the prev button should point to the last article\n\telse if( $currentView == 'credits' ) {\n\t\treturn $root . getArrayLastIndex( $activePages );\n\t}\n\n\tif( empty(nextPrevArticleName('prev')) && $currentArticlePage == '1' ){\n\t\treturn $root;\n\t} elseif( $currentArticlePage == '1' ) {\n\t\treturn $root . nextPrevArticleName('prev') . '/' . $activePages[nextPrevArticleName('prev')]['numberOfPages'];\n\t} elseif($activePages[$currentArticle]['numberOfPages'] >= $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage-1);\n\t} else {\n\t\treturn $root . $currentArticle;\t\t\n\t}\n}",
"public function getPrevious($text = null)\n {\n $text = \\Config::get('pagination::slider.prev_link_text', $text);\n $class = \\Config::get('pagination::align_simple') ? 'previous' : '';\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->currentPage <= 1) {\n $class = ltrim($class . ' ') . 'disabled';\n return '<li class=\"'.$class.'\"><span>'.$text.'</span></li>';\n } else {\n $url = $this->paginator->getUrl($this->currentPage - 1);\n return '<li class=\"'.$class.'\"><a href=\"'.$url.'\">'.$text.'</a></li>';\n }\n }",
"public function getPreviousButton($text = '<i class=\"left arrow icon\"></i>')\n {\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledTextWrapper($text);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPageLinkWrapper($url, $text, 'prev');\n }",
"public function genPrevLink()\n\t{\n\t\t$this->pagination['prevLink'] = \"\";\t\n\t\tif($this->page > 1)\n\t\t{\n\t\t\t$page = $this->page-1;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_prev',$this->prepend.$page.$this->append, '<'),\n\t\t\t\t\t\t\t\t$item);\n\t\t\t$this->pagination['prevLink'] = $item;\n\t\t}\n\t}",
"public function prev_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() - 1);\n\t}",
"public function previousAction()\n {\n $this->pageAction('goToPreviousPage');\n }",
"public static function previous()\n {\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }",
"public function getPreviousPage();",
"function adr_previous( $lang_key , $direct , $nav='' )\n{\n\tglobal $lang , $phpEx ;\n\n\t$lang_key = $lang[$lang_key];\n\t$temp = ( !$nav ) ? $direct.'.'.$phpEx : $direct.'.'.$phpEx.'?'.$nav;\n\t$direction = append_sid(\"$temp\");\n\n\t$message = $lang_key .'<br /><br />'.sprintf($lang['Adr_return'],\"<a href=\\\"\" . $direction . \"\\\">\", \"</a>\") ;\n\tmessage_die( GENERAL_MESSAGE,$message);\n}",
"function previousPage()\n\t\t{\n\t\t\tif(!$this->hasPrevious())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\t\n\t\t\t$this->currentPage--;\n\t\t}",
"public function getPrevText()\n {\n return _t(__CLASS__ . '.PREVIOUS', 'Previous');\n }",
"abstract protected function setPreviousPage();",
"public function PrevPage()\n {\n if ($this->m_CurrentPage <= 1)\n $this->m_CurrentPage = 1;\n else \n $this->m_CurrentPage--;\n return $this->ReRender();\n }",
"public function previousPage()\n {\n return$this->currentPage - 1;\n }",
"public function getPreviousPageUrl();",
"public function getPreviousPageUrl();",
"function prevPage() {\n\t\treturn $this->hasPrevPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}",
"public function hasPreviousPage();",
"public function loadPreviousPage()\n {\n $prevPage = $this->results->getPreviousPage();\n $this->search($prevPage);\n }",
"public function previousPage()\n\t{\n\t\treturn $this->getIsPreviousPageAvailable() ? parent::previousPage() : false;\n\t}",
"public function previousPageUrl()\n {\n $this->resetQuery();\n\n if ($this->currentPage() > 2) {\n $this->appends('end', session()->get('accountant.api.end'));\n }\n\n return parent::previousPageUrl();\n }",
"function goback(){\n if(is_null($_SESSION[\"LAST\"])){\n return null;\n } else{\n $ret = '<p><a href=\"../'.$_SESSION[\"LAST\"].'\">Return to whence you came</a></p>';\n }\n return $ret;\n}",
"public function previous_page(){\n if($this->current_page > 1){\n return $this->current_page - 1;\n }\n else{\n return NULL;\n }\n }",
"static function page_previous($startpage, $config)\n {\n return static::page_link($startpage, $config, \"previous\");\n }",
"public function previous($linkFormat = '<p class=\"previous\"><a href=\"%s\">previous</a></li>', $if_null = '') {\n\t\t$page = $this->_rowset->getPreviousPage();\n\t\tif (is_null($page)) {\n\t\t\treturn $if_null;\n\t\t} else {\n\t\t\t$url = $this->_view->url(array('page' => $page));\n\t\t\t$html = sprintf($linkFormat, $url, $page);\n\t\t\treturn $html;\n\t\t}\n\t}",
"function nextPrev($curpage, $pages) \n { \n $next_prev = \"\"; \n\n if (($curpage-1) <= 0) \n { \n $next_prev .= \"Previous\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage-1).\"\\\" alt=\\\"Halaman sebelumnya ...\\\">Previous</a>\"; \n } \n\n $next_prev .= \" | \"; \n\n if (($curpage+1) > $pages) \n { \n $next_prev .= \"Next\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage+1).\"\\\" alt=\\\"Halaman berikut ...\\\">Next</a>\"; \n } \n\n return $next_prev; \n }",
"function previous_post_link($format = '« %link', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"public function previousPageUrl()\n {\n $previousPage = $this->structure->getPreviousPage($this->currentPage);\n if ($previousPage) {\n return $this->structure->getUrl($this->currentPage, $previousPage);\n }\n\n return;\n }",
"protected function previousStep()\r\n {\r\n $index = array_search($this->_currentStep, array_values($this->_steps)) - 1;\r\n $this->redirect(array_values($this->_steps)[($index > 0 ? $index : 0)]);\r\n }",
"public static function prevpage(){\n\t\t// Make sure that user is not redirected back to Login, Register, ForgotPassword, etc.\n\t\t// List of Pages that user should never get redirected to when logged in\n\t\t$no_redir_pages = array(\"login\", \"register\", \"logout\", \"forgot-password\", \"resend-activation-email\", \"reset-password\", \"activate\",\n\t\t\t\t\t\t\t\t\"Login\", \"Register\", \"Logout\", \"Forgot-Password\", \"Resend-Activation-Email\", \"Reset-Password\", \"Activate\",\n\t\t\t\t\t\t\t\t\"Templates\", \"assets\");\n\t\t// Get Current Page so we have something to compair to\n\t\t$cur_page = $_SERVER['REQUEST_URI'];\n\t\t//Remove the extra forward slash from link\n\t\t$cur_page_a = ltrim($cur_page, DIR);\n\t\t// Get first part of the url (page name)\n\t\t$cur_page_b = explode('/', $cur_page_a);\n\t\t//Add current page to lang change session for redirect\n\t\t$_SESSION['lang_prev_page'] = $cur_page_a;\n\t\t// Check to see if we should log as a previous page\n\t\tif(strpos ($cur_page,\".\" ) === FALSE){\n\t\t\tif(!in_array($cur_page_b[0], $no_redir_pages)){\n\t\t\t\t$_SESSION['login_prev_page'] = $cur_page_a;\n\t\t\t}\n\t\t}\n\t}",
"public function PrevLink()\n {\n if ($this->NotFirstPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() - $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }",
"function get_previous_posts_page_link()\n {\n }",
"public function has_previous_page()\n {\n }",
"protected function _processPrevious()\n\t{\n\t\t$step = (int) $this->Session->read('Wizard.step');\n\t\t\n\t\tif( ! empty($step)){\n\t\t\t$step--;\n\t\t\t$this->_write($step);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\t\t\n\t}",
"function renderPrev($tag = '<<') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page > 1) {\r\n\t\t\treturn ' <a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page - 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn \" $tag\";\r\n\t\t}\r\n\t}",
"public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }",
"public function prevpage() {\n return $this->current_page - 1;\n }",
"function fc_pagination_prevpage($paged, $max_page, $prevpage) {\n if( $max_page > 1 && $paged > 1 )\n $pagingString = '<li class=\"prev\"><a href=\"'.get_pagenum_link($paged-1). '\">'.$prevpage.'</a></li>';\n return $pagingString;\n}",
"function previous_post($format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '')\n {\n }",
"private function prevLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('last sunday', strtotime($time . ' +1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . ' -1 week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '-1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 -1month'));\n }\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }",
"public function previousPage() {\r\n\t\t$intReturn = ($this->getCurrentPage() - 1 > 0) ? ($this->getCurrentPage() - 1) : 1;\r\n\r\n\t\treturn $intReturn;\r\n\t}",
"public function testGetPreviousPage()\n {\n $this->assertContains(\n 'subfolder/subsubfolder/subsubpage',\n $this->manifest->getPreviousPage(\n DOCSVIEWER_PATH . '/tests/docs/en/test.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n // does not leak between entities\n $this->assertNull(\n $this->manifest->getPreviousPage(\n DOCSVIEWER_PATH . '/tests/docs/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n\n // does not leak between entities\n $this->assertNull(\n $this->manifest->getPreviousPage(\n DOCSVIEWER_PATH . '\t/tests/docs/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n }",
"function thb_single_prev_custom_pagination() {\n\t\t$post = get_previous_post();\n\n\t\tif ( $post == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo \"<div class='thb-single-previous-nav-wrapper'>\";\n\t\t\techo \"<a href='\" . get_permalink( $post->ID ) . \"'>\";\n\t\t\t\techo \"<span>\" . __( 'Previous post', 'thb_text_domain' ) . \"</span>\";\n\t\t\t\techo \"<p class='thb-single-nav-title'>\" . thb_text_format( esc_html( $post->post_title ) ) . \"</p>\";\n\t\t\techo \"</a>\";\n\t\techo \"</div>\";\n\t}",
"function previous_posts_link($label = \\null)\n {\n }",
"public function previousPageTitle()\n {\n $page = $this->structure->getPreviousPage($this->currentPage);\n\n return $page ? $this->pageGuide->getTitle($page) : null;\n }",
"function smarty_function_page_back($params, &$smarty)\n{\n\t$message_2196 = $smarty->get_template_vars(message_2196);\n\treturn '<a id=\"linkbacktop_back\" href=\"javascript:history.go(-1)\" title=\"' . $message_2196 . '\">' . $message_2196 . '</a>';\n}",
"function go_back_button()\n{\n\techo'<p style=\"float: left; width:300px; font-size: 10px; line-height: 25px;\"><a class=\"button\" style=\"font-size: 10px; margin-bottom: 10px;\" href=\"http://drnonprofit.com/coaching/\">Continue Shopping</a>\n\t<br />\n\tOnly one subscription needs to be purchased at a time, additional purchases may be made after this one is completed</p>';\n}",
"function return_to_previous_url()\n{\n\tif(empty($_SERVER[\"HTTP_REFERER\"]) || basename($_SERVER[\"HTTP_REFERER\"])==\"user.php\")\n\t\t// go back to main page\n\t\t$redirect_uri = current_page_folder_url();\n\telse\n\t\t$redirect_uri = $_SERVER[\"HTTP_REFERER\"];\n\n\theader(\"Location: \" . $redirect_uri);\n}",
"protected function getPreviousUrl()\n {\n $slug = array_last($this->memory->getPageHistory());\n\n if (null === $slug || false === $slug) {\n return null;\n }\n\n if ($slug === WikiMemory::INDEX_SLUG) {\n return cms_route('wiki.page.index');\n }\n\n return cms_route('wiki.page', [ $slug ]);\n }",
"static private function historyback()\n {\n echo '<script>window.history.back();</script>';\n }",
"public function getUrlPrevious($option){\n\t\tif (strpos(URL::previous(),'search_value=')!==false){\n\t\t\t$UrlPrevious= $option .'/search?' . strstr(URL::previous(), 'search_value=');\n\t\t}else{\n\t\t\tif (strpos(Session::get('UrlPrevious'),'page=')!==false){\n\t\t\t\t$UrlPrevious= $option .'?' . strstr(Session::get('UrlPrevious'), 'page=');\n\t\t\t}else{\n\t\t\t\tif (strpos(URL::previous(),'page=')!==false){\n\t\t\t\t\t$UrlPrevious= $option .'?' . strstr(URL::previous(), 'page=');\n\t\t\t\t}else{\n\t\t\t\t\t$UrlPrevious= $option .'/';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//store in the session object the previous URL\n\t\tSession::put('UrlPrevious',$UrlPrevious);\n\t\t\n\t}",
"public function gridSetPagesUrlPrev($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_PREV', $url);\n $this->setVar('PREV_PAGE_TAG', __('Previuos page'));\n }\n }",
"public function previousEnabled(int $page): string;",
"function link_with_disabled_back_button($url, $linktext){\n print \"<a href=\\\"$url\\\"\";\n print \"ONCLICK=\\\"location.replace(this.href);return false;\\\">\";\n print $linktext . \"</a>\";\n}",
"public function getPreviousUrl() {\r\n\t\treturn $this->Session->read('history.current');\r\n\t}",
"private function createPrevPageLink($activePage)\n {\n # initialise variables\n $prevPage=1;\n $linkText=null;\n $startRecord=0;\n\n $prevPage=--$activePage;\n\n # There is no page 0 so need to disable in that case\n if(0==$prevPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">«</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&selectCounty='.$this->selectCounty;\n $linkText .= '&startRecord='.$this->startRecordArr[$prevPage];\n $linkText .= '&recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&pageNum='.$prevPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">«</span>';\n $linkText .= '<span class=\"sr-only\">'.$prevPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }",
"function hasPrevPage() {\n\t\treturn $this->hasPage($this->p - 1);\n\t}",
"function get_previous_image_link($size = 'thumbnail', $text = \\false)\n {\n }",
"public function previous(): static\n {\n $link = Arr::get($this->links, 'prev');\n\n throw_unless($link, NoPreviousPageException::class);\n\n return $this->getResults($link);\n }",
"public function previousLink($label = '<', $itemClass = 'page-item', $linkClass = 'page-link')\n {\n $html = '<li class=\"' . $itemClass . '\">';\n $html.= '<a class=\"' . $linkClass . '\" href=\"';\n $html.= $this->url . $this->previousPage . '\"';\n $html.= ($this->currentPage == 1) ? ' style=\"cursor:default;\"' : '';\n $html.= '>';\n $html.= $label;\n $html.= '</a>'; \n $html.= '</li>';\n \n return $html;\n }",
"function previous_comic_link($format, $link) {\n\tglobal $non_comic_categories;\n\tprevious_post_link($format, $link, false, $non_comic_categories);\n}",
"public function hasPreviousPage() {\n return 1 < $this->page_;\n }",
"protected function getPreviousButton()\n {\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledLink($this->previousButtonText);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPrevNextPageLinkWrapper($url, $this->previousButtonText, 'prev');\n }",
"public function back();",
"function previous_image_link($size = 'thumbnail', $text = \\false)\n {\n }",
"public function getPreviousPageNumber(): int;",
"function back() {\n if (!empty($_SERVER['HTTP_REFERER'])) {\n header('location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }\n}",
"public function getPreviousPageUrl()\n {\n return $this->previousPageUrl;\n }",
"public function hasPrevious()\n {\n return $this->curPage > 1;\n }",
"function get_previous_post_link($format = '« %link', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"public function previousPage($meta)\n {\n $response = $this->http_client->request('GET', $this->addAuthToUri($meta->previous_page_link), [\n 'headers' => [\n 'Accept' => 'application/json',\n ],\n ]);\n\n return $this->handleResponse($response);\n }",
"function hasPrevious()\n\t\t{\n\t\t\tif($this->currentPage > 1)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}",
"static public function getPrevPage() {\n\t\treturn self::$prev_page;\n\t}",
"public function getPreviousPage() {\n\t\tif (($this->currentPage - 1) <= 0) {\n\t\t\t$this->currentPage = $this->countPages();\n\t\t\treturn $this->currentPage;\n\t\t} else {\n\t\t\treturn --$this->currentPage;\n\t\t}\n\t}",
"public function getBackUrl()\n {\n $url = $this->helperWizard()->getPreviousPageUrlAsString();\n return $this->getUrl($url, array('_current' => true));\n }",
"function nextPage($text='next')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif (!empty($this->_pageDetails['nextPage']))\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['nextPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['nextPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['nextPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}",
"function get_previous_posts_link($label = \\null)\n {\n }",
"function pb_single_next_prev() {\n\t// Only show on single post pages (not plants)\n\tif( !is_singular('post') ) {\n\t\treturn;\n\t}\n\n\t$previouspost_text = __( 'Older Posts', 'lean-kickstart' );\n\t$nextpost_text = __( 'Newer Posts', 'lean-kickstart' );\n\n\techo '<div class=\"archive-pagination pagination\">';\n\t\tprevious_post_link( '<div class=\"pagination-previous alignleft\">%link</div>', $previouspost_text );\n\t\tnext_post_link( '<div class=\"pagination-next alignright\">%link</div>', $nextpost_text );\n\techo '</div>';\n}",
"function themes_button_back($url) {\n\tglobal $apps_path;\n\tif (function_exists('bindtextdomain')) {\n\t\tbindtextdomain('messages', $apps_path['plug'].'/language/');\n\t\tbind_textdomain_codeset('messages', 'UTF-8');\n\t\ttextdomain('messages');\n\t}\n\n\t$content = themes_button($url, _('Back'), 'button_back');\n\treturn $content;\n}",
"public static function previousCommentsLink($post, $label = 'load previous comments')\n {\n // check param type\n // we do this here to support manual template data overrides, such as providing an array of values\n if (!is_object($post) || 'Timber\\Post' !== get_class($post)) {\n return false;\n }\n\n $nextPageNumber = (get_query_var('cpage', 1) - 1);\n if (0 >= $nextPageNumber) {\n return false;\n }\n return '<a href=\"' .\n $post->link() . (strpos($post->link(), '?') === false ? '?' : '&') . 'cpage=' . $nextPageNumber\n . '\">' . $label . '</a>';\n }",
"public function getPreviousPage()\n\t{\n\t\treturn $this->previousPage;\n\t}",
"function previous_comments_link($label = '')\n {\n }",
"public function getPrevPage(){\r\n\t\t$page=$this->_vars['current_page'];\r\n\t\tif($page>$this->_vars['total_pages']+1) return false;\r\n\t\treturn $page>1?$page-1:false;\r\n\t}",
"function back_link($width)\n\t{\n\t\tif(empty($_POST))\n\t\t\t$_SESSION['back_page'] = $_SERVER['HTTP_REFERER'];\n\t\t\t\n\t\t\techo '<table width=\"'.$width.'\" border=\"0\" align=\"center\"><tr><td align=\"right\" valign=\"middle\"><a href=\"'.$_SESSION['back_page'].'\" title=\"'.BACK_ICON_ALT.'\"><img border=\"0\" align=\"absmiddle\" src=\"'.BACK_ICON.'\" title=\"'.BACK_ICON_ALT.'\" alt=\"'.BACK_ICON_ALT.'\">Back</a></td></tr></table>';\n\t}",
"function tyler_previous_post_link_plus( $args = '' ) {\n\t\n\treturn tyler_adjacent_post_link_plus( $args, '« %link', true );\n}",
"private function previous()\n {\n $this->m--;\n $this->init();\n }",
"function be_make_prev_next( $output, $id, $size, $permalink, $icon, $text ) {\n\tif( '« Previous Photo' == $text )\n\t\t$output = '<span class=\"prev\">' . $output . '</span>';\n\t\n\tif( 'Next Photo »' == $text )\n\t\t$output = '<span class=\"next\">' . $output . '</span>';\n\t\t\n\treturn $output;\n}",
"protected function renderBackButton() {}",
"public function has_previous_page() {\n\t\t\treturn $this->page > 1;\n\t\t}",
"public function hasPrevPage() {\n return $this->getCurPage() > self::FIRST_PAGE;\n }",
"public function has_prev()\n\t{\n\t\treturn $this->get_cur_page() > 1;\n\t}",
"public function redirectBack()\n {\n $httpReferer = $this->referer();\n $previousRoute = \\explode(\"?\", $httpReferer)[0];\n\n $this->redirect($previousRoute);\n }",
"function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}",
"private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }"
] | [
"0.7728658",
"0.761609",
"0.7378077",
"0.7298928",
"0.72882986",
"0.7176808",
"0.7164734",
"0.71109456",
"0.70618325",
"0.70093465",
"0.700824",
"0.691703",
"0.6864042",
"0.6854228",
"0.67319095",
"0.67174816",
"0.67074054",
"0.6676611",
"0.6676403",
"0.66725117",
"0.6671372",
"0.6671372",
"0.6643687",
"0.6608987",
"0.6607062",
"0.6590164",
"0.65679824",
"0.6565796",
"0.6549766",
"0.6535808",
"0.64992064",
"0.64739895",
"0.6466939",
"0.6465464",
"0.6456715",
"0.64538115",
"0.6433335",
"0.64175326",
"0.64173394",
"0.6381613",
"0.6374825",
"0.6365704",
"0.63629097",
"0.62843394",
"0.6237695",
"0.62341243",
"0.6220055",
"0.621582",
"0.6211892",
"0.618964",
"0.6183932",
"0.6151289",
"0.6146805",
"0.61433333",
"0.61411935",
"0.6135094",
"0.6132824",
"0.611393",
"0.61030793",
"0.61028844",
"0.6028113",
"0.601148",
"0.60068667",
"0.5998365",
"0.59958535",
"0.5989333",
"0.59893227",
"0.5978265",
"0.5950073",
"0.5941547",
"0.593869",
"0.59148836",
"0.5908948",
"0.5902174",
"0.58939904",
"0.58562136",
"0.5837236",
"0.58367276",
"0.58335096",
"0.5831667",
"0.5831226",
"0.58284754",
"0.58197314",
"0.581569",
"0.5811627",
"0.58055556",
"0.5783026",
"0.57826084",
"0.57756287",
"0.57706404",
"0.57550997",
"0.5754745",
"0.5750849",
"0.57473314",
"0.5740694",
"0.57267886",
"0.57188386",
"0.5711599",
"0.5711043",
"0.5701185"
] | 0.8316928 | 0 |
Displays a link to the next page, where the page doesn't exist then display the $text | function nextPage($text='next')
{
if (empty($this->_pageDetails)) { return false; }
if (!empty($this->_pageDetails['nextPage']))
{
if($this->style == 'ajax')
{
//$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['nextPage'],"update" => "ajax_update","method"=>"get"));
$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['nextPage'],array("update" => "ajax_update","method"=>"get"));
}
else
{
$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['nextPage'], false, false, false);
}
return $t;
}
//return '<span><strong>' . $text . '</strong></span>';
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">></a></li>';\n }\n }",
"public function next(string $text = 'Next', array $options = []): string\n {\n return $this->generateLink($text, 'nextPage', $options);\n }",
"protected function next($text)\n\t{\n\t\treturn $this->forwards(__FUNCTION__, $text, $this->page + 1);\n\t}",
"function NextUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id + 1;\n\t\t$last = LastArticle('parameters/last_article_id');\n\t\tif ($new_id > (int)$last)\n\t\t{\n\t\t\treturn \"\";\t\n\t\t// jump an article because this is deleted\n\t\t}else if (file_exists($path . $new_id) == false){\n\t\t\treturn NextUrl($new_id, $text);\t\n\t\t}else{\n\t\t\t$string = '<a href=\"' . ARTICLE_HOME . '?id=' . $new_id . '\">' . $text . '</a>';\n\t\t\treturn $string;\n\t\t}\n \t}",
"function link_to_next_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __(\"Next Item →\");\n }\n $item = get_current_record('item');\n if ($next = $item->next()) {\n return link_to($next, 'show', $text, $props);\n }\n}",
"private function print_next_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( min( $this->total_pages, $this->current_page + 1 ) ),\n\t\t\t__( 'Go to the next page', 'multilingual-press' ),\n\t\t\t'next-page' . $this->disable_last,\n\t\t\t'›'\n\t\t);\n\t}",
"function nextPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n $root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the next button should point to the first article\n\tif( $currentView == 'home' ) {\n\t\treturn $root . getArrayFirstIndex( $activePages );\n\t}\n\t// If we're on the credits page, the next button should be inactive\n\telse if( $currentView == 'credits' ) {\n\t\treturn false;\n\t}\n\t// If we're on the last page, send to credits\n\telse if( $currentArticle == 'theend' ) {\n\t\treturn $root . 'credits';\n\t}\n\t// If we're on a regular article page get the next one\n\tif($activePages[$currentArticle]['numberOfPages'] == $currentArticlePage) {\n\t\tif( !$activePages[nextPrevArticleName('next')]['active'] ) return $root . 'theend';\n\t\treturn $root . nextPrevArticleName('next');\n\t} elseif($activePages[$currentArticle]['numberOfPages'] > $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage+1);\n\t}\n}",
"public function genNextLink()\n\t{\n\t\t$this->pagination['nextLink'] = \"\";\t\n\t\tif($this->page < $this->numofpages)\n\t\t{\n\t\t\t$page = $this->page+1;\t\t\t\t\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_next',$this->prepend.$page.$this->append, '>'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\t\n\t\t\t$this->pagination['nextLink'] = $item;\n\t\t}\n\t}",
"public function getNextPage();",
"function nextPage() {\n\t\treturn $this->hasNextPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}",
"function prevPage($text='prev')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['previousPage']) )\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['previousPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['previousPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['previousPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}",
"public function getNextText()\n {\n return _t(__CLASS__ . '.NEXT', 'Next');\n }",
"public function advanceLabelPage ()\r\n {\r\n $return = '';\r\n $this->label_column = 1;\r\n $this->label_row =1;\r\n ++$this->label_page;\r\n $return .= '\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n return $return;\r\n }",
"public function getNextButton($text = '<i class=\"right arrow icon\"></i>')\n {\n // If the current page is greater than or equal to the last page, it means we\n // can't go any further into the pages, as we're already on this last page\n // that is available, so we will make it the \"next\" link style disabled.\n if (! $this->paginator->hasMorePages()) {\n return $this->getDisabledTextWrapper($text);\n }\n\n $url = $this->paginator->url($this->paginator->currentPage() + 1);\n\n return $this->getPageLinkWrapper($url, $text, 'next');\n }",
"public function next_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() + 1);\n\t}",
"private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }",
"public function pageWithText($page, $text)\n {\n return '';\n }",
"function renderNext($tag = '>>') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page < $this->max_pages) {\r\n\t\t\treturn '<a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page + 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn $tag;\r\n\t\t}\r\n\t}",
"public function nextAction()\n {\n $this->pageAction('goToNextPage');\n }",
"public function getNext($text = null)\n {\n $text = \\Config::get('pagination::slider.next_link_text', $text);\n $class = \\Config::get('pagination::align_simple') ? 'next' : '';\n // If the current page is greater than or equal to the last page, it means we\n // can't go any further into the pages, as we're already on this last page\n // that is available, so we will make it the \"next\" link style disabled.\n if ($this->currentPage >= $this->lastPage) {\n $class = ltrim($class . ' ') . 'disabled';\n return '<li class=\"'.$class.'\"><span>'.$text.'</span></li>';\n } else {\n $url = $this->paginator->getUrl($this->currentPage + 1);\n return '<li class=\"'.$class.'\"><a href=\"'.$url.'\">'.$text.'</a></li>';\n }\n }",
"function writePage($text) {\n //TODO: Write the text to the page.\n return 1;\n }",
"function PreviousUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id - 1;\n\t\t// if id=0 this is the first article, so don't show text\n\t\tif ($new_id == 0){\n\t\t\treturn \"\";\n\t\t// jump an article because this is deleted\n\t\t}else if (file_exists($path . $new_id) == false){\n\t\t\treturn PreviousUrl($new_id, $text);\n\t\t}else{\n\t\t\t$string = '<a href=\"' . ARTICLE_HOME . '?id=' . $new_id . '\">' . $text . '</a>';\n\t\t\treturn $string;\n\t\t}\n \t}",
"public function nextPage($width,$lang,$nextcell,$headertext,$headeralign) {\n\n\t// include text translations\n\tinclude('fixed.php');\n\tinclude('data.php'); // Load Testing Data\n\n\t// Check Amount of Space Left on Page\n\tif ($this->GetY() + $nextcell > 276)\n\t\t{\n\n\t\t// Write Continued on Next Page\n \t$this->SetX(12);\n\t\t$this->MultiCell(array_sum($width), 0, $formatting[$lang]['next_page'], 'T', 'L', 0, 0, '', '', true);\n\n\t\t// Create New Page\n\t\t$this->AddPage('P','A4');\n\t\t$this->Ln(1.2);\n\t\n\t\t// Add Header if Necessary\n\t\tif (isset($headertext)) {\n\t\n\t\t\t$this->TableHeader($headertext, $headeralign, $width, 12);\n\n\t\t}\n\t}\n\n\treturn;\n\n}",
"function _next($type,$title,$id,$more=''){\r\n // title : cot ten\r\n // id : id hien tai cua bai viet\r\n // more : dieu kien mo rong\r\n global $mysql,$table_prefix,$lang;\r\n $total = $mysql->num_rows($mysql->query('select * from '.$table_prefix.$type.' where id>'.$id.' '.$more.''));\r\n if(!$total){\r\n $code = '...';\r\n }else{\r\n $q = $mysql->query('select * from '.$table_prefix.$type.' where id>'.$id.' '.$more.' order by id ASC limit 0,1');\r\n while($r=$mysql->fetch_array($q)){\r\n $code = \"<a href='javascript: void(0);' onclick=\\\"viewpages('main','\".$type.\"=view&id=\".$r['id'].\"');web_title('\".$type.\" - \".$r['title'].\"');\\\" title='\".$r[$title].\"'>\".cut_str($r[$title],25).\"</a>\";\r\n }\r\n }\r\nreturn $code;\r\n}",
"public function loadNextPage()\n {\n $nextPage = $this->results->getNextPage();\n $this->search($nextPage);\n }",
"public function getNextPageUrl();",
"public function getNextPageUrl();",
"public function pageWithText(int $page, string $text, ?string $rel = null): string;",
"function page_advance( $link, $total, $range, $current, $html = array() ) {\r\n $range = max(1, ceil($range));\r\n $total_page = ceil($total / $range);\r\n $current = max(0, ceil($current));\r\n $bar = \"\";\r\n\r\n $title = str_replace(array(\"{link}\", \"{from}\", \"{to}\", \"{total}\"), array($link, min(($current - 1) * $range + 1, $total), min($current * $range, $total), $total), $html['title']);\r\n\r\n if ( $current >= 3 ) {\r\n $bar .= str_replace(\"{link}\", $html['first']);\r\n }\r\n\r\n if ( $current >= 2 ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current - 1), $html['pre']);\r\n }\r\n\r\n $bar .= $title;\r\n\r\n if ( $current <= $total_page - 2 ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current + 1), $html['last']);\r\n }\r\n\r\n if ( $current < $total_page ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current + 1), $html['next']);\r\n }\r\n\r\n return $bar;\r\n\r\n}",
"function next_posts_link($label = \\null, $max_page = 0)\n {\n }",
"public function NextLink()\n {\n if ($this->NotLastPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() + $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }",
"public function nextPageUrl()\n {\n $this->resetQuery();\n\n if ($this->items->count() == $this->perPage()) {\n $this->appends('start', session()->get('accountant.api.start'));\n\n return $this->url($this->currentPage() + 1);\n }\n }",
"public function nextPage()\n\t{\n\t\treturn $this->getIsNextPageAvailable() ? parent::nextPage() : false;\n\t}",
"public function nextpage() {\n return $this->current_page + 1;\n }",
"public function nextAction()\n {\n // check if request is ajax\n if (Helper::isAjaxRequest()) {\n // get request\n $code = Helper::requestGet('code', null);\n $userName = Helper::requestGet('userName', null);\n\n // get next url string\n $url = $this->getMediaNextUrlByCode($code);\n\n if ($url) {\n // do request for content\n $media = file_get_contents($url);\n\n // decode json\n $media = json_decode($media);\n\n // check for error\n $this->hasError($media);\n\n // check if json valid and response success\n if (!json_last_error() && $media->meta->code == self::SUCCESS_RESPONSE && !empty($media->data)) {\n $hasNextUrl = false;\n\n if (isset($media->pagination->next_url)) {\n $hasNextUrl = true;\n\n // set next pagination url\n $this->setMediaNextUrlByCode($code, $media->pagination->next_url);\n }\n\n // options for view rendering\n $options = [\n 'c' => Config::get('defaultController'),\n 'a_next' => 'next',\n 'code' => $code,\n 'userName' => $userName,\n 'hasNextUrl' => $hasNextUrl,\n ];\n\n // rendering view without layout\n Helper::renderStatic('main/_viewMediaMore', compact('media', 'options'), false);\n exit;\n }\n }\n }\n }",
"public function testGetNextPage()\n {\n // most directory\n $this->assertStringEndsWith(\n '2.3/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/subfolder/subsubfolder/subsubpage.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n // after sorting, 2 is shown.\n $this->assertContains(\n '/intermediate/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/sort/01-basic.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n\n // next gets the following URL\n $this->assertContains(\n '/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/'\n )->Link\n );\n\n\n // last folder in a entity does not leak\n $this->assertNull(\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/test.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n }",
"public function skip_link() {\n\t\techo '<a class=\"skip-link screen-reader-text\" href=\"#site-content\">' . __( 'Skip to the content', 'wilbur' ) . '</a>';\n\t}",
"function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }",
"public function nextPageUrl()\n {\n $nextPage = $this->structure->getNextPage($this->currentPage);\n if ($nextPage) {\n return $this->structure->getUrl($this->currentPage, $nextPage);\n }\n\n return;\n }",
"function get_next_image_link($size = 'thumbnail', $text = \\false)\n {\n }",
"public function next($linkFormat = '<p class=\"next\"><a href=\"%s\">next</a></li>', $if_null = '') {\n\t\t$page = $this->_rowset->getNextPage();\n\t\tif (is_null($page)) {\n\t\t\treturn $if_null;\n\t\t} else {\n\t\t\t$url = $this->_view->url(array('page' => $page));\n\t\t\t$html = sprintf($linkFormat, $url, $page);\n\t\t\treturn $html;\n\t\t}\n\t}",
"function nextPage()\n\t\t{\n\t\t\tif(!$this->hasNext())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\n\t\t\t$this->currentPage++;\t\t\t\n\t\t}",
"function show($text=null, $separator=null)\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['recordCount']) )\n\t\t{\n\t\t\t$t = '';\n\t\t\tif(is_array($this->show))\n\t\t\t{\n\t\t\t\t$t = $text.$separator;\n\t\t\t\tforeach($this->show as $value)\n\t\t\t\t{\n\t\t\t\t\t$link = preg_replace('/show=(.*?)&/','show='.$value.'&',$this->link);\n\t\t\t\t\tif($this->_pageDetails['limit'] == $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$t .= '<em>'.$value.'</em>'.$separator;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$t .= $this->Ajax->linkToRemote($value, array(\"fallback\"=>$this->action.\"#\",\"url\" => $link.$this->_pageDetails['page'],\"update\" => \"ajax_update\",\"method\"=>\"get\")).$separator;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$t .= $this->Html->link($value,$link.$this->_pageDetails['page']).$separator;\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\treturn $t;\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"function thb_single_next_custom_pagination() {\n\t\t$post = get_next_post();\n\n\t\tif ( $post == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo \"<div class='thb-single-next-nav-wrapper'>\";\n\t\t\techo \"<a href='\" . get_permalink( $post->ID ) . \"'>\";\n\t\t\t\techo \"<span>\" . __( 'Next post', 'thb_text_domain' ) . \"</span>\";\n\t\t\t\techo \"<p class='thb-single-nav-title'>\" . thb_text_format( esc_html( $post->post_title ) ) . \"</p>\";\n\t\t\techo \"</a>\";\n\t\techo \"</div>\";\n\t}",
"private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">»</a></li>';\n }\n }",
"function edreportnextpage_func()\n{\n\tglobal $wpHelper;\n\n $subject = isset($_GET['subject']) ? (int)$_GET['subject'] : '';\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $perpage = isset($_GET['perpage']) ? (int)$_GET['perpage'] : 10;\n $text = isset($_GET['textsearch']) ? sanitize_text_field($_GET['textsearch']) : '';\n\t$type = isset($_GET['type']) ? sanitize_text_field($_GET['type']) : '';\n $grades = isset($_GET['grades']) ? $_GET['grades'] : [];\n $status = isset($_GET['status']) ? $_GET['status'] : [];\n $wpHelper->queryStart(($perpage * $page));\n $wpHelper->queryLimit($perpage);\n $series = $wpHelper->series($subject, $grades, $text, 'none', $status, $type);\n if (!empty($series)) :\n foreach ($series as $s) :\n format_edseries($s, $status, $type);\n endforeach;\n else:\n if ($page == 1 ) echo \"<div class='noseriesfound'>No More Reviews Found</div>\";\n elseif ( !empty($text) ) echo \"<div class='noseriesfound'>No Reviews Found</div>\";\n endif;\n die();\n}",
"function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }",
"public function NextPage()\n {\n if ($this->m_CurrentPage >= $this->m_TotalPages)\n $this->m_CurrentPage = $this->m_TotalPages;\n else\n $this->m_CurrentPage++;\n return $this->ReRender();\n }",
"private function generateHtml($page, $text = null)\n {\n // If no link text is specified\n if (!$text)\n // Specify that the text is the number of the page\n $text = $page;\n\n $currentURI = rtrim($_SERVER['REQUEST_URI'], '/') . '/';\n $currentURI = preg_replace('~/page-[0-9]+~', '', $currentURI);\n // Generate HTML link code and return\n return\n '<li><a href=\"' . $currentURI . $this->index . $page . '\">' . $text . '</a></li>';\n }",
"function print_next_wizard_page(&$question, &$form, $course) {\n global $CFG, $USER, $SESSION, $COURSE;\n\n // Catch invalid navigation & reloads\n if (empty($question->id) && empty($SESSION->calculated)) {\n redirect('edit.php?courseid='.$COURSE->id, 'The page you are loading has expired.', 3);\n }\n\n // See where we're coming from\n switch($form->wizardpage) {\n case 'question':\n require(\"$CFG->dirroot/question/type/calculated/datasetdefinitions.php\");\n break;\n case 'datasetdefinitions':\n case 'datasetitems':\n require(\"$CFG->dirroot/question/type/calculated/datasetitems.php\");\n break;\n default:\n print_error('invalidwizardpage', 'question');\n break;\n }\n }",
"function get_next_posts_link($label = \\null, $max_page = 0)\n {\n }",
"public function nextPageUrl()\n {\n if ($this->lastPage() > $this->currentPage()) {\n return $this->url($this->currentPage() + 1);\n }\n }",
"private function print_last_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( $this->total_pages ),\n\t\t\t__( 'Go to the last page', 'multilingual-press' ),\n\t\t\t'last-page' . $this->disable_last,\n\t\t\t'»'\n\t\t);\n\t}",
"private function nextLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('next sunday', strtotime($time . ' -1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . '+1week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '+1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 +1month'));\n }\n\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }",
"public function next(): void\n {\n if (!\\next($this->responseData->_embedded->items) && $this->fetchMore) {\n if ($this->getPage() < $this->getPages()) {\n $this->responseData = $this->client->requestLink($this->getLinks()->next->href);\n $this->rewind();\n }\n }\n }",
"function pager($page, $total, $pnumber, $page_link, $parameters)\n {\n $number = (int)($total/$pnumber);\n if((float)($total/$pnumber) - $number != 0) $number++;\n // Check on left links\n if($page - $page_link > 1)\n {\n echo \"<a href=$_SERVER[PHP_SELF]?page=1{$parameters}> <nobr>[1-$pnumber]</nobr></a> <em class=currentpage><nobr> ... </nobr> </em> \";\n // Have one\n for($i = $page - $page_link; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n else\n {\n // Have no\n for($i = 1; $i<$page; $i++)\n {\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n // Check on right links\n if($page + $page_link < $number)\n {\n // Have one\n for($i = $page; $i<=$page + $page_link; $i++)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n echo \"<em class=currentpage><nobr> ... </nobr> </em> <a href=$_SERVER[PHP_SELF]?page=$number{$parameters}> <nobr>[\".(($number - 1)*$pnumber + 1).\"-$total]</nobr></a> \";\n }\n else\n {\n // Have no\n for($i = $page; $i<=$number; $i++)\n {\n if($number == $i)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-$total] </nobr></em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}>[\".(($i - 1)*$pnumber + 1).\"-$total]</a> \";\n }\n else\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr> [\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"] </nobr> </em>\";\n else\n echo \" <a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a> \";\n }\n }\n }\n //echo \"<br><br>\";\n }",
"static function page_next($startpage, $config)\n {\n return static::page_link($startpage, $config, \"next\");\n }",
"function NewPage()\n {\n $ypos = $this->GetY();\n if ($ypos > 230){\n $this->AddPage();\n }\n }",
"function ts_get_next_slider_text()\r\n{\r\n\treturn SLIDER_NEXT_TEXT;\r\n}",
"public static function next_post_link () : void\n {\n add_filter(\"next_post_link\", function ($output) {\n $nextPost = get_adjacent_post(false, '', false);\n\n if ($nextPost !== '') {\n $nextPostTitle = strlen(get_the_title($nextPost)) > 30 ? substr(get_the_title($nextPost), 0, 30) . \"...\" : get_the_title($nextPost);\n\n $output = '<div class=\"detials\">';\n $output .= '<p>' . __(\"Next Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\"><h4>' . $nextPostTitle . '</h4></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\"><span class=\"lnr text-white ti-arrow-right\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\">' . get_the_post_thumbnail($nextPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n\n return $output;\n });\n }",
"function get_next_posts_page_link($max_page = 0)\n {\n }",
"function more_link( $link, $text ) {\n\treturn ( __( '(more…)' ) !== $text ) ? $link : str_replace( $text, __( 'Continue Reading', 'wpdh' ), $link );\n}",
"private function prev() {\n if ($this->currentPage > 1) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage - 1) . '\"><</a></li>';\n }\n }",
"public function header_next() {\n\t\tif (!empty($_SESSION['page_list'])) {\n\t\t\t$_SESSION['next_page'] = $_SESSION['page_list'][0];\n\t\t\t$_SESSION['page_list_done'][] = $_SESSION['page_list'][0];\n\t\t\tarray_splice($_SESSION['page_list'], 0, 1);\n\t\t\tforeach ($_SESSION['page_list_done'] as $value) {\n\t\t\t\techo $value . '<br />';\n\t\t\t}\n\t\t\t$_SESSION['started'] = 1;\n\t\t\t//var_dump($_SESSION['page_list']);\n\t\t\techo '<br />';\n\t\t\techo '<br />';\n\t\t\techo '<br />';\n\t\t\t//var_dump($_SESSION['page_list_done']);\n\t\t\theader( \"refresh:1;url=\" . $_SERVER['PHP_SELF'] ); \n\t\t\t//exit;\n\t\t} else if (empty($_SESSION['page_list']) && $_SESSION['started'] == 0) {\n\t\t\t$_SESSION['started'] = 1;\n\t\t\techo 'oops session[\"started\"] est egal à zero alors que page_list n\\'est aps vide';\n\t\t} else if (empty($_SESSION['page_list']) && $_SESSION['started'] == 1) {\n\t\t\techo \"The domain has been parsed entirely ! <br />The e-mail list is below :\";\n\t\t\texit;\n\t\t\t\n\t\t}\n\t}",
"function DrawPages( $link=\"\" )\r\n\t\t{\r\n\t\t\tif( $link == \"\" )\r\n\t\t\t{\r\n\t\t\t\t$link = $_SERVER[\"PHP_SELF\"] . \"?\" . $_SERVER[\"QUERY_STRING\"];\r\n\t\t\t\t\r\n\t\t\t\tif( $pos_PAGE = strpos( $link, \"&page=\" ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$link = substr( $link, 0, $pos_PAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// usando el array remove_words\r\n\t\t\t// ejecuta la eliminación de posibles parametros\r\n\t\t\tfor( $ij=0; $ij<count($this->remove_words); $ij++ )\r\n\t\t\t{\r\n\t\t\t\t$link = str_replace( $this->remove_words[$ij], \"\", $link );\r\n\t\t\t}\r\n\r\n\t\t\techo \"<br>\";\r\n\r\n\t\t\t$str_page = \"Páginas\";\r\n\t\t\t\r\n\t\t\tif( $this->lang != 1 )\r\n\t\t\t{\r\n\t\t\t\tif( $this->lang == 2 )\r\n\t\t\t\t\t$str_page = \"Pages\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<div style='float:left; width:74%;'>\";\r\n\t\t\techo \"<table align='center' border='0'>\";\r\n\t\t\techo \"<tr><td align='center' class='columna'>\" . (($this->TotalPages==0) ? \"\" : \"$str_page\") . \" \";\r\n\r\n\t\t\tif( $this->page > 1 )\r\n\t\t\t echo \" <a href='$link&page=\" . ($this->page-1) . \"'><img src='../images/back_btn.gif' alt='Anterior'></a>\";\t\t\r\n\r\n\t\t\t$since = 1;\r\n\t\t\t$to = $this->TotalPages;\r\n\r\n\t\t\tif( $this->TotalPages > 20 )\r\n\t\t\t{\r\n\t\t\t\t$since = $this->page;\r\n\t\t\t\t$to = $since + 20;\r\n\r\n\t\t\t\tif( $to > $this->TotalPages )\r\n\t\t\t\t{\r\n\t\t\t\t\t$to = $this->TotalPages;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\")\r\n\t\t\t{\r\n\t\t\t\techo \" <a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\t$index_page = $this->page;\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\t$since = 1;\r\n\t\t\t\t$to = 26;\r\n\r\n\t\t\t\tif( substr($this->page,0,1) == \"!\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->page = substr($this->page, 1, strlen($this->page));\r\n\t\t\t\t\t$this->page = 26 + $this->page;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$index_page = $this->page;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// convertir la página Alfabetica a un INDICE\r\n\t\t\t\t\t$index_page = (ord($this->page) - 64);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor($i=$since; $i<=$to; $i++ )\r\n\t\t\t{\r\n\t\t\t\tif( $i == $index_page )\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"<b><font size=+1>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\techo $i;\t\t\t\t\t\r\n\r\n\t\t\t\t\techo \"</font></b> \";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$str = $i;\r\n\r\n\t\t\t\t\techo \"<a href='\" . $link . \"&page=$str'>\";\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\r\n\t\t\t\t\techo $str;\r\n\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\techo \"</a> \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\tfor($i=0; $i<=9; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( 26+$i == $index_page )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo \"<strong><font size=+1>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$str = chr(48+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo \"</font></strong> \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$str = chr(48+$i);\r\n\t\r\n\t\t\t\t\t\techo \"<a href='\" . $link . \"&page=!$str'>\";\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\t\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\t\techo \"</a> \";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\" )\r\n\t\t\t{\r\n\t\t\t\techo \" <a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->page<($this->TotalPages-1))\r\n\t\t\t echo \" <a href='$link&page=\" . ($this->page+1) . \"'><img src='../images/forward_btn.gif' alt='Siguiente'></a>\";\t\r\n\r\n\t\t\techo \"</td></tr>\";\r\n\t\t\techo \"</table>\";\r\n\t\t\techo \"</div>\";\r\n\t\t\t\r\n\t\t\tglobal $pr;\r\n\t\t\t\r\n\t\t\tif( isset($pr) )\r\n\t\t\t{\r\n\t\t\t\tglobal $LBL_RECS_X_PAGE;\r\n\t\t\t\techo \"<div style='float:right; width:25%; text-align:right;' class='x-pageRanges'>$LBL_RECS_X_PAGE \";\r\n\t\t\t\techo \"\t<span \" . (($pr==10) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=10'>10</a></span> \";\r\n\t\t\t\techo \"\t<span \" . (($pr==15) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=15'>15</a></span> \";\r\n\t\t\t\techo\"\t<span \" . (($pr==20) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=20'>20</a></span> \";\r\n\t\t\t\techo \" </div>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<br style='clear:both'>\";\r\n\t\t}",
"function twentyten_continue_reading_link() {\n\t\treturn ' <a href=\"' . get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">→</span>', 'twentyten' ) . '</a>';\n\t}",
"function next_post($format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '')\n {\n }",
"function fc_pagination_nextpage($paged, $max_page, $nextpage) {\n if( $paged != \"\" && $paged < $max_page)\n $pagingString = '<li class=\"next\"><a href=\"'.get_pagenum_link($paged+1). '\">'.$nextpage.'</a></li>'.\"\\n\";\n return $pagingString;\n}",
"public function gridSetPagesUrlNext($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_NEXT', $url);\n $this->setVar('NEXT_PAGE_TAG', __('Next page'));\n }\n }",
"function link_to_previous_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __('← Previous Item');\n }\n $item = get_current_record('item');\n if ($previous = $item->previous()) {\n return link_to($previous, 'show', $text, $props);\n }\n}",
"public function nextPage()\n {\n return $this->currentPage + 1;\n }",
"function next_comments_link($label = '', $max_page = 0)\n {\n }",
"private function createNextPageLink($activePage)\n {\n # initialise variables\n $nextPage=1;\n $linkText=null;\n $startRecord=0;\n\n $nextPage=++$activePage;\n\n # There is no page 0 so need to disable in that case\n if($this->totalPages+1==$nextPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">»</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&selectCounty='.$this->selectCounty;\n $linkText .= '&startRecord='.$this->startRecordArr[$nextPage];\n $linkText .= '&recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&pageNum='.$nextPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">»</span>';\n $linkText .= '<span class=\"sr-only\">'.$nextPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }",
"public function nextPage()\n {\n return $this->nextPage;\n }",
"private function pagERROR404()\n\t{\n\t\t$tekst = new TekstVerwerken;\n\t\t\n\t\t$pageOutput = $this->menu();\n\t\t$pageOutput.= $this->div('open', 'id=\"inhoud\"');\n\t\t$pageOutput.= $this->h2('full', '', 'De pagina die je zoekt kon niet worden gevonden.');\n\t\t$pageOutput.= $this->p('full', 'style=\"padding: 10px\"', 'De pagina \"'.$tekst->cleanHTML($_SESSION['page']).'\" bestaat niet op de website.<br>Denk je dat dit een vergissing is, gelieve dan het contactformulier te gebruiken om dit probleem te melden. Vermeld in dit bericht zeker het gedeelte dat tussen quotes staat.');\n\t\t$pageOutput.= $this->div('close');\n\t\treturn $pageOutput;\n\t}",
"public function setNextHref(string $url);",
"public function next_page(){\n if($this->current_page < $this->number_of_pages()){\n return $this->current_page + 1;\n }\n else{\n return NULL;\n }\n }",
"private function print_previous_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( max( 1, $this->current_page - 1 ) ),\n\t\t\t__( 'Go to the previous page', 'multilingual-press' ),\n\t\t\t'prev-page' . $this->disable_first,\n\t\t\t'‹'\n\t\t);\n\t}",
"function mithpress_continue_reading_link() {\n\treturn ' <a href=\"'. get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">→</span>', 'twentyten' ) . '</a>';\n}",
"function next_image_link($size = 'thumbnail', $text = \\false)\n {\n }",
"function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }",
"public function iShouldSeeADownloadLinkInTheText($text)\n {\n $this->getSession()->getPage()->findLink($text);\n }",
"function nextPrev($curpage, $pages) \n { \n $next_prev = \"\"; \n\n if (($curpage-1) <= 0) \n { \n $next_prev .= \"Previous\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage-1).\"\\\" alt=\\\"Halaman sebelumnya ...\\\">Previous</a>\"; \n } \n\n $next_prev .= \" | \"; \n\n if (($curpage+1) > $pages) \n { \n $next_prev .= \"Next\"; \n } \n else \n { \n $next_prev .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($curpage+1).\"\\\" alt=\\\"Halaman berikut ...\\\">Next</a>\"; \n } \n\n return $next_prev; \n }",
"function darksnow_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url( get_permalink() ) . '\">' . __( 'Continue reading <span class=\"meta-nav\">→</span>', 'darksnow' ) . '</a>';\n}",
"function CreatePage($text)\n{\n\tglobal\t$FM_VERS;\n\n\techo \"<html>\";\n\techo \"<head>\";\n\techo \"</head>\";\n\techo \"<body>\";\n\techo nl2br($text);\n\techo \"<p><p><small>Your form submission was processed by formmail.php ($FM_VERS), available from <a href=\\\"http://www.tectite.com/\\\">www.tectite.com</a></small>\";\n\techo \"</body>\";\n\techo \"</html>\";\n}",
"public function has_next_page()\n {\n }",
"function displayPaging() \r\n {\r\n $self = $_SERVER['PHP_SELF'];\r\n if($this->openPage<=0) {\r\n $next = 2;\r\n }\r\n\r\n else {\r\n $next = $this->openPage+1;\r\n }\r\n $prev = $this->openPage-1;\r\n $last = $this->pages;\r\n\t\t$queryString = '';\r\n\t\t\r\n\t\tif ($_GET['keywords']!= '') {\r\n\t\t\t$queryString .= '&keywords='.$_GET['keywords'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['sort'] != '') {\r\n\t\t\t$queryString .= '&sort='.$_GET['sort'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['filters']!='') {\r\n\t\t\t$queryString .= '&filters='.$_GET['filters'];\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\tif ($_GET['cat']!='') {\r\n\t\t\t$queryString .= '&cat='.$_GET['cat'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['media']!='') {\r\n\t\t\t$queryString .= '&media='.$_GET['media'];\r\n\t\t}\r\n\t\tif ($_GET['content']!='') {\r\n\t\t\t$queryString .= '&content='.$_GET['content'];\r\n\t\t}\r\n\t\tif ($_GET['genre']!='') {\r\n\t\t\t$queryString .= '&genre='.$_GET['genre'];\r\n\t\t}\r\n\r\n if($this->openPage > 1) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=1\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\techo \"First</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n \techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$prev\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\techo \"Prev</a>] \";\r\n }\r\n else {\r\n echo \"[First<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Prev] \";\r\n }\r\n for($i=1;$i<=$this->pages;$i++) {\r\n if($i == $this->openPage) \r\n\t\t\t\tif ($i==1)\r\n \techo \"$i\";\r\n\t\t\t\telse \r\n\t\t\t\t\t echo \", $i\";\r\n else\r\n\t\t\tif ($i==1) {\r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n\t\t\t\t}else{ \r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n } }\r\n if($this->openPage < $this->pages) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$next\".$queryString.\"\\\">Next</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$last\".$queryString.\"\\\">Last</a>]\";\r\n }\r\n else {\r\n echo \" [Next<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Last]\";\r\n } \r\n }",
"function get_next_post_link($format = '%link »', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }",
"private function isNextPage() {\n return isset($this->pages[$this->currentPageNumber + 1]);\n }",
"static function show_page_jumplead()\n\t{\n\t\t$h2 = 'Jumplead';\n\t\tinclude(JUMPLEAD_PATH_VIEW . 'jumplead.php');\n\t}",
"public function genLastLink()\n\t{\n\t\t$this->pagination['lastLink'] = \"\";\n\t\tif($this->page <= ($this->numofpages - 10))\n\t\t{\n\t\t\t$page = $this->numofpages;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_last',$this->prepend.$page.$this->append, '>>'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\n\t\t\t$this->pagination['lastLink'] = $item;\t\n\t\t}\n\t}",
"public function next()\n {\n return $this->pager->next();\n }",
"public function pageLinked(){\n return view('done');\n }",
"public function next() : void\n {\n $this->currentRecordPos++;\n if ($this->currentRecordPos > $this->maxPageRecord) {\n $this->page($this->currentPagePos+1);\n }\n }",
"function paging_2($str,$width,$course)\n{\n global $currenttotal,$limit,$offset,$showed,$last,$PHP_SELF,$align;\n\n if($currenttotal>0)\n {\n #### PAGING STARTS\n print \"<table width='$width' cellpadding='2' cellspacing='0' align='right'>\";\n\tprint \"<tr>\";\n\t#---------------------------------------\n print \"<td width='30%' valign='top' align='right'>\";\n if($offset>=$limit)\n print \"<a href='$PHP_SELF?offset=$last¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>Previous</a> \";\n\tif(isset($align))\n\t{\n print \"<span class='astro'>Pic:</span> \";\n\t}\n\telse\n\t{\n print \"<span class='gottopage' style='font-size:12px'>Page:</span> \";\n\t}\n\t$pages=$currenttotal%$limit;\n\tif($pages==0)\n $pages=$currenttotal/$limit;\n\telse\n\t{\n $pages=$currenttotal/$limit;\n $pages=(int)$pages+1;\n\t}\t\t\n\t$m=\"0\";\n\tfor($i=1;$i<=$pages;$i++)\n\t{\n $pageoff=($i-1)*$limit;\n if($showed==($i*$limit))\n {\n\t\tprint \"<span class'pagingtext' style='font-size:12px'>$i </span> \";\n }\n else\n {\n\t\tprint \"<a href='$PHP_SELF?offset=$pageoff¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>$i</a> \";\n }\n if($m==\"29\")\n {\n\t\t$m=\"0\";\n\t\tprint \"<br>\";\n }\n\t\t$m++;\n\t}\n\t#---------------------------------------\n\tprint \" <a href='$PHP_SELF?offset=$showed¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>\";\n\tif($showed<$currenttotal)\n print \"Next</a>\";\n\tprint \"</td>\";\n\t#---------------------------------------\n\tprint \"</tr>\";\n\tprint \"</table><br>\";\n#### PAGING ENDS\n }\n\n}",
"private function print_first_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( 1 ),\n\t\t\t__( 'Go to the first page', 'multilingual-press' ),\n\t\t\t'first-page' . $this->disable_first,\n\t\t\t'«'\n\t\t);\n\t}",
"function scrap_page_next($url)\n {\n $page = curl_get_file($url);\n $regex = '@(?s)<h2.*?Add to Compare@';\n preg_match_all($regex,$page,$match);\n if($match == null)\n echo \"No match found!!\";\n else\n {\n foreach($match[0] as $m)\n scrap($m);\n }\n \n //To find next url\n $regex = '@<link\\s*rel=\"next\"\\s*href=\"(.*)?\"@';\n preg_match($regex,$page,$u);\n if($u == null)\n return null;\n else \n return $u[1]; \n }",
"public function go($text = '')\n {\n $cur_page_md5 = md5($_GET['object'] . '%%' . $_GET['action'] . '%%' . $_GET['id']);\n // Verify and send email\n if ( ! empty($_POST['go'])) {\n // Check if email is already registered for someone\n if ( ! common()->email_verify($_POST['email'])) {\n _re('Invalid e-mail, please check your spelling!');\n }\n if (empty($_POST['name'])) {\n _re('Friend name required!');\n }\n if (empty($_POST['message'])) {\n _re('Message text required!');\n }\n // Check for flood\n if ( ! empty($_SESSION[$this->SESSION_TTL_NAME][$cur_page_md5]) && $_SESSION[$this->SESSION_TTL_NAME][$cur_page_md5] > (time() - $this->TTL)) {\n _re('You are not allowed to send current page more than once in future ' . ($_SESSION[$this->SESSION_TTL_NAME][$cur_page_md5] + $this->TTL - time()) . ' seconds!');\n }\n // Try to send email\n if ( ! common()->_error_exists()) {\n $subject = 'Your friend ' . $_POST['name'] . ' sent to you from ' . SITE_NAME;\n $text_to_send = ( ! empty($_POST['comment']) ? $_POST['comment'] . \"<br />\\r\\n<br />\\r\\n\" : '') . $_POST['message'];\n $send_result = common()->quick_send_mail($_POST['email'], $subject, $text_to_send);\n // Anti-flooder\n $_SESSION[$this->SESSION_TTL_NAME][$cur_page_md5] = time();\n $replace2 = [\n 'result' => (int) ((bool) $send_result),\n ];\n return tpl()->parse('system/common/email_page_result', $replace2);\n }\n }\n // Show form\n if (empty($_POST['go']) || common()->_error_exists()) {\n $replace = [\n 'error_message' => _e(),\n 'form_action' => './?object=' . $_GET['object'] . '&action=' . $_GET['action'] . '&id=' . $_GET['id'],\n 'name' => _prepare_html(isset($_POST['name']) ? $_POST['name'] : ( ! empty($this->_user_info['display_name']) ? $this->_user_info['display_name'] : $this->_user_info['name'])),\n 'email' => _prepare_html(isset($_POST['email']) ? $_POST['email'] : $this->_user_info['email']),\n 'message' => _prepare_html(isset($_POST['message']) ? $_POST['message'] : $text),\n 'comment' => _prepare_html($_POST['comment']),\n 'page_preview' => isset($_POST['message']) ? $_POST['message'] : $text,\n ];\n return tpl()->parse('system/common/email_page_form', $replace);\n }\n }",
"function echotheme_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url(get_permalink()) . '\">' . __('Continue reading <span class=\"meta-nav\">→</span>', 'echotheme') . '</a>';\n}",
"function next_post_link($format = '%link »', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }"
] | [
"0.72525835",
"0.7088597",
"0.7022927",
"0.69762427",
"0.68411785",
"0.68309224",
"0.6763134",
"0.6693151",
"0.6586086",
"0.6478846",
"0.64167935",
"0.6394911",
"0.63409",
"0.6329707",
"0.6272749",
"0.6260567",
"0.6243084",
"0.62086666",
"0.62011236",
"0.61731035",
"0.6145034",
"0.61283034",
"0.6066908",
"0.60345495",
"0.6013454",
"0.6000808",
"0.6000808",
"0.59643924",
"0.59634775",
"0.5874962",
"0.58746207",
"0.58670706",
"0.5856352",
"0.58494806",
"0.583846",
"0.58197284",
"0.580517",
"0.579443",
"0.5775507",
"0.57675475",
"0.5761201",
"0.5746731",
"0.57448053",
"0.57366955",
"0.57295",
"0.5720052",
"0.571723",
"0.57049775",
"0.5692949",
"0.56795144",
"0.567881",
"0.5678636",
"0.56761885",
"0.56571776",
"0.5651509",
"0.5641513",
"0.56056136",
"0.56052476",
"0.5593612",
"0.5571722",
"0.5569351",
"0.55668044",
"0.5561121",
"0.55532587",
"0.55528855",
"0.55483323",
"0.5547657",
"0.55451405",
"0.5539028",
"0.5534873",
"0.5533655",
"0.55301976",
"0.55081224",
"0.55063707",
"0.5500036",
"0.54904985",
"0.54877347",
"0.54843044",
"0.5481886",
"0.5475498",
"0.54740036",
"0.54614943",
"0.54583395",
"0.54562134",
"0.5453926",
"0.5450984",
"0.5447202",
"0.544354",
"0.5436632",
"0.54315156",
"0.5426066",
"0.5425734",
"0.5425234",
"0.54198945",
"0.5416919",
"0.541664",
"0.5405585",
"0.5395113",
"0.53881055",
"0.5373808"
] | 0.8054678 | 0 |
grants a passport token to the user. User $user, Request $request | public function grant($request, Supplier $supplier)
{
$response = $this->guzzle->post('oauth/clients',[
'form_params' => [
'name' => $supplier->name,
'redirect' => 'http://localhost/',
'token' => $request->token,
]
]);
$data = json_decode((string) $response->getBody(), true);
ServiceSupplier::where('id', $data['id'])->update(['password_client' => 1]);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function token(Request $request) {\n global $base_url;\n\n $payload = Json::decode($request->getContent());\n\n $response = \\Drupal::httpClient()->post($base_url . '/oauth/token', [\n 'verify' => TRUE,\n 'form_params' => [\n 'grant_type' => 'password',\n 'client_id' => $payload['client_id'],\n 'client_secret' => $payload['client_secret'],\n 'scope' => 'skyword',\n 'username' => 'admin',\n 'password' => 'drupaladm1n',\n ],\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n ])->getBody()->getContents();\n\n return new JsonResponse(Json::decode($response));\n }",
"protected abstract function grant_token($user, $token);",
"public function getToken(Request $request)\n {\n $email = $request->input('username');\n $password = $request->input('password');\n //checking if user exists\n $user = User::where('email', $email)->get();\n if ($user->count() > 0) {\n $user = $user[0];\n if (Hash::check($password, $user->password)) {\n $role = $user->app_role;\n\n $oauth_client = DB::table('oauth_clients')->where('password_client', 1)->first();\n $request->request->add([\n 'grant_type' => 'password',\n 'client_id' => $oauth_client->id,\n 'client_secret' => $oauth_client->secret,\n 'scope' => '*',\n ]);\n $tokenRequest = Request::create(\n '/oauth/token',\n 'post'\n );\n return Route::dispatch($tokenRequest);\n\n// $temp = Route::dispatch($tokenRequest);\n// return $temp->expires_in;\n// return Carbon::parse($temp->expires_in)->toDateTimeString();\n } else {\n //type = 2 => incorrect passowrd\n return [\n 'error' => '2',\n 'errorType' => 'auth'];\n }\n } else {\n //type= 1 => no such user exists\n return [\n 'error' => '1',\n 'errorType' => 'auth'];\n }\n }",
"public function requestToken(Request $request)\n\t{\n\t $request->validate([\n\t 'email' => 'required|email',\n\t 'password' => 'required',\n\t 'device_name' => 'required',\n\t ]);\n\n\t $user = User::where('email', $request->email)->first();\n\n\t if (! $user || ! Hash::check($request->password, $user->password)) {\n\t \t$response = [\n\t \t\t'status' => 'error',\n\t\t\t\t'message' => 'The provided credentials are incorrect.'\n\t\t\t];\n\t\t\treturn response()->json($response, 200);\n\t }\n\n\t $data['access_token'] = $user->createToken($request->device_name)->plainTextToken;\n\n\t $response = [\n \t\t'status' => 'success',\n \t\t'message' => 'Token generated',\n \t\t'data' => $data,\n\t\t];\n\t return response()->json($response, 200);\n\t}",
"public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }",
"public function receiveUserToken(User $user, $password);",
"public function signIsUsingPassport()\n {\n Passport::actingAs(factory(User::class)->create());\n }",
"public function newToken(Request $request, UserManagerInterface $userManager, $user = null)\r\n {\r\n try {\r\n $isAuthenticated = ($user instanceof UserInterface);\r\n if (!($user instanceof UserInterface)) {\r\n $userGET = $request->request->get('user');\r\n if (strlen($userGET) < 2) {\r\n throw new BadCredentialsException('Usuário inválido');\r\n }\r\n $passGET = $request->request->get('pass');\r\n if (strlen($passGET) < 3) {\r\n throw new BadCredentialsException('Senha inválida');\r\n }\r\n\r\n /** @var User $user */\r\n $user = $userManager->findByUsername($userGET);\r\n\r\n if (!$user) {\r\n /** @var User $user */\r\n $user = $userManager->findUserByDocument($userGET);\r\n if (!$user) {\r\n throw $this->createNotFoundException(\"Credenciais não encontrada\");\r\n }\r\n }\r\n }\r\n\r\n $userManager->manager($user);\r\n $roles = $user->getRoles();\r\n if (!is_array($roles)) {\r\n // return new JsonResponse(['error' => 'Usuário sem permissão'], JsonResponse::HTTP_NOT_FOUND);\r\n throw new \\Exception('Usuário sem permissão');\r\n }\r\n\r\n $channel = $request->get('channel');\r\n\r\n if (!in_array('ROLE_API', $roles) && !in_array('ROLE_ROOT', $roles) && $channel !== 'client') {\r\n throw new \\Exception('Usuário sem permissão de acesso à api');\r\n }\r\n\r\n if ($request->request->get('needRole')) {\r\n if (!in_array($request->request->get('needRole'), $roles)) {\r\n throw new \\Exception(sprintf('Usuário sem permissão de acesso. [%s]', str_replace('ROLE_', '', $request->request->get('needRole'))));\r\n }\r\n }\r\n\r\n if (!$isAuthenticated) {\r\n $isValid = $userManager->isPasswordValid($passGET);\r\n // TMP SHA1 for emergency\r\n if (strtoupper(sha1($passGET)) === $user->getPassword()) {\r\n $isValid = true;\r\n }\r\n } else {\r\n $isValid = true;\r\n }\r\n\r\n if (!$isValid) {\r\n throw new \\Exception('Credenciais inválidas');\r\n }\r\n\r\n $token = $userManager->generateToken();\r\n\r\n $userContent = $userManager->getUserContent();\r\n\r\n if ($user->getPerson()) {\r\n $userContent['person'] = $user->getPerson()->getId();\r\n }\r\n\r\n $user->setLastLogin(new \\DateTime());\r\n $userManager->update();\r\n\r\n $data = [\r\n 'token' => $token,\r\n 'user' => $userContent\r\n ];\r\n\r\n if (count(self::$AuthExtraResponse)) {\r\n $data['extra'] = self::$AuthExtraResponse;\r\n }\r\n\r\n $response = new JsonResponse($data);\r\n /*$cookie = Cookie::create('sl_session')\r\n ->withValue($token)\r\n ->withExpires(time() + 86400)\r\n ->withSecure(true)\r\n ->withSameSite('None');*/\r\n // ->withDomain('.suporteleiloes.com')\r\n // ->withSecure(true);\r\n if (count(self::$AuthCookies)) {\r\n foreach (self::$AuthCookies as $cookie) {\r\n $response->headers->setCookie($cookie($data));\r\n }\r\n }\r\n\r\n if (count(self::$AuthHeaders)) {\r\n foreach (self::$AuthHeaders as $header) {\r\n $response->headers->set($header['key'], is_callable($header['value']) ? $header['value']($data) : $header['value']);\r\n }\r\n }\r\n\r\n #$response->headers->setCookie($cookie);\r\n $response->headers->set('Access-Control-Allow-Credentials', 'true');\r\n $refer = $request->headers->get('origin');\r\n if (!empty($refer)) {\r\n $response->headers->set('Access-Control-Allow-Origin', filter_var($refer, FILTER_SANITIZE_URL));\r\n }\r\n\r\n self::$AuthResponseData = $data;\r\n self::$AuthResponseData['user'] = $user;\r\n return $response;\r\n } catch (\\Exception $e) {\r\n self::$AuthResponseData = [\r\n 'detail' => $e->getMessage(),\r\n 'status' => 401,\r\n 'title' => 'Unauthorized',\r\n 'type' => 'authentication'\r\n ];\r\n $response = new JsonResponse(self::$AuthResponseData, 401);\r\n $response->headers->set('Access-Control-Allow-Credentials', 'true');\r\n $refer = $request->headers->get('origin');\r\n if (!empty($refer)) {\r\n $response->headers->set('Access-Control-Allow-Origin', filter_var($refer, FILTER_SANITIZE_URL));\r\n }\r\n\r\n return $response;\r\n }\r\n\r\n }",
"public function userTokenAuth(Request $request)\n {\n $header = $request->header('Authorization');\n if (Str::startsWith($header, 'Bearer ')) {\n $header = Str::substr($header, 7);\n }else{\n response()->json($this->apiResponse(false,null,'Authorization syntax error'),200)->send();\n die();\n }\n\n /*\n * Check the User Token\n */\n $user = User::where('token',$header)->get()->first();\n\n if($user != null){\n\n if($user->status == 0){\n\n /*\n * Blocked User\n */\n response()->json($this->apiResponse(false,null,'هذا الحساب تم حظره من قبل مسؤول النظام' ),200)->send();\n die();\n }else{\n\n return $user;\n\n }\n\n }else{\n\n response()->json($this->apiResponse(false,null,'يجب ان تقوم بتسجيل الدخول لكي تتمكن من تصفح التطبيق'),200)->send();\n die();\n }\n }",
"public function token(Request $request)\n {\n try {\n $data = $request->json()->all();\n\n $user = User::where('username', $data['username'])->first();\n\n if($user && Hash::check($data['password'], $user->password)) {\n return response()->json($user, 200);\n } else {\n response()->json(['error' => 'No content'], 406);\n }\n } catch (ModelNotFoundException $ex) {\n return response()->json(['error' => 'No content'], 406);\n }\n }",
"public function partnerLogin(Request $request){\n $request->validate([\n 'email' => 'required|string|email',\n 'secretkey' => 'required|string'\n ]);\n $user = User::orWhere('email', $request->email)->orWhere('secretId', $request->secretkey)->first();\n\n if($user) {\n $tokenResult = $user->createToken('Personal Access Token');\n\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString()\n ]);\n }\n else{\n return response()->json(['error'=>'Unauthorised'], 401);\n }\n }",
"public function onAuthenticationRequired(Request $request, TokenInterface $token): Response;",
"public function sendToken(User $user): string;",
"public function authorize(UserToken $token);",
"public function store(Request $request, Token $token, User $user);",
"public function createNewToken(UserInterface $user, Request $request): void\n {\n $series = base64_encode(random_bytes(64));\n $tokenValue = base64_encode(random_bytes(64));\n\n $this->rememberMeDAO->insertToken(\n new PersistentToken(\n \\get_class($user),\n $user->getId(),\n $series,\n $tokenValue,\n new DateTime()\n )\n );\n\n $this->setCookieToRequest($request, $series, $tokenValue);\n }",
"public function userLogin(Request $request){\n if(Auth::attempt(['email' => request('email'), 'password' => request('password')])){\n $content = $this->generateToken($request,'password');\n $result = json_decode($content, 1);\n return $this->sendResponse($result, 'User loggedin successfully.');\n }\n else{\n return response()->json(['error'=>'Unauthorised'], 401);\n }\n }",
"public function login(Request $request)\n {\n // get passport\n $client = BaseClient::where('password_client', 1)->first();\n $request->request->add([\n 'grant_type' => 'password',\n 'client_id' => $client->id,\n 'client_secret' => $client->secret,\n 'username' => $request->email,\n 'password' => $request->password,\n 'scope' => '*'\n ]);\n\n $credentials = request(['email', 'password']);\n //login user\n if (!Auth::attempt($credentials)) {\n return response()->json([\n 'message' => \"We couldn't find your credentials in our records.\"\n ], 401);\n }\n $user = $request->user();\n if (!$user->hasVerifiedEmail()) {\n return response()->json(['errorCode' => 401, 'user' => new AuthResource($user)], 200);\n }\n\n // Fire off the internal request.\n $proxy = Request::create(\n 'oauth/token',\n 'POST'\n );\n $dispatched = Route::dispatch($proxy);\n return $dispatched;\n }",
"public function login(Request $request)\n {\n// $username = $request->input('username');\n// $user = User::where('username',$username)->first();\n//\n// $username = $request->input('username');\n// $user = User::where('username',$username)->first();\n//\n// if($user->hasAnyRoles(['Checklister','Company Guard'])){\n// $scope = 'android';\n// }\n// else{\n// return response(json_encode(['error' => 'Unauthorised']), 401)\n// ->header('Content-Type', 'text/json');\n// }\n\n $this->validate($request, [\n 'username' => 'required',\n 'password' => 'required',\n ]);\n\n\n\n// $params = [\n// 'grant_type' => 'password',\n// 'client_id' => $this->client->id,\n// 'client_secret' => $this->client->secret,\n// 'username' => request('username'),\n// 'password' => request('password'),\n//// 'redirect_uri' => 'http://hcno.local/',\n// 'scope' => '*',\n// ];\n//\n// $request->request->add($params);\n//\n// $proxy = Request::create('oauth/token', 'POST');\n//\n// return Route::dispatch($proxy);\n\n return $this->issueToken($request,'password');\n }",
"public function login(Request $request, User $user)\n {\n\n \t$email \t\t= $request->input('email');\n \t$password \t= $request->input('password');\n\n \tif($user = User::where('email', $email)->first()) {\n\n\t \t\t$credentials = [\n\n\t \t\t\t'email' => $email,\n\t \t\t\t'password' => $password\n\n\t \t\t];\n\t \t\t$credentials['active'] = 1;\n\n\t \t\t$token = null;\n\t \t\ttry {\n\n\t \t\t\tif(!$token = JWTAuth::attempt($credentials)) {\n\n\t \t\t\t\treturn response()->json([\n\t \t\t\t\t\t'msg' => 'Email or Password are incorrect' \n\t \t\t\t\t], 404);\n\n\t \t\t\t}\n\n\t \t\t} catch (JWTException $e) {\n\n\t \t\t\treturn response()->json([\n\t \t\t\t\t'msg' => 'Failed to create token'\n\t \t\t\t], 404);\n\n\t \t\t}\n\n\n\t\t $response = [\n\n\t\t \t'status'=> 'true',\n\t\t \t'access_token' \t=> $token,\n\t\t\t\t'token_type' \t=> 'bearer'\n\n\n\t\t ];\n\n\t \treturn response()->json($response, 200);\n\n\t }\t\n\n\t \treturn response()->json(['msg' => 'Email or Password are incorrect'], 404);\n }",
"public function generate(User $user): PasswordToken;",
"public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|string|email',\n 'password' => 'required|string',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors'=>$validator->errors()], 422);\n }\n\n $user = User::where('email', $request->input('email'))->firstOrFail();\n\n if(Hash::check($request->input('password'), $user->password)){\n\n $token = Token::create([\n 'token'=>Str::random(60),\n 'user_id'=> $user->id\n ]);\n\n return response()->json([\n 'access_token' => $token,\n 'email' => $user->email\n ]);\n\n }\n return response()->json(['status' => 'Incorrect Credentials'],401);\n }",
"public function login(Request $request)\n {\n $oauthPasswordClient = DB::connection()->table('oauth_clients')\n ->select([\n 'id',\n 'secret'\n ])\n ->where('name', 'Laravel Password Grant Client')\n ->first();\n\n if (is_null($oauthPasswordClient))\n {\n return response()->json('Something is wrong with the server configuration.', 500);\n }\n\n // Add parameters to request to abstract oauth details from client\n $new_request = RequestFacade::create('/oauth/token', 'POST', [\n 'grant_type' => 'password',\n 'client_id' => $oauthPasswordClient->id,\n 'client_secret' => $oauthPasswordClient->secret,\n 'username' => $request->username,\n 'password' => $request->password,\n ]);\n RequestFacade::replace($new_request->input());\n\n /** @noinspection PhpParamsInspection */\n return Route::dispatch($new_request);\n }",
"private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }",
"public function login(Request $request){\n $this->validateLogin($request);\n \n if ($this->attemptLogin($request)) {\n $user = $this->guard()->user();\n //generate api_token\n $user->generateToken();\n\n return response()->json([\n 'data' => $user->toArray(),\n ]);\n }\n\n return $this->sendFailedLoginResponse($request);\n }",
"protected function authenticate(Request $request)\n {\n $email = $request->input('username');\n $password = $request->input('password');\n $request->request->add([\n 'username' => $email,\n 'password' => $password,\n 'grant_type' => 'password',\n 'client_id' => env('CLIENT_SECRET', ''),\n 'client_secret' => env('CLIENT_SECRET', ''),\n 'scope' => '*'\n ]);\n\n $proxy = Request::create(\n 'oauth/token',\n 'POST'\n );\n\n return Route::dispatch($proxy);\n // return Route::dispatch($tokenRequest)->getContent();\n }",
"function set_laravel_passport_grant_client_token()\n {\n DB::table('oauth_clients')\n ->where('id', 2)\n ->update(['secret' => 'dLdsIf3nPMWJC4gOCNcsUn5pBSv5tTPSaU51Gu2F']);\n }",
"public function user(Request $request)\n\t\t{\n\t\t\t$token = $request->bearerToken();\n\t\t\tif (empty($token))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$firebaseToken = $this->verifier->verifyIdToken($token);\n\t\t\t\t$targetProvider = config('firebase-token-authentication.target_provider');\n\t\t\t\t\n\t\t\t\treturn app(config('auth.providers.'.$targetProvider.'.model'))\n\t\t\t\t\t->resolveByClaims($firebaseToken)\n\t\t\t\t\t->setFirebaseAuthenticationToken($token);\n\t\t\t}\n\t\t\tcatch (\\Exception $exception)\n\t\t\t{\n\t\t\t\tif ($exception instanceof \\Firebase\\Auth\\Token\\Exception\\ExpiredToken)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (config('app.debug'))\n\t\t\t\t{\n\t\t\t\t\tthrow $exception;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"public function login(Request $request)\n {\n $user = User::where(\"email\", $request->request->get(\"email\"))->first();\n if($user){\n $valid = Hash::check($request->request->get(\"password\"), $user->password);\n if($valid){\n $token = Str::random(60);\n $user->api_token = hash('sha256', $token);\n $user->save();\n return response()->json($user);\n }\n }\n return response()->json([\"message\"=>\"Echec\"], 401);\n\n }",
"public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|string|email|max:255',\n 'password' => 'required|string|min:6',\n ]);\n\n if ($validator->fails())\n {\n return response(['errors'=>$validator->errors()->all()], 422);\n }\n\n $user = User::where('email', $request->email)->first();\n\n if ($user) {\n if (Hash::check($request->password, $user->password)) {\n\n $tokenResult = $user->createToken($user->username . ' Password Grant Client Token');\n $token = $tokenResult->token;\n\n if ($request->remember_me)\n $token->expires_at = Carbon::now()->addWeeks(1);\n\n $token->save();\n\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString()\n ], 200\n );\n\n } else {\n $response = [\"message\" => \"Non concordance des mots de passe\"];\n return response($response, 422);\n }\n } else {\n $response = [\"message\" => \"L'utilisateur n'existe pas\"];\n return response($response, 422);\n }\n\n }",
"public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|string|email',\n 'password' => 'required|string',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors'=>$validator->errors()], 422);\n }\n\n try {\n $user = User::where('email', $request->input('email'))->firstOrFail();\n }catch (\\Exception $e){\n return response()->json(['status' => 'Incorrect Credentials'],401);\n }\n\n if(Hash::check($request->input('password'), $user->password)){\n\n $token = Token::create([\n 'token'=>Str::random(60),\n 'user_id'=> $user->id\n ]);\n\n return response()->json([\n 'access_token' => $token,\n 'email' => $user->email\n ]);\n\n }\n return response()->json(['status' => 'Incorrect Credentials'],401);\n }",
"public function createToken(\\Navis\\UserBundle\\Entity\\User $user)\n {\n $token = sha1(time().$user->getSecretToken());\n\n $user->setAccessToken($token);\n $user->setExpiresAt(time()+300);//añado 5 minutos al tiempo de expiracion del token\n\n $this->getEntityManager()->persist($user);\n $this->getEntityManager()->flush();\n\n \n\n return $token;\n }",
"public function testCreateAuthenticatedTokenWithValidPassport(): void\n {\n $this->userProvider->expects($this->once())\n ->method('loadUserByIdentifier')\n ->with('test_user')\n ->will($this->returnValue($this->user))\n ;\n\n // expect the user checker to pass\n $this->userChecker->expects($this->once())\n ->method('checkPostAuth')\n ->with($this->user)\n ;\n\n // configure roles on the user to confirm they are combined with the\n // access token scopes\n $this->user->expects($this->once())\n ->method('getRoles')\n ->will($this->returnValue(['ROLE_USER']))\n ;\n\n // configure the passport\n $passport = new Passport(\n new UserBadge('test_user'),\n new OAuthCredentials('mock_token_string', 'scope_1 scope_2')\n );\n\n $token = $this->authenticator->createAuthenticatedToken($passport, 'api_firewall_name');\n\n $this->assertTrue($token->isAuthenticated());\n $this->assertSame('mock_token_string', $token->getToken());\n $this->assertSame($this->user, $token->getUser());\n $this->assertSame(['ROLE_USER', 'ROLE_SCOPE_1', 'ROLE_SCOPE_2'], $token->getRoleNames());\n }",
"protected function authenticated(Request $request, $user)\n {\n //set api token\n $user->api_token = Str::random(60);\n $user->update();\n\n }",
"public function signIsUsingPassportAsUser(User $user)\n {\n Passport::actingAs($user);\n }",
"public function creating(Request $request)\n {\n $request->token = newToken();\n }",
"public function token(Request $request, $id)\n {\n $token = Str::random(60);\n\n $user = User::find($id);\n\n $user->api_token = hash('sha256', $token);\n $user->save();\n\n return ['token' => $token];\n }",
"public function authenticate(Request $request): PassportInterface\n {\n // within the \"authenticate\" stage.\n $currentToken = $this->tokenStorage->getToken();\n if (!($currentToken instanceof TwoFactorTokenInterface)) {\n // This should only happen when the check path is called outside of a 2fa process\n // access_control can't handle this, as it's called after the authenticator\n throw new AccessDeniedException('User is not in a two-factor authentication process.');\n }\n\n $this->dispatchTwoFactorAuthenticationEvent(TwoFactorAuthenticationEvents::ATTEMPT, $request, $currentToken);\n\n $credentials = new TwoFactorCodeCredentials($this->twoFactorFirewallConfig->getAuthCodeFromRequest($request));\n $passport = new TwoFactorPassport($currentToken, $credentials, [new RememberMeBadge()]);\n\n if ($this->twoFactorFirewallConfig->isCsrfProtectionEnabled()) {\n $tokenValue = $this->twoFactorFirewallConfig->getCsrfTokenFromRequest($request);\n $tokenId = $this->twoFactorFirewallConfig->getCsrfTokenId();\n $passport->addBadge(new CsrfTokenBadge($tokenId, $tokenValue));\n }\n\n if ($this->twoFactorFirewallConfig->hasTrustedDeviceParameterInRequest($request)\n && class_exists(TrustedDeviceBadge::class) // Make sure the package is installed\n ) {\n $passport->addBadge(new TrustedDeviceBadge());\n }\n\n return $passport;\n }",
"public function registerUserRequest()\n {\n $user = factory(User::class)->make();\n\n return $this->json('POST', '/api/v2/user', array_merge($user->toArray(), ['password' => 'secret1234', 'agb_check' => true]));\n }",
"public function loginByFacebook(Request $request)\n {\n $userID = $request->userID;\n $access_token = $request->access_token;\n //dd($input);\n $curl_handle = curl_init();\n curl_setopt($curl_handle, CURLOPT_URL, 'https://graph.facebook.com/v9.0/' . $userID . '?fields=id%2Cname%2Cemail&access_token=' . $access_token);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 0);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n $response = json_decode(curl_exec($curl_handle));\n curl_close($curl_handle);\n if (!isset($response->email)) {\n return response()->json(['error' => 'wrong facebook token / this facebook token is already expired.'], 401);\n }\n\n // we get feedback from google & can use this email for creating a new user\n // then pass it to Laravel passport\n $client = Client::where('email', $response->email)->first();\n if (!$client) {\n $client = new Client();\n $client->email = $response->email;\n $client->save();\n }\n\n //this traits PassportToken comes in handy\n //you don't need to generate token with password\n\n if ($token = Auth::guard('api')->login($client)) {\n return $this->respondWithToken($token);\n }\n\n return response()->json([\n \"status\" => 0,\n 'msg' => 'Unauthorized'\n ], 401);\n }",
"public function loginByGoogle(Request $request)\n {\n\n //dd($request->input('token'));\n $input = $request->input('token');\n\n $curl_handle = curl_init();\n curl_setopt($curl_handle, CURLOPT_URL, 'https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=' . $input);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 0);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n $response = json_decode(curl_exec($curl_handle));\n curl_close($curl_handle);\n if (!isset($response->email)) {\n return response()->json(['error' => 'wrong google token / this google token is already expired.'], 401);\n }\n\n // we get feedback from google & can use this email for creating a new user\n // then pass it to Laravel passport\n $client = Client::where('email', $response->email)->first();\n if (!$client) {\n $client = new Client();\n $client->email = $response->email;\n $client->save();\n }\n\n //this traits PassportToken comes in handy\n //you don't need to generate token with password\n\n if ($token = Auth::guard('api')->login($client)) {\n return $this->respondWithToken($token);\n }\n\n return response()->json([\n \"status\" => 0,\n 'msg' => 'Unauthorized'\n ], 401);\n }",
"public function newToken(Request $request)\n {\n// $forPage = $request->input('forPage');\n \n $applicationSid = config('services.twilio')['applicationSid'];\n $accountSid = config('services.twilio')['accountSid'];\n $authToken = config('services.twilio')['authToken'];\n // // $appSid = env('TWILIO_APPLICATION_SID');\n \n $clientToken = new ClientToken($accountSid,$authToken);\n \n $clientToken->allowClientOutgoing($applicationSid);\n\n // if ($forPage == '/cats') {\n $clientToken->allowClientIncoming('support_agent');\n // } else {\n // $clientToken->allowClientIncoming('customer');\n // }\n\n $token = $clientToken->generateToken();\n return response()->json($token);\n }",
"public function postTwoFactor(Request $request) {\n if (!Session::get('password_validated') || !Session::get('id')) {\n return redirect()->route('login-page');\n }\n\n if (isset($_POST['token'])) {\n $user = User::find(Session::get('id'));\n if ($user->verifyToken($request->input('token'))) {\n Auth::login($user);\n\n // Log that the user was successfully logged in\n $loginlog = new Login;\n $loginlog->user_id = $user->id;\n $loginlog->ip = $request->getClientIp();\n $loginlog->combocorrect = '';\n $loginlog->tokencorrect = 'Correct';\n $loginlog->success = 'Success';\n $loginlog->save();\n\n //return redirect($this->redirectPath());\n return redirect('/clients/active');\n } else {\n // Log that the user entered wrong token\n $loginlog = new Login;\n $loginlog->user_id = $user->id;\n $loginlog->ip = $request->getClientIp();\n $loginlog->combocorrect = '';\n $loginlog->tokencorrect = 'Error';\n $loginlog->success = '';\n $loginlog->save();\n\n Session::flush();\n return redirect()->route('logout');\n }\n }\n }",
"public function login($request) {\n $credentials = request(['email', 'password']);\n\n if (!Auth::attempt($credentials)) {\n return response()->json([\n 'message' => 'Unauthorized'\n ], 401);\n }\n\n $user = $request->user();\n\n $tokenResult = $user->createToken('Personal Access Token');\n $token = $tokenResult->token;\n\n if ($request->remember_me) {\n $token->expires_at = Carbon::now()->addWeeks(1);\n }\n\n $token->save;\n\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString(),\n 'user' => new $this->dataResource($user)\n ]);\n }",
"public function login(Request $request)\n {\n if(!Auth::attempt(['email' => $request->input('email'), 'password' => $request->input('password')]))\n return response()->json([\n 'message' => 'Unauthorized'\n ], 401);\n\n $user = $request->user();\n\n $tokenResult = $user->createToken('Personal Access Token');\n $token = $tokenResult->token;\n\n if ($request->remember_me)\n $token->expires_at = Carbon::now()->addWeeks(1);\n\n $token->save();\n\n //return $user = Auth::user();\n\n return response()->json([\n 'user' => $user,\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString()\n ]);\n }",
"protected function authenticated(Request $request, User $user)\n {\n return response()\n ->json([\n 'status' => 'ok',\n 'token' => $user->createToken(date(\"Y/m/d H:i:s\"))->accessToken,\n ], 200);\n }",
"public function user(Request $request)\n {\n $tokenWithBearer = $request->header('Authorization');\n $bearer = substr($tokenWithBearer, 0, 7);\n $token = substr($tokenWithBearer, 7);\n\n $user = Auth::user();\n\n return response()->json([\n 'message' => 'Success',\n 'user' => $user,\n //'posts' => $user->posts,\n 'access_token' => $token,\n 'token_type' => trim($bearer),\n ]);\n }",
"private function setToken(UserModel $user)\n {\n\t\t$this->token = JWTAuth::AddJWTToken($user);\n\t}",
"public function register (Request $request) {\n\n\t $validator = $this->validator($request->all());\n\n\t if ($validator->fails()) {\n\t return response(['errors'=>$validator->errors()->all()], 422);\n\t }\n\n\t $request['password'] = Hash::make($request['password']);\n\t \n\t $user = User::create($request->toArray());\n\n\t $token = $user->createToken('Laravel Password Grant Client')->accessToken;\n\t \n\t $response = ['token' => $token];\n\n\t return response($response, 200);\n\n\t}",
"public function getAuthUser(Request $request){\n $user = JWTAuth::toUser($request->token);\n return response()->json(['result' => $user]);\n }",
"public function request_token() {\n\t\tif ($this->token->validate(\"request_token\")) {\n\t\t\t$co = new Config();\n\t\t\t$co->setPackageObject(Package::getByHandle('rest_wordpress'));\n\t\t\t$wp_rest_api_url = $co->get('WP_REST_API_URL');\n\t\t\t$oauth_key = $co->get('WP_REST_API_OAUTH_KEY');\n\t\t\t$oauth_secret = $co->get('WP_REST_API_OAUTH_SECRET');\n\t\t\t\n\t\t\t// Get Zend_Oauth_Consumer object\n\t\t\t$consumer = $this->getOauthConsumer($wp_rest_api_url, $oauth_key, $oauth_secret);\n\t\t\t\n\t\t\tif (is_object($consumer)) {\n\t\t\t\ttry {\n\t\t\t\t\t// Get Zend_Oauth_Token_Request object\n\t\t\t\t\t$token = $consumer->getRequestToken();\n\t\t\t\t\t$this->set('token', $token);\n\t\t\t\t\t$_SESSION['REQUEST_TOKEN'] = serialize($token);\n\t\t\t\t\t$consumer->redirect(array(\n\t\t\t\t\t\t'oauth_callback' => $this->getCollbackUrl()\n\t\t\t\t\t));\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->redirect('/dashboard/wp_rest_api/settings','required');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->set('error', array($this->token->getErrorMessage()));\n\t\t}\n\t}",
"private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }",
"private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }",
"public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|string|email|max:255',\n 'password' => 'required|string|min:6'\n ]);\n\n\n if($validator->fails()){\n return $this->sendError('Validation Error.', $validator->errors()); \n }\n\n $credentials = request(['email', 'password']);\n //\n if(Auth::attempt($credentials)){\n $user = auth()->user();\n //gera o token passport\n $user->token = $user->createToken($user->email)->accessToken;\n $success['usuario'] = $user;\n return $this->sendResponse($success, 'Usuario logado com sucesso.');\n }else{\n return $this->sendError('Usuario não logado.');\n }\n\n \n }",
"public function login(Request $request)\n {\n // Get user by email\n $user = User::where('email', $request->email)->first();\n // Check login\n if (!$user || !Hash::check($request->password, $user->password)) {\n return response()->json(['Unauthorized'], 401);\n\n }\n\n // Create token\n $token = $user->createToken($request->device_name ?? 'undefined')->plainTextToken;\n\n return response()->json(['token' => $token, 'user' => $user], 200);\n }",
"public function interceptAuthTokenRequest($request)\n {\n $accessTokenRequest = $this->parseAccessTokenRequest($request);\n\n\n /*\n $this->lastAccessTokenRequest = $accessTokenRequest;\n\n $clientId = $this->lastAccessTokenRequest->getClientId();\n $clientSecret = $this->lastAccessTokenRequest->getClientSecret();\n\n\n /* *\n * @var ClientRepositoryInterface\n * /\n $clientRepo = app()->make(ClientRepository::class);\n $client = $clientRepo->getClientEntity(\n $clientId,\n 'password',\n $clientSecret,\n true\n );\n\n $userId = DB::select('user_id from oauth_clients WHERE id=?;', [$clientId]);\n\n /**\n * @var MockPasswordGrant $passwordGrant\n * /\n $passwordGrant = app()->make(MockPasswordGrant::class);\n\n $accessTokenTTL = \\DateInterval::createFromDateString('1 day');\n\n $finalizedScopes = [];\n\n // Issue and persist new tokens\n $accessToken = $passwordGrant->issueAccessToken($accessTokenTTL, $client, $userId, $finalizedScopes);\n $refreshToken = $passwordGrant->issueRefreshToken($accessToken);\n */\n\n $accessToken = $this->issueAccessToken($accessTokenRequest);\n\n\n dd([(self::class . '::' . __FUNCTION__), $accessToken]);\n\n\n // TODO: Convert to Guzzle Response.\n\n $headers = [\n 'Content-Type' => 'application/json'\n ];\n\n return new Response(\n $statusCode,\n $headers,\n json_encode($starfishResponse)\n );\n\n }",
"public function login(Request $request)\n {\n $credentials = $request->validate([\n 'email' => 'required|string|email',\n 'password' => 'required|string',\n ]);\n \n if (Auth::attempt($credentials)) {\n\n $user = Auth::user();\n if ($user->role == 'adminstrator') {\n $success['token'] = $user->createToken('MyApp', ['do_anything'])->accessToken;\n } else {\n $success['token'] = $user->createToken('MyApp', ['can_create'])->accessToken;\n }\n \n return response()->json(['success' => $success,\n 'user' => $user,\n ]);\n } else {\n return response()->json([\n 'message' => 'Invalid user name or password',\n 'status_code' => 401\n ], 401);\n }\n }",
"public function login(Request $request)\n {\n $fields = $request->validate([\n 'email' => 'required|string',\n 'password' => 'required|string'\n ]);\n\n // We check the user's email\n $user = User::where('email', $fields['email'])->first();\n\n $password = Hash::check($fields['password'], $user->password);\n\n $token = $user->createToken('bitchesttoken')->plainTextToken;\n\n // We set the success response\n $successResponse = response([\n 'user' => $user,\n 'token' => $token\n ], 201);\n\n // We set the error response\n $errorResponse = response([\n 'message' => 'email ou mot de passe incorrect'\n ], 403);\n\n return !$user || !$password ? $errorResponse : $successResponse;\n }",
"public function authenticated(Request $request, Authenticatable $user)\n {\n if($request->wantsJson() || $request->isJson()) {\n return response(Auth::createToken($user), 200);\n }\n\n return redirect()->intended($this->redirectPath());\n }",
"public function updateUserToken(Request $request)\n {\n $api = new APIServiceRepository();\n if (!$request->input('idUser') || !$request->input('token')) {\n return $this->sendError('No existe la informacion solicitada');\n } else {\n //Verifico si existe el Usuario\n $dataUser = $api->existUser($request->input('idUser'));\n if (empty($dataUser)) {\n return $this->sendError('No existe el id del usuario');\n } else {\n $api->updateUserToken($request->input('idUser'), $request->input('token'));\n return $this->sendResponse('Token Modificado', '');\n }\n }\n }",
"protected function register(Request $request)\n {\n $token =Str::random(80);\n $data =$request->all();\n $user= User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n \"api_token\" => hash('sha256', $token), \n ]);\n \n return $token;\n\n // return $user;\n }",
"protected function request_token() {\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/request_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_callback' => SocialHelper::php_self()\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$_SESSION['oauth'] = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->authorize();\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}",
"public function postAction (Request $request)\n {\n $token = new Token();\n $form = $this->createForm(TokenType::class, $token);\n $form->submit(json_decode($request->getContent(), true), true);\n\n if ($form->isSubmitted() && $form->isValid()) {\n if ($this->getDoctrine()->getRepository(Token::class)->find($token->getId()) instanceof Token) {\n return $this->success($token);\n }\n\n $res = $this->get('metagame')->get('api/users/me', [], $token->getId());\n if ($res->getStatusCode() !== 200) {\n return $this->failure('token_error', (string)$res->getBody());\n }\n\n $manager = $this->get('app.security.user_manager');\n\n $data = json_decode((string)$res->getBody(), true);\n $user = $manager->findUserByUsername($data['username']);\n if ($user === null) {\n $user = $manager->createUser($data['username']);\n $user->setId($data['id']);\n $manager->updateUser($user);\n }\n\n $token->setUser($user);\n $this->getDoctrine()->getManager()->persist($token);\n $this->getDoctrine()->getManager()->flush();\n\n return $this->success(\n $token,\n [\n 'Default',\n 'User',\n 'user' => [\n 'Default',\n 'Self',\n ],\n ]\n );\n }\n\n return $this->failure('validation_error', $this->formatValidationErrors($form->getErrors(true)));\n }",
"public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }",
"public function createTokenForUser(User $user)\n {\n return JWTAuth::fromUser($user);\n }",
"public function login(Request $request)\n {\n $request->validate([\n 'ref' => 'required|string',\n 'password' => 'required|string',\n ]);\n\n $user = null;\n if (filter_var($request->ref, FILTER_VALIDATE_EMAIL)) $user = User::whereEmail($request->ref)->first();\n else $user = User::whereUsername($request->ref)->first();\n\n $credentials = ['email' => $user->email, 'password' => $request->password];\n if (!$user->email_verified_at) return response()->json([\n 'message' => [\n 'type' => 'danger',\n 'content' => 'Please, check your mailbox and click on the activation link.'\n ]\n ], 403);\n if ($user->is_active === 0) return response()->json([\n 'message' => [\n 'type' => 'danger',\n 'content' => 'Your account is not active. Please, contact the administrator.'\n ]\n ], 403);\n\n if (!Auth::attempt($credentials))\n return response()->json([\n 'message' => [\n 'type' => 'danger',\n 'content' => 'Unauthorized'\n ]\n ], 401);\n\n $user->update([\n 'ip' => $request->ip(),\n 'last_login' => now()\n ]);\n $tokenResult = $user->createToken('User Personal Access Token');\n $token = $tokenResult->token;\n // if ($request->remember_me)\n $token->expires_at = Carbon::now()->addWeeks(1);\n $token->save();\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString(),\n 'userData' => array_merge($user->toArray(), [\n 'notifications' => $user->unreadNotifications()->latest()->limit(5)->get(),\n 'plans' => $user->plans,\n 'messages' => $user->contact_us()->whereStatus(0)->latest()->limit(5)->get()\n ])\n ]);\n }",
"public function store(Request $request, User $user)\n {\n\n //user allowed?\n $response = Gate::inspect('create', Token::class);\n if (!$response->allowed()) {\n //create errror message\n return redirect(\n action(\n 'Web\\UserController@show',\n ['user' => $user->id]\n )\n )\n ->withErrors([$response->message()]);\n }\n\n //Validation \n $request->validate([\n 'token_name' => 'required|min:5|max:255',\n 'token_ability' => 'required',\n ]);\n\n \n Session::flash('message', \"Token \\\"\" . $user->createToken($request->token_name, [$request->token_ability])->plainTextToken . \"\\\" created\");\n return Redirect::back();\n }",
"public function getPassport(): Passport;",
"public function issueToken(Request $request, $provider, $accessToken) {\n $params = [\n 'grant_type' => 'social',\n 'client_id' => env('PASSPORT_CLIENT_ID'),\n 'client_secret' => env('PASSPORT_CLIENT_SECRET'),\n 'accessToken' => $accessToken,\n 'provider' => $provider,\n ];\n $request->request->add($params);\n\n $requestToken = Request::create(\"oauth/token\", \"POST\");\n $response = Route::dispatch($requestToken);\n\n return response()->json([\n \"response\" => json_decode($response->getContent())\n ]);\n }",
"public function completeUserRegistrationAndLogin(Request $request, $token)\n {\n $user = $this->verifyToken($token);\n \n //validate the input from the user\n $validator = $this->passwordValidator($request->all());\n\n if ($validator->fails()) {\n $errors = $validator->errors();\n return redirect()\n ->back()\n ->withErrors($validator->errors());\n }\n\n $user->status = User::VERIFIED;\n $user->password = bcrypt($request->input('password'));\n $user->save();\n\n Auth::guard($this->getGuard())->login($user);\n \n return redirect($this->redirectPath());\n\n }",
"public function login (Request $request) {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email',\n 'password' => 'required'\n ]);\n if ($validator->fails())\n return response()->json(['errors' => $validator->errors()], 400);\n $user = User::where('email', $request->email)->first();\n if (is_null($user) || !Hash::check($request->password, $user->password))\n return response()->json(['error'=>'نام کاربری یا رمز عبور نادرست است'], 403);\n $token = $user->createToken(now())->plainTextToken;\n return response()->json(['message'=>'خوش آمدید', 'token'=>$token]);\n }",
"public function login(Request $request)\n {\n $rules = [\n 'team_id' => 'required',\n 'password' => 'required',\n ];\n $input = $request->only('team_id', 'password');\n $validator = Validator::make($input, $rules);\n if($validator->fails()) {\n $error = $validator->messages()->toJson();\n return response()->json(['success'=> false, 'error'=> $error]);\n }\n $credentials = [\n 'team_id' => $request->team_id,\n 'password' => $request->password,\n ];\n $token = $this->jwt->attempt($credentials);\n\n try {\n // attempt to verify the credentials and create a token for the user\n if (! $token = $this->jwt->attempt($credentials)) {\n return response()->json(['success' => false, 'error' => 'Invalid Credentials. Please make sure you entered the right information and you have verified your email address.'], 401);\n }\n } catch (JWTException $e) {\n // something went wrong whilst attempting to encode the token\n return response()->json(['success' => false, 'error' => 'could_not_create_token'], 500);\n }\n // all good so return the token\n return response()->json(['success' => true, 'data'=> [ 'token' => $token ]]);\n }",
"public function getAuthUser(Request $request) {\n $user = JWTAuth::toUser($request->token);\n return response()->json(['result' => $user]);\n }",
"public function register(Request $request)\n {\n $user = $this->user_repo->create($request->all(), true);\n\n $this->guard()->login($user);\n\n return $request->wantsJson()\n ? $user->append(['access_token', 'redirect_to'])\n : redirect($this->redirectPath());\n }",
"public function login(Request $request)\n {\n $validation = Validator::make($request->all(), [\n 'email' => 'required|email',\n 'password' => 'required|min:4',\n ]);\n\n if ($validation->fails()) {\n return $this->throwValidation($validation->messages()->all());\n }\n\n $credentials = $request->only(['email', 'password']);\n\n try {\n if (!Auth::attempt($credentials)) {\n return $this->throwValidation('Invaild Credentials');\n }\n \n // else {\n // $UserDetails = User::where('email',$request->email)->first();\n // if($UserDetails->status==0 && $UserDetails->confirmed==0)\n // {\n // return $this->throwValidation(trans('api.messages.login.not-active'));\n // }\n // }\n\n $user = $request->user();\n\n $passportToken = $user->createToken(\"{{env('APP_NAME')}}\");\n\n // Save generated token\n $passportToken->token->save();\n\n $token = $passportToken->accessToken;\n } catch (\\Exception $e) {\n return $this->respondInternalError($e->getMessage());\n }\n\n $UserUpdateDetails = User::where('email',$request->email)->first();\n $UserUpdateDetails->save();\n\n $UserDetails = User::where('email',$request->email)->first();\n $UserDetails->token = $token;\n return $this->respond([\n 'status' => true,\n 'message' => 'Login Successfully',\n 'data' => $UserDetails\n ]);\n }",
"public function login(Request $request){\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email',\n 'password' => 'required|string|min:6',\n ]);\n \n \n if ($validator->fails()) {\n return response()->json($validator->errors(), 422);\n }\n \n if (!$token = Auth::guard('shopUsers')->attempt($validator->validate())) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n \n \n return $this->createNewToken($token);\n }",
"public function createToken(Request $request)\n {\n //try\n //{\n //These vars will be true when the and the hashed password are valid\n $checkemail = false;\n $checkpassword = false;\n\n\n\n //Extract email and username from the request\n $r_email = $request->input('email');\n $r_password = $request->input('password');\n\n //Testing Hashing the password\n $password = Hash::make($request);\n \n //Try if the user email is in db \n $db_mail = DB::table('user')\n ->where('Email', $r_email)\n ->select('Email')\n ->pluck('Email');\n \n //when email was founded then change to true\n if($db_mail[0] == $r_email)\n {\n $checkemail = true;\n }\n\n //search for member id in user table with the email address\n $db_memberid = DB::table('user')\n ->where('Email', $r_email)\n ->select('member_id')\n ->pluck('member_id');\n\n //search for userid in DB with the email address\n $db_userid = DB::table('user')\n ->where('Email', $r_email)\n ->select('id')\n ->pluck('id');\n\n //search for the password in member with the userid\n $db_password = DB::table('member')\n ->where('id', '=', $db_memberid[0])\n ->select('password')\n ->pluck('password');\n\n\n if(Hash::check($r_password, $db_password[0]))\n {\n $checkpassword = true;\n }\n\n\n if($checkpassword&&$checkemail){\n \n //Credentials are right!\n $customClaims = ['User_Id' => $db_userid[0], 'User_Email' => $db_mail[0]];\n $payload = JWTFactory::make($customClaims);\n $token = JWTAuth::encode($payload);\n \n //send token back\n return response()->json(['token' => (string)$token]);\n\n }elseif (!$checkpassword) {\n return response()->json(['error' => 'The Password is wrong']);\n }elseif (!$checkemail) {\n return response()->json(['error' => 'The Email is wrong']);\n }elseif (!$$checkpassword&&!$checkemail) {\n return response()->json(['error' => 'The Email and the password are wrong']);\n }\n }",
"private function get_token($user)\n\t\t{\n\t\t\treturn $user->id . ';' . $this->ip_lock($this->getAuthToken($user)) . ';' . $_SERVER['REMOTE_ADDR'];\n\t\t}",
"protected function respondWithToken($token)\n{\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'user'=> $this->guard()->user(),\n 'expires_in' => $this->guard()->factory()->getTTL() * 60\n ]);\n}",
"public function postAuth(Request $request) {\n\t\tif (!$request->isJson())\n\t\t\treturn;\n\n\t\t$req = $request->json()->all();\n\t\tif (!isset($req['mac'], $req['usermac'], $req['redir'], $req['gatewayip'], $req['access_token'])) {\n\t\t\treturn;\n\t\t}\n\t\t$cfg = self::getDevConfig($req['mac']);\n\t\tif (!$cfg || $cfg['access_token'] != $req['access_token']) {\n\t\t\treturn response()->json(['success'=>false]);\n\t\t}\n\t\t$token = self::auth($req['mac'], $req['usermac'], null, $req['redir']);\n\t\treturn response()->json(['success'=>true, 'token'=>$token]);\n\t}",
"public function userByToken();",
"public function login(Request $request) {\n $credentials = $request->only('email', 'password');\n\n // set the identifier for wp_users\n JWTAuth::setIdentifier('id');\n\n try {\n // attempt authorization\n if (! $token = JWTAuth::attempt($credentials, [ 'aud' => 'access' ])) {\n // authorization failed\n return $this->json(['message' => 'invalid credentials'], 400);\n }\n return $this->json(compact('token'));\n }\n catch (\\Exception $ex) {\n // authorization error\n return $this->error('could not create token', $ex);\n }\n }",
"public function login(Request $request)\n {\n if(Auth::attempt(['email' => $request->email, 'password' => $request->password]))\n {\n $id = uniqid();\n $user = Auth::user();\n \n $result['unique_id'] = $this->tokenName . $id;\n $result['token'] = $user->createToken($this->tokenName . $id)->accessToken;\n $result['name'] = $user->name;\n $result['profile'] = $user->profile;\n $result['success'] = true;\n\n return response()->json($result, $this-> successStatus);\n }\n else\n {\n $result['success'] = false;\n $result['message'] = 'Unauthorized User';\n\n return response()->json($result, 461); \n }\n }",
"protected function authenticate(){\n $user = User::create([\n 'name' => 'test',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret1234'),\n ]);\n $this->user = $user;\n $token = JWTAuth::fromUser($user);\n return $token;\n }",
"protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }",
"public function login(Request $request) {\n $jwtAuth = new JwtAuth();\n\n $json = $request->input('json', null);\n $params = json_decode($json);\n\n $username = (!is_null($json) && isset($params->username)) ? $params->username : null;\n $getToken = (!is_null($json) && isset($params->gettoken)) ? $params->gettoken : null;\n\n if(!is_null($username) && ($getToken == null || $getToken == 'false'))\n {\n $signup = $jwtAuth->signup($username);\n }elseif ($getToken != null){\n $signup = $jwtAuth->signup($username, $getToken);\n }else{\n $signup = array(\n 'status' => 'error',\n 'message' => 'Envia tus datos por post'\n );\n }\n \n return response()->json($signup, 200);\n }",
"public function login(User $user, Request $request)\n {\n $user->setIsActive(1)\n ->setLastSeen(new \\DateTime());\n\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n\n if ($request->request->has(\"fcm_token\")) {\n $fcmToken = $request->request->get(\"fcm_token\");\n\n $this->tokenManager->markFCMTokenAsActive($user, $fcmToken);\n }\n\n $this->session->start();\n $this->session->set('token', $user->getToken());\n\n $normalizedUser = $this->helper->currentUserNormalizer($user);\n\n return $this->helper->prepareForSuccessResponse($normalizedUser);\n }",
"public function token()\n {\n if( !isset( $this->config['oauth_id'] ) || !isset( $this->config['oauth_secret'] ) )\n $this->redirect( 'oauth' );\n\n // Skip if we're already set up\n if( isset( $this->config['oauth_id'] ) && isset( $this->config['oauth_secret'] ) && isset( $this->config['oauth_token'] ) )\n $this->redirect( '' );\n \n \n $this->url = $_SERVER['HTTP_HOST'].$this->baseURL;\n }",
"public function issueToken(ServerRequestInterface $request)\n {\n // Getting API response\n $response = parent::issueToken($request);\n $parsedResponse = json_decode($response->content());\n $requestedUserEmail = $request->getParsedBody()['username'];\n $requestedUser = User::where('email', $requestedUserEmail)->first();\n\n // If failure\n if(isset($parsedResponse->error)){\n\n // Add system log\n Log::notice('Nieudana próba logowania', [\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'error' => $parsedResponse->message,\n 'user' => ($requestedUser)? $requestedUser->email: null\n ]);\n\n // Translate response\n $parsedResponse->message = __($parsedResponse->message);\n $parsedResponse->error = __($parsedResponse->error);\n $response->setContent(json_encode($parsedResponse));\n }\n\n // If success\n else if (isset($parsedResponse->token_type)){\n\n // Add info about user to API response\n $parsedResponse->user_object = $requestedUser;\n $response->setContent(json_encode($parsedResponse));\n\n // Log successfull login attemp\n// $requestedUser->logLogin();\n\n }\n return $response;\n }",
"public function register(RegisterRequest $request, User $user)\n {\n \t$user = $user->create([\n\n \t\t'name'\t\t\t\t=> ucwords($request->name), \n \t\t'email'\t\t\t\t=> $request->email,\n \t\t'password'\t\t\t=> Hash::make($request->password),\n \t\t'activation_token'\t=> str_random(60)\n\n \t]);\n\n\t\t\t$credentials = $request->only('email', 'password');\n\n\t\t\ttry {\n // attempt to verify the credentials and create a token for the user\n\t if (! $token = JWTAuth::attempt($credentials)) {\n\t return response()->json(['error' => 'invalid_credentials'], 401);\n\t }\n\t } catch (JWTException $e) {\n\t // something went wrong whilst attempting to encode the token\n\t return response()->json(['error' => 'could_not_create_token'], 500);\n\t }\n\n\t // to send verify at gmail\n\t $user->notify(new SignupActivate($user));\n\n\t // response with fractal\n\t\t\t$response = fractal()\n\t\t\t\t->item($user)\n\t\t\t\t->transformWith(new UserTransformer)\n\t\t\t\t->toArray();\n\n\t\t\t$response['access_token'] = compact('token');\n\n\t // all good so return the token\n\t return response()->json($response, 201);\n }",
"public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name'=>['required'],\n 'password'=>['required'],\n ]);\n if($validator->fails()){\n return response('failed',422);\n }\n\n if(!auth()->attempt($validator->validated())) {\n return response(['message'=>'Invalid credentials','data'=>$validator->validated()],400);\n }\n\n $accessToken = auth()->user()->createToken('authToken')->accessToken;\n $oauth = now()->addHours(6);\n\n return response(['user'=>auth()->user(),'access_token'=>$accessToken,'expire'=>$oauth]);\n\n }",
"public function login(Request $request)\n {\n //dd($request->all());\n $validator = Validator($request->all(),[\n 'email' => 'required|exists:users,email',\n 'password' => 'required',\n ]);\n if($validator->fails()){\n $msg = $validator->errors()->first();\n return ApiResponse::errorResponse('VALIDATION_ERROR', $msg, []);\n //return $this->validateResponse($validator->errors()->first(),[]);\n }\n $credentials = request(['email', 'password']);\n if(Auth::attempt($credentials)) {\n\n $user = Auth::user();\n \n $tokenResult = $user->createToken('Personal Access Token')->accessToken;\n $user->token = $tokenResult; \n $msg = 'Login success';\n return ApiResponse::successResponse('SUCCESS', $msg , $user);\n //return $this->successResponse($msg,$user);\n \n \n }else {\n $msg = 'User not found';\n return ApiResponse::errorResponse('UNAUTHORIZED_ERROR', $msg, []);\n //return $this->errorResponse($msg,[]);\n }\n \n }",
"protected function authenticate(){\n \\Artisan::call('passport:install');\n $user = User::create([\n 'name' => 'test',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret1234'),\n ]);\n Passport::actingAs($user);\n $token = $user->createToken('myapi')->accessToken;\n $headers = [ 'Authorization' => 'Bearer $token'];\n\n return $headers;\n }",
"public function login(Request $request){\n $user = User::where('email', $request->email)->get();\n\n //Comprobar que email y password de user son iguales\n $data = ['email' => $request->email];\n\n $user = User::where($data)->first();\n\n if($user->password == $request->password)\n {\n //Si son iguales codifico el token\n $token = new Token($data);\n $tokenEncode = $token->encode();\n\n //Devolver la respuesta en formato JSON con el token y código 200\n return response()->json([\n \"token\" => $tokenEncode\n ],200);\n var_dump('Login correcto');\n }\n return response()->json([\n \"error\" => \"Usuario incorrecto\"\n ],401);\n }",
"public function enableTwoFactor($userId, $request)\n {\n return $this->start()->uri(\"/api/user/two-factor\")\n ->urlSegment($userId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }",
"function new_access_token($token, $consumer, $verifier = null) {\n // for the user associated with this token if the request token\n // is authorized\n // should also invalidate the request token\n }",
"protected function processGrantTypePassword(Oauth_Model_Request $request) {\n\n $modelLoader = $this->_helper->ModelLoader;\n //client\n $client = $this->retrieveClientFromHeader($request);\n //resource owner\n $resource_owner_id = $this->getRequest()->getParam(USERNAME);\n $resource_owner = $modelLoader->loadResourceOwner($resource_owner_id);\n //scopes\n $scopes = $request->getScope();\n //token\n $token = $this->_token_factory->create($resource_owner, $scopes);\n //refresh token\n $refresh_token = $this->_refresh_token_factory->create($client, $scopes, $resource_owner);\n //response\n return $this->compose_response($token, $refresh_token);\n }",
"public function getAuthToken($user)\n\t\t{\n\t\t\treturn sha1($this->getSessionSalt($user).$user->passphrase);\n\t\t}",
"public function resendActivationToken(Request $request,$user_id='')\n {\n if ($user_id) {\n $user_id = base64_decode($user_id);\n $user = User::find($user_id);\n if (!empty($user)) {\n $this->send_sms($user->home_contact_ext.$user->home_contact_num,$user->email_token,$user->first_name);\n\n $url = 'code_verification/'.base64_encode($user_id);\n if ($request->has('CompanyNumber')) {\n $url='code_verification/'.base64_encode($user_id).'?CompanyNumber='.$request->get('CompanyNumber');\n }\n\n return redirect($url)\n ->with('success','Token sent again Successfully');\n }\n } \n\n }",
"public function user(Request $request);",
"public function login (Request $request)\n {\n $validator = Validator::make($request->all(), [\n\n 'email' => 'required|email',\n 'password' => 'required',\n\n ]);\n if ($validator->fails()) {\n return response()->json(['error'=>$validator->errors()], 401);\n }\n\n // $user = User::where('email', $request->email)->first();\n $credentials = $request->only(['email', 'password']);\n if (Auth::attempt($credentials)) {\n // user auth pass\n $user = Auth::user();\n if($user->is_verified==0)\n {\n return response(['Unauthorize'=>'User Not Verified'],401);\n }\n $token = $user->createToken('MyApp')->plainTextToken;\n\n\n return response()->json([\n 'token'=>$token,\n 'status' => true,\n 'data' => $user,\n 'message' => 'Login successfull.'\n ],201);\n\n }\n return response()->json([\n 'status' => false,\n 'message' => 'Invalid Credentials.'\n ]);\n\n\n\n }"
] | [
"0.6660562",
"0.66252416",
"0.65500987",
"0.65338385",
"0.64669263",
"0.6378788",
"0.6241137",
"0.6210433",
"0.62041277",
"0.6186837",
"0.6114993",
"0.5941711",
"0.59191376",
"0.590946",
"0.5877192",
"0.5832231",
"0.58276343",
"0.5820947",
"0.58154684",
"0.58090836",
"0.5799379",
"0.5798205",
"0.5793772",
"0.5792558",
"0.57904565",
"0.5790288",
"0.57690376",
"0.5757549",
"0.5747998",
"0.574586",
"0.57282704",
"0.5718247",
"0.5698306",
"0.5696439",
"0.5693855",
"0.56907004",
"0.5682509",
"0.5669784",
"0.56563497",
"0.565538",
"0.5649954",
"0.5640051",
"0.5624709",
"0.5611279",
"0.56099284",
"0.5597692",
"0.55764747",
"0.55405",
"0.5533864",
"0.5524963",
"0.552077",
"0.5506969",
"0.5495848",
"0.5492635",
"0.54904425",
"0.5488842",
"0.5485428",
"0.54793614",
"0.5463781",
"0.5453015",
"0.54523104",
"0.5450059",
"0.5446536",
"0.5440087",
"0.5436197",
"0.5433119",
"0.5431731",
"0.54298246",
"0.54287004",
"0.54259384",
"0.54258513",
"0.54230785",
"0.54186904",
"0.54186505",
"0.5416425",
"0.53935164",
"0.53793424",
"0.5373415",
"0.53722006",
"0.5366272",
"0.53661025",
"0.5358223",
"0.5356705",
"0.5349335",
"0.5347139",
"0.5341155",
"0.5335404",
"0.5333141",
"0.5323508",
"0.5320808",
"0.5316515",
"0.53051627",
"0.5302294",
"0.5287429",
"0.5279278",
"0.52764285",
"0.5270813",
"0.52694136",
"0.5269121",
"0.52674425",
"0.5264154"
] | 0.0 | -1 |
Call the Model constructor | function __construct() {
parent::__construct();
$this->load->database();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }",
"function __construct () {\n\t\t$this->_model = new Model();\n\t}",
"function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }",
"function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}",
"function __construct()\r\n {\r\n parent::Model();\r\n }",
"function __construct() {\r\n parent::Model();\r\n }",
"function __construct() {\n // Call the Model constructor \n parent::__construct();\n }",
"public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }",
"private function __construct($model)\r\n {\r\n\r\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n parent::Model();\n }",
"function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}",
"public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n\t\t}\n\t\t$this->model_name = strtolower($this->model_name);\n\t\t\n\t\t$this->_initialize_db();\n\t}",
"public function __construct()\n {\n parent::Model();\n\n }",
"function __construct()\n\t\t{\n\t\t\t// Call the Model constructor\n\t\t\tparent::__construct();\n\t\t $this->load->database();\t\n\t\t}",
"public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }",
"public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}",
"public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}",
"public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }",
"public function __construct()\n\t{\n\t\t// \\ladybug_dump($model);\n\t}",
"function __construct () {\n\n\t\techo 'I am in Model';\n\n\t}",
"public function __construct() {\n $this->openConnection();\n $this->model();\n }",
"public function __construct()\n {\n $this->model = app()->make($this->model());\n }",
"function __construct()\n {\n $this->openDatabaseConnection();\n $this->loadModel();\n }",
"public function __construct(Model $model) {\n parent::__construct($model);\n \n }",
"public function __construct()\n {\n $this->model = new BaseModel;\n }",
"public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }",
"public function __construct(){\n\t\tinclude_once(\"model/crews_model.php\");\n\t\t$this->model = new crews_model();\n\t}",
"public function __construct($model) \n {\n parent::__construct($model);\n }",
"public function __construct($initModel = true) {\n if ($initModel)\n $this->model = new Model();\n }",
"public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('data');\n\t}",
"public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }",
"public function __construct() {\n $this->docenteModel = $this->model('DocenteModel');\n }",
"function __construct(Model $model)\n {\n $this->model=$model;\n }",
"public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }",
"public function __construct($model)\n {\n //\n $this->model = $model;\n }",
"public function __construct() {\n\t\t$this->orgModel = new OrgModel(); // TODO: \n\t }",
"public function __construct()\n {\n\n $this->SubCategory = new SubCategoriesModel;\n $this->Functions = new ModelFunctions();\n }",
"function __construct() {\n parent::__construct();\n $this->load->model('Callcenter_model');\n }",
"public function __construct() {\n // und lädt das zugehörige Model\n $this->userModel = $this->model('User');\n }",
"function __construct()\n {\n parent::__construct();\n $this->__resTraitConstruct();\n $this->load->model('VSMModel');\n $this->load->model('TextPreprocessingModel');\n\n }",
"public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }",
"public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}",
"function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}",
"protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }",
"public function __construct() {\n parent::__construct('md_rent_car', 'md_order');\n $this->log->log_debug('RentCarAffairModel model be initialized');\n }",
"function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct()\n {\n $this->modelName = explode('.', Route::currentRouteName())[0];\n $this->model = new Model($this->modelName);\n }",
"public function __construct( Model $model ) {\n\t\t$this->model = $model;\n\t}",
"public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}",
"public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }",
"function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}",
"function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model('floatplan_model');\n\t\t$this->load->model('user_model');\n }",
"public function __construct() {\r\n $this->model = new CompanyModel();\r\n }",
"public function __construct($model){\r\n\t\t$this->model = $model;\r\n\t}",
"public function __construct()\n {\n $this->MemberModel = new MemberModel();\n }",
"public function __construct()\n\t{\n\t\t$this->modelProducts = new ProductsModel();\n\t\t/* ********** fin initialisation Model ********** */\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}",
"public function __construct()\n {\n parent::__construct();\n\n $this->model = new MembersModel();\n }",
"public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }",
"public function __construct()\n {\n echo \"constructeur model\";\n }",
"function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }",
"public function __construct()\n\t\t{\n\t\t\t/*goi thang den ham _init trong ResourceModel*/\n\t\t\tparent::_init('lienhe', 'id', new ContactModel);\n\t\t}",
"public function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model(\"options_model\");\n\t\t$this->load->model(\"selections_model\");\n\t\t$this->load->model(\"info_model\");\n\t\t$this->load->model(\"dealer_model\");\n\t\t$this->load->library(\"encrypt\");\n\t\t$this->load->model(\"promocode_model\");\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->load->model(['m_voting', 'm_master', 'm_prospects', 'm_factors']);\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model('Thematic_model');\n }",
"function __construct() {\n $this->model = new HomeModel();\n }",
"public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }",
"public function __construct()\n\t{\n\t\t//MVC: makes CodeIgniter style $this->load->model() available to my controllers\n\t\t$this->load = new modelLoader($this);\n\t}",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct($model)\n {\n $this->model = $model;\n }",
"function __construct()\n\t{\n\t\tparent :: __construct();\n\t\t$this -> load -> model('getinfo','m');\n\t}",
"function __construct() {\n $this->loteModel = new loteModel();\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model(array('dt_diag_klsf_model','dt_obat_model','dt_pasien_model','dt_pemeriksaan_model','dt_proses_model','dt_thpan_model'));\n }",
"function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}",
"public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }",
"public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }",
"public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}",
"public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t$this->load->model(array('user_model','program_model'));\r\n\t\t\r\n\t}",
"public function __construct(Model $model)\n {\n // $this->$key = $model;\n $this->model = $model;\n }",
"function __construct()\n {\n // load model\n Load::loadModel(\"helpDesk\");\n }",
"public function __construct()\n\t{\n\t\t$this->model = new Layout_Model();\n\t}",
"public function __construct(){\n $this->sliderModel = $this->model('Slider');\n $this->siteInfoModel = $this->model('SiteInfo');\n $this->officeModel = $this->model('Office');\n $this->categoryModel = $this->model('Category');\n $this->brandModel = $this->model('Brands');\n $this->productModel = $this->model('Products');\n $this->imgModel = $this->model('Image');\n }",
"function __construct()\n {\n parent::__construct();\n // $this->load->model('');\n }",
"public function __construct() {\r\n parent::__construct();\r\n $this->load->model(array(\r\n 'app_model'\r\n ));\r\n }",
"function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('TimeTable_model', 'tmtl');\n\t\t$this->load->model('Schools_model', 'schl');\n\t}",
"public function __construct() {\n\t\t\t$this->modelName = 'concreeeeeete';\n\t\t}",
"public function __construct($model = null)\n {\n $instance = $this->makeModel($model);\n parent::__construct($instance->getConnection()->query());\n $this->setModel($instance);\n }",
"function __construct() {\n parent::__construct();\n $this->load->model('Fontend_model');\n $this->load->model('Package_model');\n }"
] | [
"0.8196736",
"0.8080118",
"0.8054001",
"0.7839992",
"0.78184336",
"0.78158236",
"0.7770901",
"0.773286",
"0.7704549",
"0.7701882",
"0.7701882",
"0.7701882",
"0.7701882",
"0.76811564",
"0.76426494",
"0.75779855",
"0.75710344",
"0.75621206",
"0.7518676",
"0.75171185",
"0.75171185",
"0.7511973",
"0.7489728",
"0.7468261",
"0.74572253",
"0.7449389",
"0.7445181",
"0.7444535",
"0.7427869",
"0.7407304",
"0.74014014",
"0.73759925",
"0.73413444",
"0.7335981",
"0.73260605",
"0.7277932",
"0.7272845",
"0.72707343",
"0.7265125",
"0.7254405",
"0.7252804",
"0.72438663",
"0.7242104",
"0.7241692",
"0.7240256",
"0.7231797",
"0.7230043",
"0.72287345",
"0.7228103",
"0.722678",
"0.72072005",
"0.71945196",
"0.7175319",
"0.716174",
"0.71547157",
"0.7150238",
"0.7140722",
"0.71377164",
"0.71358",
"0.7132933",
"0.7132409",
"0.7132409",
"0.71250975",
"0.71239203",
"0.71029484",
"0.7092826",
"0.70837456",
"0.7072703",
"0.70563996",
"0.7049204",
"0.70491046",
"0.7045107",
"0.70382833",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7036996",
"0.7033529",
"0.7029588",
"0.7026682",
"0.70233345",
"0.70195305",
"0.70195305",
"0.7018619",
"0.7012934",
"0.7012402",
"0.7007989",
"0.70067614",
"0.7005785",
"0.7004497",
"0.6996979",
"0.69894654",
"0.6989313",
"0.6972264",
"0.6970196",
"0.6969221"
] | 0.0 | -1 |
Create the object representing the current request. | public function createRequest(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function factory()\n {\n $request = new Request();\n static::$_current = $request;\n return $request;\n }",
"public static function create()\n {\n $contentType = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : 'text/html';\n return (new Request(\n $_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI'] ,\n $_REQUEST, $contentType\n ))->processBody();\n }",
"protected function _getRequest() {\n\t\treturn new Request;\n\t}",
"function request() {\n return new Request;\n }",
"public static function request() {\n\t\tif (!isset(self::$_request)) {\n\t\t\tself::$_request=new \\GO\\Base\\Request();\n\t\t}\n\t\treturn self::$_request;\n\t}",
"static public function createFromGlobals()\n {\n $request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);\n\n if (0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')\n && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE'))\n ) {\n parse_str($request->getContent(), $data);\n $request->request = new Collection($data);\n }\n\n return $request;\n }",
"private function setRequest() {\n // Create request object\n $this->request = Request::createFromGlobals();\n // Check caching and exit if so\n // - create a dummy response for possible 304\n $response = new Response();\n $seconds = Config::get()->pagecachetime;\n $response->setLastModified(new DateTime('-' . $seconds . ' seconds'));\n if ($response->isNotModified($this->getRequest())) {\n $response\n ->setSharedMaxAge($seconds)\n ->send();\n exit();\n }\n // Add better json request support\n // check request Content-Type\n $ctCheck = 0 === strpos(\n $this->request->headers->get('CONTENT_TYPE')\n , 'application/json'\n );\n // check request Method\n $methodCheck = in_array(\n strtoupper($this->request->server->get('REQUEST_METHOD', 'GET'))\n , array('PUT', 'DELETE', 'POST')\n );\n if ($ctCheck && $methodCheck) {\n $params = (array) json_decode($this->request->getContent());\n $this->request->request = new ParameterBag($params);\n }\n }",
"function request()\n\t{\n\t\treturn phanda()->create(\\Phanda\\Foundation\\Http\\Request::class);\n\t}",
"public function __construct(Request $request);",
"public function __construct() {\r\n\t\t// Initialize the properties related to the request itself\r\n\t\t$this->class = '';\r\n\t\t$this->method = '';\r\n\t\t$this->action_instance = null;\r\n\t\t\r\n\t\t// Initialize the logger\r\n\t\t$this->logger = new Logger();\r\n\t\t\r\n\t\t// Initialize the database\r\n\t\t$this->db = new Database(DB_CONNECTION_NAME, DB_USER, DB_PASS, DB_NAME);\r\n\t\t\r\n\t\t// Initialize the output instance\r\n\t\t$this->output = new Output();\r\n\t\t\r\n\t\t/* Initialize the input variables */\r\n\t\t$this->input = new stdClass(); // Initialize the input object\r\n\t\t$this->input->get = &$_GET; // Store the GET parameters\r\n\t\t$this->input->post = &$_POST; // Store the POST parameters\r\n\t\t$this->input->request = &$_REQUEST; // Store the POST parameters\r\n\t\t$this->input->files = &$_FILES; // Store the FILES parameters\r\n\t\t$this->input->cookie = &$_COOKIE; // Store the cookies\r\n\t\t$this->input->session = &$_SESSION; // Store the session parameters\r\n\t\t$this->input->server = &$_SERVER; // Store the server parameters\r\n\t}",
"public static function createFromGlobals()\n {\n $class = __CLASS__;\n\n \n //Modification for modouth flow TODO: extend request class and override createFromGlobals method\n //to handle params stored in session\n \n $OAUTH_PARAMS = array();\n \n $clientKey = 'modoauth-clientid';\n $resTypeKey = 'modoauth-responsetype';\n $stateKey = 'modoauth-state';\n \n if(isset($_SESSION['modoauth'])){\n $oauthParams = $_SESSION['modoauth'];\n $OAUTH_PARAMS = array(\n \"client_id\"=>$oauthParams[$clientKey],\n \"response_type\"=>$oauthParams[$resTypeKey],\n \"state\"=>$oauthParams[$stateKey]\n );\n }\n \n $request = new $class(array_merge($_GET,$OAUTH_PARAMS), $_POST, array(), $_COOKIE, $_FILES, $_SERVER);\n\n $contentType = $request->server('CONTENT_TYPE', '');\n $requestMethod = $request->server('REQUEST_METHOD', 'GET'); \n if (0 === strpos($contentType, 'application/x-www-form-urlencoded')\n && in_array(strtoupper($requestMethod), array('PUT', 'DELETE'))\n ) {\n parse_str($request->getContent(), $data);\n $request->request = $data;\n } elseif (0 === strpos($contentType, 'application/json')\n && in_array(strtoupper($requestMethod), array('POST', 'PUT', 'DELETE'))\n ) {\n $data = json_decode($request->getContent(), true);\n $request->request = $data;\n }\n \n return $request;\n }",
"function __construct() {\n $this->init();\n \\base\\RequestRegistry::setRequest($this);\n }",
"public function __construct( Request $request )\n {\n\n }",
"public static function createFromHttpRequest(Request $request)\n {\n $static = new static();\n $static->name = $request->name;\n $static->email = $request->email;\n $static->password = $request->password;\n $static->role = $request->role;\n $static->description = $request->description;\n\n return $static;\n }",
"public function createRequest()\n {\n return new ChipVN_Http_Request;\n }",
"public function __construct() {\n\n\t\t// get Session data\n\t\t$this->session = Session::get();\n\n\t\t// get Response format (json, unless html is explicitly asked for)\n\t\t(strpos($_SERVER['HTTP_ACCEPT'], 'html')) ? $this->format = 'html' : $this->format = 'json';\n\n\t\t// get URI data\n\t\t$this->uri = new URI();\n\n\t\t// get Request method\n\t\t$this->method = $this->crud_map[$_SERVER['REQUEST_METHOD']];\n\n\t\t// get Model\n\t\t$this->model = $this->uri->get('model', 'index');\n\n\t\t// get Request body\n\t\t//\t\t@todo: combine this switch into a simpler statement that uses php://input for all methods\n\t\t//\t\t\t\tand can tell if data is url encoded (parse_str) or json.\n\t\tswitch($this->method) {\n\t\t\tcase 'create':\n\t\t\t\t$this->data = $_POST;\n\t\t\t\tbreak;\n\t\t\tcase 'read':\n\t\t\t\t$this->data = $_GET;\n\t\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\tparse_str(file_get_contents('php://input'), $_put);\n\t\t\t\t$this->data = $_put;\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\tparse_str(file_get_contents('php://input'), $_delete);\n\t\t\t\t$this->data = $_delete;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// get User data\n\t\t$this->user = new User(Session::get('user_id',0));\n\t}",
"public function __construct($request) {\n\t\t\n\t\t\t$this->_request = $request;\n\t\t\t\n\t\t}",
"protected function factory()\n {\n $this->request = $this->request();\n $this->response = $this->response();\n $this->route = $this->route();\n\n return $this;\n }",
"public function __construct( ezcMvcRequest $request );",
"public static function createFromGlobals()\r\n {\r\n // Create and return a new instance of this\r\n return new static(\r\n $_GET,\r\n $_POST,\r\n $_COOKIE,\r\n $_SERVER,\r\n $_FILES,\r\n null // Let our content getter take care of the \"body\"\r\n );\r\n }",
"public function __construct (){\n $this->request = app('request');\n }",
"protected function buildRequest() {\n\t\t/* @var $request \\TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request */\n\t\t$request = $this->objectManager->get('TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Web\\\\Request');\n\t\t$request->setControllerVendorName($this->vendorName);\n\t\t$request->setControllerExtensionName($this->extensionName);\n\t\t$request->setPluginName($this->pluginName);\n\t\t$request->setControllerName($this->controllerName);\n\t\t$request->setControllerActionName($this->actionName);\n\t\t$request->setFormat($this->formatName);\n\t\t$request->setArguments($this->arguments);\n\t\treturn $request;\n\t}",
"public function __construct(Request $request)\n\t{\n\t\t//\n $this->request = $request;\n }",
"public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}",
"public static function createFromGlobals()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n $path = $_SERVER['REQUEST_URI'];\n return new static($method, $path, $_REQUEST);\n }",
"public static function capture()\n {\n $request = new self();\n\n $request->setMethod($_SERVER['REQUEST_METHOD'])\n ->setScheme($_SERVER['REQUEST_SCHEME'])\n ->setTime($_SERVER['REQUEST_TIME_FLOAT'])\n ->setUri($_SERVER['REQUEST_URI'])\n ->setUserAgent($_SERVER['HTTP_USER_AGENT'])\n ->setRemoteIp($_SERVER['REMOTE_ADDR'])\n ->setRemotePort((int) $_SERVER['REMOTE_PORT'])\n ->setServerProtocol($_SERVER['SERVER_PROTOCOL'])\n ->setQuery($_GET)\n ->setInput($_POST);\n\n return $request;\n }",
"public function __construct($request)\n\t{\n\t\t//\n $this->request = $request;\n }",
"public function __construct()\n {\n $this->uri = $_SERVER['REQUEST_URI'];\n $this->method = $_SERVER['REQUEST_METHOD'];\n\n // Get all parameters from the request depending on request method\n $parameters = match ($this->method) {\n 'GET' => $_GET,\n 'POST' => $_POST,\n };\n // Remove 'path' from Request parameters because we use it in rewrite rule in htaccess for pretty url,\n // and it is handled by the Route later.\n unset($parameters['path']);\n $this->parameters = $parameters;\n }",
"protected function obtainRequest() {\n return Request::createFromGlobals();\n }",
"public function __construct(Request $request)\n {\n $this->page_title = $request->route()->getName();\n //$this->request_id =\\App\\Api::RequestLogWrite(\\Request::all());\n }",
"public function __construct(Request $request)\n {\n $this->requestData = $request;\n }",
"public function __construct(Request $request) {\n\n //request class\n $this->request = $request;\n\n }",
"public function __construct(Request $request)\n {\n //\n }",
"abstract public function initFromRequest(\\App\\Request $request);",
"public function __construct($request)\n\t{\n\t\t$this->request = $request;\n\t}",
"public function __construct()\n {\n $this->parser = app()->make('Parser');\n\n $this->request = app()->make('Request');\n $this->data = $this->request->getRequest();\n }",
"public function __construct($request) {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n\n }",
"public function getRequest()\n {\n if (is_null($this->_request)) {\n $this->_request = new Request();\n }\n return $this->_request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function createFromRequest(Request $request);",
"public function toRequest(): Request\n {\n // Create URI\n $uri = new Uri(sprintf($this->uriTemplate, $this->shop));\n\n // Create headers\n $authenticatedRequestHeader = $this->accessTokenTransformer\n ->toAuthenticatedRequestHeader($this->accessToken);\n\n // Create headers\n $headers = array_merge($this->headers, $authenticatedRequestHeader);\n\n // Create request\n return new Request($this->httpMethod, $uri, $headers);\n }",
"public function __construct(Request $request) {\n $this->request = $request;\n }",
"public function __construct(Request $request) {\n $this->request = $request;\n }",
"public function __construct(Request $request) {\n $this->request = $request;\n }",
"public function __construct(Request $request) {\n $this->request = $request;\n }",
"public function get_request()\n {\n $request = new midgardmvc_core_request();\n $request->set_method($this->appserver_context['env']['REQUEST_METHOD']);\n if (isset($this->appserver_context['env']['HTTP_X_HTTP_METHOD_OVERRIDE']))\n {\n $request->set_method($this->appserver_context['env']['HTTP_X_HTTP_METHOD_OVERRIDE']);\n }\n\n // Parse URL into components (Mjolnir doesn't do this for us)\n $url_components = parse_url(\"http://{$this->appserver_context['env']['HTTP_HOST']}{$this->appserver_context['env']['REQUEST_URI']}\");\n\n // Handle GET parameters\n if (!empty($url_components['query']))\n {\n $get_parameters = array();\n parse_str($url_components['query'], $get_parameters);\n $request->set_query($get_parameters);\n }\n\n $request->resolve_node($url_components['path']);\n\n return $request;\n }",
"public function __construct(Request $request)\n {\n $this->requestData = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"public function __construct($request)\n {\n $this->request = $request;\n }",
"private function _setRequest()\n\t{\n\t\tif ($this->_requestUri !== NULL) {\n $this->_request = preg_replace('#(^/)|(^' . ROOT . ')|(/$)#', '', $this->_requestUri);\n\n if (! $this->_request) {\n \t$this->_request = self::DEFAULT_MODULE . '/' . self::DEFAULT_VIEW;\n }\n\n $this->_requestVars = explode('/', $this->_request);\n if (count($this->_requestVars) == 1) {\n\t\t\t\t$this->_request .= '/' . self::DEFAULT_VIEW;\n\t\t\t\t$this->_requestVars[] = self::DEFAULT_VIEW;\n }\n\n return $this;\n }\n\n throw new Exception('Request URI is not available');\n\t}",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n // $this->model = $model;\n }",
"public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->incomingRequest = new IncomingIlluminateRequest($request);\n $this->outgoingResponse = new OutgoingResponse();\n }",
"public function __construct(Request $request){\n $this->request = $request;\n\n }",
"protected function initRequest()\n {\n $context = new RequestContext();\n $context->fromRequest(self::$request);\n $matcher = new UrlMatcher($this->routCollection, $context);\n\n try {\n $attributes = $matcher->match(self::$request->getPathInfo());\n $response = $this->callController($attributes);\n } catch (ResourceNotFoundException $e) {\n $response = new Response('Not Found', 404);\n } catch (Exception $e) {\n $response = new Response('An error occurred', 500);\n }\n\n $response->send();\n }",
"public function __construct($request)\n {\n // Verify system requirements\n Requirements::verify();\n\n // Retrieve the library from request\n $request = $this->getRequestClass($request);\n\n // Validate the requested library\n $this->validate($request);\n\n // Initialize the Request library\n $this->requestCtx = new $request();\n\n // Initialize the Network\n $this->networkCtx = new Network();\n\n // Initialize Response Object\n $this->responseCtx = new Response();\n }",
"public function request(): Request\n {\n if (class_exists('Src\\Http\\Request')) {\n return new Request;\n }\n }",
"public function __construct() {\n // BIG THANKS!!!\n foreach ($_POST as $key => $val) {\n if (substr($key, 0, 8) == 'action::') {\n $_POST['action'] = substr($key, 8);\n unset($_POST[$key]);\n }\n }\n\n $this->post = (object)$_POST;\n foreach($this->post as $key => $value) $this->post->$key = stripslashes($value);\n $this->_uri = array_key_exists('PATH_INFO', $_SERVER) ? $_SERVER['PATH_INFO'] : '';\n // Fix: workaround for lighttp rewrite rules, pse check for better solution\n if ('/index.php' === substr($this->_uri,0, 10))\n $this->_uri = substr($this->_uri, 10);\n $this->_rootUri = $this->getBaseUri() . substr($this->_uri, 1);\n\n $i = strrpos($_SERVER['SCRIPT_NAME'], '/') + 1;\n $this->baseUri = substr($_SERVER['REQUEST_URI'], 0, $i);\n\n $this->uri = $this->_uri;\n $this->requestUri = $_SERVER['REQUEST_URI'];\n }",
"public function __construct($request)\n {\n #TODO change the request data type\n $id = isset($request[0]) ? $request[0] : null;\n $modelClass = $this->getModelClass();\n $this->model = new $modelClass($id);\n }",
"public function __construct(Request $request)\n {\n $this->response['meta']['request'] = $request->all();\n $this->response['meta']['timestamp'] = Carbon::now()->format('Y-m-d\\TH:i:s.v\\Z');\n\n if($request->input('sourceId') == 'comics')\n $this->response['meta']['request']['sourceId'] = 'space';\n }",
"public function __construct(?HttpRequest $request = null) {}",
"public function __construct(Request $request)\n {\n parent::__construct();\n\n $this->registry = new RequestRegistry([\n 'DEFAULT_VIEW' => $request->{'request-view'},\n 'AUTO_REBUILD' => $request->{'request-rebuild'}\n ]);\n }",
"public static function capture(): Request\n {\n return parent::createFromGlobals();\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }",
"public function __construct(Request $request)\n {\n $this->request = $request;\n }"
] | [
"0.7819796",
"0.75796235",
"0.7390413",
"0.71912575",
"0.7041319",
"0.70375586",
"0.6892279",
"0.68758136",
"0.6809956",
"0.67815953",
"0.67699075",
"0.6758292",
"0.6745856",
"0.6714415",
"0.67100155",
"0.6644409",
"0.6632911",
"0.66080236",
"0.6601363",
"0.65632135",
"0.65579",
"0.6555645",
"0.6534263",
"0.65272206",
"0.6514984",
"0.64998865",
"0.64962167",
"0.6492213",
"0.64709365",
"0.6427292",
"0.6419711",
"0.6417614",
"0.6412895",
"0.63901025",
"0.6379675",
"0.63728917",
"0.6366273",
"0.63656646",
"0.6359607",
"0.6357514",
"0.6349735",
"0.6339817",
"0.63177705",
"0.63177705",
"0.63177705",
"0.63177705",
"0.63173354",
"0.6314735",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.6306111",
"0.63008404",
"0.6287328",
"0.6274203",
"0.6270506",
"0.62608874",
"0.6258795",
"0.6257317",
"0.6242616",
"0.62418634",
"0.6241767",
"0.6238287",
"0.6233553",
"0.62311065",
"0.6226803",
"0.621943",
"0.6206345",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105",
"0.6203105"
] | 0.6902876 | 7 |
Create the instance that will output the response. | public function createResponseWriter(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function response() {\n return new Response;\n }",
"protected function createHttpResponse()\n {\n return new Response();\n }",
"public function createResponse()\n {\n return new Response;\n }",
"private function response() {\n if ($this->responseStatus !== 200) {\n $this->request['format'] = self::DEFAULT_RESPONSE_FORMAT;\n }\n $method = $this->request['format'] . 'Response';\n $this->response = array('status' => $this->responseStatus, 'body' => $this->$method());\n return $this;\n }",
"protected function _getResponse() {\n\t\treturn new Response;\n\t}",
"public function __construct()\n {\n $this->response = new Response();\n }",
"public static function response(): Response\n {\n return new Response;\n }",
"public function output(): \\Maleficarum\\Response\\AbstractResponse {\n $contentType = $this->handler->getContentType();\n $body = $this->handler->getBody();\n\n // add typical response headers\n $this\n ->response\n ->setHeader('Content-Type', $contentType);\n\n // send the response\n $this\n ->response\n ->setContent((string)$body)\n ->send();\n\n return $this;\n }",
"public function get_response_object()\n {\n }",
"protected function _response() {}",
"public function as_response() {\n return Net_HTTP::Response($this);\n }",
"public function createResponse()\n {\n return new GuzzleResponse();\n }",
"protected function response()\n {\n return new Response('php://memory');\n }",
"public function createResponse(): ResponseInterface\n\t\t{\n\t\t\treturn $this->responseFactory->createResponse()->withHeader('Content-Type', 'text/html; charset=utf-8');\n\t\t}",
"public function getResponseInstance(){\n\t\treturn ControllerResponse::getInstance();\n\t}",
"public function createResponse(): IResponse;",
"public function output()\n {\n $this->sendHeaders()\n ->sendBody();\n\n return $this;\n }",
"public function create(): ResponseInterface\n\t{\n\t\t$this->content = [];\n\t}",
"public static function response()\n {\n $container = Container::instance();\n if (!$container->has('response')) {\n $container->register('response', new Response());\n }\n return $container->get('response');\n }",
"public function getResponseParser()\n {\n return new ResponseParser();\n }",
"protected function getResponseFactory()\n {\n }",
"public function run()\n {\n try {\n $response = $this->buildResponse();\n } catch (Error\\Base $ex) {\n $response = $this->handleError($ex);\n }\n\n $this->serializer->serialize($response, $this);\n\n return $this;\n }",
"protected function construct_response()\n {\n $this->feedback['ok'] = $this->ok;\n $this->feedback['code'] = $this->code;\n $this->feedback['resource'] = $this->resource;\n }",
"protected function getResponse(): Response\n {\n return new Response(fopen('data://text/plain,', 'rb'), 200);\n }",
"public function getResponseOutput() {\n // Empty, to be overridden\n }",
"public function create()\n {\n return $this->renderOutput();\n }",
"public function response()\n {\n }",
"private function _createJson()\n {\n return new SlimBootstrap\\ResponseOutputWriter\\Json(\n $this->_request,\n $this->_response,\n $this->_headers,\n $this->_shortName\n );\n }",
"public function makeResponse(): ResponseInterface;",
"public function response ();",
"public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }",
"public function __construct()\n {\n return response([],400);\n }",
"public function __construct($objResponse) {\n $this->_objResponse = $objResponse;\n\n if(!($this instanceof Core_Web_Template_Subtemplate)) {\n if($this->_objResponse->getStrresponsetype() === TPL_MODE_HTML_FULL) {\n $this->_txtOutput = file_get_contents(TPL_HTML_BASE);\n } else if($this->_objResponse->getStrresponsetype() === TPL_MODE_HTML_ACTION_ONLY) {\n if(file_exists(TEMPLATE_DIR . str_replace('_', DIRECTORY_SEPARATOR, $this->_objResponse->tplContent) . '.html')) {\n $this->_txtOutput = file_get_contents(TEMPLATE_DIR . str_replace('_', DIRECTORY_SEPARATOR, $this->_objResponse->tplContent) . '.html');\n } else {\n var_dump('Can\\'t find template \"' . TEMPLATE_DIR . str_replace('_', DIRECTORY_SEPARATOR, $this->_objResponse->tplContent) . '.html' . '\"');\n }\n } else if($this->_objResponse->getStrresponsetype() === TPL_MODE_JSON) {\n $this->_txtOutput = file_get_contents(TPL_JSON_BASE);\n }\n }\n }",
"public function response($response)\n {\n\n return new Response($response);\n\n }",
"public function response();",
"public function createResponse(): ResponseInterface {\n return $this->responseFactory->createResponse()->withHeader('Content-Type', 'application/json');\n }",
"public function getResponseParser(): ResponseParserInterface\n {\n return new ResponseParser();\n }",
"public function getResponseParser(): ResponseParserInterface\n {\n return new ResponseParser();\n }",
"public function getResponseParser(): ResponseParserInterface\n {\n return new ResponseParser();\n }",
"public static function create()\n {\n return new static('Multiple OCSP responses received');\n }",
"protected function buildResponse(): self\n {\n $verb = $this->apiCall['verb'] ?? 'get';\n $this->response = $this->client->$verb(\"{$this->apiCall['endpoint']}?{$this->getQuery()}\");\n\n return $this;\n }",
"public function __construct($response){\n \n $this->_helper = new Helper();\n \n $this->_response = $response;\n \n }",
"final public function getResponse() {\r\n $template = $this->getProvider()->get('PM\\Main\\Web\\Component\\Template\\Json');\r\n $response = $this->getProvider()->get('response');\r\n $response->setTemplate($template);\r\n return $response;\r\n }",
"function __construct()\n {\n parent::__construct();\n\n // Set our page category and name\n $this->pageCategory('default');\n $this->pageName('The object you called did not properly extend the fRESTApplication Object');\n\n // We're going to output XML\n $this->fOutput->setMimeType('text/xml');\n\n // No caching output\n //$this->fOutput->noCache = true;\n\n // Don't use the theme or try and merge them\n $this->fTheme->useTheme(false);\n\n // Setup our default DOM document\n $this->dom = new DOMDocument('1.0', 'UTF-8');\n $this->dom->formatOutput = true;\n\n // Create the root node and result subnode\n $this->parentNode = $this->dom->createElement(get_class($this));\n $this->dom->appendChild($this->parentNode);\n $this->result = $this->dom->createElement('result');\n $this->parentNode->appendChild($this->result);\n\n // Append the hostname for debugging\n $hostname = new tHostname();\n $this->parentNode->appendChild($this->dom->createElement('host', $hostname->get()));\n\n // Append the request time\n $this->parentNode->appendChild($this->dom->createElement('requestTime', strftime('%x %X')));\n }",
"public function factory_provider(): Response_Factory {\n\t\treturn new Response_Factory( new HTTP() );\n\t}",
"abstract public function createResponse(AbstractRequestClient $request);",
"public function toResponse(): Response\n {\n $response = clone RequestContext::getResponse();\n return $response->setException($this->getException())->auto($this->handleBody(), $this->getStatusCode());\n }",
"protected function build()\n {\n $this->getResponse()->setVersion($this->getConf()->getVersion());\n $this->getResponse()->setCreate(json_decode($this->getConf()->getCreate()));\n }",
"protected function created()\n {\n $this->response = $this->response->withStatus(201);\n $this->jsonBody($this->payload->getOutput());\n }",
"public function get(): ResponseInterface\n {\n $view = $this->config->views['info'] ?? 'Tatter\\Workflows\\Views\\actions\\info';\n\n $this->response->setBody(view($view, [\n 'layout' => $this->config->layouts['public'],\n 'config' => $this->config,\n 'job' => $this->job,\n ]));\n\n return $this->response;\n }",
"abstract public function response();",
"protected function __construct()\n\t{\n\t\t$this->Header = ResponseHeader::getInstance();\n\t}",
"public function _response($response) {\n\t\treturn $this->_instance($this->_classes['response'], array(\n\t\t\t'body' => $response\n\t\t));\n\t}",
"public static function getCurrentResponse() {\r\n if (self::$response == NULL) {\r\n self::$response = new self();\r\n }\r\n return self::$response;\r\n }",
"function __construct(ResponseFactory $response)\n {\n $this->response = $response;\n }",
"public function getResponse()\n\t{\n\t\t$outGoingResponse = $this->response;\n\t\t$request = $this->request;\n\n\t\t$headers = $outGoingResponse->getHeaders();\n\t\t$status_code = (isset($headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS])) ? $headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] : 200;\n\t\tunset($headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS]);\n\n\t\t$response = new Response(trim($outGoingResponse->getStream()), $status_code, array_filter($headers));\n\t\t$response->prepare($request->getRequest());\n\n\t\treturn $response;\n\t}",
"public function __invoke() : ResponseInterface {\n $response = new Response();\n\n $response->setStatusCode(404)\n ->setContent(static::$NOTFOUND_BODY)\n ->setContentType(static::$CONTENT_TYPE);\n\n return $response;\n }",
"public function toResponse()\n {\n $request = $this->request();\n $partialData = $request->getHeader('X-Inertia-Partial-Data');\n $only = array_filter(\n explode(',', $partialData ? $partialData->getValue() : '')\n );\n\n $partialComponent = $request->getHeader('X-Inertia-Partial-Component');\n $props = ($only && ($partialComponent ? $partialComponent->getValue() : '') === $this->component)\n ? Helpers::arrayOnly($this->props, $only)\n : $this->props;\n\n array_walk_recursive($props, static function (&$prop) {\n $prop = Helpers::closureCall($prop);\n });\n\n $page = [\n 'component' => $this->component,\n 'props' => $props,\n 'url' => $request->getURL(),\n 'version' => $this->version ? $this->version : 0,\n ];\n $json = json_encode($page);\n\n $response = new HTTPResponse();\n if ($request->getHeader('X-Inertia')) {\n $response->setBody($json);\n $response->addHeader('Vary', 'Accept');\n $response->addHeader('X-Inertia','true');\n return $response;\n } else {\n $controller = Controller::curr();\n $processed = $controller->renderWith($this->rootView, $this->viewData + ['page' => $page, 'pageJson' => $json]);\n $response->setBody($processed);\n return $response;\n }\n }",
"public function __construct($response)\n {\n $this->response = $response;\n }",
"public function __construct($response)\n {\n $this->response = $response;\n }",
"public function __construct($response)\n {\n $this->response = $response;\n }",
"public function __construct($response)\n {\n $this->response = $response;\n }",
"public function & GetResponse ();",
"public function __construct($response)\n {\n $this->init($response);\n\n }",
"public function get_response () {\n $this->process_form();\n\n if (!$this->response) {\n $this->response=new Ctz_response();\n }\n\n return $this->response;\n }",
"public function create()\n {\n return $this->response->view($this->getViewName('create'));\n }",
"abstract function createOutput();",
"public function getResponse()\n {\n if (is_null($this->_response)) {\n $this->_response = new Response();\n }\n return $this->_response;\n }",
"public function Response($response) {\n\t\t\n\t}",
"public function init()\n {\n // init default response properties\n $this->headers = array();\n $this->params = array();\n $this->uri = null;\n $this->method = null;\n $this->version = null;\n $this->cookies = array();\n $this->parts = array();\n\n // Query string is always present, even if it is empty\n $this->queryString = '';\n $this->body = '';\n\n return $this;\n }",
"public function getResponse() {\n }",
"public function createInstance()\n {\n $mock = $this->mock('Dhii\\\\SimpleTest\\\\Writer\\\\WriterAwareInterface')\n ->getWriter()\n ->new();\n\n return $mock;\n }",
"function __construct($response, $request)\n\t{\n\t\tparent::__construct($response, $request);\n\t}",
"private function _createJsonHal()\n {\n return new SlimBootstrap\\ResponseOutputWriter\\JsonHal(\n $this->_request,\n $this->_response,\n $this->_headers,\n $this->_shortName\n );\n }",
"protected function main(): ResponseInterface\n {\n }",
"public function output() {\n // Add output listeners\n $oc = new OutputController();\n $oc->listen();\n // Create matcher\n $matcher = new UrlMatcher(Routing::get()->routes(), new RequestContext());\n // Subscribe a route listener to the events\n $this->serviceContainer->get('events')\n ->addSubscriber(new RouterListener($matcher, new RequestStack()));\n // Create kernel object\n $kernel = new HttpKernel(\n $this->serviceContainer->get('events'), new ControllerResolver(), new RequestStack(), new ArgumentResolver()\n );\n\n $response = $kernel->handle($this->getRequest());\n $response->send();\n\n $kernel->terminate($this->getRequest(), $response);\n \n if($this->inDevelopment()) {\n // Execute any queries left behind\n Db::flushAll();\n }\n\n return $this;\n }",
"public function getResponse() {\n\t}",
"public function response()\n {\n return new Response(\n $this->getService('service.token')->sendToken($this->response)\n );\n }",
"public function __construct(HttpResponse $response)\n {\n $this->response = $response;\n }",
"public function launch() {\n $this->run();\n return $this->_response;\n }",
"public function getResponse() {}",
"public function getResponse() {}",
"public function getResponse() : Response\n {\n return $this->response;\n }",
"public function response() {\n $response = (object)[\n 'count' => $this->response,\n 'errors' => $this->errors\n ];\n echo json_encode($response); \n }",
"public function getResponse()\n {\n }",
"public function __construct(Response $response)\n {\n $this->response = $response;\n }",
"public function createPage()\n {\n echo $this->output;\n }",
"public function __invoke(): Response\n {\n return new Response('', Response::HTTP_NO_CONTENT);\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->stream = fopen('php://output', 'w');\n\t}",
"public function prepareResponse();",
"public function response()\r\n {\r\n return $this->response;\r\n }",
"public function response()\r\n {\r\n return $this->response;\r\n }",
"public function createStatusAction(): ResponseInterface\n {\n return $this->htmlResponse();\n }",
"public function run()\n\t{\n\t\t// Proxy requests, write headers, and then render response\n\t\treturn $this\n\t\t\t->request()\n\t\t\t->response()\n\t\t;\n\t}",
"public function getOutput()\n {\n $this->output = $output;\n }",
"function get_response() {\n return $this->response;\n }",
"public function dump()\n {\n $this->baseResponse->dump();\n\n return $this;\n }",
"public function __construct(ResponseFactory $response)\n {\n $this->response = $response;\n }",
"public function enableResponseProcessing(): self\n {\n $this->enableResponseProcessing = true;\n\n return $this;\n }",
"public function toResponse()\n {\n $base = ['return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail];\n $attributes = array_merge($base, $this->attributes);\n if ($this->sign) {\n $attributes['sign'] = Support\\generate_sign($attributes, $this->app->getKey());\n }\n return new Response(XML::build($attributes));\n }"
] | [
"0.7633698",
"0.75850236",
"0.7502986",
"0.745646",
"0.7449684",
"0.73577356",
"0.73361456",
"0.71089935",
"0.69429004",
"0.6780523",
"0.6756643",
"0.6751104",
"0.672081",
"0.67011636",
"0.666654",
"0.6652955",
"0.66448355",
"0.66399264",
"0.6595596",
"0.6531698",
"0.65127426",
"0.65002626",
"0.64981437",
"0.648465",
"0.64768225",
"0.6457322",
"0.6401955",
"0.6396446",
"0.63447577",
"0.6308545",
"0.6290117",
"0.62859416",
"0.62852776",
"0.6280751",
"0.62801355",
"0.6274818",
"0.62730294",
"0.62730294",
"0.62730294",
"0.6253351",
"0.6244846",
"0.6238631",
"0.6230766",
"0.62278503",
"0.62271345",
"0.6212196",
"0.6207944",
"0.6198393",
"0.6197422",
"0.6192735",
"0.61862713",
"0.6173806",
"0.6171312",
"0.61635584",
"0.61501026",
"0.6117367",
"0.61023396",
"0.6101816",
"0.60906184",
"0.60906184",
"0.60906184",
"0.60906184",
"0.60876787",
"0.60819024",
"0.60443103",
"0.60424167",
"0.6040292",
"0.6039687",
"0.6039228",
"0.60341287",
"0.6008655",
"0.6003971",
"0.60033834",
"0.6000857",
"0.5994175",
"0.59932864",
"0.599013",
"0.598682",
"0.5983343",
"0.5972807",
"0.59711194",
"0.59711194",
"0.5970319",
"0.59679836",
"0.596117",
"0.5959618",
"0.5957312",
"0.59568906",
"0.5951507",
"0.5950825",
"0.59481996",
"0.59481996",
"0.59465814",
"0.5936323",
"0.5929963",
"0.591205",
"0.590786",
"0.59045327",
"0.5903986",
"0.58991706"
] | 0.6834764 | 9 |
Create the view object. | public function createView(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createView(){\n\t\t$vue = new View(\"Create\");\n\t\t$vue->generer();\n\t}",
"public function create()\n {\n return view($this->_config['view']);\n }",
"function __construct()\r\n {\r\n $this->view = new View();\r\n }",
"function __construct()\n {\n $this->view = new View();\n }",
"public function __construct()\n {\n $this->view = new View($this);\n }",
"public function create()\n {\n return view($this->view());\n }",
"public function create()\n {\n return view(parent::commonData($this->view_path.'.create'));\n }",
"public function create()\n {\n $view = new View('verein_create');\n $view->title = 'Verein erfassen';\n $view->heading = 'Verein erfassen';\n $view->display();\n }",
"function __construct()\n {\n $this->view = new View(); \n }",
"public function create(): View\n {\n //\n }",
"protected function createView()\n {\n return new IndexView();\n }",
"function __construct(){\n $this->view=new View(); \n }",
"protected function _view()\r\n\t\t{\r\n\t\t\t((!is_object($this->_view)) ? $this->_view = init_class(VIEW_NAME) : '');\r\n\t\t}",
"public function create()\n\t{\n\t\t//\n\t\treturn View::make('mockups.pelanggan');\n\t}",
"public function __construct(){\n //l'intensification de la classe view\n $this->view=new View();\n }",
"public function create() {\r\n require $this->views_folder . 'create.php';\r\n }",
"public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }",
"function __construct() {\n// \t\t$this -> view = new View();\n \t}",
"public function create()\n\t{\n\t\treturn View::make($this->createView, array(\n\t\t\t'model' => $this->decorator->getModel(),\n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'fields' => FieldMapper::getFields($this->decorator->getFields()),\n\t\t\t'method' => 'POST',\n\t\t\t'action' => get_class($this) . '@store',\n\t\t\t'listingAction' => get_class($this) . '@index'\n\t\t));\n\t}",
"public function create() {\n return view($this->viewfolder . '.create', ['j' => $this->j]);\n }",
"protected function makeViews()\n {\n new MakeView($this, $this->files);\n }",
"protected function setView()\n {\n $view = 'Src\\Modules\\\\' . $this->module_name . '\\Views\\\\' . $this->class . 'View';\n $this->view = new $view;\n \n $this->view->setData( $this->model->getData() );\n \n $this->view->run();\n }",
"public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}",
"protected function buildView()\n {\n $view = new FusionView();\n\n $httpRequest = Request::createFromEnvironment();\n $request = $httpRequest->createActionRequest();\n\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($request);\n\n $this->controllerContext = new ControllerContext(\n $request,\n new Response(),\n new Arguments([]),\n $uriBuilder\n );\n\n $view->setControllerContext($this->controllerContext);\n $view->disableFallbackView();\n $view->setPackageKey('Flowpack.Listable');\n $view->setFusionPathPattern(__DIR__ . '/Fixtures/');\n\n return $view;\n }",
"public function create()\n {\n return view($this->controller.'.create', $this->viewData);\n }",
"public function create() \n {\n return view(\"$this->view.create\");\n }",
"public function create()\n {\n //return view()\n }",
"protected function initializeStandaloneViewInstance() {}",
"private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}",
"public function create()\n {\n // Open the editor with an empty canvas\n return View::make('canvas.editor');\n }",
"Public Static Function Instance($template = null){\r\n return new View($template);\r\n }",
"public function create()\n {\n\t return view('crear-ug0299');\n }",
"function __construct() {\r\n $this->view = new View();\r\n $this->deviceType = View::getInstance();\r\n }",
"public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}",
"public function initializeView() {}",
"public function initializeView() {}",
"protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }",
"protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }",
"public function create()\n {\n return view(\"supercircles.create\");\n }",
"public function __construct()\n {\n $this->view = new Views('about');\n }",
"public function create()\r\n {\r\n return view($this->edit_view);\r\n }",
"public function create()\n\t{\n\t\t//load a form to make an artobj\n\t\treturn View::make('artobjs.create');\n\t}",
"protected function _initView()\n\t{\n\t\t$view = new App_View();\n\t\t$view->doctype('XHTML1_STRICT');\n\n\t\t$view->addHelperPath(APPLICATION_PATH . '/views/helpers');\n\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\n\t\t$viewRenderer->setView($view);\n\n\t\t\n\t\treturn $view;\n\t}",
"public function createView($viewName, $definition, $schemaName){ }",
"public function create()\n {\n return view(\"gasto.gastofijo.create\");\n }",
"function view($name_view){\n return new View($name_view);\n}",
"public function __construct($view = null) {}",
"public function getView() {}",
"public function getView() {}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view ('libros.create');\n }",
"protected function createView()\n {\n LayoutModule::setLayoutClassName( PortalLayout::class );\n return new PortalView();\n }",
"public function __construct()\n\t{\n\t\t$this->_view = new \\App\\View\\View('welcome'); \n\t}",
"public function __construct()\r\n {\r\n $this->view = new stdClass;\r\n $this->view->placeHolder = $this->placeHolder;\r\n $this->view->settingOptionName = $this->settingOptionName;\r\n }",
"public function create()\n {\n $this->set_datas([]);\n $this->blade->view($this->get_view_page(), $this->get_datas());\n }",
"protected function _initView()\r\n {\r\n $view = new Zend_View();\r\n $view->doctype('XHTML1_STRICT');\r\n\r\n // Add it to the ViewRenderer\r\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\r\n $viewRenderer->setView($view);\r\n\r\n $front = Zend_Controller_Front::getInstance();\r\n $router = $front->getRouter();\r\n $router->addRoute('products', new Zend_Controller_Router_Route('products/:slug', array('controller' => 'products', 'action' => 'details')));\r\n $router->addRoute('page', new Zend_Controller_Router_Route('page/:slug', array('controller' => 'page', 'action' => 'open')));\r\n\r\n return $view;\r\n }",
"public function create()\n {\n $routePrefix = $this->routePrefix;\n\n /* Parameters passed to view:\n $routePrefix as string\n */\n return view($this->viewPrefix.'.create', compact('routePrefix'));\n }",
"public function create()\n {\n return view('labours.create');\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('new');\n\t}",
"function create () {\n\tinclude 'request-create-view.php';\n}",
"function create(){\n // data create start\n return view('admin.landview.create');\n }",
"public function create()\n {\n return view('izgled');\n }",
"public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }",
"public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }",
"public function viewCreate(){\n\n\t\t// Set logged in user to a variable.\n\n\t\t$authUser = Auth::user();\n\n\t\t// Return view with variables.\n\n\t\treturn view('tags.viewCreate')\n\t\t\t->with('authUser', $authUser);\n\n\t}",
"public function create()\n {\n //on that view we manipulate a token\n return view(\"trello.token\");\n }",
"public function __construct(){\n parent::__construct();\n \n // set the default template as the name of the view class\n $template = get_class($this);\n if(strtolower(substr($template, -4)) === 'view'){\n $template = substr($template, 0, strlen($template) - 4);\n }\n $this->template($template);\n }",
"protected function createView() {\n return parent::createView()\n ->with('singleResultView', 'partials.test-result-single-textarea');\n }",
"public function create()\n {\n return $this->_viewHelper->getCreateView(\n array_merge($this->_defaultData, [ 'fields' => $this->_loadResourceFields()])\n );\n }",
"public static function create() {\n self::check_logged_in();\n self::render_view('unit/new.html');\n }",
"public function create()\n {\n return view('getintouchs.create');\n }",
"public function create()\n {\n\n $title = 'Tạo mới đơn hàng!';\n\n return view($this->viewPath . __FUNCTION__, compact('title'));\n }",
"public function create()\n {\n $main = new MainClass();\n $main = $main->getMain();\n\n return view('tp_document_ident.create')\n ->with('main', $main);\n }",
"public function create()\n {\n $this->view_data['language'] = Language::translatable()->get(); \n return view($this->base_view_path.'add', $this->view_data);\n }",
"public function __construct( View $view ) {\n\t\t$this->view = $view;\n\t}",
"public function create()\n {\n return view($this->veiw_base . '.create');\n }",
"private function _makeView($controller_name)\n\t{\n\t\t$view = $controller_name . 'View';\n\n\t\treturn new $view();\n\t}",
"public function create()\n {\n /*return view(\"banda\");*/\n }",
"public function create() {\n\n\t\t# Tampilkan view yang dituju\n\t\treturn View::make('admin.tps.buat');\n\t}",
"public function create()\n {\n $this->authorize('superadmin-only');\n\n return parent::view(null, $this->repository->makeModel());\n }",
"public function create()\n\t{\n\t\treturn View::make('quantridonvi.create');\n\t}",
"public function __construct()\n {\n $this->view = GeneralUtility::makeInstance(StandaloneView::class);\n $this->view->setPartialRootPaths($this->partialRootPaths);\n $this->view->setTemplateRootPaths($this->templateRootPaths);\n $this->view->setLayoutRootPaths($this->layoutRootPaths);\n $this->view->setTemplate($this->templateFile);\n $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);\n $this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);\n $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n }",
"public function create(): object\n {\n if (!Bouncer::can('create', $this->model)) {\n abort(403);\n }\n $form = $this->form($this->form, [\n 'method' => 'POST',\n 'route' => [$this->routeWithModulePrefix . '.' . 'store']\n ]);\n\n $item = new $this->model;\n return $this->view($this->baseView . '.create', ['form' => $form, 'item' => $item]);\n }",
"function __construct() {\n // Create a new instance of the corresponding view.\n $this->view = new View();\n // $this->session = new Session(); // Sessions still not working.\n }",
"public function create()\n\t{\n\t\treturn View::make('ugd.create' );\n\t}",
"protected function create_interact_view() {\n\t\t$this->interact = new \\Interact\\InteractBaseView($this->course, $this->user,\n\t\t\tarray($this->assignment->get_tag()), $this->section->get_tag());\n\t\t$this->add_aux($this->interact);\n\t}",
"public function create()\n\t{\n\t\t//\n\t\treturn View::make('mockups.utang_nonbank');\n\t}",
"public function create()\n {\n return view ('create');\n }",
"public function create()\n {\n return View::make('fakultet.orgjed.create');\n }",
"public function create(View $view)\n {\n if( Request::is('admin/user/*'))\n $runner = DB::table('tbl_registration')->where('RegistrationId', Request::route('id'))->first();\n else if ( Request::is('admin/employee/*') || Request::is('admin/owner/*'))\n $runner = DB::table('tbl_registration')->join('tbl_companies', 'tbl_companies.CompanyId', '=', 'tbl_registration.CompanyId')->where('RegistrationId', Request::route('id'))->first();\n else if( Request::is('admin/account')) {\n $runner = new \\stdClass;\n $runner->admin_id = Session::get('user_data')->admin_id;\n $runner->RegistrationName = Session::get('user_data')->admin_name;\n $runner->RegistrationEmail = Session::get('user_data')->admin_email;\n }\n $view->with('user_info', $runner);\n }",
"public function getView()\n {\n }",
"public function create()\n {\n return view('trumbowyg.create');\n }",
"public function create() {\n //\n return View::make('purposes.create');\n }",
"public function create()\n\t{\n\t\treturn View::make(''.$this->common_name.'.create')->with('common_name',$this->common_name);\n\t}",
"static public function Make($path, $data=[]) {\n\t\treturn new View($path, $data);\n\t}",
"public function create()\n\t{\n\t\treturn \\View::make('Evento/new_evento');\n\t}",
"public function create()\n {\n //\n return view('object.create');\n }",
"public function create()\n\t{\n\t\t$this->layout->content = View::make('pns.create');\n\t}",
"protected function buildView()\n {\n $table = $this->columns;\n\n $columns = $table->map(function ($column) {\n return $column->column.':'.$column->method.','.$column->caption;\n })->implode('|');\n\n $dropdown = $table->filter(function ($column) {\n return true == $column->is_foreign;\n })->transform(function ($column) {\n return $column->column.':'.$column->table_foreign;\n })->implode('|');\n\n $this->view = [\n 'name' => $this->module->name,\n '--columns' => $columns,\n '--controller' => $this->class,\n '--request' => $this->class,\n '--module' => $this->module->id,\n '--dropdown' => $dropdown,\n '--icon' => $this->module->icon,\n ];\n }",
"public function create()\n\t{\n return View::make('home');\n\t}"
] | [
"0.794952",
"0.76571953",
"0.7395223",
"0.7379122",
"0.7336238",
"0.7288675",
"0.7211296",
"0.7208456",
"0.71926713",
"0.7186296",
"0.7142922",
"0.70601517",
"0.702001",
"0.70051837",
"0.6971911",
"0.697179",
"0.6914115",
"0.68875027",
"0.68810904",
"0.6880818",
"0.68716836",
"0.6860623",
"0.68486977",
"0.68412215",
"0.6823655",
"0.68200636",
"0.67986625",
"0.6762621",
"0.675467",
"0.67374015",
"0.6731995",
"0.6731287",
"0.6721441",
"0.6718431",
"0.6711832",
"0.6711832",
"0.671023",
"0.671023",
"0.66944486",
"0.6694048",
"0.66860396",
"0.66802716",
"0.66752535",
"0.66679335",
"0.6660509",
"0.6654713",
"0.66441303",
"0.66383344",
"0.66383344",
"0.6628216",
"0.66244805",
"0.6608542",
"0.66017544",
"0.6600962",
"0.659958",
"0.65892696",
"0.65772957",
"0.6565373",
"0.6564707",
"0.65605897",
"0.65558326",
"0.65529305",
"0.65492755",
"0.65390056",
"0.65336233",
"0.6532043",
"0.6531274",
"0.6525469",
"0.6519545",
"0.6512641",
"0.65041864",
"0.6500989",
"0.6498669",
"0.6483474",
"0.6480619",
"0.64747316",
"0.64637816",
"0.6459815",
"0.6450289",
"0.6445105",
"0.64445597",
"0.6438853",
"0.6429973",
"0.64255786",
"0.6423421",
"0.64227474",
"0.64219606",
"0.64094394",
"0.6407361",
"0.6404356",
"0.6403674",
"0.6403494",
"0.64029294",
"0.6398638",
"0.6398081",
"0.6396497",
"0.63962734",
"0.6393353",
"0.6363303",
"0.6349201"
] | 0.84783465 | 0 |
Create the user representation. | public function createUser(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }",
"public function create()\n {\n return $this->edit(new User);\n }",
"public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }",
"protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}",
"public function createUser()\n {\n return User::factory()->create();\n }",
"public function create () {\n return view('backend.user.create');\n }",
"public function create()\n {\n return view('modules.User.userCreateInfo');\n }",
"public function create()\n {\n return view('sys_user.create');\n }",
"public function create()\n {\n return view('backends.user.create');\n }",
"public function create()\n {\n return view(config('const.template.user.entry'));\n }",
"public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }",
"public function create()\n {\n return view(\"backend.user.create\");\n }",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }",
"public function create()\n {\n return view('webcontrol.user.add');\n }",
"public function create() {\n\t\treturn View::make('users.create')->with('user', new User());\n\t}",
"public function create()\n {\n $this->authorize('create', User::class);\n return view('theme.backoffice.pages.user.create', [\n 'roles' => auth()->user()->visible_roles()\n ]);\n }",
"public function create()\n\t{\n\t\t$eloquent = App::make('orchestra.user');\n\t\t$form = $this->presenter->form($eloquent, 'create');\n\n\t\t$this->fireEvent('form', array($eloquent, $form));\n\t\tSite::set('title', trans('orchestra/foundation::title.users.create'));\n\n\t\treturn View::make('orchestra/foundation::users.edit', compact('eloquent', 'form'));\n\t}",
"public function create()\n {\n return $this->userService->create();\n }",
"public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }",
"public function create()\n {\n return view('administration::user.create');\n }",
"public function create()\n {\n $user= new User;\n $this->authorize('create', $user);\n\n $employees=Employee::all();\n $branchOffices=BranchOffice::all();\n $roles=Role::with('permissions')->get();\n $permissions=Permission::pluck('name','id');\n return view('admin.users.create', compact('user','roles', 'permissions','employees','branchOffices'));\n }",
"public function create()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.add_user');\n $roles = Role::getAll()->pluck('name', 'id');\n\n $this->content = view('admin.users.create')->with(compact('roles'))->render();\n return $this->renderOutput();\n }",
"public function create()\n {\n \n return view('user.create') ;\n }",
"public function create()\n {\n $item = new User();\n $roles = Role::pluck('name', 'name')->all();\n\n return view('pages.user.create', compact('item', 'roles'));\n }",
"public function create()\n {\n return view('backend.user.create');\n }",
"public function create()\n {\n return view('backend.user.create');\n }",
"public function create()\n {\n return view('backend.user.create');\n }",
"public function create()\n {\n return view('backend.user.create');\n }",
"public function create()\n {\n View::render('users/create.view', [\n 'method' => 'POST',\n 'action' => '/user/store',\n 'roles' => RoleModel::load()->all(),\n ]);\n }",
"public function create()\n\t{\n\t\t//get user type\n\t\t$userTypes = UserType::select('id', 'user_type_name')->get();\n\n\t\treturn View::make('user.create')\n\t\t\t->with(array('userTypes' => $userTypes));\n\t}",
"public function getCreate()\n {\n // If we are already authentified, redirect to the profile page.\n if(Auth::user()) return Redirect::action('frontend\\UserController@getIndex');\n\n // Get the data needed for the view.\n $user = API::get('api/v1/user/create');\n $rules = User::$rules;\n $meta = $this->meta;\n $meta['title'] = Lang::get('user/title.create_a_new_user');\n\n return View::make('frontend/user/create', compact('user', 'rules', 'meta'));\n }",
"public function create()\n {\n return view('admin.create.users',[\n 'roles'=>Role::all(),\n 'job_titles'=>JobTitle::all(),\n 'polyvalent'=>PolyvalentToggle::first()->toggle,\n ]);\n }",
"public function create()\n {\n return View::component('CreateUser');\n }",
"static function create() {\n $numargs = func_num_args();\n if($numargs < 3 || $numargs > 7) return false;\n $args = func_get_args();\n\n $u = new User;\n\n // required values\n $u->id = (integer) $args[0];\n $u->firstName = (string) $args[1];\n $u->lastName = (string) $args[2];\n\n // not required values\n $u->email = isset($args[3]) ? $args[3] : '';\n $u->department = isset($args[4]) ? $args[4] : '';\n $u->contact = isset($args[5]) ? $args[5] : '';\n $u->isAdmin = isset($args[6]) ? $args[6] : false;\n\n return $u;\n }",
"public function create()\n {\n return view(\"user.create\");\n }",
"public function create()\n {\n // dd( $user->roles );\n $form[ 'formUrl' ] = url('users');\n $form[ 'formMethod' ] = 'post';\n $form[ 'blank' ] = 'blank';\n $formFields = User::getFormData( );\n unset( $formFields['_password'] );\n unset( $formFields['_password_confirmation'] );\n $form[ 'content' ] = view('layouts.templates.forms.form_fields', [ 'formFields' => $formFields ] );\n $form = view('layouts.templates.forms.form', $form );\n \n $this->data[ 'contents' ] = $form ;\n\n $this->data[ 'message_alert' ] = Session::get('message');\n $this->data[ 'page_title' ] = 'User management';\n $this->data[ 'header' ] = 'Tambah User';\n $this->data[ 'sub_header' ] = '';\n return $this->render( );\n }",
"public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}",
"public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }",
"public function create()\n {\n return view('users.sysuser.create');\n }",
"public function create()\n {\n\t $role = Auth::user()->rols()->first();\n\t $roles = $this->role_repository->allowedCrudRoles($role);\n\t $country = $this->country_repository->findOneBy(old('country_id',null));\n\t $state = $this->state_repository->findOneBy(old('state_id',null));\n\t $city = $this->city_repository->findOneBy(old('city_id',null));\n\t\t$offices = $this->office_repository->offices(Auth::user());\n\n\t $viewData = compact('roles','offices');\n\t if($country){\n\t\t $viewData['country']=$country;\n\t }\n\n\t if($state){\n\t\t $viewData['state']=$state;\n\t }\n\n\t if($city){\n\t\t $viewData['city']=$city;\n\t }\n\n\t return view('web.supplier.user.create')->with($viewData);\n }",
"public function create()\n {\n $this->resetFields();\n //DAN MEMBUKA AREA\n $this->openUser();\n }",
"public function create()\n\t{\n\t\t$user = User::create([\n\t\t\t\t\tInput::all()\n\t\t\t]);\n\n\t\treturn Response::json($user);\n\t}",
"public function create() {\n return View::make('user.create');\n }",
"public function createAction()\n {\n echo (new View('userCreate'))->render();\n }",
"public function create()\n {\n return $this->renderOutputAdmin(\"users.form\", [\n \"route\" => route(\"admin.users.store\")\n ]);\n }",
"public function create()\n {\n $this->generateParams();\n return view('backend.pages.user._form', compact('gender', 'type', 'city'));\n }",
"public function createUser()\n {\n }",
"public function create()\n {\n $this->authorize('create', User::class);\n return view('user.form')->with('user', new User())->with('roles', UserRole::getRoleList());\n }",
"public function create()\n {\n $user = new User();\n $roles = Role::all();\n return view('backend.user.create', compact('user', 'roles'));\n }",
"public function create()\n {\n return view(\"ContentManager::user.create\",['model' => \"\"]);\n }",
"public function create()\n {\n return view('backend.pages.user.create-user');\n }",
"public function create()\n {\n $user = new User();\n $roles = Role::pluck('name','id')->all();\n\n return view('pages.user.create', compact(['user','roles']));\n }",
"public function create()\n\t{\n\t\treturn view('admin.pages.users-create', [\n\t\t\t'action' => route('admin.users.store'),\n\t\t\t'method' => 'POST',\n\t\t\t'legend' => 'Create',\n\t\t\t'permissions' => Permission::all(),\n\t\t]);\n\t}",
"public function create()\n {\n $breadcrumb = [\n [\n 'name' => config('consts.user.USER_NAME'),\n 'href' => config('consts.user.USER_PATH')\n ],\n [\n 'name' => '新規',\n 'href' => ''\n ]\n ];\n $leftNav = [\n ['name' => 'ユーザー', 'href' => config('consts.common.ROOT_PATH') . '/user'],\n ['name' => 'サンプル', 'href' => config('consts.common.ROOT_PATH'). '/sample'],\n ['name' => 'テスト', 'href' => '']\n ];\n $this->current_id = $_GET['id'];\n $data = DB::table('users')\n ->leftjoin('users_ex', 'users.id', '=', 'users_ex.user_id')\n ->where('users.id', $this->current_id)\n ->first();\n \n return view('user.create', [\n 'breadcrumb' => $breadcrumb,\n 'leftNav' => $leftNav,\n 'data' => $data\n ]);\n }",
"public function formatUser()\n {\n if (! $this->user) {\n return [];\n } else {\n return [\n 'uniqueid' => $this->user->user_id,\n 'name' => $this->user->username,\n 'email' => $this->user->email,\n 'photourl' => $this->user->avatar_img_url,\n 'roles' => $this->getMappedRoles(),\n ];\n }\n }",
"public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }",
"public function create()\n {\n return view('admin.content.user.create');\n }",
"public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }",
"public function create() {\n // TODO: Admin Policy\n return view('auth.user_add');\n }",
"function create() {\n return view('admin.user.create');\n }",
"public function create()\n\t{\n\t\treturn view('kagi::users.create');\n\t}",
"public function formUserCreate(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $this->_app->notFound();\n }\n \n $get = $this->_app->request->get();\n \n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n \n // Get a list of all groups\n $groups = GroupLoader::fetchAll();\n \n // Get a list of all locales\n $locale_list = $this->_app->site->getLocales();\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primary_group = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Get the default groups\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n \n // Set default groups, including default primary group\n foreach ($groups as $group_id => $group){\n $group_list[$group_id] = $group->export();\n if (isset($default_groups[$group_id]) || $group_id == $primary_group->id)\n $group_list[$group_id]['member'] = true;\n else\n $group_list[$group_id]['member'] = false;\n }\n \n $data['primary_group_id'] = $primary_group->id;\n // Set default title for new users\n $data['title'] = $primary_group->new_user_title;\n // Set default locale\n $data['locale'] = $this->_app->site->default_locale;\n \n // Create a dummy user to prepopulate fields\n $target_user = new User($data); \n \n if ($render == \"modal\")\n $template = \"components/user-info-modal.html\";\n else\n $template = \"components/user-info-panel.html\";\n \n // Determine authorized fields for those that have default values. Don't hide any fields\n $fields = ['title', 'locale', 'groups', 'primary_group_id'];\n $show_fields = [];\n $disabled_fields = [];\n $hidden_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $show_fields[] = $field;\n else\n $disabled_fields[] = $field;\n } \n \n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n $validators = new \\Fortress\\ClientSideValidator($schema, $this->_app->translator); \n \n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"Create User\",\n \"submit_button\" => \"Create user\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/users\",\n \"target_user\" => $target_user,\n \"groups\" => $group_list,\n \"locales\" => $locale_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => $hidden_fields\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"enable\", \"delete\", \"activate\"\n ]\n ],\n \"validators\" => $validators->formValidationRulesJson()\n ]); \n }",
"public function create()\n {\n $this->authorize('create', User::class);\n\n $rolesObjects = Role::all();\n\n $selectedRole = null;\n $roles = array();\n foreach ($rolesObjects as $role) {\n $roles[$role->id] = $role->display;\n\n if ($role->name == 'readonly') {\n $selectedRole = $role->id;\n }\n }\n\n $centerList = DB::table('centers')\n ->select('centers.*', DB::raw('regions.name as regionName'), 'regions.parent_id')\n ->join('regions', 'regions.id', '=', 'centers.region_id')\n ->get();\n\n $centers = array();\n foreach ($centerList as $center) {\n $parent = ($center->parent_id)\n ? Region::find($center->parent_id)\n : null;\n\n $regionName = ($parent)\n ? $parent->name\n : $center->regionName;\n\n $centers[$center->abbreviation] = \"{$regionName} - {$center->name}\";\n }\n asort($centers);\n\n return view('users.create', compact('centers', 'roles', 'selectedRole'));\n }",
"public function create()\n {\n return view('user.create');\n }",
"public function create()\n {\n return view('pages/key/userCreate');\n }",
"public function create()\n {\n return view('user.create', [\n 'action' => route('user.store'),\n 'method' => 'post'\n ]);\n }",
"public function create() {\n $roles = Role::lists('name', 'id');\n $user = null;\n return view('backend.user.create', compact('roles', 'user'));\n }",
"public function create(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUcrDataByToken(UserController::getUcrRequestTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function create()\n\t{\n\t\t$user = new User();\n return view('user.create')->with(compact('user'));\n\t}",
"private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }",
"public function create()\n {\n\treturn view('user.createuser');\n }",
"function CreateUser() {\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USER_TYPE] = $this->reseller->getUserType();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USERNAME] = $this->reseller->getUserLoginName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EMAIL_ID] = $this->reseller->getEmailId();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CONTACT_NO] = $this->reseller->getMobileNo();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_FULL_NAME] = $this->reseller->getFullName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ADDRESS] = $this->reseller->getAddress();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CITY] = $this->reseller->getCity();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_REGION] = $this->reseller->getRegion();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_COUNTRY] = $this->reseller->getCountry();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DOMAIN_NAME] = $this->reseller->getDomainName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EXPIRY_DATE] = $this->reseller->getExpiryDate();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ENABLE_CMS] = $this->reseller->getEnableCMS();\n $this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DLT_ENTITY_ID] = $this->reseller->getDltEntityId();\n\t\t\t$response = new sgc_callapi(sgc_constant::SGC_API, sgc_constant::SGC_ENDPOINT_RESELLER_CREATE_USER, $this->data, $this->header, sgc_common_api_params::API_COMMON_METHOD_POST, $this->useRestApi);\n\t\t\treturn $response->getResponse();\n\t\t}",
"public function create()\n {\n return view('user_create');\n }",
"public function create()\n\t{\t\n\t\t$roles = Role::pluck('name', 'id');\n\t\t$branches = Branch::pluck('nomenclature', 'id');\n\t\treturn view('users.create')\n\t\t->with('roles', $roles)\n\t\t->with('branches', $branches);\n\t}",
"public function create()\n {\n return \\view('admin.users.create');\n }",
"protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }",
"public function create()\n {\n return view('admin::auth.users.create');\n }",
"public function create()\n {\n \n //get type users\n \n\n return view('users.create', [\n 'types' => $types,\n 'departments' => $departments,\n ]);\n }",
"public function create()\n {\n //\n return response()->view('cms.users.create');\n }",
"public function create()\n {\n return view('user::backend.users.create');\n }",
"public function create()\n {\n $User = User::get();\n view()->share('elements', $User);\n\n $UserRoles = UserRoles::get();\n view()->share('UserRoles', $UserRoles);\n\n return view('users.form');\n }",
"public function create()\n {\n return View::render('users/create.view', [\n 'method' => 'POST',\n 'roles' => RoleModel::load()->all(),\n ]);\n }",
"public function create()\n {\n try {\n $data['user'] = [];\n\n // Get validation messages\n $data['validationMessages'] = User::$validationMessages;\n\n //Get all country\n $data['countries'] = Country::getAllCountry();\n\n $data['states'] = ['' => 'Select state'];\n\n //Render the user add form\n return view('user.add', $data);\n\n } catch (\\Exception $ex) {\n return redirect()->route('user.index')->with('failure', $ex->getMessage());\n }\n }",
"public function create()\n {\n\n $user = new User;\n return view('user.create', compact('user'));\n }",
"private function createAppReviewUser()\n {\n\n $user = new Users();\n $user->setFullname(self::AppReviewName);\n $user->setIsActive(true);\n $user->setLegacyPassword('');\n $user->setSalt('');\n $user->setSingleMsg(false);\n $this->pwdHelper->SaveUserPassword($user, self::AppReviewPassword);\n $this->em->persist($user);\n $this->em->flush();\n\n // Add the user to the org\n\n $orgMember = new OrgMembers();\n $orgMember->setUser($user);\n $orgMember->setOrg($this->appReviewOrg);\n $orgMember->setIsHidden(false);\n $orgMember->setIsAdmin(true);\n $orgMember->setIsApproved(true);\n $this->em->persist($orgMember);\n $this->em->flush();\n\n // Add the user to each of the three groups\n\n $this->addUserToGroup($user, $this->mentors);\n $this->addUserToGroup($user, $this->students);\n $this->addUserToGroup($user, $this->parents);\n\n $this->mentorUserIds[] = $user->getId();\n $this->studentUserIds[] = $user->getId();\n $this->parentUserIds[] = $user->getId();\n\n // Add an email contact record\n\n $contactEmail = new Contacts();\n $contactEmail->setContact(self::AppReviewEmail);\n $contactEmail->setContactType(Contacts::TYPE_EMAIL);\n $contactEmail->setUser($user);\n $this->em->persist($contactEmail);\n $this->em->flush();\n\n // Add a phone contact record\n\n $contactPhone = new Contacts();\n $contactPhone->setContact($this->generateRandomPhone());\n $contactPhone->setContactType(Contacts::TYPE_PHONE);\n $contactPhone->setUser($user);\n $this->em->persist($contactPhone);\n $this->em->flush();\n }",
"public function store(UserCreateRequest $request): UserResource\n {\n /* Convert request to array */\n $data = $request->all();\n\n /* Hashing password */\n $data['password'] = bcrypt($request->input('password'));\n\n /* Store data to database */\n $user = User::create($data);\n\n /* Send Register email to the user */\n event(new Registered($user));\n\n activity(\"Admin\")\n ->on($user)\n ->withProperties([\n ['IP' => $request->ip()],\n ['user_data' => $request->all()],\n ])\n ->log('Store a user');\n\n return new UserResource($user->loadMissing('plans'));\n }",
"public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }",
"public function create()\n {\n $this->authorize('create', User::class);\n\n $roles = Role::all();\n\n $projects = Project::all()->filter(function ($item) {\n return $item['archived_at'] == null;\n });\n $timezones = cache()->rememberForever('timezones', function () {\n return timezones();\n });\n $user = auth()->user();\n return view('users.create', compact('projects', 'user', 'roles', 'timezones'));\n }",
"public function create(UserInterface $user);",
"public function create()\n {\n return view('user::create');\n }",
"public function create()\n {\n return view('user::create');\n }",
"public function create()\n {\n return view('user::create');\n }",
"public function create() {\n return view('admin.user.create');\n }",
"public function create()\n {\n return view(\"backend.users.create\");\n }",
"public function create()\n {\n return view('users.form', ['user' => new User]);\n }"
] | [
"0.6878866",
"0.6863107",
"0.6825762",
"0.6823838",
"0.6710182",
"0.6693789",
"0.66874737",
"0.6669606",
"0.6666873",
"0.6658373",
"0.6646404",
"0.6632397",
"0.66148394",
"0.66148394",
"0.65879905",
"0.6575731",
"0.65502983",
"0.65495974",
"0.65370625",
"0.6521902",
"0.6521891",
"0.6518652",
"0.6517891",
"0.651755",
"0.6508652",
"0.6496248",
"0.6493396",
"0.6493396",
"0.6493396",
"0.6493396",
"0.6492337",
"0.6489569",
"0.6487201",
"0.648626",
"0.64860666",
"0.64833534",
"0.6474633",
"0.6468149",
"0.64660054",
"0.6465508",
"0.6465078",
"0.646477",
"0.6463191",
"0.6462735",
"0.6459062",
"0.6455507",
"0.64507216",
"0.6446883",
"0.6444759",
"0.6438469",
"0.64342713",
"0.6416676",
"0.6412299",
"0.6409403",
"0.6402497",
"0.6402432",
"0.6387693",
"0.63872963",
"0.6385024",
"0.6382647",
"0.6376688",
"0.63760495",
"0.6374099",
"0.6372518",
"0.636987",
"0.6366224",
"0.6365248",
"0.636194",
"0.635981",
"0.63597023",
"0.63578755",
"0.6351993",
"0.63445723",
"0.6341204",
"0.63358027",
"0.6335212",
"0.63311654",
"0.6329918",
"0.6328023",
"0.6322485",
"0.63216996",
"0.63190037",
"0.6317697",
"0.6315758",
"0.6312572",
"0.6311054",
"0.63105035",
"0.6308995",
"0.63071877",
"0.63058335",
"0.63010746",
"0.6300033",
"0.6300033",
"0.6300033",
"0.62988436",
"0.62947404",
"0.6292953"
] | 0.6834517 | 5 |
Create the owner representation. | public function createOwner(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view ('owner.create');\n }",
"public function create()\n {\n //\n return view('create_owner');\n }",
"public function create()\n {\n return view('owner.create');\n }",
"public function create()\n {\n return view('owner.create');\n }",
"public function create()\n {\n return view('admin.owner.create');\n }",
"public function create()\n {\n return Inertia::render('Owners/Create', [\n 'organizations' => auth()->user()->organizations()->orderBy('name')->select('id', 'name')->get()\n ]);\n }",
"public function create()\n {\n return view('layouts.owner.create');\n }",
"private function generateOwnerSchema()\n {\n $owner = $this->generalSettings->get('company_or_person')->value();\n\n if ($owner->value() === 'person') {\n $siteOwner = new Person(\n collect([\n '@id' => $this->site->absoluteUrl() . SchemaIds::PERSON,\n 'name' => $this->generalSettings->get('target_name'),\n 'url' => $this->site->absoluteUrl(),\n 'sameAs' => $this->getSameAs(),\n ])\n );\n } else {\n $siteOwner = new Organization(\n $this->context->get('site'),\n $this->generalSettings\n );\n }\n\n return $siteOwner->generate();\n }",
"public function create()\n { \n return view('owners.create');\n\n }",
"protected function create()\n {\n $this->preCreate();\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->create($this->data)[static::$api_name];\n } else {\n $this->data = $this->api->create($this->data)[static::$api_name];\n }\n $this->id = $this->data['id'];\n $this->postCreate();\n\n return $this;\n }",
"protected function setOwner($owner) {\r\n $this->owner = $this->create($owner);\r\n }",
"public function create()\n {\n $userO = new UserOwner();\n $companys = DB::table('owners')->pluck('company');\n $roles = DB::table('roles')->pluck('value');\n $locations = DB::table('locations')->pluck('name');\n \n\n return View::make('userO.save',compact('userO','companys','locations','roles'));\n }",
"public function create()\n {\n $owners_lastName = Owner::OrderBy('last_name', 'id')->pluck('last_name', 'id');\n $owners_firstName = Owner::OrderBy('first_name', 'id')->pluck('first_name', 'id');\n $owners = $owners_firstName;\n foreach ($owners as $key => $value) {\n $owners[$key] = \"$owners_firstName[$key] $owners_lastName[$key]\";\n }\n return view('contracts.create', compact('owners'));\n }",
"public function setOwner($var)\n {\n GPBUtil::checkString($var, True);\n $this->owner = $var;\n\n return $this;\n }",
"function ownerClass()\n\t{\n\t\t$this->m_owner = array('pkowner_id'=>\"\", 'organization_name'=>\"\", 'owner_name'=>\"\", 'owner_address'=>\"\", 'owner_phone_bus'=>\"\", 'owner_phone_res'=>\"\", 'owner_fax'=>\"\", 'email'=>\"\", 'foip'=>\"\", 'owner_type'=>\"\"); \n\t}",
"public function create()\n {\n // $catowner = Catowner::all();\n return view('author.catowner.create');\n }",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function create()\n {\n $cars = $this->getCars();\n\n return view('pages.owner.create', compact('cars'));\n }",
"public function getOwner();",
"public function getOwner();",
"public function getOwner();",
"public function setOwner(\\SetaPDF_Core_Type_Owner $owner) {}",
"public function setOwner(\\SetaPDF_Core_Type_Owner $owner) {}",
"public function create()\n {\n if (\\request('owner') && \\request('owner') != null){\n $owner = Owner::find(\\request('owner'));\n session()->flash('owner_id', $owner->nic);\n }\n\n return view('admin.vehicles.create');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function create()\n {\n if (! Gate::allows('risk_powner_create')) {\n return abort(401);\n }\n \n $partners = \\App\\Partner::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $risks = \\App\\Risk::get()->pluck('code', 'id')->prepend(trans('global.app_please_select'), '');\n\n return view('admin.risk_powners.create', compact('partners', 'risks'));\n }",
"public function owner()\n\t{\n\t\treturn $this->oneToOne('Hubzero\\User\\User', 'id', 'owned_by_user');\n\t}",
"public function store(OwnerRequest $request)\n {\n Owner::create([\n 'organization_id' => $request->organization_id,\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'photo_path' => $request->file('photo') ? $request->file('photo')->store('owners') : null,\n ]);\n\n return Redirect::route('owners')->with('success', 'Propietario creado.');\n }",
"public function creating(ContractType $model)\n {\n # Set Current User as Creator\n $model->setAttribute('creator', $model->getAttribute('creator') ?: $this->getUserId() );\n }",
"public function create()\n {\n //\n return view('object.create');\n }",
"public function show(Owner $owner)\n {\n return new OwnerResource($owner);\n }",
"public function store(OwnerCreateRequest $request)\n {\n $user = new User();\n $user->role_id = 3;\n $user->name = $request->get('name');\n $user->email = $request->get('email');\n $user->password = bcrypt($request->get('password'));\n $user->save();\n $owner = new Owner();\n $owner->user_id = $user->id;\n $owner->society_id = $request->get('society_id');\n $owner->flat_no = strtoupper($request->get('flat_no'));\n $owner->phone_no = $request->get('phone_no');\n $owner->save();\n Session::flash('created_owner', 'Your details have been registered. Wait for manager approval!');\n $note = new OwnerRegister();\n Mail::to($user->email)->send($note);\n return redirect('/sign-up');\n\n// $validated = $request->validated();\n// return $validated;\n }",
"public function create($OwnerID)\n {\n\t\t$sOwner = \\App\\Models\\Master\\SMD\\Owner::find($OwnerID);\n\t\treturn view('Master.SMD.owner_client_form')->with( array('sOwner'=>\t$sOwner) );\n }",
"public abstract function getCreator();",
"public function setOwner($val)\n {\n $this->_propDict[\"owner\"] = $val;\n return $this;\n }",
"public function create()\n\t{\n\t\treturn view('uoms.create');\n\t}",
"public function getOwner() {\r\n return $this->owner;\r\n }",
"public function getCreator();",
"public function getCreator();",
"public function create()\n {\n //\n return view('backend.access.organizations.create');\n }",
"public function create()\n {}",
"public function create(){\n return view('Owner.Tenants.create');\n }",
"public function create() {\n $this->createPersonHeader();\n $this->createRecipientHeader();\n $this->createBody();\n $this->createText();\n $this->createFooter();\n }",
"public function create()\n {\n return view('org::create');\n }",
"public function getCreator() {}",
"public function create() {\n\t\t\t//\n\t\t}",
"public function create() {}",
"public function create(){}",
"public function create() {\n \n }",
"public function create() {\n \n }",
"public static function ownerOnly(){\n return TRUE;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function create()\n {\n return view('os.create');\n }",
"public function getOwnerIdentifier();",
"public function create()\n {\n return view('organizations.create');\n }",
"public function create()\n {\n return view('admin.opponents.create');\n }",
"public function run()\n {\n $owner = User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => 'secret'\n ]);\n\n $owner->roles()->attach(Role::getRoleIdByName(Role::OWNER));\n $owner->ownerDetail()->save(new OwnerDetail([\n 'number_of_outlet' => 0,\n 'number_of_employee' => 0\n ]));\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function creator()\n\t{\n\t\treturn $this->oneToOne('Hubzero\\User\\User', 'id', 'created_by_user');\n\t}",
"public function create()\n {\n //\n return view('Organizer.create');\n }",
"public function owner()\n {\n return $this->belongsTo(Spark::userModel(), 'owner_id');\n }",
"public function create() {\n\n\t\t\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create()\n {\n return Inertia::render('Organization/Create');\n }",
"public function create()\n {\n return view('backend.member.create',get_defined_vars());\n }",
"public function create()\n {\n return view('organizations/create');\n }",
"public function create()\n {\n return view('medialinkexample::admin.authors.create');\n }",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function store(OwnerRequest $request)\n {\n Owner::create(request(['first_name', 'last_name', 'phone_number']));\n\n session()->flash('message', 'Owner Created Successfully');\n\n return redirect()->route('owner.index');\n }",
"public function create()\n {\n return parent::create();\n }",
"public function getOwner()\n {\n return isset($this->owner) ? $this->owner : '';\n }",
"public function getOwnerId()\n {\n return $this->owner_id;\n }"
] | [
"0.7349649",
"0.723654",
"0.7211741",
"0.7211741",
"0.7182614",
"0.6769957",
"0.6648783",
"0.66088873",
"0.6580069",
"0.65343875",
"0.64591855",
"0.6400853",
"0.6386555",
"0.63546115",
"0.62972206",
"0.6227148",
"0.62033653",
"0.620312",
"0.620312",
"0.620312",
"0.62007326",
"0.608327",
"0.608327",
"0.608327",
"0.60038245",
"0.60038245",
"0.59763926",
"0.59118205",
"0.59118205",
"0.58624136",
"0.58507204",
"0.5831872",
"0.58104825",
"0.5759574",
"0.5756314",
"0.57561",
"0.57126117",
"0.5697722",
"0.5689987",
"0.5683229",
"0.5676723",
"0.5673847",
"0.5673847",
"0.5661792",
"0.56580347",
"0.56541455",
"0.5634155",
"0.56315434",
"0.5622199",
"0.5608781",
"0.5604228",
"0.5602605",
"0.5586453",
"0.5586453",
"0.5583897",
"0.55825263",
"0.55825263",
"0.55825263",
"0.5576601",
"0.55684006",
"0.55649316",
"0.556309",
"0.5551231",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55494654",
"0.55467737",
"0.55461484",
"0.5527335",
"0.551803",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.5515865",
"0.55069256",
"0.5505678",
"0.55034757",
"0.5500019",
"0.5498723",
"0.5498723",
"0.5497911",
"0.5494853",
"0.5492095",
"0.5490506"
] | 0.79933745 | 0 |
Create the data provider. | public function createProvider(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createData()\n {\n // TODO: Implement createData() method.\n }",
"protected function initDataProvider() {\n\t\t/** @var $dataProvider Tx_Taxonomy_Service_ExtDirect_Controller_DataProvider */\n\t\t$dataProvider = t3lib_div::makeInstance('Tx_Taxonomy_Service_ExtDirect_Controller_DataProvider');\n\t\t$this->setDataProvider($dataProvider);\n\t}",
"public function dataProviderCreateInstance()\n {\n yield [\n [\n 'seed' => 0,\n 'min' => 0,\n 'max' => 10,\n 'format' => [\n [-1, -1],\n [-1, -1],\n ],\n ],\n ];\n }",
"public function gpDataProvider() {}",
"abstract protected function getDataProvider();",
"public function createDataProvider()\n {\n return [\n [1, 1, 0],\n [null, 0, 1]\n ];\n }",
"public function getDataProvider();",
"public function getDataProvider();",
"public function getDataProvider() {\n\t\tif (!$this->dataProvider) {\n\t\t\t/** @var Dispatcher $dispatcher */\n\t\t\t$dispatcher = $this->dispatcher ? $this->dispatcher : Dispatcher::getSharedDispatcher();\n\t\t\tlist($vendor, $extension,) = Utility::getClassNamePartsForPath($dispatcher->getPath());\n\n\t\t\t// Check if an extension provides a Data Provider\n\t\t\t$dataProviderClass = 'Tx_' . $extension . '_Rest_DataProvider';\n\t\t\tif (!class_exists($dataProviderClass)) {\n\t\t\t\t$dataProviderClass = ($vendor ? $vendor . '\\\\' : '') . $extension . '\\\\Rest\\\\DataProvider';\n\t\t\t}\n\t\t\t// Get the specific builtin Data Provider\n\t\t\tif (!class_exists($dataProviderClass)) {\n\t\t\t\t$dataProviderClass = 'Cundd\\\\Rest\\\\DataProvider\\\\' . $extension . 'DataProvider';\n\t\t\t\t// Get the default Data Provider\n\t\t\t\tif (!class_exists($dataProviderClass)) {\n\t\t\t\t\t$dataProviderClass = 'Cundd\\\\Rest\\\\DataProvider\\\\DataProviderInterface';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->dataProvider = $this->get($dataProviderClass);\n\t\t}\n\t\treturn $this->dataProvider;\n\t}",
"public function providerCreate()\n {\n $data = array(\n // None.\n array(null, null, '\\\\UnicornFail\\\\PhpOption\\\\None'),\n\n // SomeFloat.\n array('3.33', 3.33, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array('-42.9', -42.9, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array('-9.25', -9.25, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(3.33, 3.33, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(-42.9, -42.9, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(-9.25, -9.25, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n\n // SomeInteger.\n array(0, 0, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array(1, 1, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array('0', 0, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array('1', 1, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n\n // SomeBoolean.\n array(true, true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array(false, false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('on', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('ON', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('off', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('OFF', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('true', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('TRUE', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('false', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('FALSE', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('yes', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('YES', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('no', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('NO', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n\n // SomeArray.\n array(array(), array(), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array(array(1, 2, 3), array(1, 2, 3), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array('foo,bar,baz', array('foo', 'bar', 'baz'), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array('foo=bar,baz=quz', array('foo' => 'bar', 'baz' => 'quz'), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n\n // SomeString.\n array('', '', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n array('string', 'string', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n array('foo=bar', 'foo=bar', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n );\n\n $index = 0;\n return array_combine(array_map(function ($item) use (&$index) {\n $item = array_map(function ($value) {\n if (is_string($value) && (is_callable($value) || class_exists($value))) {\n $parts = explode('\\\\', $value);\n return array_pop($parts);\n }\n return json_encode($value);\n }, $item);\n $label = implode(' : ', array_merge(array('#' . $index++), $item));\n return $label;\n }, $data), $data);\n }",
"protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }",
"public static function factory($type)\n {\n if (! static::existsProvider($type)) {\n throw new \\InvalidArgumentException(\"Data provider {$type} does not exists\", 500);\n }\n\n $providerClass = __NAMESPACE__.'\\\\DataProviders\\\\' . ucfirst($type) . \"Provider\";\n\n return new $providerClass();\n }",
"public static function provider($provider)\n {\n static::$data = $provider;\n }",
"public function getProvider() : DataProvider {\n\t\treturn $this->dataProvider;\n\t}",
"public function createData() {\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}",
"private function createDataHelper() {\n // initialize the data helper when this API is firstly called.\n $this->isDataHelperInitialized = true;\n\n $helperClass = ucfirst($this->controller) . 'DataHelper';\n $helperClassPath = APPLICATION_ROOT_PATH . \"/data-helper/$helperClass.php\";\n if (!file_exists($helperClassPath)) {\n return null;\n }\n \n require_once $helperClassPath;\n return new $helperClass($this->action, $this->request, $this->session);\n }",
"public function parametersAndQueriesDataProvider() {}",
"public function getAndPostDataProvider() {}",
"private function createDataSource()\n {\n $this->debug(\"Creating data source\");\n $this->dataSource = DataSourceRepository::createDataSource(\n $this->config['datasource']['key'],\n $this->config['datasource']['title'],\n 'SYSTEM'\n );\n $this->dataSource->setDataSourceAttribute(\"manual_publish\", 0);\n $this->dataSource->setDataSourceAttribute(\"qa_flag\", 0);\n\n $this->log(\"Data source {$this->dataSource->title}({$this->dataSource->data_source_id}) created\");\n }",
"public function getSetDataProvider() {}",
"public function create()\n {\n return new PersonData($this);\n }",
"public function dataProvider() {\n return [\n [2, []],\n [1, ['multiple_file_display_type' => 'sources']],\n ];\n }",
"public function buildDataProvider()\n {\n $name = 'company * product';\n $phone = '333-22-22-333';\n $url = 'https://test.url.mage.com';\n return [\n [\n 'descriptors' => [\n 'name' => $name,\n 'phone' => $phone,\n 'url' => $url,\n ],\n 'expected' => [\n 'descriptor' => [\n 'name' => $name,\n 'phone' => $phone,\n 'url' => $url,\n ],\n ],\n ],\n [\n 'descriptors' => [\n 'name' => $name,\n 'phone' => $phone,\n ],\n 'expected' => [\n 'descriptor' => [\n 'name' => $name,\n 'phone' => $phone,\n ],\n ],\n ],\n [\n 'descriptors' => [\n 'name' => $name,\n ],\n 'expected' => [\n 'descriptor' => [\n 'name' => $name,\n ],\n ],\n ],\n [\n 'descriptors' => [],\n 'expected' => [],\n ],\n ];\n }",
"public function setDataProvider(DataProviderInterface $data_provider = NULL);",
"public function __construct()\n {\n $this->m_DataAccess = new PDOMySQLActorrDataModel();\n }",
"public function create( $data = array() );",
"public function create( array $data );",
"public function constructDataProvider()\n {\n return [\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n 'error_handler.config' => [\n 'type' => 'email',\n 'to' => '[email protected]',\n ],\n ],\n null,\n null,\n ],\n [\n [\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'Mandatory application config parameter missing: app_base_path',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'routing' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"routing\" service must implement the RouterInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'templating' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"templating\" service must implement the TemplatingInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'security.checker' => new \\stdClass(),\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"security.checker\" service must implement the SecurityCheckerInterface',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'mfw',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n ],\n '\\\\RuntimeException',\n 'The \"security.config\" application parameter is missing.',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'The \"orm.config.type\" must be set.',\n ],\n [\n [\n 'app_base_path' => __DIR__ . '/test_app',\n 'orm.config' => [\n 'type' => 'something-unknown',\n 'host' => 'db',\n 'database' => 'mfw',\n 'username' => 'mfw',\n 'password' => 'mfw',\n 'mapping' => [\n 'test' => 'Smatyas\\\\Mfw\\\\Tests\\\\Orm\\\\TestEntity',\n ],\n ],\n 'security.config' => [],\n ],\n '\\\\RuntimeException',\n 'Unknown orm type: something-unknown',\n ],\n ];\n }",
"public function getDataProvider()\n\t{\n\t\treturn $this->_dataProvider;\n\t}",
"public function dutchDataProvider() {}",
"protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }",
"public function dutchDataProvider() {}",
"public function setDataProvider($providerName);",
"public function createData(EntityManager $em);",
"public function getDataProvider()\n {\n return $this->dataProvider;\n }",
"abstract protected function createAdapter();",
"public function creating(array $data);",
"public function prepareDataProvider()\n\t{\n\t\treturn [\"abc\" => 'tao đạt nè'];\n\t}",
"function create(DataHolder $holder);",
"public static function Create(){\n return new ConnectionData();\n }",
"public function __construct() {\n\t\t$this->providers = array(\n\t\t\t'ngg' => new ShoutemNGGDao(),\n\t\t\t'flag' => new ShoutemFlaGalleryDao(),\n\t\t);\n\t}",
"public function setDataProvider()\n {\n return [\n [['a'], 0, 'x', ['x']],\n\n [['a', 'b'], 0, 'x', ['x', 'b']],\n [['a', 'b'], 1, 'y', ['a', 'y']],\n\n [['a', 'b', 'c'], 0, 'x', ['x', 'b', 'c']],\n [['a', 'b', 'c'], 1, 'y', ['a', 'y', 'c']],\n [['a', 'b', 'c'], 2, 'z', ['a', 'b', 'z']],\n ];\n }",
"public function __construct()\n {\n \t$this->schema();\n\t\t$this->data();\n }",
"public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}",
"protected function getGridDataService() {}",
"public function creating(Dataset $dataset)\n {\n }",
"public function getDataProvider()\n {\n return new ActiveDataProvider([\n 'db' => $this->_db,\n 'query' => EmailTemplate::find()->with('translations'),\n ]);\n }",
"public function create($data = null) {\n\t\t$class = $this->type->getModelClassname();\n\t\t$object = new $class($data);\n\t\t$object->setModelStorage($this->type->getStorage());\n\t\treturn $object;\n\t}",
"protected function prepareDataProvider()\n {\n $requestParams = Yii::$app->getRequest()->getBodyParams();\n if (empty($requestParams)) {\n $requestParams = Yii::$app->getRequest()->getQueryParams();\n }\n\n /* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\n // $query = $modelClass::find()\n // ->andWhere([\n // \"condition\" => 1\n // ]);\n\n //agenda del usuario\n $ids = EventsQuery::getEventsByUser($requestParams['token']);\n // $evento = EventsModel::find()\n // ->where(['condition' => 1])\n // ->andWhere(['in', 'id', $ids])\n // ->all();\n $evento=EventsQuery::getEventById($ids);\n return EventsQuery::getEventsByIds($evento);\n }",
"public function created(Provider $provider)\n {\n //\n }",
"public function __construct() {\n\n $this->datastore = new Model\\PluginDatastore();\n try {\n $id = $this->datastore->getType() . '-' . $this->getName();\n $this->datastore->fetchById($id);\n } catch (\\phpillowResponseNotFoundErrorException $e) {\n\n $this->datastore->name = $this->getName();\n $this->datastore->created = date('r');\n\n $this->datastore->save();\n }\n }",
"public function getDataStore();",
"private function registerDataRepository()\n\t{\n\t\t$this->app->singleton('glottos.dataRepository', function($app) {\n\t\t\t$messageModel = $this->getConfig('message_model');\n\n\t\t\t$translationModel = $this->getConfig('translation_model');\n\n\t\t\t$languageModel = $this->getConfig('language_model');\n\n\t\t\t$countryModel = $this->getConfig('country_model');\n\n\t\t\t$countryLanguageModel = $this->getConfig('country_language_model');\n\n\t\t\treturn new DataRepository(\n\t\t\t\t\t\t\t\t\t\tnew Message(new $messageModel, $this->app['glottos.cache']),\n\n\t\t\t\t\t\t\t\t\t\tnew Translation(new $translationModel, $this->app['glottos.cache']),\n\n\t\t\t\t\t\t\t\t\t\tnew LocaleRepository(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Language(new $languageModel, $this->app['glottos.cache']), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Country(new $countryModel, $this->app['glottos.cache']), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew CountryLanguage(new $countryLanguageModel, $this->app['glottos.cache'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t$this->app['glottos.config'],\n\n\t\t\t\t\t\t\t\t\t\t$this->app['glottos.fileSystem'],\n\n\t\t\t\t\t\t\t\t\t\t$this->app['glottos.finder']\n\t\t\t\t\t\t\t\t\t);\n\t\t});\n\t}",
"public function parseData()\n {\n if (isset($this->provider['dataCallback'])) {\n $this->provider['data'] = $this->provider['dataCallback']($this);\n }\n return $this;\n }",
"protected function __construct() {\n $this->providers = array();\n \n $this->register_provider('logger', 'php', 'Support_Resources_LoggerProvider',\n new Support_Resources_DefaultLoggerProvider(), true);\n $this->register_provider('config data', 'php', 'Support_Resources_ConfigProvider',\n new Support_Resources_DefaultConfigProvider(), true);\n $this->register_provider('template engine', 'php', 'Support_Resources_TemplateProvider',\n new Support_Resources_DefaultTemplateProvider(), true);\n $this->register_provider('db connection', 'pdo', 'Support_Resources_DBProvider',\n new Support_Resources_DefaultDBProvider(), true);\n $this->register_provider('cache', 'null', 'Support_Resources_CacheProvider',\n new Support_Resources_DefaultCacheProvider(), true);\n }",
"public function dataProvider()\n {\n return [\n [\n new Money(10, 'EUR'),\n 'EUR',\n new Money(10, 'EUR'),\n ],\n [\n new Money(15, 'EUR'),\n 'SEK',\n new Money(15, 'EUR'),\n ],\n [\n new Money(1497, 'USD'),\n 'EUR',\n new Money(1000, 'EUR'),\n ],\n ];\n }",
"public function populateDataProvider()\n {\n return [\n [\n [\n \\Magento\\Company\\Api\\Data\\CompanyInterface::COUNTRY_ID => 'US',\n \\Magento\\Company\\Api\\Data\\CompanyInterface::REGION_ID => 12\n ],\n [\n 'country_id' => 'US',\n 'region_id' => 12\n ]\n ],\n ];\n }",
"protected function prepareDataProvider()\n {\n $requestParams = Yii::$app->getRequest()->getBodyParams();\n if (empty($requestParams)) {\n $requestParams = Yii::$app->getRequest()->getQueryParams();\n }\n $proyectoId = Yii::$app->getRequest()->get($this->proyectoId, false);\n $areaId = Yii::$app->getRequest()->get($this->areaId, false);\n\n if (!$proyectoId || !$areaId) {\n throw new BadRequestHttpException(\"Bad Request\");\n }\n\n /* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\n $query = $modelClass::find()\n ->andWhere([\n \"estado\" => true,\n \"area_id\" => $areaId\n ]);\n\n return Yii::createObject([\n 'class' => ActiveDataProvider::className(),\n 'query' => $query,\n 'pagination' => [\n 'params' => $requestParams,\n ],\n 'sort' => [\n 'params' => $requestParams,\n ],\n ]);\n }",
"public abstract function getInstanceData($parameters);",
"private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}",
"function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}",
"abstract protected function _generateDataCollection();",
"public function _construct(){\n\t\treturn $this->data;\n\t}",
"public function _construct(){\n\t\treturn $this->data;\n\t}",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"public function create(array $data);",
"protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }",
"public function run()\n {\n Provider::factory(10)->create();\n }",
"public function getDataProvider()\n {\n // set database criteria\n $criteria = new CDbCriteria;\n $criteria->compare('project.id', $this->id);\n $criteria->compare('project.name', $this->name, true);\n $criteria->compare('project.status', $this->status);\n $criteria->compare('project.description', $this->description, true);\n\n // return database data provider\n return new CActiveDataProvider($this->model, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->settings->projects_per_page,\n ),\n ));\n }",
"public function generate_data() {\n\t\t$this->data = $this->get_registered_post_types();\n\t}",
"protected function load_data_store() {\n\t\t$this->data_store = new WC_CS_Admin_Funds_Transaction_Data_Store_CPT() ;\n\t}",
"public function __construct($dataContext = null) {\n if(!isset($dataContext))\n $dataContext = \\Swiftriver\\Core\\Setup::DALConfiguration()->DataContextType;\n $classType = (string) $dataContext;\n $this->dataContext = new $classType();\n }",
"public function __construct($dataContext = null) {\n if(!isset($dataContext))\n $dataContext = \\Swiftriver\\Core\\Setup::DALConfiguration()->DataContextType;\n $classType = (string) $dataContext;\n $this->dataContext = new $classType();\n }",
"public function getEshopDataProvider()\n {\n return oxNew( 'OxpsPaymorrowEshopDataProvider' );\n }",
"protected function setUp()\n {\n DI::set('database', function () {\n $mock = Mockery::mock('DatabaseObject');\n $mock->shouldReceive('query')->andReturn([])->byDefault();\n });\n\n $this->dataProvider = new DataProvider;\n\n parent::setUp();\n }",
"function __construct()\n {\n $this->dataBase = new Database(\n Conf::get('pkg_db_host'),\n Conf::get('pkg_db_port'),\n Conf::get('pkg_db_user'),\n Conf::get('pkg_db_password'),\n Conf::get('pkg_db_name'),\n Conf::get('pkg_db_usefav_table'));\n }",
"public static function factory(array $data);",
"public static function factory(array $data);",
"function newDataObject() {\n\t\t$ofrPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);\n\t\t$ofrPlugin->import('classes.ReviewObjectMetadata');\n\t\treturn new ReviewObjectMetadata();\n\t}",
"public function __construct()\n {\n $this->data = new DataController();\n }",
"private function __construct()\n {\n $factory = getDAOFactory();\n $this->_providersDAO = $factory->getFournisseurDAO();\n }",
"public function run()\n {\n ProviderType::insert(\n array(\n ['name' => 'Mayorista','question_registration'=>'¿Eres mayorista?'],\n ['name' => 'Exportador','question_registration'=>'¿Eres exportador?'],\n ['name' => 'Fabricante','question_registration'=>'¿Eres fabricante?'],\n ['name' => 'Importador','question_registration'=>'¿Eres Importador?'],\n )\n );\n }",
"public function dataProviderTestInit()\n {\n yield [\n [\n 'seed' => 0,\n 'min' => 0,\n 'max' => 10,\n 'format' => [\n [-1, -1],\n [-1, -1],\n ],\n ],\n ];\n }",
"public function create($data);"
] | [
"0.691703",
"0.6883793",
"0.67868966",
"0.66193867",
"0.65907615",
"0.6486428",
"0.6482713",
"0.6482713",
"0.62751126",
"0.622989",
"0.62173843",
"0.6124171",
"0.607909",
"0.6061989",
"0.6054555",
"0.60082346",
"0.598421",
"0.59657675",
"0.593381",
"0.5905784",
"0.58849627",
"0.58574164",
"0.5819434",
"0.5814037",
"0.581281",
"0.57942015",
"0.5773176",
"0.57424253",
"0.573392",
"0.5733644",
"0.5731248",
"0.5731212",
"0.5728237",
"0.57231784",
"0.5720501",
"0.5710364",
"0.5688998",
"0.566346",
"0.5650627",
"0.5650449",
"0.564871",
"0.56416005",
"0.56408316",
"0.5640767",
"0.5636715",
"0.5633783",
"0.56044865",
"0.5599444",
"0.55954343",
"0.5584507",
"0.5583199",
"0.55775964",
"0.5571884",
"0.55708444",
"0.55661035",
"0.5549823",
"0.5546512",
"0.5544417",
"0.55310374",
"0.5522649",
"0.5518324",
"0.5516136",
"0.55142504",
"0.55142504",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.5509784",
"0.54928046",
"0.5491843",
"0.54888695",
"0.5481498",
"0.5480488",
"0.5475277",
"0.5475277",
"0.5465228",
"0.5463724",
"0.54603666",
"0.5460125",
"0.5460125",
"0.5456297",
"0.5454463",
"0.5452426",
"0.54524153",
"0.54446065",
"0.5421876"
] | 0.7122672 | 0 |
Create a new controller instance. | public function __construct()
{
$this->middleware('auth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createController()\n {\n $this->createClass('controller');\n }",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }",
"private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }",
"protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }",
"protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }",
"public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }",
"public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}",
"public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}",
"public function createController( ezcMvcRequest $request );",
"public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }",
"public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}",
"private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }",
"public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}",
"public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}",
"private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }",
"public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }",
"public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se creó correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}",
"private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}",
"public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}",
"public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }",
"protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }",
"private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }",
"public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }",
"protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}",
"public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}",
"private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}",
"public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }",
"public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }",
"protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }",
"public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }",
"protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }",
"protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }",
"protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}",
"public function makeTestController(TestController $controller)\r\n\t{\r\n\t}",
"static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }",
"public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }",
"public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}",
"public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}",
"public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}",
"public function getController( );",
"public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }",
"static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }",
"public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }",
"private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }",
"function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }",
"public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }",
"public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }",
"protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }",
"public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }",
"protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }",
"public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }",
"public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }",
"public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }",
"protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }",
"private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }",
"public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}",
"public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }",
"public function controller()\n\t{\n\t\n\t}",
"protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }",
"function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}",
"protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }",
"public function __construct()\n {\n $this->controller = new DHTController();\n }",
"public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}",
"protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }",
"private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }",
"public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}",
"public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }",
"public static function createController( MShop_Context_Item_Interface $context, $name = null );",
"public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }",
"public function getController();",
"public function getController();",
"public function getController();",
"public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }",
"private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }",
"public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }",
"public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }",
"private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }",
"static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }",
"private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }",
"public function AController() {\r\n\t}",
"protected function initializeController() {}",
"public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }",
"public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }",
"private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }",
"function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }",
"public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}",
"public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }",
"private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}",
"public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }",
"protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }",
"public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }",
"public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}",
"protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }",
"public function create() {}",
"public function __construct()\n {\n $this->dataController = new DataController;\n }",
"function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}",
"public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }",
"private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }"
] | [
"0.82668066",
"0.8173394",
"0.78115296",
"0.77052677",
"0.7681875",
"0.7659338",
"0.74860525",
"0.74064577",
"0.7297601",
"0.7252339",
"0.7195181",
"0.7174191",
"0.70150065",
"0.6989306",
"0.69835985",
"0.69732994",
"0.6963521",
"0.6935819",
"0.68973273",
"0.68920785",
"0.6877748",
"0.68702674",
"0.68622285",
"0.6839049",
"0.6779292",
"0.6703522",
"0.66688496",
"0.66600126",
"0.6650373",
"0.66436416",
"0.6615505",
"0.66144013",
"0.6588728",
"0.64483404",
"0.64439476",
"0.6429303",
"0.6426485",
"0.6303757",
"0.6298291",
"0.6293319",
"0.62811387",
"0.6258778",
"0.62542456",
"0.616827",
"0.6162314",
"0.61610043",
"0.6139887",
"0.613725",
"0.61334985",
"0.6132223",
"0.6128982",
"0.61092585",
"0.6094611",
"0.60889256",
"0.6074893",
"0.60660255",
"0.6059098",
"0.60565156",
"0.6044235",
"0.60288006",
"0.6024102",
"0.60225666",
"0.6018304",
"0.60134345",
"0.60124683",
"0.6010913",
"0.6009284",
"0.6001683",
"0.5997471",
"0.5997012",
"0.59942573",
"0.5985074",
"0.5985074",
"0.5985074",
"0.5967613",
"0.5952533",
"0.5949068",
"0.5942203",
"0.5925731",
"0.5914304",
"0.5914013",
"0.59119135",
"0.5910308",
"0.5910285",
"0.59013796",
"0.59003943",
"0.5897524",
"0.58964556",
"0.58952993",
"0.58918965",
"0.5888943",
"0.5875413",
"0.5869938",
"0.58627135",
"0.58594996",
"0.5853714",
"0.5839484",
"0.5832913",
"0.582425",
"0.58161044",
"0.5815566"
] | 0.0 | -1 |
Show the application dashboard. | public function index()
{
$matchDates = MatchDate::orderBy('week_no')->get();
return view('layouts.matches.index', compact('matchDates'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }",
"function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}",
"public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }",
"public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }",
"public function dashboard()\n {\n return view('backend.dashboard.index');\n }",
"public function index() {\n return view(\"admin.dashboard\");\n }",
"public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }",
"public function dashboard(){\n return view('backend.admin.index');\n }",
"public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }",
"public function dashboard()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }",
"public function dashboard() \r\n {\r\n return view('admin.index');\r\n }",
"public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}",
"public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }",
"public function dashboard()\n {\n\n return view('admin.dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('adm.dashboard');\n }",
"public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }",
"public function show()\n {\n return view('dashboard');\n }",
"public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}",
"public function index() {\n return view('modules.home.dashboard');\n }",
"public function show()\n {\n return view('dashboard.dashboard');\n \n }",
"public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }",
"public function dashboard()\n { \n return view('jobposter.dashboard');\n }",
"public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}",
"public function index()\n {\n return view('pages.admin.dashboard');\n }",
"public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }",
"public function index()\n {\n //\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard.index');\n }",
"public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }",
"public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }",
"public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }",
"public function getDashboard() {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('smartcrud.auth.dashboard');\n }",
"public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }",
"public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }",
"public function index()\n {\n return view('board.pages.dashboard-board');\n }",
"public function index()\n {\n return view('admin::settings.development.dashboard');\n }",
"public function index()\n {\n return view('dashboard.dashboard');\n }",
"public function show()\n {\n return view('dashboard::show');\n }",
"public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }",
"public function dashboard()\n {\n return view('Admin.dashboard');\n }",
"public function show()\n {\n return view('admins\\auth\\dashboard');\n }",
"public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }",
"public function index()\n {\n return view('bitaac::account.dashboard');\n }",
"public function index()\n { \n return view('admin-views.dashboard');\n }",
"public function getDashboard()\n {\n return view('dashboard');\n }",
"function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }",
"public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }",
"public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }",
"public function index()\r\n {\r\n return view('user.dashboard');\r\n }",
"public function index() {\n return view('dashboard', []);\n }",
"public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }",
"public function index()\n {\n return view('back-end.dashboard.index');\n //\n }",
"public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}",
"public function index() {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('page.dashboard.index');\n }",
"public function index()\n {\n\n return view('dashboard');\n }",
"public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }",
"public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }",
"public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}",
"public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }",
"public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}",
"public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }",
"public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }",
"public function index()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }",
"public function index()\n {\n return view('/dashboard');\n }",
"public function index()\n {\n \treturn view('dashboard');\n }",
"public function index()\n {\n return view('ketua.ketua-dashboard');\n }",
"public function index(){\n return View::make('admin.authenticated.dashboardview');\n }",
"public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }",
"public function index()\n {\n return view('adminpanel.home');\n }",
"public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}",
"public function index()\n {\n return view('dashboard.home');\n }",
"public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }",
"public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }",
"public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }",
"public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }",
"public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }",
"public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }",
"public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }",
"public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }"
] | [
"0.77850926",
"0.7760142",
"0.7561336",
"0.75147176",
"0.74653697",
"0.7464913",
"0.73652893",
"0.7351646",
"0.7346477",
"0.73420244",
"0.7326711",
"0.7316215",
"0.73072463",
"0.7287626",
"0.72826403",
"0.727347",
"0.727347",
"0.727347",
"0.727347",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7241342",
"0.7236133",
"0.7235562",
"0.7218318",
"0.71989936",
"0.7197427",
"0.71913266",
"0.71790016",
"0.71684825",
"0.71577966",
"0.7146797",
"0.7133428",
"0.7132746",
"0.71298903",
"0.71249074",
"0.71218014",
"0.71170413",
"0.7110151",
"0.7109032",
"0.7107029",
"0.70974076",
"0.708061",
"0.7075653",
"0.70751685",
"0.7064041",
"0.70550334",
"0.7053102",
"0.7051273",
"0.70484304",
"0.7043605",
"0.70393986",
"0.70197886",
"0.70185125",
"0.70139873",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.6992477",
"0.6979631",
"0.69741416",
"0.69741327",
"0.6968815",
"0.6968294",
"0.69677526",
"0.69652885",
"0.69586027",
"0.6944985",
"0.69432825",
"0.69419175",
"0.6941512",
"0.6941439",
"0.6938837",
"0.6937524",
"0.6937456",
"0.6937456",
"0.69276494",
"0.6921651",
"0.69074917",
"0.69020325",
"0.6882262",
"0.6869339",
"0.6867868",
"0.68557185",
"0.68479055",
"0.684518",
"0.68408877",
"0.6838798",
"0.6833479",
"0.6832326",
"0.68309164",
"0.6826798",
"0.6812457"
] | 0.0 | -1 |
Check for end of stream. | public function stream_eof()
{
return ($this->_pos >= strlen($this->_pointer));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stream_eof() {\r\n\t\treturn $this->pos >= strlen($this->data);\r\n\t}",
"public function stream_eof()\r\n {\r\n return $this->_pos >= strlen($this->_data);\r\n }",
"public function stream_eof()\n {\n $isEof = ($this->_pos >= strlen($this->_data));\n return $isEof;\n }",
"public function stream_eof()\n {\n // we return true, so instead we lie and let stream_read do the job.\n return false;\n }",
"public function stream_eof(): bool\n {\n return ($this->position >= strlen($this->content));\n }",
"public function stream_eof() {}",
"public function eof(): bool\n {\n if ($this->stream->eof()) {\n return true;\n }\n\n // No limit and the underlying stream is not at EOF\n if ($this->limit === -1) {\n return false;\n }\n\n return $this->stream->tell() >= $this->offset + $this->limit;\n }",
"public function eof(): bool\n {\n return $this->stream->eof();\n }",
"public function eof()\n {\n return !$this->stream || feof($this->stream);\n }",
"public function stream_eof(): bool\n\t{\n\t\treturn feof($this->tempHandle);\n\t}",
"public function eof()\n {\n return $this->stream ? feof($this->stream) : true;\n }",
"function stream_eof() {\n return $this->eof;\n }",
"public function has_reached_eof()\n {\n return @feof($this->file_handle);\n }",
"public function eof()\n {\n return feof($this->stream);\n }",
"protected function isStreamFinished()\n {\n return gzeof($this->file);\n }",
"public function eof()\n\t{\n\t\treturn (!is_resource($this->fp) || feof($this->fp));\n\t}",
"public function has_not_reached_eof()\n {\n return ! @feof($this->file_handle);\n }",
"public function eof(): bool\n {\n return $this->content->eof();\n }",
"public function eof() {\n\t\treturn feof($this->handle);\n\t}",
"public function eof() : bool {\n return !$this->append && ($this->offset >= $this->size);\n }",
"public function isEOF()\n {\n if ($this->chunkOffset === $this->numChunks - 1) {\n return $this->bufferOffset >= $this->expectedLastChunkSize;\n }\n\n return $this->chunkOffset >= $this->numChunks;\n }",
"public function readUntilEndOfStream() {}",
"public function end()\n\t{\n\t\tTwitchHelper::log(TwitchHelper::LOG_INFO, \"Stream end\");\n\t}",
"private function isEndOfFile()\n {\n $handle = $this->getHandle();\n\n if (false === @fgetc($handle)) {\n\n return feof($handle);\n } else {\n fseek($handle, -1, SEEK_CUR);\n }\n\n return false;\n }",
"public function EndOfSeek()\r\n\t{\r\n\t\t$this->ResetError();\r\n\t\tif( $this->IsConnected() )\r\n\t\t{\r\n\t\t\tif( $this->activeRow >= ( $this->RowCount() ) )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->SetError( 'No connection' );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function eof()\n {\n throw new \\RuntimeException('Stream is not seekable');\n }",
"public function eof()\n {\n return $this->feof();\n }",
"protected function eof() { \n\t\treturn !isset($this->lines[$this->cursor]); \n\t}",
"public function eof(): bool;",
"public function isEOF() {\n\t\treturn $this->EOF;\n\t}",
"public function eof() {}",
"function eof() {\n return (\n $this->checkResource() ?\n feof($this->_handler) :\n Fire_Error::throwError('File resource member is not a valid file resource.', __FILE__, __LINE__)\n );\n }",
"public function eof()\n {\n return empty($this->iterable);\n }",
"public function streamClosed();",
"public function EOF()\n {\n return $this->EOF;\n }",
"public function eof();",
"public function eof();",
"public function hasNext() {\n return !feof($this->handle);\n }",
"public final function __end() : bool {\n\t\t\treturn false;\n\t\t}",
"public function isEof(): bool;",
"public function valid() {\r\n\t\tif (feof($this->handle)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n }",
"function EOF()\n\t{\n\t\tif( $this->_currentRow < $this->_numOfRows) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$this->EOF = true;\n\t\t\treturn true;\n\t\t}\n\t}",
"public function hasEnd(){\n return $this->_has(3);\n }",
"public function hasEnd(){\n return $this->_has(3);\n }",
"public function eof()\n {\n }",
"private function _exitStream()\n {\n if (!is_callable($this->exitStream)) {\n return false;\n }\n\n return call_user_func($this->exitStream);\n }",
"public function end($data = null)\n {\n if ($data !== null)\n {\n $this->write($data);\n }\n \n $this->writable = false;\n \n // close immediately if buffer is already empty\n // otherwise wait for buffer to flush first\n if ($this->data === '')\n {\n // echo '<br>stream.finish 2';\n $this->emit('finish');\n $this->close();\n }\n }",
"public function isLastStreamActive() {}",
"public function isEof(): bool\n {\n return $this->source->isEof();\n }",
"public function available() {\n return feof($this->in) ? 0 : 1;\n }",
"public function end_stream(){\r\n\t\t\t$this->stream->endElement(); // program\r\n\t\t\t$this->stream->endDocument();\r\n\t\t\techo $this->stream->outputMemory();\r\n\t\t}",
"abstract public function readMessageEnd();",
"abstract protected function isEndToken(string $token) : bool;",
"function hasMore()\n {\n return ($this->bufferSize > 0);\n }",
"public function valid(): bool\n {\n return !feof($this->fp) || $this->index !== null; // Is het einde van het bestand NIET bereikt?\n }",
"protected function scanEOS()\n {\n if (mb_strlen($this->input)) {\n return;\n }\n\n return $this->lastIndents-- > 0 ? $this->takeToken('outdent') : $this->takeToken('eos');\n }",
"protected function ends()\n {\n static $re_all = '/^[\\h\\v]*$/';\n static $re_nnl = '/^[\\h]*$/';\n \n if ($this->data === null)\n return true;\n \n // if $tnl (track new lines) is true: use \\h, else: use \\h\\v\n return preg_match($this->tnl ? $re_nnl : $re_all, $this->data);\n }",
"public function isEnded()\n {\n return $this->ended_at > 0;\n }",
"public function isReadCompleted(): bool;",
"public function isEnded();",
"public function isEnded() {}",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"public function end() {\n return $this->_end;\n }",
"public function hasNext()\r\n\t{\r\n\t\tif($this->position() == $this->inputLength() and feof($this->getPointer())) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function end() {\n return $this->end;\n }",
"public function ends()\n {\n return $this->endRepeat !== \"never\";\n }",
"protected function scanEOS()\n {\n if (mb_strlen($this->page) ) {\n return;\n }\n\n return $this->lastIndents-- > 0 ? $this->takeToken('outdent') : $this->takeToken('eos');\n }",
"public function transferEnd() {\n $this->_transferStarted = FALSE;\n $this->_transferSize = NULL;\n $this->stream = NULL;\n $this->dataPos = NULL;\n }",
"private function searchMustEnd(): bool\n {\n return in_array($this->search->fresh()->status, [\n Search::STATUS_FINISHED,\n Search::STATUS_FAILED,\n Search::STATUS_PAUSED\n ]);\n }",
"public static function endStream(): ?string\n {\n if (ob_get_contents())\n {\n $results = ob_get_contents();\n ob_get_clean();\n\n if($results == false)\n {\n throw new RuntimeException(\"There was an error while trying to obtain the buffer output.\");\n }\n\n self::$CurrentlyStreaming = false;\n self::$Content = $results;\n }\n else\n {\n self::$CurrentlyStreaming = false;\n self::$Content = null;\n $results = null;\n }\n\n return $results;\n }",
"public function stream_flush()\n {\n return true;\n }",
"function next() {\n\n\t\tif (is_null($this->_httpq->next())) { return false; }\n\n\t\treturn true;\n\n\t}",
"public function hasFinishWrite(){\n return $this->_has(3);\n }",
"protected function _isEndKey( $key )\n {\n $endReadingKey = $this->_options[self::OPT_END_READING_KEY];\n return ( 0 === strcmp( $key, $endReadingKey ) );\n }",
"public function hasEnded()\n {\n return $this->ended;\n }",
"function seekToEnd() : void;",
"public function bufferEnd() {\n\t\tob_end_flush();\n\t}",
"protected function _detectCompletionAndEnd()\n {\n// detect if the output has completed, and if it does\n// delete the output file and stop the loop.\n if($this->_detectCompletionBoundaryInOutput() === true)\n {\n $this->deleteOutputFile();\n $this->stop();\n }\n else if($this->_detectFailureBoundaryInOutput() === true)\n {\n $this->_error_code = $this->_getErrorCodeInOutput();\n }\n }",
"function is_ok()\n\t{\n\t\t$this->message = $this->sock_read();\n\n\t\tif($this->message == \"\" || preg_match('/^5/',$this->message) )\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t}",
"private function get_is_terminated(): bool\n\t{\n\t\treturn $this->status === self::STATUS_TERMINATED;\n\t}",
"public function isEnding()\n\t{\n\t\treturn $this->session->expiring();\n\t}",
"public function is_complete() {\n return $this->remaining_length() == 0;\n }",
"public function isValid()\n {\n return $this->pos < strlen($this->buffer);\n }",
"protected function closeStream()\n {\n gzclose($this->file);\n // Handle event with listener\n $this->listener->onEnd();\n }",
"public function eof()\n {\n return $this->rendered;\n }",
"public function end($end);",
"public function finished()\n {\n return ! is_null($this->finishedAt);\n }",
"public function onCompleted(ProxyEvent $event){\r\n\t\tif($this->stream){\r\n\t\t\texit;\r\n\t\t}\r\n\t}",
"public function end()\n {\n return end($this->_data);\n }",
"abstract protected function doEnd();",
"function onAfterStream(&$man, $cmd, $input) {\r\n\t\treturn true;\r\n\t}",
"public function has_ended() {\r\n\t\treturn 0 == $this->get_seconds_left();\r\n\t}",
"public function fileEnd(): void;",
"public function stream_tell() {}",
"public function getEnd() {}",
"public function streamStatementEnd( &$sql, &$newLine ) {\n\t\tif ( $this->delimiter ) {\n\t\t\t$prev = $newLine;\n\t\t\t$newLine = preg_replace( '/' . preg_quote( $this->delimiter, '/' ) . '$/', '', $newLine );\n\t\t\tif ( $newLine != $prev ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function available() {\r\n\t\t// All streams were read\r\n\t\tif($this->_streamsCount===0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// The current stream has more data\r\n\t\tif(reset($this->_streams)->available()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Check the other streams, if they have data\r\n\t\tforeach($this->_streams as $stream) {\r\n\t\t\tif($stream->available()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public function readToEnd() {\n\t\t$data = \"\";\n\n\t\twhile (($chunk = $this->read(4096)) !== \"\") {\n\t\t\t$data .= $chunk;\n\t\t}\n\n\t\treturn $data;\n\t}"
] | [
"0.84634507",
"0.84209985",
"0.8390213",
"0.83486485",
"0.8246708",
"0.80031765",
"0.7909408",
"0.7906364",
"0.7851162",
"0.7810407",
"0.7714902",
"0.7656468",
"0.7654029",
"0.7581033",
"0.7580208",
"0.7441049",
"0.7411358",
"0.73846376",
"0.7362084",
"0.7338954",
"0.7312465",
"0.7151065",
"0.7012356",
"0.69916975",
"0.6989898",
"0.69774264",
"0.69707173",
"0.6948859",
"0.6866746",
"0.6849873",
"0.68396163",
"0.6831486",
"0.6703664",
"0.6679517",
"0.6575555",
"0.6531221",
"0.6531221",
"0.65203863",
"0.64691365",
"0.63628876",
"0.6313097",
"0.62658757",
"0.6250912",
"0.6250912",
"0.62378776",
"0.6224915",
"0.6204461",
"0.61691225",
"0.6086037",
"0.5979693",
"0.5971766",
"0.5936544",
"0.59344816",
"0.58701855",
"0.5863754",
"0.5862936",
"0.5803596",
"0.579789",
"0.5795531",
"0.57891786",
"0.5778832",
"0.5770207",
"0.5770207",
"0.5770207",
"0.5747016",
"0.5735004",
"0.57348394",
"0.5725347",
"0.568192",
"0.56554353",
"0.5630453",
"0.56219685",
"0.560632",
"0.558824",
"0.55791885",
"0.55784166",
"0.5568083",
"0.55648625",
"0.55605185",
"0.5507026",
"0.5498625",
"0.5474077",
"0.54706836",
"0.54661644",
"0.544629",
"0.54300326",
"0.5429896",
"0.5426355",
"0.54178935",
"0.54019374",
"0.53953344",
"0.53905004",
"0.5375464",
"0.53734195",
"0.5372317",
"0.5366503",
"0.5346785",
"0.5343695",
"0.5338501",
"0.53155065"
] | 0.83069265 | 4 |
Return the current position. | public function stream_tell()
{
return $this->_pos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getCurrentPosition()\n {\n return $this->getPositionInstance()->getPosition();\n }",
"public function getPosCur()\n {\n return $this->pos_cur;\n }",
"public function getCurrentPosition(): int;",
"public static function getPosition()\n {\n return self::$position;\n }",
"public function getPosition() {\n\t\treturn $this->position;\n\t}",
"public function getPosition() {\n\t\treturn $this->position;\n\t}",
"public function position() {\n\t\treturn $this->position;\n\t}",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPosition()\n {\n return $this->position;\n }",
"public function getPos()\n {\n return $this->pos;\n }",
"public function getPosition()\n {\n return $this->get(self::POSITION);\n }",
"function getPosition()\n\t{\n\t\treturn $this->Info['Position'];\n\t}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPosition() {\n return $this->getValue('position');\n }",
"public function getPosition() {}",
"public function getPosition() {}",
"public function getPos();",
"public function getPos();",
"public static function position()\n {\n return static::$position;\n }",
"public static function position()\n {\n return static::$position;\n }",
"public function getPosition()\n {\n return $this->getData(self::POSITION);\n }",
"function getPosition() {\n\t\t}",
"public function getPosition()\n {\n return -1;\n }",
"public function getPosition(): int\n {\n return $this->position;\n }",
"public function getPosition(): int\n {\n return $this->position;\n }",
"public function getPosition(): string;",
"public function SeekPosition()\r\n\t{\r\n\t\treturn $this->active_row;\r\n\t}",
"public function getPosition();",
"public function getPosition();",
"public function getPosition();",
"public function getPosition() : int\n {\n $rtn = $this->data['position'];\n\n return $rtn;\n }",
"public function getPosition() {\n }",
"function getPosition() ;",
"public function getPosition(){ }",
"function current() \n {\n // TODO wrap this;\n return $this->offsetGet($this->position);\n }",
"public function position()\n {\n return $this->i;\n }",
"public function getPosCurTmp()\n {\n return $this->pos_cur_tmp;\n }",
"public function position()\n\t{\n\t\treturn $this->getField('position');\n\t}",
"function getPosition() { return $this->readText(); }",
"public function position()\r\n\t{\r\n\t\treturn ftell($this->getPointer());\r\n\t}",
"function getPosition() { return $this->readText(); }",
"public function getCurrentPosition() {\n return implode(' ', array($this->x, $this->y, $this->facing));\n }",
"public function getCurrent()\n {\n return $this->cur;\n }",
"public function getStartPosition()\n\t{\n\t\treturn $this->startPosition;\n\t}",
"function current()\n\t{\n\t\treturn $this->get($this->pos);\n\t}",
"function getPosition() {\n return sprintf(\"%010d\", $this->_position);\n }",
"public function getStartPosition() {\r\n return $this->startPosition;\r\n }",
"public function current()\n {\n return $this->getItem($this->position);\n }",
"public function current()\n {\n return $this->data[$this->position];\n }",
"public function current() {\n\t\treturn $this->data[$this->position];\n\t}",
"public function get_position(){ return $this->_position;}",
"public function getStartPosition()\n\t{\n\t\treturn -1;\n\t}",
"public function getPosition()\n {\n $value = $this->get(self::POSITION);\n return $value === null ? (string)$value : $value;\n }",
"public function getCurrent() {\n return $this->current-1;\n }",
"function currentTextPosition()\n {\n return array($this->current, $this->offset);\n }",
"public function getPosition()\r\n {\r\n return ftell($this->handle);\r\n }",
"public function current()\n {\n return $this->activeValue[$this->position];\n }",
"public function current()\n {\n return $this->list[$this->position];\n }",
"private function getXposition()\n {\n return $this->getPositionInstance()->getXposition();\n }",
"public function getCurrent() {\r\n\t\treturn $this->current;\r\n\t}",
"public function getPosCur1()\n {\n return $this->pos_cur1;\n }",
"public function current()\n {\n return $this->collection->getItems()[$this->position];\n }",
"public function getCurrent()\n {\n return $this->current;\n }",
"public function getCurrent()\n {\n return $this->current;\n }",
"public function getPosition()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('position');\t\t\n\t\t\t\t\t\t\n\t\t$position = new Position($this->position_id);\n\n\t\treturn $position;\n\t}",
"private function getPosition()\n {\n if (false === ($position = @ftell($this->getHandle()))) {\n $error = error_get_last();\n\n throw new RuntimeException($error['message']);\n }\n\n return $position;\n }",
"public function current()\n {\n return $this->elements[$this->position];\n }",
"public function getInitialPosition();",
"public function current()\n {\n $this->getOrigin()->data_seek($this->position);\n if ($this->currData)\n $return = $this->currData;\n else\n $return = $this->getCurrentData();\n\n $this->currData = null;\n\n return $return;\n }",
"public function getCurrent() {\n $this->prepare();\n return $this->_current;\n }",
"public function current() : string\n {\n return chr($this->position);\n }",
"function pos(){\n return ftell($this->handle);\n }",
"public function getPosition() {\r\n return $this->posAxis;\r\n }",
"public function current() {\n\t\treturn $this->offsetGet($this->currentIndex);\n\t}",
"public function currentLocation() {\n return $this->currentLocation;\n }",
"public function position();",
"public function current()\n {\n return $this->_current;\n }",
"public function current()\n {\n return $this->_current;\n }",
"public function current()\n {\n return $this->_current;\n }",
"public function getFilePos() {\n\t\treturn $this->linepointer;\n\t}",
"public function current()\n {\n return $this->current;\n }",
"public function current()\n {\n return $this->current;\n }",
"public function current()\n {\n return $this->current;\n }",
"public function current()\n {\n return $this->bricks[$this->position];\n }",
"function current()\n {\n if (!isset($this->_curPage)\n || $this->_curPage->getPage() != $this->_position\n ) {\n $this->_curPage = $this->_pages->get($this->_position);\n }\n return $this->_curPage;\n }",
"public function current() {\r\n\t\treturn $this->lastLine;\r\n }",
"public function current()\n {\n return $this->records[$this->position];\n }",
"public function getCurrentLine()\n {\n return $this->lineno;\n }",
"public function current()\n {\n return $this->offsetGet($this->index);\n }",
"public function current()\n\t{\n\t\treturn $this->current;\n\t}"
] | [
"0.8633055",
"0.830362",
"0.8256613",
"0.8245945",
"0.82310414",
"0.82310414",
"0.8101096",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80986315",
"0.80930287",
"0.8024884",
"0.80193627",
"0.8001666",
"0.8001666",
"0.8001666",
"0.8001666",
"0.8001666",
"0.79684377",
"0.79267657",
"0.79267657",
"0.79089516",
"0.79089516",
"0.7896957",
"0.7896957",
"0.7884776",
"0.7870079",
"0.7822859",
"0.78182167",
"0.78182167",
"0.7812309",
"0.7796457",
"0.77952474",
"0.77952474",
"0.77952474",
"0.7762977",
"0.7720866",
"0.7691651",
"0.7651744",
"0.7625248",
"0.76223695",
"0.754769",
"0.7545712",
"0.75409013",
"0.75382495",
"0.74764824",
"0.7459743",
"0.7428405",
"0.7416466",
"0.738406",
"0.7355599",
"0.73496556",
"0.7336588",
"0.7324032",
"0.7320708",
"0.7303373",
"0.72946316",
"0.72942936",
"0.7264918",
"0.7258314",
"0.72312665",
"0.7181307",
"0.71741945",
"0.713155",
"0.7129532",
"0.71014154",
"0.70942557",
"0.7078573",
"0.7078573",
"0.7075995",
"0.70737994",
"0.7068687",
"0.706685",
"0.7051231",
"0.70321435",
"0.70183027",
"0.700056",
"0.69957644",
"0.69901663",
"0.6983373",
"0.6980881",
"0.6940608",
"0.6940608",
"0.6940608",
"0.69387245",
"0.6929509",
"0.6929509",
"0.6929509",
"0.6894125",
"0.6885387",
"0.6881415",
"0.687243",
"0.6868168",
"0.68600285",
"0.6858901"
] | 0.0 | -1 |
Read from the stream. | public function stream_read($count)
{
if (!$this->_open) {
return false;
}
if (!($this->_mode & STREAM_VAR_READABLE)) {
return false;
}
$data = substr($this->_pointer, $this->_pos, $count);
$this->_pos = $this->_pos + strlen($data);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readStream();",
"abstract public function read(AbstractStream $stream);",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"abstract public function read();",
"function read() {\n\t\t$_this =& AmfStream::getInstance();\n\t\treturn $_this->__stream;\n\t}",
"public function read() {\r\n }",
"public function read()\n {\n }",
"abstract function read();",
"public function read()\n {\n }",
"public function read() {\n\t\t\n\t}",
"public function readStream($path)\n {\n }",
"public function readStream($path)\n {\n }",
"public function readUntilEndOfStream() {}",
"abstract protected function read ();",
"public function readStream($path)\n {\n //todo\n }",
"public function stream_read($count) {\r\n\t\t$ret = substr($this->data, $this->pos, $count);\r\n\t\t$this->pos += strlen($ret);\r\n\t\t\r\n\t\treturn $ret;\r\n\t}",
"public function read(PacketStream $stream): void;",
"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 ()\n {\n return $this->read();\n }",
"public function stream_read(int $length)\n\t{\n\t\treturn fread($this->tempHandle, $length);\n\t}",
"function stream_read( $count ) {\r\n\t\tif ( ! isset( $this->data_ref ) ) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\t$ret = substr( $this->data_ref, $this->position, $count );\r\n\r\n\t\t$this->position += strlen( $ret );\r\n\t\treturn $ret;\r\n\t}",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"function read()\n {\n }",
"public function read($pathorstream);",
"function read($size = 4096) {\n if (!$content = @fread($this->_handler, $size)) {\n Fire_Error::throwError(sprintf('Failed to read %d bytes data from \"%s\" file.',\n $size, \n $this->_file\n ), __FILE__, __LINE__\n );\n }\n \n return $content;\n }",
"public function read()\n {\n $this->response = $this->transport->read();\n return $this->response;\n }",
"public function read() {\n\t\t// For head requests\n\t\tif ($this->isEmptyBody) {\n\t\t\t$this->close();\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// Currently we don't support any content encodings like gzip or deflate\n\t\t// TODO: Implement this if needed\n\t\tif ($this->contentEncoding) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Unsupported content encoding: \" . $this->contentEncoding);\n\t\t}\n\n\t\t// Read uncompressed chunk\n\t\t$data = $this->readChunk();\n\n\t\t// Close connection when there is no more data\n\t\tif ($data === \"\") {\n\t\t\t$this->close();\n\t\t}\n\n\t\treturn $data;\n\t}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function readStream($path)\n {\n try {\n $object = $this->applyPathPrefix($path);\n $url = $this->ossClient->signUrl($this->bucket, $object, 60, OssClient::OSS_HTTP_GET, $this->options);\n $handle = fopen($url, 'r');\n\n return $this->normalizeResponse([\n 'stream' => $handle,\n ], $path);\n } catch (OssException $e) {\n return false;\n }\n }",
"public function read()\n\t{\n\t\treturn file_get_contents($this->getPath());\n\t}",
"public function read($start = 0, $length) {}",
"public function read($length);",
"public function read($length);",
"public function read($length);",
"public function read($length) {\n\t\tif (! $this->readable) {\n\t\t\tthrow new RuntimeException(\"Stream is not readable\");\n\t\t}\n\t\treturn fread($this->handle, $length);\n\t}",
"public function read($length)\n {\n }",
"public function Read($read)\n\t\t{\n\t\t\tif(!$this->IsValid())\n\t\t\t\treturn false;\n\n\t\t\treturn fread($this->file, $read);\n\t\t}",
"public function stream_read(int $count): string\n {\n $p =& $this->position;\n $ret = substr($this->content, $p, $count);\n $p += strlen($ret);\n return $ret;\n }",
"public static function getStream() {}",
"public function processRead()\n {\n if (feof($this->socket)) {\n $this->log('Client closed remote socket', Loggable::LEVEL_WARN);\n $this->disconnect();\n } else if ($this->securityMethod && !$this->cryptoComplete) {\n $this->log('Continuing crypto negotiation');\n\n $success = stream_socket_enable_crypto($this->socket, true, $this->securityMethod);\n if ($success === false) {\n $this->log('stream_socket_enable_crypto() failed: ' . $this->getLastSocketError(), Loggable::LEVEL_WARN);\n $this->trigger('error', $this, 'stream_socket_enable_crypto() failed: ' . $this->getLastSocketError());\n\n $this->disconnect();\n } else if ($success) {\n $this->log('Crypto negotiation complete');\n $this->cryptoComplete = true;\n\n $this->trigger('cryptoenabled', $this);\n }\n } else {\n $this->readDataIntoBuffer();\n\n if (!$this->handshake->isComplete()) {\n $this->shakeHands();\n } else {\n // keep processing until there are no complete frames left in the buffer\n while ($this->messageDecoder->processData($this->buffer));\n }\n }\n }",
"public function read($len) {\r\n\t\tif($len<0) {\r\n\t\t\tthrow new Curly_Stream_Exception('The given length '.$len.' is invalid for a read operation. Only positive values area valid.');\r\n\t\t}\r\n\t\t\r\n\t\t$read='';\r\n\t\t$readLen=0;\r\n\t\t\r\n\t\t// Read from every stream, until we have enough data\r\n\t\tforeach($this->_streams as $stream) {\r\n\t\t\t$read.=$stream->read($len-$readLen);\r\n\t\t\t\r\n\t\t\t// Enough data read\r\n\t\t\t$readLen=strlen($read);\r\n\t\t\tif($readLen==$len) {\r\n\t\t\t\treturn $read;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->shift();\r\n\t\t}\r\n\t\t\r\n\t\t// So, not enough data found, but return what we´ve got.\r\n\t\treturn $read;\r\n\t}",
"public function read()\n {\n $this->seen();\n }",
"public function read(StreamInterface $stream)\n {\n $this->platformID = $stream->readUShort();\n $this->encodingID = $stream->readUShort();\n $this->languageID = $stream->readUShort();\n $this->nameID = $stream->readUShort();\n $this->length = $stream->readUShort();\n $this->offset = $stream->readUShort();\n }",
"public function read(){\n \treturn ser_read();\n }",
"public function read() \n {\n\n if ($this->is_csv) \n {\n return $this->read_csv();\n }\n else\n {\n return $this->read_lines();\n }\n \n }",
"public function read()\n {\n return $this->_contents;\n }",
"private function _readStream(&$stream, &$transparencyMask, &$transparencyPixelCount) {}",
"public function read()\n {\n return $this->response;\n }",
"public function getContents()\n {\n return stream_get_contents($this->stream);\n }",
"public function Read()\n\t{\n\t\treturn $this->OnRead();\n\t}",
"public function getStream(): mixed;",
"public function read($length)\n {\n return fread($this->stream, $length);\n }",
"public function read($count)\n {\n return fread($this->socket, $count);\n }",
"public function readLine() {\n\t\tif (! $this->readable) {\n\t\t\tthrow new RuntimeException(\"Stream is not readable\");\n\t\t}\n\t\treturn fgets($this->handle);\n\t}",
"public function read($length)\n {\n $this->assertStreamIsAvailable();\n $this->assertStreamIsReadable();\n\n $result = fread($this->stream, $length);\n\n if (false === $result) {\n $msg = 'Error occurred during reading data from stream.';\n throw new Exception\\RuntimeException($msg);\n }\n\n return $result;\n }",
"public function openRead() {\r\n return $this->open();\r\n }",
"function read() {\n\t\tif ($this->f && filesize($this->path) > 0) {\n\t\t\treturn fread($this->f, filesize($this->path));\n\t\t}\n\t\treturn '';\n\t}",
"function read()\n {\n $response_content = '';\n if ($this->headers['Transfer-Encoding'] == 'chunked')\n {\n while ($chunk_length = hexdec(fgets($this->socket)))\n {\n $response_content_chunk = '';\n $read_length = 0;\n\n while ($read_length < $chunk_length)\n {\n $response_content_chunk .= fread($this->socket, $chunk_length - $read_length);\n $read_length = strlen($response_content_chunk);\n }\n\n $response_content .= $response_content_chunk;\n fgets($this->socket);\n }\n }\n else\n {\n while (!feof($this->socket))\n {\n $response_content .= fgets($this->socket, 128);\n }\n }\n return chop($response_content);\n fclose($this->socket);\n }",
"public function read()\n {\n return $this->fallback->process(\n $this->preProcessor->process(\n $this->source->get()\n )\n );\n }",
"public function getReadStream(File $file);",
"protected function read()\n {\n return true;\n }",
"public function read($length) {\n $this->waitForData();\n return $this->readData($length);\n }",
"function readStream( string $_stream_path, IEntitySet $_transform ): IStreamProperties;",
"public function onRead();",
"public function read_string() { return $this->read_bytes(); }",
"public function getContents()\n {\n $this->assertStreamIsAvailable();\n $this->assertStreamIsReadable();\n\n $result = stream_get_contents($this->stream);\n\n if (false === $result) {\n $msg = 'Error occurred during getting remaining contents from stream.';\n throw new Exception\\RuntimeException($msg);\n }\n\n return $result;\n }",
"public function read($len) {\n if (strlen($this->rbuffer_) > 0) {\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }\n\n $data = $this->transport_->readAll(4);\n $array = unpack('Nlength', $data);\n $length = $array['length'];\n\n $this->rbuffer_ = $this->transport_->readAll($length);\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }",
"function readContent(){\n\n if (ftell($this->handle) == 0){\n $this->readLine();\n }\n $this->content = [];\n \n while ( ($read = $this->readLine()) !== FALSE){\n $this->content[] = $read;\n }\n }",
"public function readToStream($stream, $handlerObj = NULL, $handlerMethod = NULL) {\n return $this->fileService->readFileToStream( $this->path, $stream, $handlerObj, $handlerMethod );\n }",
"public function read($length)\n {\n $data = empty($length) ? '' : fread($this->stream, $length);\n if ($data === false) {\n throw new RuntimeException('Could not read stream');\n }\n return $data;\n }",
"public function read(): bool\n {\n }",
"public function read(): bool\n {\n }",
"public function onRead() {\n\t\tif (false === ($pct = $this->readExact($this->lowMark))) {\n\t\t\treturn; // not readed yet\n\t\t}\n\t\tif ($pct === \"<policy-file-request/>\\x00\") {\n\t\t\tif ($this->pool->policyData) {\n\t\t\t\t$this->write($p = $this->pool->policyData . \"\\x00\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->write(\"<error/>\\x00\");\n\t\t\t}\n\t\t}\n\t\t$this->finish();\n\t}",
"public function read(): mixed\n {\n return json_decode(file_get_contents($this->path), true, 512, JSON_THROW_ON_ERROR);\n }",
"private function readIntoBuffer()\n {\n $data = stream_socket_recvfrom($this->socket, self::$READ_BUFFER_SIZE);\n\n if ($data === '' || $data === false || !is_resource($this->socket) || feof($this->socket)) {\n $this->disconnect();\n return null;\n }\n\n $this->readBuffer->feed($data);\n }",
"public function onReadAvailable()\n\t{\n\t\t$s = @fread($this->stream, 0xffff);\n\n\t\tif ($s === false || @feof($this->stream)) {\n\t\t\t$this->close();\n\n\t\t} else {\n\t\t\t$this->readBuffer .= $s;\n\n\t\t\twhile (($l = strlen($this->readBuffer)) >= 8) {\n\t\t\t\t$frame = unpack(\"Cversion/Ctype/nrequestId/ncontentLength/CpaddingLength\", $this->readBuffer);\n\t\t\t\t$type = $frame[\"type\"];\n\t\t\t\t$requestId = $frame[\"requestId\"];\n\t\t\t\t$contentLength = $frame[\"contentLength\"];\n\t\t\t\t$paddingLength = $frame[\"paddingLength\"];\n\n\t\t\t\tif ($l < 8 + $contentLength + $paddingLength) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->contentBuffer = substr($this->readBuffer, 8, $contentLength);\n\t\t\t\t$this->readBuffer = substr($this->readBuffer, 8 + $contentLength + $paddingLength) ?: \"\";\n\n\t\t\t\tif ($frame[\"version\"] !== 1) {\n\t\t\t\t\t$this->handler->onError(\n\t\t\t\t\t\tnew ConnectionException(\"Protocol version mismatch. Expected 1, got {$frame[\"version\"]}.\"),\n\t\t\t\t\t\t$this\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($type === Constants::TYPE_PARAMS) {\n\t\t\t\t\t$this->onParamsFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDIN) {\n\t\t\t\t\t$this->onStdinFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_BEGIN_REQUEST) {\n\t\t\t\t\t$this->onBeginRequestFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_ABORT_REQUEST) {\n\t\t\t\t\t$this->onAbortRequestFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_GET_VALUES) {\n\t\t\t\t\tif ($requestId !== Constants::NULL_REQUEST_ID) {\n\t\t\t\t\t\t$this->closeWithError(\"Received frame GET-VALUES on non-null-request id channel.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->onGetValuesFrame();\n\t\t\t\t\t}\n\n\t\t\t\t} elseif ($type === Constants::TYPE_END_REQUEST) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: END-REQUEST.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDOUT) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: STDOUT.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDERR) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: STDERR.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_DATA) {\n\t\t\t\t\t$this->onDataFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_GET_VALUES_RESULT) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: GET-VALUES-RESULT.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_UNKNOWN_TYPE) {\n\t\t\t\t\t$this->contentBuffer = \"\";\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->closeWithError(\"Unhandled request type #{$type}, closing connection.\");\n\t\t\t\t}\n\n\t\t\t\tif (!$this->closed && !empty($this->contentBuffer)) {\n\t\t\t\t\t$this->closeWithError(\"Content buffer hasn't been fully consumed.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function read($len = 1024) {\n\t\treturn fread($this->fp, $len);\n\t}",
"public function getContents()\n {\n $contents = stream_get_contents($this->stream);\n if ($contents === false) {\n throw new RuntimeException('Could not read stream');\n }\n return $contents;\n }",
"public function onRead() {\n\t\tstart:\n\t\tif ($this->type === 'udp') {\n\t\t\t$this->onUdpPacket($this->read($this->highMark));\n\t\t}\n\t\tif ($this->state === self::STATE_ROOT) {\n\t\t\tif (false === ($hdr = $this->readExact(2))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->pctSize = Binary::bytes2int($hdr, true);\n\t\t\t$this->setWatermark($this->pctSize);\n\t\t\t$this->state = self::STATE_PACKET;\n\t\t}\n\t\tif ($this->state === self::STATE_PACKET) {\n\t\t\tif (false === ($pct = $this->readExact($this->pctSize))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->state = self::STATE_ROOT;\n\t\t\t$this->setWatermark(2);\n\t\t\t$this->onUdpPacket($pct);\n\t\t}\n\t\tgoto start;\n\t}",
"protected function _read($length) {\n $data = false;\n if (!feof($this->_socket)) {\n $data = fread($this->_socket, $length);\n }\n return $data;\n }"
] | [
"0.8190801",
"0.78004193",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7469309",
"0.7265477",
"0.72069097",
"0.7112128",
"0.7072189",
"0.70513386",
"0.70177794",
"0.69620675",
"0.6944735",
"0.6944735",
"0.6856007",
"0.68476415",
"0.68354595",
"0.6731734",
"0.66945666",
"0.66583693",
"0.66513705",
"0.6642368",
"0.6593364",
"0.6587467",
"0.6587467",
"0.6587467",
"0.6587467",
"0.6587467",
"0.6587467",
"0.6562294",
"0.65356565",
"0.648363",
"0.64236313",
"0.6386691",
"0.6371528",
"0.6370959",
"0.6370959",
"0.6370959",
"0.6370959",
"0.63546",
"0.6323349",
"0.63101894",
"0.6302618",
"0.6302618",
"0.6302618",
"0.62841284",
"0.6281283",
"0.62795407",
"0.627372",
"0.62535",
"0.6252699",
"0.6233214",
"0.62091005",
"0.6184485",
"0.61725163",
"0.61497235",
"0.61492777",
"0.61218643",
"0.61163485",
"0.61100435",
"0.6108146",
"0.6107999",
"0.6103462",
"0.6103308",
"0.6092632",
"0.60803765",
"0.605652",
"0.60156",
"0.6011389",
"0.6004139",
"0.5996046",
"0.5994347",
"0.59688836",
"0.5952874",
"0.59173626",
"0.59017915",
"0.58960783",
"0.58950955",
"0.5890185",
"0.58854675",
"0.5868627",
"0.5864666",
"0.5864666",
"0.5860782",
"0.5844852",
"0.58436924",
"0.582749",
"0.5826614",
"0.5820392",
"0.58180076",
"0.58085257"
] | 0.6508499 | 40 |
Write to the stream. | public function stream_write($data)
{
if (!$this->_open) {
return false;
}
if (!($this->_mode & STREAM_VAR_WRITEABLE)) {
return false;
}
$datalen = strlen($data);
$this->_pointer = substr($this->_pointer, 0, $this->_pos)
. $data
. substr($this->_pointer, $this->_pos+$datalen);
$this->_pos = $this->_pos + $datalen;
return $datalen;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write();",
"public function write();",
"protected function _write() {}",
"public function write()\n {\n }",
"abstract protected function write();",
"public function writeStream($resource);",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function write($data) {\r\n\t\t$res=fwrite($this->_handle, $data);\r\n\t\tif(!$res) {\r\n\t\t\tthrow new Curly_Stream_Exception('An error occured while writing data into the output stream');\r\n\t\t}\r\n\t\telse if($res!==strlen($data)) {\r\n\t\t\tthrow new Curly_Stream_Exception('Not all data was written to the output stream. Just '.$res.' bytes were written');\r\n\t\t}\r\n\t}",
"abstract protected function _write();",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function write($bytes) {}",
"public function write($bytes) {}",
"abstract public function write($data);",
"public function write($bytes) {}",
"public function writeMessage(Parser\\OutputStream $stream);",
"protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }",
"public function write($buf);",
"function write()\n {\n }",
"public function write($data)\n {\n $this->buffer .= $data;\n }",
"public function write($s)\n {\n $this->flushbits();\n $this->_out .= $s;\n }",
"public function write($data) {\n\t}",
"public function write($buffer)\n {\n }",
"public function write()\n {\n $this->assertEquals('', $this->memoryOutputStream->getBuffer());\n $this->assertEquals(5, $this->memoryOutputStream->write('hello'));\n $this->assertEquals('hello', $this->memoryOutputStream->getBuffer());\n }",
"public function write(PacketStream $stream): void;",
"public function writeTo($stream) {\n\t\t// have we written the request size yet?\n\t\t$written = $this->writeRequestSize($stream);\n\t\t\n\t\t// try to write the actual buffer itself\n\t\tif ($this->sizeWritten && !feof($this->buffer)) {\n\t\t\t//TODO: check that fread returns something\n\t\t\t$written += fwrite($stream, fread($this->buffer, 8192));\n\t\t}\n\t\t// if we are done, mark it off\n\t\tif (feof($this->buffer)) {\n\t\t\t$this->complete = true;\n\t\t\tfclose($this->buffer);\n\t\t}\n\t\treturn $written;\n\t}",
"public function _write($data)\n {\n }",
"public function write( $message ){\n \n fwrite( $this->getFilePointer(), $message . \"\\n\\n\" );\n \n }",
"public function write($content);",
"public function writeStream(Customweb_Core_Stream_IInput $inputStream);",
"protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }",
"public function writeAndClose();",
"protected function write()\n {\n $this->writeString($this->clientName);\n $this->writeString($this->clientVersion);\n $this->writeShort($this->protocolVersion);\n $this->writeString(''); // client id, unused.\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->username);\n $this->writeString($this->password);\n }",
"public function write() {\n\n try {\n $this->open();\n $sessionData = session_encode(); // Returns an encoded string containing the session data.\n $fileHandle = fopen(self::FILEPATH, \"w+\"); // Open the file\n fwrite($fileHandle, $sessionData); // Write the session data to file\n fclose($fileHandle);\n }\n catch(SessionException $e) {\n echo \"Error writing session to file: \" . $e->getMessage();\n }\n }",
"function stream_write( $data ) {\r\n\t\tif ( ! isset( $this->data_ref ) ) {\r\n\t\t\t$this->data_ref = '';\r\n\t\t}\r\n\r\n\t\t$left = substr( $this->data_ref, 0, $this->position );\r\n\t\t$right = substr( $this->data_ref, $this->position + strlen( $data ) );\r\n\r\n\t\tWP_Test_Stream::$data[ $this->bucket ][ $this->file ] = $left . $data . $right;\r\n\r\n\t\t$this->position += strlen( $data );\r\n\t\treturn strlen( $data );\r\n\t}",
"public function write($data, $length){ }",
"public function close()\n {\n $this->flush();\n $this->out->close();\n }",
"public function writeFile()\n {\n $this->eof();\n\n return parent::writeFile();\n }",
"public function write($contents);",
"public function flush()\n {\n $this->out->flush();\n }",
"public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"private function writeBlock()\n {\n if ($this->block_count > 0) {\n $this->encoder->writeLong($this->block_count);\n $to_write = (string) $this->buffer;\n\n if ($this->codec === AvroDataIO::DEFLATE_CODEC) {\n $to_write = gzdeflate($to_write);\n } elseif ($this->codec === AvroDataIO::ZSTANDARD_CODEC) {\n if (!extension_loaded('zstd')) {\n throw new AvroException('Please install ext-zstd to use zstandard compression.');\n }\n $to_write = zstd_compress($to_write);\n } elseif ($this->codec === AvroDataIO::SNAPPY_CODEC) {\n if (!extension_loaded('snappy')) {\n throw new AvroException('Please install ext-snappy to use snappy compression.');\n }\n $crc32 = crc32($to_write);\n $compressed = snappy_compress($to_write);\n $to_write = pack('a*N', $compressed, $crc32);\n } elseif ($this->codec === AvroDataIO::BZIP2_CODEC) {\n if (!extension_loaded('bz2')) {\n throw new AvroException('Please install ext-bz2 to use bzip2 compression.');\n }\n $to_write = bzcompress($to_write);\n }\n\n $this->encoder->writeLong(strlen($to_write));\n $this->write($to_write);\n $this->write($this->sync_marker);\n $this->buffer->truncate();\n $this->block_count = 0;\n }\n }",
"public function write($bytes);",
"public function write()\r\n\t{\r\n\t\t\r\n\t\tif (headers_sent() OR $this->_destroyed)\r\n\t\t{\r\n\t\t\t// Session cannot be written when the headers are sent or when\r\n\t\t\t// the session has been destroyed\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\r\n\t\t// Set the last active timestamp\r\n\t\t$this->_data['last_active'] = time();\r\n\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn $this->_write();\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\t// Log & ignore all errors when a write fails\r\n\t\t\tKeke::$log->add(Log::ERROR, Keke_exception::text($e))->write();\r\n\t\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"public function send()\n {\n fwrite($this->rStream, $this->sText);\n }",
"public function write($message);",
"function write($data) {\n if (!@fwrite($this->_handler, $data, strlen($data))) {\n \tFire_Error::throwError(sprintf('Failed to write %s data to %s file.',\n \t $data,\n \t $this->_file\n \t ), __FILE__, __LINE__\n \t);\n }\n }",
"public function write($path, $data);",
"public function flush() {\n\t\tfflush($this->fp);\n\t}",
"protected function _write($payload) {\n return @fwrite($this->_socket, $payload);\n }",
"public function write(string $data): void\n {\n $this->output->write($data);\n }",
"public function write($buf) {\n $this->wbuffer_ .= $buf;\n }",
"protected function _write($data)\n {\n $this->_connect();\n\n fwrite($this->_socket, $data);\n stream_set_timeout($this->_socket, Zend_TimeSync::$options['timeout']);\n }",
"public function write()\n {\n echo 'file log write...';\n }",
"abstract public function write( $value );",
"public function appendStream($bytes) {}",
"public function processWrite()\n {\n if (!$this->hasPendingWrite()) {\n return;\n }\n\n if (!$this->pendingWriteBuffer) {\n $this->pendingWriteBuffer .= array_shift($this->pendingWrites)->toRawData();\n }\n\n $this->log('Writing data to client, buffer contents: ' . $this->pendingWriteBuffer, Loggable::LEVEL_DEBUG);\n\n $bytesWritten = fwrite($this->socket, $this->pendingWriteBuffer);\n\n if ($bytesWritten === false) {\n $this->log('Data write failed', Loggable::LEVEL_ERROR);\n $this->trigger('error', $this, 'Data write failed');\n\n $this->disconnect();\n } else if ($bytesWritten > 0) {\n $this->pendingWriteBuffer = (string) substr($this->pendingWriteBuffer, $bytesWritten);\n }\n }",
"public function write() {\n var_dump($this->as_array());\n }",
"public function write()\n\t{echo __METHOD__ . \"()\\n\";\n\t\tif (empty($this->_messages))\n\t\t{\n\t\t\t// There is nothing to write, move along\n\t\t\treturn;\n\t\t}\n\n\t\t// Import all messages locally\n\t\t$messages = $this->_messages;\n\n\t\t// Reset the messages array\n\t\t$this->_messages = array();\n\n\t\tforeach ($this->_writers as $writer)\n\t\t{\n\t\t\tif (empty($writer['types']))\n\t\t\t{\n\t\t\t\t// Write all of the messages\n\t\t\t\t$writer['object']->write($messages);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Filtered messages\n\t\t\t\t$filtered = array();\n\n\t\t\t\tforeach ($messages as $message)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($message['type'], $writer['types']))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Writer accepts this kind of message\n\t\t\t\t\t\t$filtered[] = $message;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Write the filtered messages\n\t\t\t\t$writer['object']->write($filtered);\n\t\t\t}\n\t\t}\n\t}",
"public function onWrite();",
"public function write($string);",
"public function stream_write(string $data)\n\t{\n\t\t$len = strlen($data);\n\t\t$res = fwrite($this->tempHandle, $data, $len);\n\n\t\tif ($res !== $len) { // disk full?\n\t\t\t$this->writeError = true;\n\t\t}\n\n\t\treturn $res;\n\t}",
"public function write($string)\n {\n }",
"public function getWriteStream()\n {\n return $this->write_stream;\n }",
"function write($data, $append = true) {\n\t\t$_this =& AmfStream::getInstance();\n\t\tif($append) {\n\t\t\t$_this->__stream .= $data;\n\t\t} else {\n\t\t\t$_this->__stream = $data;\n\t\t}\n\t\treturn true;\n\t}",
"private function write($data)\n {\n $this->connection->write($data);\n }",
"function write($data)\r\n {\r\n $this->string.=$data;\r\n return TRUE;\r\n }",
"protected function write_output() {\n\t\t\tif ( null === $this->output_stream ) {\n\t\t\t\techo $this->output_string;\n\t\t\t} else {\n\t\t\t\tfwrite( $this->output_stream, $this->output_string );\n\t\t\t}\n\t\t\t$this->output_string = '';\n\t\t}",
"public function write($body);",
"protected function _write( $event )\n\t{\n\t\t$this->_checkAndReopen();\n\n\t\t$line = $this->_formatter->format( $event );\n\t\tif ( false === @fwrite( $this->_stream, $line ) )\n\t\t{\n\t\t\tthrow new Miao_Log_Exception( \"Unable to write to stream\" );\n\t\t}\n\t}",
"public function write($data) {\n $result = socket_write($this->communicationSocket, $data);\n $this->checkResult($result);\n }",
"private function _writeValue($value)\n\t{\n\t\tfwrite($this->_stream, $value);\n\t}",
"public function write(string $message);",
"public function write($name, $content);",
"function write($data)\n {\n eval(PUBSUB_MUTATE);\n if ($this->_finished_writing)\n {\n #errno = EBADF; # as if we were writing on a closed fd\n return -1;\n }\n $this->_outbuf .= $data;\n if (strlen($this->_outbuf))\n {\n # XXX: check for failure?\n $this->_evl->setInterestOnWritable($this->_outsock,\n $this->_wrapOnWritable);\n }\n return strlen($data);\n }",
"public function writeStream($path, $resource, Config $config)\n {\n }",
"public function write()\n {\n $r=false;\n \n if(!empty($this->buffer))\n {\n foreach($this->buffer as $entry)\n {\n if(empty($this->logs[$entry['log']]))\n {\n $log_file=LOG_LOCATION.'/'.$entry['log'].'.log';\n\n $this->logs[$entry['log']]=fopen($log_file,'a');\n }\n\n if($entry['level']==LOG_LEVEL_ERROR)\n {\n $level_string='ERROR';\n }\n elseif($entry['level']==LOG_LEVEL_WARNING)\n {\n $level_string='WARNING';\n }\n elseif($entry['level']==LOG_LEVEL_NOTICE)\n {\n $level_string='NOTICE';\n }\n else\n {\n $level_string='UNKNOWN';\n }\n\n $log_config=&$this->system->config('log');\n\n $out=date($log_config['timestamp_format']).'|'.$level_string.' - '.$entry['message'].\"\\n\";\n\n if(!empty($this->logs[$entry['log']])&&fwrite($this->logs[$entry['log']],$out))\n {\n $r=true;\n }\n\n if(!$r)\n {\n throw new A_Exception('Could not write to file \"'.$log_file.'\"');\n }\n }\n\n if($r)\n {\n $this->buffer=array();\n }\n }\n }",
"private function write($data) {\n if (!fwrite($this->_socket, $data)) \n throw new Predis_ClientException(sprintf(\n 'An error has occurred while writing data %s on the network stream'),\n $data\n );\n }",
"public function write($data)\n\t{\n\t\tif(is_resource($this->socket))\n\t\t{\n\t\t\treturn fwrite($this->socket, $data, strlen($data));\n\t\t}\n\t}",
"abstract function write ($message);",
"public function writeSocket()\n {\n socket_write($this->socket, $this->stringWithEquation, strlen($this->stringWithEquation));\n }",
"public function writeCompletely($stream) {\n\t\t$written = 0;\n\t\twhile (!$this->complete) {\n\t\t\t$written += $this->writeTo($stream);\n\t\t}\n\t\t//echo \"\\nWritten \" . $written . ' bytes ';\n\t\treturn $written;\n\t}",
"public function write(): bool\n {\n }",
"public function write(): bool\n {\n }",
"public function write(string $data): bool {}",
"function write($offset, $data) {}",
"protected function _writeFileBody() {}",
"function write($message);",
"public function writeFromStream($stream, $length, $handlerObj = NULL, $handlerMethod = NULL) {\n return $this->fileService->writeFileFromStream( $this->path, $stream, $length, $handlerObj, $handlerMethod );\n }",
"public function write($filename);",
"public function write($filename);",
"public function stream_set_write_buffer($stream, $buffer)\n {\n return stream_set_write_buffer($stream, $buffer);\n }",
"public function streamCallback() {\n $this->_closeSession();\n $this->start = time();\n\n while(!$this->_exitStream()) {\n $this->_writeComment();\n $this->_writeMessage();\n $this->_flushContent();\n \n sleep($this->sleepTime);\n };\n }"
] | [
"0.7419436",
"0.7419436",
"0.7100575",
"0.70711845",
"0.66825634",
"0.6659639",
"0.6624464",
"0.6624464",
"0.66230446",
"0.66230446",
"0.66230446",
"0.66066575",
"0.65974814",
"0.6502326",
"0.6502326",
"0.6502326",
"0.6502326",
"0.64350414",
"0.64350414",
"0.6434489",
"0.64315236",
"0.6390898",
"0.6369631",
"0.63587356",
"0.63585",
"0.6333562",
"0.63173705",
"0.63164914",
"0.6293328",
"0.62637216",
"0.62432504",
"0.6219262",
"0.61830753",
"0.6126404",
"0.61095035",
"0.608868",
"0.60766554",
"0.6069577",
"0.6060065",
"0.6045703",
"0.6018831",
"0.5990749",
"0.5958799",
"0.5947398",
"0.5931446",
"0.59235",
"0.5913254",
"0.5904193",
"0.5902713",
"0.5898351",
"0.5852197",
"0.5841039",
"0.5824834",
"0.5784904",
"0.5767195",
"0.57655597",
"0.5764687",
"0.5763655",
"0.5745724",
"0.5743159",
"0.57416147",
"0.57232887",
"0.5721285",
"0.5704757",
"0.57012564",
"0.5699817",
"0.5697719",
"0.56934017",
"0.5667262",
"0.5666002",
"0.56595504",
"0.56560856",
"0.565277",
"0.56350493",
"0.5633148",
"0.5632861",
"0.561647",
"0.56136876",
"0.5610991",
"0.5601272",
"0.5590756",
"0.55872977",
"0.5584859",
"0.5571809",
"0.5565886",
"0.55608124",
"0.5560643",
"0.5544832",
"0.5517558",
"0.5499525",
"0.5499525",
"0.5496367",
"0.54771703",
"0.54735917",
"0.5468096",
"0.54604125",
"0.5456328",
"0.5456328",
"0.5442282",
"0.54409206"
] | 0.5575991 | 83 |
Move the position in the stream. | public function stream_seek($offset, $whence)
{
switch ($whence) {
// from start
case SEEK_SET:
if ($offset < strlen($this->_pointer) && $offset >= 0) {
$this->_pos = $offset;
return true;
} else {
return false;
}
break;
// from current position
case SEEK_CUR:
if ($offset >= 0) {
$this->_pos += $offset;
return true;
} else {
return false;
}
break;
// from the end
case SEEK_END:
if (strlen($this->_pointer) + $offset >= 0) {
$this->_pos = strlen($this->_pointer) + $offset;
return true;
} else {
return false;
}
break;
default:
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function seek($position) {}",
"function seek($pos) {\n fseek($this->handle, $pos, SEEK_CUR);\n }",
"public function _seek($position);",
"public function seek()\r\n\t{\r\n\t}",
"protected function shift() {\r\n\t\tarray_shift($this->_streams);\r\n\t\t$this->_streamsCount--;\r\n\t}",
"public function forward() : void {\n $this->seek(0, SEEK_END);\n }",
"public function rewind()\n {\n $this->position = 0;\n $this->getOrigin()->data_seek($this->position);\n }",
"public function seek(int $position) {\n\t\t$this->rewind();\n\t\twhile ($this->key() < $position) {\n\t\t\t$this->next();\n\t\t}\n\t\t//echo \"Position is: \", $this->key(), \" instruction is: \" . $this->getCurrentInstruction() . \".\\n\";\n\t}",
"public function seek($index) {\n\t\t\tif ( $index<=$this->p ) {\n\t\t\t\t$this->p = $index; // just jump; don't update stream state (line, ...)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// seek forward, consume until p hits index\n\t\t\twhile ( $this->p<$index ) {\n\t\t\t\t$this->consume();\n\t\t\t}\n\t\t}",
"public function seek(int $offset): void;",
"private function moveStringCursor($positionOffset, $byteStreamOffset)\n {\n }",
"function move() {\n $this->pos++;\n return $this;\n }",
"public abstract function seek($offset);",
"function stream_tell() {\r\n\t\treturn $this->position;\r\n\t}",
"public function seek($position)\n {\n fseek($this->resource, $position, SEEK_SET);\n if (!$this->valid()) {\n throw new \\OutOfRangeException('Seek out of file content. ');\n }\n }",
"public function rewind() {\n $this->pos = 0;\n }",
"public function tell() {\r\n\t\t$pos=ftell($this->_handle);\r\n\t\tif($pos===false) {\r\n\t\t\tthrow new Curly_Stream_Exception('An error occured while determining the current stream offset');\r\n\t\t}\r\n\t\treturn $pos;\r\n\t}",
"public function seek($position)\n {\n $item = $this->dataStore->read($position);\n if (!isset($item) || empty($item)) {\n throw new \\InvalidArgumentException(\"Position not valid or not found.\");\n }\n $this->current = $item;\n }",
"public function seek($position)\n {\n Mage::throwException(Mage::helper('importexport')->__('Not implemented yet'));\n }",
"function MoveNext() {}",
"public function seek($index);",
"public function seek($index);",
"public function seek(int $offset): void\n {\n $this->assertHandleIsOpen();\n\n Psl\\invariant($offset >= 0, '$offset must be a positive-int.');\n $this->offset = $offset;\n }",
"public function stream_tell()\r\n {\r\n return $this->_pos;\r\n }",
"public function stream_tell() {\r\n\t\treturn $this->pos;\r\n\t}",
"protected function getStreamPos()\n {\n return gztell($this->file);\n }",
"public function setOffset(int $offset): void\n {\n $current = $this->stream->tell();\n\n if ($current !== $offset) {\n // If the stream cannot seek to the offset position, then read to it\n if ($this->stream->isSeekable()) {\n $this->stream->seek($offset);\n } elseif ($current > $offset) {\n throw new \\RuntimeException(\"Could not seek to stream offset $offset\");\n } else {\n $this->stream->read($offset - $current);\n }\n }\n\n $this->offset = $offset;\n }",
"public function stream_tell(): int\n {\n return $this->position;\n }",
"function moveLeft()\n {\n $this->position--;\n if ($this->position < 0) {\n $this->position++;\n array_unshift($this->line, '_');\n }\n }",
"public function seek($index)\n {\n $fh = $this->_getFileHandle();\n fseek($fh, $index);\n $this->_moveNext();\n }",
"public function move()\n {\n }",
"public function stream_tell()\n {\n return $this->_pos;\n }",
"public function moveItemAt($currentPosition, $newPosition = 0);",
"public function seek($position)\n {\n if ( ! isset($this->data[$position]))\n {\n throw \\OutOfBoundsException('Out of bounds error !');\n }\n $this->position = $position;\n }",
"function tell()\n {\n throw new \\RuntimeException('Stream is not seekable');\n }",
"public function rewind(): void\n {\n $this->position = 0;\n }",
"public function moveTo($position)\n {\n $step = $position - $this->{$this->getPositionColumn()};\n\n return $this->movePosition($step);\n }",
"public function move($x = 0, $y = 0) {\n\t\tif(!$this->is_copied) {\n\t\t\t$this->delete();\n\t\t}\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}",
"public function stream_tell() {}",
"public function rewind()\n {\n if (!$this->is_seekable) {\n throw new Exception('stream does not support seeking');\n }\n rewind($this->stream);\n $this->offset = 0;\n $this->value = false;\n if ($this->flags & SplFileObject::READ_AHEAD) {\n $this->current();\n }\n }",
"function seekTo(int $offset, int $whence = SEEK_SET) : void;",
"public function rewind() {\n\t\t$this->position = 0;\n\t}",
"public function rewind() {\n\t\t$this->position = 0;\n\t}",
"function rewind() {\n $this->position = 0;\n }",
"function rewind() {\r\n $this->_position = 0;\r\n }",
"public function next()\n {\n $this->position++;\n $this->fileIterator->seek($this->position);\n }",
"public function rewind() {\n $this->_position = 0;\n }",
"function move($source, $destination);",
"public function rewind() {\r\n\t\t$this->position = 0;\r\n\t\trewind($this->handle);\r\n\t\t$this->next();\r\n\t}",
"function seek($position=0)\n\t{\n\t\t$result = @mysqli_data_seek($this->m_query_id, $position);\n\t\tif ($result) $this->m_row = $position;\n\t\telse $this->halt(\"seek($position) failed: result has \".$this->num_rows().\" rows\");\n\t}",
"function seek($pos = 0) \n \t{\n \t\t$status = @mysql_data_seek($this->Query_ID, $pos);\n \t\tif ($status)\n \t\t\t$this->row = $pos;\n \t\telse\n \t\t\tnew CException(sprintf(\"seek(%d) zawi�d�: wynik ma %d wiersz(y)\", $pos, $this->numRows()), __FILE__, __LINE__);\n\n \t\treturn;\n \t}",
"function seekToStart() : void;",
"public function setNextPosition(Position $position): void;",
"function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}",
"public function seek($position): void {\n // by the block size and then store its location\n if (fseek($this->fileHandle, $position * $this->blockSize) === 0) {\n $this->position = $position;\n } else {\n // Otherwise mark the position invalid and throw an exception\n $this->isValid = false;\n throw new OutOfBoundsException(\"Position {$position} is out of bound\");\n }\n }",
"function setPosition($value) {\n $this->_position = intval($value);\n }",
"private function incrementMoveNumber(): void\n {\n ++$this->moveNumber;\n }",
"function movePosition($i) {\n global $connection, $user;\n\n $batch_id = $this->getBatchId();\n $username = $_SESSION[\"username\"];\n\n // Check if there is a file at the new position\n $nextposition = $i;\n $sql = 'select position from TR_BATCH_IMAGE where tr_batch_id = ? and position = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"ii\",$batch_id,$nextposition);\n $statement->execute();\n $statement->bind_result($position2);\n $statement->store_result();\n if ($statement->fetch()) {\n // nothing\n } else {\n // No such position, go back to beginning, set position to 1\n $nextposition = 1;\n }\n $statement->close();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n\n // Update position\n $sql = \"update TR_USER_BATCH set position = ? where username = ? and tr_batch_id = ?\";\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"isi\",$nextposition,$username,$batch_id);\n $statement->execute();\n\n //if (mysql_affected_rows() < 1) {\n // throw new Exception(\"Could not update position [$nextposition] for batch [$batch_id], user [$username]\");\n //}\n\n $statement->close();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n\n return $this->getFile($nextposition);\n }",
"public function tell(): int\n {\n return $this->stream->tell() - $this->offset;\n }",
"public function rewind() {\n\n\t\t\t$this->position = 0;\n\t\t}",
"public function seek($pos)\n\t{\n\t\t// verify that a query was run\n\t\tif (is_resource($this->_results) === false)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::QUERY_NOT_RUN);\n\t\t}\n\n\t\t// check connection\n\t\t$this->_checkConnection();\n\n\t\t// lookup the row and move to the record\n\t\tif (mysql_data_seek($this->_results, $pos) === false)\n\t\t{\n\t\t\tthrow new DatabaseException('Record not found',\n\t\t\t\tDatabaseException::RECORD_UNKNOWN);\n\t\t}\n\n\t\t// set postion\n\t\t$this->_row = $pos;\n\t}",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->position = 0;\n }",
"public function reorder_onMove()\n {\n $sourceNode = Page::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Page::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }",
"public function shift()\n {\n array_shift($this->body);\n }",
"abstract function incrementPosition();",
"function rewind() \n {\n $this->position = 0;\n }",
"function rewind() \n {\n $this->position = 0;\n }",
"public function rewind()\n {\n $this->_position = 0;\n }",
"function rewind()\n {\n throw new \\RuntimeException('Stream is not seekable');\n }",
"public function seekFromStart(int $offset): void;",
"public function moveTo($destination) {}",
"public function seek ( $position ) {\n\n if(!array_key_exists($position, $this->_collection))\n return;\n\n $this->rewind();\n\n while($position != $this->key())\n $this->next();\n\n return;\n }",
"public function seek($offset, $whence = stubSeekable::SET);",
"public function seek($offset, $whence = SEEK_SET)\n {\n if (!$this->seekable) {\n throw new RuntimeException('Could not seek this stream');\n }\n $res = fseek($this->stream, $offset, $whence);\n if ($res == -1) {\n throw new RuntimeException('Could not seek desired position');\n }\n }",
"public function seek(int $offset, int $whence = SEEK_SET): void;",
"public function setPosition() {\n }",
"public function seek($key) {\n\t\t$curr_key = $this->key();\n\t\tparent::seek($key);\n\t\t\n\t\tif($key != $curr_key)\n\t\t\t$this->_result->seek($key);\n\t}",
"protected function _moveNext()\n {\n if ($nextRow = $this->_getNextRow()) {\n $this->_currentRow = $this->_formatRow($nextRow);\n } else {\n $this->_currentRow = array();\n }\n \n if (!$this->_currentRow) {\n fclose($this->_handle);\n $this->_valid = false;\n $this->_handle = null;\n }\n }",
"public function seek($offset, $whence = SEEK_SET);",
"public function next(): void {\n if (fseek($this->fileHandle,\n ($this->position + $this->blockSize)) === 0) {\n // Set new location\n $this->updatePosition();\n $this->readBlock();\n } else {\n // Otherwise mark the position invalid and throw an exception\n $this->isValid = false;\n throw new OutOfBoundsException();\n }\n }",
"public function orderedMove() {\n\t\t$modelName = $this->Controller->modelClass;\n\t\t$this->Controller->{$modelName}->transaction();\n\n\t\tif (!$this->Controller->{$modelName}->Behaviors->attached('Sequence')) {\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('infinitas', 'A problem occured moving the ordered record.'),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => true\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$fields = array_values($this->Controller->{$modelName}->sequenceGroupFields());\n\t\t$fields[] = $this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey;\n\t\t$data = $this->Controller->{$modelName}->find('first', array(\n\t\t\t'fields' => $fields,\n\t\t\t'conditions' => array(\n\t\t\t\t$this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey => $this->Controller->request->data[$modelName][$this->Controller->{$modelName}->primaryKey]\n\t\t\t),\n\t\t\t'callbacks' => false\n\t\t));\n\t\t$data[$modelName]['ordering'] = $this->Controller->request->params['named']['position'];\n\n\t\ttry {\n\t\t\tif ($this->Controller->{$modelName}->save($data, array('validate' => false))) {\n\t\t\t\t$this->Controller->{$modelName}->transaction(true);\n\t\t\t\t$this->Controller->notice(\n\t\t\t\t\t__d('infinitas', 'The record was moved'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'redirect' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->Controller->{$modelName}->transaction(false);\n\t\t\t$this->Controller->notice(\n\t\t\t\t$e->getMessage(),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => false\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}",
"public function rewind() : void {\n $this->seek(0, SEEK_SET);\n }",
"public function moveMarker(): void\n {\n $ind = $this->getPlayerIndexMarker();\n $this->players[$ind]->marker = false;\n\n if (++$ind >= count($this->players)) {\n $ind = 0;\n }\n $this->players[$ind]->marker = true;\n }",
"public function moveTo($x, $y) {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}",
"public function rewind() {}"
] | [
"0.6806508",
"0.6667892",
"0.64964783",
"0.6100045",
"0.60601807",
"0.6022693",
"0.59694767",
"0.59149235",
"0.5878716",
"0.5857605",
"0.5762012",
"0.5756327",
"0.57376146",
"0.5713159",
"0.57107794",
"0.5705842",
"0.568593",
"0.5680032",
"0.56681985",
"0.5640608",
"0.5637022",
"0.5637022",
"0.5622182",
"0.5611131",
"0.56065965",
"0.5577878",
"0.55747974",
"0.5572277",
"0.5558542",
"0.55524033",
"0.55463254",
"0.5545308",
"0.55388415",
"0.55300564",
"0.55269605",
"0.5507711",
"0.5502673",
"0.54735804",
"0.5467917",
"0.5454029",
"0.5444755",
"0.5442274",
"0.5442274",
"0.5438083",
"0.54341114",
"0.54161143",
"0.5412003",
"0.5392016",
"0.5384826",
"0.5383656",
"0.53742427",
"0.5367713",
"0.5361469",
"0.53594494",
"0.53498626",
"0.5341023",
"0.5339848",
"0.5335208",
"0.533381",
"0.5322",
"0.5312427",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.53005636",
"0.5287397",
"0.52856565",
"0.52852297",
"0.5283917",
"0.5283917",
"0.5269903",
"0.52585095",
"0.52511764",
"0.52355677",
"0.5233798",
"0.5225144",
"0.52248067",
"0.52246666",
"0.5218673",
"0.5210401",
"0.5201162",
"0.51979405",
"0.5192857",
"0.517653",
"0.5174376",
"0.5173385",
"0.5168477",
"0.5157282",
"0.5157282",
"0.51548624",
"0.51548624",
"0.51548624",
"0.51548624",
"0.51548624",
"0.51548624",
"0.51548624"
] | 0.0 | -1 |
Write all data to storage. | public function stream_flush()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function writeAll( array $data ) {\n\n\t\t$this->_data = $data;\n\t}",
"public function writeAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write( s($name), s($value) );\n }\n }",
"function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }",
"public function flush()\r\r\n\t{\r\r\n\t\t$this->_storage->flush();\r\r\n\t}",
"public function putAll($data)\n\t{\n\t\t$this->data = array_merge($this->data, $data);\n\n\t\tif ($this->autosave) $this->write();\n\t}",
"public function persistAll() {}",
"public function flushDataStore()\n {\n $this->database->flushAll(); \n }",
"public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($fp);\n\t\t\t$this->afterSave();\n\t\t}\n\t}",
"protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }",
"public function save(): void\n {\n foreach ($this->getChunks() as $chunk) {\n $this->getFile()->seek(0, SeekType::SEEK_END);\n $chunk->setOffset($this->getFile()->tell() / 4096);\n $chunkData = $chunk->getChunkData();\n $this->getFile()->write($chunkData);\n $this->getFile()->seek($this->calcOffset($chunk->getCoordinates()),\n SeekType::SEEK_SET\n );\n $chunkLocation = $chunk->getLocation();\n $this->getFile()->write($chunkLocation);\n }\n }",
"public function flush()\n {\n $this->store()->flush();\n }",
"public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}",
"function persistAll() ;",
"public function store()\n {\n $this->storeKeys();\n }",
"private function writeAppData()\n {\n $fileName = \"{$this->storeDirectory}/appData.json\";\n $data = json_encode([\n 'default-counter' => $this->defaultCounter,\n ]);\n file_put_contents($fileName, $data, JSON_PRETTY_PRINT);\n }",
"private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}",
"public function flushAll();",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"public function flush()\n\t{\n\t\t$this->items = array();\n\t\t$this->properties = array();\n\t}",
"protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\n\t\t//throw new Exception(\"Not yet implemented!\");\n\t\t\t\t//---------------------\n\n $domDoc = new DOMDocument;\n $rootElt = $domDoc->createElement('items');\n $rootNode = $domDoc->appendChild($rootElt);\n\n foreach($this->_data AS $row) {\n $rowElement = $domDoc->createElement('item');\n\n foreach($row AS $key => $value) {\n\n $element = $domDoc->createElement($key);\n $element->appendChild($domDoc->createTextNode($value));\n\n $rowElement->appendChild($element);\n }\n $rootNode->appendChild($rowElement);\n\n }\n\n $data = $domDoc->saveXML();\n\n //var_dump($data);\n\n file_put_contents($this->_origin, $data);\n\n\t\t// --------------------\n\t}",
"public function storeAll(iterable $snapshots): void;",
"function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}",
"public function flush()\n {\n $this->memcache->flush();\n }",
"public function writeRawAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write_raw( s($name), s($value) );\n }\n }",
"public function flush(/* ... */)\n {\n $this->_storage = [[], [], []];\n $this->_event_history = [];\n $this->set_state(STATE_DECLARED);\n }",
"private function saveItems()\n {\n $this->storage->save($this->items);\n }",
"public function flush()\n {\n $this->aliases = [];\n $this->bindings = [];\n $this->instances = [];\n }",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }",
"abstract public function write($data);",
"public function write(array $data);",
"protected function all() : void\n {\n File::ensureDirectoryExists(Path::storage('app/public'));\n File::ensureDirectoryExists(Path::storage('app/private'));\n\n File::ensureDirectoryExists(Path::storage('framework/logs'));\n File::ensureDirectoryExists(Path::storage('framework/views'));\n\n File::put(Path::storage('framework/logs/laravel.log'), '');\n\n Artisan::call('storage:link --force');\n }",
"public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }",
"public function store()\n {\n $classes = [];\n\n foreach ($this->classes as $class) {\n $classes[] = $class['input_file'];\n }\n\n $json_classes = json_encode($classes);\n\n $this->filesystem->put(config('larinterface.cache_directory') . '/larinterface.json', $json_classes);\n }",
"public function _write($data)\n {\n }",
"private function save(): void\n {\n foreach ($this->dataToSave as $file => $data) {\n $this->langFilesManager->fillKeys($file, $data);\n }\n }",
"public function persist()\n {\n $uid = $this->getIdentifier() == 0 ? 'NEW' . rand(100000, 999999) : $this->getIdentifier();\n $data = [\n trim(static::$storageTableName) => [\n $uid => $this->getPersistableDataArray()\n ]\n ];\n // New records always must have a pid\n if ($this->getIdentifier() == 0) {\n $data[trim(static::$storageTableName)][$uid]['pid'] = 0;\n }\n /** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $tce */\n $tce = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\DataHandling\\DataHandler::class);\n $tce->start($data, []);\n $tce->process_datamap();\n }",
"private function flush(): void {\n file_put_contents(APP_ROOT . '/public/config/lang/dictionary.json',\n json_encode([\\Config::Dictionary => $this->dictionary]));\n }",
"public function saveAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->saveAll();\n }\n }\n }\n }\n $this->save();\n }",
"public function flush()\n {\n }",
"public function flush()\n {\n }",
"public function flushAll() {\n\t\t$this->removeKeys();\n\t}",
"public function write($data) {\n\t}",
"public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }",
"public function flush()\n {\n $this->out->flush();\n }",
"protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t}",
"private function flush_maps()\r\n {\r\n $fp = fopen(Mapprovider::MAP_STORAGE, \"w\");\r\n fwrite($fp, serialize($this->maps));\r\n fclose($fp);\r\n }",
"public function flush()\n {\n // TODO: Implement flush() method.\n }",
"public function saveData()\r\n {\r\n \r\n }",
"private function SaveData()\n {\n // loop tanks and save data\n foreach ($this->tanks AS $tank_id => $data) {\n // get category id from tank id\n $category_id_tank = $this->CreateCategoryByIdentifier($this->InstanceID, $tank_id, $data['Name']);\n\n // loop tank data and add variables to tank category\n $position = 0;\n foreach ($data AS $key => $value) {\n $this->CreateVariableByIdentifier($category_id_tank, $key, $value, $position);\n $position++;\n }\n }\n }",
"public function save($values)\n {\n $values = json_encode($values);\n Storage::put($this->storename, $values);\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() {}",
"abstract public function flush();",
"public function flushData()\n\t{\n\t\t$class = get_class($this);\n\t\tunset($this->_data[$class]);\n\t}",
"public function saveCache()\n {\n if($this->isCacheExists()){\n if($this->isUpdateRequired()){\n $this->updateCache();\n }\n } else {\n $this->packData()->writeFile();\n }\n }",
"public function store($contents)\n {\n file_put_contents(self::$dataFolder . '/' . time() . '.data', serialize($contents));\n }",
"public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }",
"abstract public function FlushToDatabase();",
"public function store() {\n\t\t//\n\t}",
"public function store() {\n\t\t//\n\t}",
"public function store() {\n\t\t//\n\t}",
"public function flush($data = null) {}",
"public function flush($data = null) {}",
"public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }",
"public function flushAll(){\n\n //get flush All\n $this->client->flushall();\n }",
"public function clear()\n {\n $this->dataStorage = [];\n }",
"public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }",
"function store() {\r\n $this->reindex();\r\n //---------------------\r\n if (($handle = fopen($this->_origin, \"w\")) !== FALSE) {\r\n fputcsv($handle, $this->_fields);\r\n foreach ($this->_data as $key => $record)\r\n fputcsv($handle, array_values((array) $record));\r\n fclose($handle);\r\n }\r\n }",
"protected function writeSysFileStorageRecords() {}",
"public function write();",
"public function write();",
"public function save()\n {\n // Save each initialised region\n foreach ($this->regions as $key => $region) {\n $region->save();\n unset($this->regions[$key]);\n }\n }",
"public function flush()\n {\n $this->arrSettings = null;\n $this->section = null;\n $this->group = null;\n $this->changed = null;\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();"
] | [
"0.7294902",
"0.69378567",
"0.6879967",
"0.6850956",
"0.67007834",
"0.6676123",
"0.66586334",
"0.6617833",
"0.6536265",
"0.6484093",
"0.6457243",
"0.6453696",
"0.6432425",
"0.629232",
"0.6125354",
"0.60769874",
"0.60159403",
"0.5986041",
"0.59794605",
"0.5943955",
"0.5927488",
"0.5898939",
"0.58709216",
"0.5869632",
"0.5867001",
"0.5861213",
"0.5857382",
"0.5856608",
"0.5856608",
"0.5856608",
"0.5856608",
"0.5855219",
"0.58518595",
"0.58225006",
"0.5819092",
"0.581613",
"0.5812457",
"0.57896584",
"0.57892644",
"0.5775311",
"0.57444966",
"0.5741293",
"0.5734522",
"0.5734522",
"0.57129836",
"0.56951004",
"0.5691077",
"0.56613773",
"0.5656148",
"0.5654639",
"0.564704",
"0.56386256",
"0.56364846",
"0.56290895",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56269103",
"0.56266654",
"0.56266654",
"0.56266654",
"0.56266654",
"0.5614843",
"0.56147134",
"0.560963",
"0.56066394",
"0.56056243",
"0.55847245",
"0.55816215",
"0.55816215",
"0.55816215",
"0.55801076",
"0.55801076",
"0.5569606",
"0.5564012",
"0.5563739",
"0.55627054",
"0.5562299",
"0.55489665",
"0.55429137",
"0.55429137",
"0.55388355",
"0.5536399",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827",
"0.5531827"
] | 0.0 | -1 |
Return information about the stream. | public function stream_stat()
{
$stat = array(
'size' => strlen($this->_pointer)
);
return $stat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMetaData()\n {\n return stream_get_meta_data($this->_stream_handle);\n }",
"protected function getMetaData()\n {\n return stream_get_meta_data($this->stream);\n }",
"public function queryStream()\n {\n $response = $this->sendCommand(self::RCMD_QUERY_STREAM);\n\n if ($response->getCode() !== Response::RCMD_STREAM_INFO) {\n throw Exception\\UnexpectedResponseException::fromResponse($response);\n }\n\n list($title, $dj, $listeners, $peak, $max) = array_values(\n unpack('a64title/a64dj/Vlisteners/Vpeak/Vmax', $response->getData())\n );\n\n return new StreamInfo(\n rtrim($title, \"\\0\"),\n rtrim($dj, \"\\0\"),\n $listeners,\n $peak,\n $max\n );\n }",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream() {}",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getStream();",
"public function getMetaData() {\n\t\treturn stream_get_meta_data($this->handle);\n\t}",
"public static function getStream() {}",
"public function renvoi_infos() {\n\t\t$info = @stream_get_meta_data ( $this->connexion );\n\t\t\n\t\treturn $info;\n\t}",
"public function stream_stat() {}",
"public function getStream() {\n return $this->stream;\n }",
"public function getStream()\n {\n return $this->stream;\n }",
"public function getStream()\n {\n return $this->stream;\n }",
"public function stream_stat()\n {\n return array( \n \n );\n }",
"public function getStreamObject() {}",
"public function getStream()\n\t\t{\n\t\t\treturn $this->stream;\n\t\t}",
"public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}",
"public function stream_stat(): array\n {\n return (array)$this->content;\n }",
"public function info()\n {\n return $this->info;\n }",
"public function info()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function &getStream()\n {\n return $this->_stream;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo ()\n {\n return $this->info;\n }",
"public function getEntryStream();",
"public function getEntryStream();",
"public function getEntryStream();",
"public function getInfo()\r\n {\r\n return $this->info;\r\n }",
"public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}",
"public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}",
"public function info()\n {\n return $this->send('info');\n }",
"public function getStream(): mixed;",
"public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}",
"public function getStreams();",
"public function getInfo()\n\t{\n\t\treturn curl_getinfo($this->s);\n\t}",
"public function getInfo()\n {\n return self::_mapFacebookInfo($this->getInfo_Raw());\n }",
"public function show(Stream $stream)\n {\n return $stream;\n }",
"public function getInfo()\n {\n return $this->getServer()->getInfo();\n }",
"public function returnStream() {\n return $this->stream;\n }",
"public function info()\n {\n return curl_getinfo($this->_session);\n }",
"public function get_info()\n {\n return $this->_request('getinfo');\n }",
"public function readStream();",
"function read_stream( $stream_uri ) {\n\n $result = false;\n $icy_metaint = false;\n\n // Stream context default request headers\n $stream_context = stream_context_create(\n array(\n 'http' => array(\n 'method' => 'GET',\n 'header' => 'Icy-MetaData: 1',\n 'user_agent' => 'Mozilla/5.0 (AIO Radio Station Player) AppleWebKit/537.36 (KHTML, like Gecko)',\n 'timeout' => 6,\n 'ignore_errors' => true\n )\n )\n );\n\n // Attempt to open stream, read it and close connection (all here)\n if ( $stream = @fopen( $stream_uri, 'r', false, $stream_context ) ) {\n\n if ( $stream && ( $meta_data = stream_get_meta_data( $stream ) ) && isset( $meta_data[ 'wrapper_data' ] ) ) {\n\n foreach ( $meta_data[ 'wrapper_data' ] as $header ) { // Loop headers searching something to indicate codec\n\n if ( strpos( strtolower( $header ), 'icy-metaint' ) !== false ) { // Expected something like: string(17) \"icy-metaint:16000\" for MP3\n\n $tmp = explode( \":\", $header );\n $icy_metaint = trim( $tmp[ 1 ] ); // Should be interval value\n break;\n\n } else if ( $header == 'Content-Type: application/ogg' ) { // OGG Codec (start is 0)\n\n $icy_metaint = 0;\n\n }\n\n }\n\n }\n\n // Stream returned metadata refresh time, use it to get streamTitle info.\n if ( $icy_metaint !== false && is_numeric( $icy_metaint ) ) {\n\n $buffer = stream_get_contents( $stream, 600, $icy_metaint );\n\n // Attempt to find string \"StreamTitle\" in stream with length of 600 bytes and $icy_metaint is offset where to start\n if ( strpos( $buffer, 'StreamTitle=' ) !== false ) {\n\n $title = explode( 'StreamTitle=', $buffer );\n $title = trim( $title[ 1 ] );\n\n // Use regex to match 'Song name - Title'; from StreamTitle='format';\n if ( preg_match( \"/\\'?([^\\'|^\\;]*)\\'?;/\", $title, $m ) )\n $result = $m[ 1 ];\n\n // Icecast method ( only works if stream title / artist are on beginning )\n } else if ( strpos( $buffer, 'TITLE=' ) !== false && strpos( $buffer, 'ARTIST=' ) !== false ) {\n\n // This is not the best solution, it doesn't parse binary it just removes control characters after regex\n preg_match( '/TITLE=(?P<title>.*)ARTIST=(?P<artist>.*)ENCODEDBY/s', $buffer, $m ); // Match TITLE/ARTIST on the beginning of stream (OGG metadata)\n $result = preg_replace( '/[\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F]/', '', $m[ 'artist' ] . ' - ' . $m[ 'title' ] ); // Remove control characters like '\\u10'...\n\n }\n\n }\n\n fclose( $stream );\n\n }\n\n // Handle information gathered so far\n return ( ( $stream == false ) ? false : $result );\n\n }",
"public function getInfo() {}",
"public function getInfo() {}",
"function read() {\n\t\t$_this =& AmfStream::getInstance();\n\t\treturn $_this->__stream;\n\t}",
"public function getInfo()\n {\n return curl_getinfo($this->_handle);\n }",
"public function info()\n {\n return $this->type('info');\n }",
"public function stream();",
"public function getInfoBuffer()\n {\n return $this->infoBuffer;\n }",
"public function __toString()\n {\n return $this->getStream()->getContents();\n }",
"public function info()\n {\n return $this->query($this->userEndpoint);\n }",
"public function getInfo();",
"public function __toString()\n {\n return stream_get_contents($this->stream, -1, 0);\n }",
"public function getEntryStream()\n {\n return $this->dispatch(new GetTypeStream($this));\n }",
"public function getContents()\n {\n return stream_get_contents($this->stream);\n }",
"public function stream_stat()\n\t{\n\t\treturn fstat($this->tempHandle);\n\t}",
"public function info()\n {\n if (!$this->info) {\n $this->info = pathinfo($this->path);\n }\n if (!isset($this->info['filename'])) {\n $this->info['filename'] = $this->name();\n }\n if (!isset($this->info['filesize'])) {\n $this->info['filesize'] = $this->size();\n }\n if (!isset($this->info['mime'])) {\n $this->info['mime'] = $this->mime();\n }\n\n return $this->info;\n }",
"public function info(){\n return $this->getAdapter()->info();\n }",
"function getStream() {\n\t\t $this->Close();\n\t\t return $this->Stream;\n\t\t}",
"public function info();",
"public function info();",
"public function is_stream() {\n return $this->is_stream;\n }",
"public function getInformation()\n {\n return $this->values[\"info\"];\n }",
"public function getStream($filtered = false) {}",
"public function getInformation()\n {\n return $this->information;\n }",
"public function getInformation();",
"public function getName()\n {\n return 'streams';\n }",
"public function getInfo() {\n $file_info = $this->handler->fetch($this->update_info);\n if (isset($file_info['body'])) {\n return unserialize($file_info['body']);\n } else {\n return unserialize($file_info);\n }\n }",
"public function getInfo() {\n return array(\n \"Hash\" => $this->getName(),\n \"Connected\" => $this->isConnected() ? \"yes\" : \"no\",\n \"IP:Port\" => $this->getIp().\":\".$this->getPort(),\n \"Line In\" => $this->getLineIn(),\n \"Line Out \" => $this->getLineOut(),\n \"Dec Key\" => Utils::bin2hex($this->getDecryptionKey(),64),\n \"Enc Key\" => Utils::bin2hex($this->getEncryptionKey(),64),\n );\n }",
"function info() {\n\t \treturn $this->description;\n\t }",
"public function version() : StreamVersion {\n return $this->version;\n }",
"public function getFileInfo()\n {\n return $this->_info;\n }",
"public function getInfo()\n {\n $this->conn->initialize();\n $json = $this->conn->getClient()->request(\"/{$this->name}/\")->getContent();\n $info = JSONEncoder::decode($json);\n\n return $info;\n }",
"public function getInfo() \n {\n return $this->requestInfo;\n }",
"public function getStream(): StreamInterface\n {\n return $this->stream;\n }",
"public function getStream(): StreamInterface\n {\n return $this->stream;\n }",
"public function getStreamAlgorithm() {}",
"public function getInfo()\n {\n return $this->lastInfo;\n }",
"public function expose()\n\t\t{\n\t\t\treturn $this->stream;\n\t\t}",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getInstanceInfo()\n {\n return $this->get(self::_INSTANCE_INFO);\n }"
] | [
"0.7526914",
"0.7440086",
"0.7297649",
"0.7276369",
"0.7276369",
"0.7276369",
"0.7276369",
"0.72753835",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.7260929",
"0.72105086",
"0.7195592",
"0.70592344",
"0.6992175",
"0.6868408",
"0.6831635",
"0.6831635",
"0.68275946",
"0.6801927",
"0.667276",
"0.658346",
"0.6554715",
"0.64939946",
"0.64939946",
"0.64860255",
"0.64860255",
"0.64860255",
"0.64860255",
"0.64860255",
"0.6471519",
"0.6470022",
"0.6470022",
"0.6470022",
"0.6470022",
"0.6470022",
"0.6470022",
"0.6470022",
"0.6457435",
"0.64471084",
"0.64471084",
"0.64471084",
"0.64284956",
"0.6423129",
"0.6423129",
"0.63968843",
"0.63932574",
"0.6367835",
"0.6358785",
"0.63459885",
"0.63383657",
"0.63118607",
"0.63052535",
"0.6259847",
"0.624459",
"0.6207478",
"0.6195886",
"0.61878586",
"0.61832815",
"0.61832815",
"0.6166152",
"0.6154777",
"0.6108763",
"0.6075192",
"0.60729706",
"0.60715306",
"0.60661644",
"0.6047249",
"0.6039964",
"0.6026251",
"0.60199666",
"0.5977404",
"0.59624004",
"0.5955175",
"0.59495085",
"0.59455085",
"0.59455085",
"0.59380555",
"0.59375316",
"0.58805794",
"0.58780307",
"0.5855981",
"0.58536613",
"0.58528763",
"0.5852169",
"0.5844343",
"0.5837153",
"0.5831693",
"0.58036244",
"0.5792269",
"0.57836",
"0.57836",
"0.57760614",
"0.57410306",
"0.5740248",
"0.57398033",
"0.5737333"
] | 0.65907466 | 24 |
This method is called in response to stat() calls on the URL paths As taken from the PHP Manual: "This method is called in response to stat() calls on the URL paths associated with the wrapper and should return as many elements in common with the system function as possible. Unknown or unavailable values should be set to a rational value (usually 0)." With regards to the implementation that is Stream_Var we can actually fake some of the data. For instance, the uid and gid can be that of the corrent posix_getuid and posix_getgid() The following outlines the information that we essentially fake: 'dev': is unknown and set to 0 'ino': is unknown and set to 0 'mode': set to 33216 (chmod 700 means user has read, write and execute on the file) 'nlink': is unknown and set to 0 'uid': if the method posix_getuid exist, this is called, otherwise 0 is returned 'gid': if the method posix_getgid exist, this is called, otherwise 0 is returned 'rdev' unknown and set to 0 'size': is set to the strlen of the pointer. 'atime': set to current value returned by time() 'mtime': set to current value returned by time() 'ctime': set to current value returned by time() 'blksize': is unknown and set to 0 'blocks': is unknown and set to 0 | public function url_stat($path, $flags)
{
if (!$this->setPointerFromPath($path, false)) {
//does not exist
return false;
}
$time = time();
$keys = array(
'dev' => 0,
'ino' => 0,
// chmod 700 means user has read, write and execute on the file
'mode' => 33216,
'nlink' => 0,
//this processes uid
'uid' => function_exists('posix_getuid') ? posix_getuid() : 0,
//this processes gid
'gid' => function_exists('posix_getgid') ? posix_getgid() : 0,
'rdev' => 0,
'size' => $flags & STREAM_URL_STAT_QUIET
? @strlen($this->_pointer) : strlen($this->_pointer),
'atime' => $time,
'mtime' => $time,
'ctime' => $time,
'blksize' => 0,
'blocks' => 0
);
return array_merge(array_values($keys), $keys);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stream_stat() {}",
"public function stream_stat() {\r\n\t\t$dir_ref = & $this->get_directory_ref();\r\n\t\tif ( substr( $this->file, -1 ) === '/' || isset( $dir_ref ) ) {\r\n\t\t\treturn $this->make_stat(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'mode' => WP_Test_Stream::DIRECTORY_MODE,\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif ( ! isset( $this->data_ref ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $this->make_stat(\r\n\t\t\tarray(\r\n\t\t\t\t'size' => strlen( $this->data_ref ),\r\n\t\t\t\t'mode' => WP_Test_Stream::FILE_MODE,\r\n\t\t\t)\r\n\t\t);\r\n\t}",
"public function stream_stat()\n {\n $stat = array(\n 'size' => strlen($this->_pointer)\n );\n return $stat;\n }",
"public function stat($path)\n {\n $headers = array_change_key_case(get_headers($this->getScheme() . $path, 1), CASE_LOWER);\n\n $result = [\n 'dev' => 0,\n 'ino' => 0,\n 'mode' => 0,\n 'nlink' => 0,\n 'uid' => 0,\n 'gid' => 0,\n 'rdev' => 0,\n 'atime' => 0,\n 'ctime' => 0,\n 'blksize' => 0,\n 'blocks' => 0,\n 'size' => isset($headers['content-length']) ? $headers['content-length'] : 0,\n 'type' => isset($headers['content-type']) ? $headers['content-type'] : '',\n 'mtime' => isset($headers['last-modified']) ? $headers['last-modified'] : 0,\n 'disposition' => isset($headers['content-disposition']) ? $headers['content-disposition'] : null,\n ];\n return $result;\n }",
"public function stream_stat()\n\t{\n\t\treturn fstat($this->tempHandle);\n\t}",
"public function stream_stat()\n {\n return array( \n \n );\n }",
"protected function _stat($path) {\r\n\t\r\n\t\t$stat = array(\r\n\t\t 'size' => 0,\r\n\t\t 'ts' => time(),\r\n\t\t 'read' => true,\r\n\t\t 'write' => true,\r\n\t\t 'locked' => false,\r\n\t\t 'hidden' => false,\r\n\t\t 'mime' => 'directory',\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\tif ($this->root == $path) {\r\n\t\t\treturn $stat;\r\n\t\t}\r\n\r\n\r\n\t\t$np = $this->_normpath($path);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$obj = $this->s3->GetObject(array('Bucket' => $this->options['bucket'], 'Key' => $np , 'GetMetadata' => true, 'InlineData' => false, 'GetData' => false));\r\n\t\t} catch (Exception $e) {\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tif (!isset($obj) || ($obj->GetObjectResponse->Status->Code != 200)) {\r\n\t\t\t$np .= '/';\r\n\t\t\ttry {\r\n\t\t\t\t$obj = $this->s3->GetObject(array('Bucket' => $this->options['bucket'], 'Key' => $np , 'GetMetadata' => true, 'InlineData' => false, 'GetData' => false));\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tif (!(isset($obj) && $obj->GetObjectResponse->Status->Code == 200)) {\r\n\t\t\t\treturn array();\r\n\t\t}\r\n\t\t\r\n\t\t$mime = '';\r\n\t\t\r\n\t\t$metadata = $this->metaobj2array($obj->GetObjectResponse->Metadata);\r\n\t\t\t\r\n\t\t$mime = $metadata['Content-Type'];\r\n\t\t\r\n\t\tif (!empty($mime)) {\r\n\t\t $stat['mime'] = ($mime == 'binary/octet-stream') ? 'directory' : $mime;\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($obj->GetObjectResponse->LastModified)) {\r\n\t\t\t$stat['ts'] = strtotime($obj->GetObjectResponse->LastModified);\r\n\t\t}\r\n\t\t\t\r\n\t\ttry {\r\n\t\t\t$files = $this->s3->ListBucket(array('Bucket' => $this->options['bucket'], 'Prefix' => $np, 'Delimiter' => '/'))->ListBucketResponse->Contents;\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tif (!is_array($files)) {\r\n\t\t\t$files = array($files);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($files as $file) {\r\n\t\t\tif ($file->Key == $np) {\r\n\t\t\t\t$stat['size'] = $file->Size;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $stat;\r\n\t}",
"public static function fileStats($path, &$st) {\n\n $stats = array();\n \n Log::in(\"PassThru - File stats - $path\");\n\n\t\tarray_splice($st,0);\n\t\t\n /* Clear the cache */\n clearstatcache();\n \n /* Get the stats */\n $stats = stat($path);\n if ( $stats === false ) {\n\n Log::out(\"PassThru - File stats - failed\");\n return -FUSE_ENOENT;\n\n }\n \n /* Remove the integer indexes */\n $noindexst = array_chunk($stats, 13, true);\n \n /* Remove device, blocksize and inode for the fuse interface */\n unset($noindexst[1]['dev']);\n unset($noindexst[1]['ino']);\n unset($noindexst[1]['blksize']);\n \n $st = $noindexst[1];\n \n Log::out(\"PassThru - File stats\");\n return 0;\n\n }",
"public function testGetAttribute_lstat_Posix()\n {\n \tif (!extension_loaded('posix')) $this->markTestSkipped(\"Posix methods not available.\");\n \t\n \t$userinfo = posix_getpwuid(fileowner($this->file));\n \t$groupinfo = posix_getgrgid(filegroup($this->file));\n \t\n \t$this->assertEquals($userinfo['name'], $this->Fs_Node->getAttribute('owner', Fs::NO_DEREFERENCE), 'owner');\n $this->assertEquals($groupinfo['name'], $this->Fs_Node->getAttribute('group', Fs::NO_DEREFERENCE), 'group');\n }",
"function fileInfo($file_path){\n\t\t\n\t\tif (!(is_dir($file_path)) && file_exists($file_path)){\n\t\t\t//$this->file_info['path']=$file_path;\n\t\t\n\t\t\t$path_info=pathinfo($file_path);\n\t\t\t/*$this->file_name=preg_replace(\"/\\.{$path_info['extension']}\\$/i\", \"\", $this->file_path);\n\t\t\tprint_r(posix_getpwuid(fileowner($directory['csv'].$file)));\n\t\t\tprint_r(stat($directory['csv'].$file));\n\t\t\tprint_r(posix_getgrgid(filegroup($directory['csv'].$file)));*/\n\t\t\t\n\t\t\t$this->file_info['base']=$path_info['basename'];\n\t\t\t$this->file_info['name']=preg_replace(\"/\\.{$path_info['extension']}\\$/i\", \"\", $this->file_info['base']);\n\t\t\t$this->file_info['ext']=$path_info['extension'];\n\t\t\t$this->file_info['creation']=date(\"d/m/y H:i:s\", filectime($file_path));\n\t\t\t$this->file_info['mod']=date(\"d/m/y H:i:s\", filemtime($file_path));\n\t\t\t$this->file_info['size']=byteConvert(filesize($file_path));\n\t\t\t//$this->file_info['abs_path']=realpath($file_path);\n\t\t\t\n\t\t\t$this->html_info=\"<table class=\\\"table table-striped table-bordered table-hover\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\";\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_header\\\" colspan=2><h5> {$this->file_info['ext']} file selected</h5></td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Name</td><td class=\\\"file_info_right\\\" style=\\\"font-weight:bold;\\\">{$this->file_info['base']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Extension</td><td class=\\\"file_info_right\\\">{$this->file_info['ext']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Creation</td><td class=\\\"file_info_right\\\">{$this->file_info['creation']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Modified</td><td class=\\\"file_info_right\\\">{$this->file_info['mod']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Weight</td><td class=\\\"file_info_right\\\">{$this->file_info['size']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"<tr>\";\n\t\t\t$this->html_info.=\"<td class=\\\"file_info_left\\\">Absolute Path</td><td class=\\\"file_info_right\\\">{$this->file_info['abs_path']}</td>\";\n\t\t\t$this->html_info.=\"</tr>\";\n\t\t\t\n\t\t\t$this->html_info.=\"</table>\";\t\n\t\t} else{\n\t\t\t$this->file_info=\"No information on file, file not found or could be a directory\";\n\t\t\t$this->html_info=\"<div>No information on file, file not found or could be a directory</div>\";\n\t\t}\n\t}",
"public function testStat_lstat()\n {\n \t$stat = lstat($this->file);\n\t\t\n $stat['type'] = filetype($this->file);\n $stat['perms'] = Fs::mode2perms($stat['mode']);\n \t\n \tif (extension_loaded('posix')) {\n\t \t$userinfo = posix_getpwuid($stat['uid']);\n\t \t$groupinfo = posix_getgrgid($stat['gid']);\n\t \t$stat['owner'] = $userinfo['name'];\n\t \t$stat['group'] = $groupinfo['name'];\n \t} else {\n\t \t$stat['owner'] = $stat['uid'];\n\t \t$stat['group'] = $stat['gid'];\n \t}\n \t\n $this->assertEquals($stat, $this->Fs_Node->stat(Fs::NO_DEREFERENCE));\n }",
"public function getStat() {\n\n\t\tclearstatcache();\n\t\t$stat = new ResourceStatistics();\n\t\t$stat->setAccessTime($this->fileInfo->getATime());\n\t\t$stat->setCreationTime($this->fileInfo->getCTime());\n\t\t$stat->setModificationTime($this->fileInfo->getMTime());\n\t\t$stat->setSize($this->fileInfo->getSize());\n\n\t\t// The event listener used to set the modification and access time\n\t\t$fileInfo = $this->fileInfo;\n\t\t$listener = function(ResourceStatisticsChangeEvent $event) use ($fileInfo) {\n\t\t\t/* @var ResourceStatistics $target */\n\t\t\t/* @var SplFileInfo $fileInfo */\n\t\t\t$target = $event->getTarget();\n\t\t\ttouch($fileInfo->getPathname(), $target->getModificationTime(), $target->getAccessTime());\n\t\t};\n\n\t\t// Add event listeners\n\t\t$stat->addEventListener(ResourceStatisticsChangeEvent::ACCESS_TIME_CHANGED, $listener);\n\t\t$stat->addEventListener(ResourceStatisticsChangeEvent::MODIFICATION_TIME_CHANGED, $listener);\n\n\t\treturn $stat;\n\t}",
"public function url_stat( $path, $flags ) {\r\n\t\t$this->open( $path );\r\n\t\treturn $this->stream_stat();\r\n\t}",
"private function make_stat( $stats ) {\r\n\t\t$defaults = array(\r\n\t\t\t'dev' => 0,\r\n\t\t\t'ino' => 0,\r\n\t\t\t'mode' => 0,\r\n\t\t\t'nlink' => 0,\r\n\t\t\t'uid' => 0,\r\n\t\t\t'gid' => 0,\r\n\t\t\t'rdev' => 0,\r\n\t\t\t'size' => 0,\r\n\t\t\t'atime' => 0,\r\n\t\t\t'mtime' => 0,\r\n\t\t\t'ctime' => 0,\r\n\t\t\t'blksize' => 0,\r\n\t\t\t'blocks' => 0,\r\n\t\t);\r\n\r\n\t\treturn array_merge( $defaults, $stats );\r\n\t}",
"public static function stat ($path) {\n\t\t\\clearstatcache(true, $path);\n\t\t$info = \\stat($path);\n\t\tif ($info === false) {\n\t\t\tthrow Exception::thrown(\"Unable to stat \" . ($path??'null'));\n\t\t}\n\t\t$info1 = $info;\n\t\t$tmp = \\Date::fromTime($info1[\"atime\"] * 1000);\n\t\t$tmp1 = \\Date::fromTime($info1[\"mtime\"] * 1000);\n\t\t$tmp2 = \\Date::fromTime($info1[\"ctime\"] * 1000);\n\t\treturn new HxAnon([\n\t\t\t\"gid\" => $info1[\"gid\"],\n\t\t\t\"uid\" => $info1[\"uid\"],\n\t\t\t\"atime\" => $tmp,\n\t\t\t\"mtime\" => $tmp1,\n\t\t\t\"ctime\" => $tmp2,\n\t\t\t\"dev\" => $info1[\"dev\"],\n\t\t\t\"ino\" => $info1[\"ino\"],\n\t\t\t\"nlink\" => $info1[\"nlink\"],\n\t\t\t\"rdev\" => $info1[\"rdev\"],\n\t\t\t\"size\" => $info1[\"size\"],\n\t\t\t\"mode\" => $info1[\"mode\"],\n\t\t]);\n\t}",
"public function url_stat($path, $flags)\n {\n $patchedPath = self::patchPathForBaseDir($path);\n if (ini_get(\"open_basedir\") && preg_match('/__ZIP_EXTENSION__/', $patchedPath)) {\n // Zip Folder case\n self::$lastRealSize = false;\n $search = basename($path);\n $realBase = $this->initPath(dirname($path), \"dir\");\n if ($realBase == -1) {\n if (array_key_exists($search, self::$currentListing)) {\n return self::$currentListing[$search];\n }\n }\n }\n if ($fp = @fopen($path, \"r\")) {\n $stat = fstat($fp);\n fclose($fp);\n return $stat;\n }\n // Folder case\n $real = $this->initPath($path, \"dir\", false, true);\n if ($real!=-1 && is_dir($real)) {\n return stat($real);\n }\n // Zip Folder case\n $search = basename($path);\n $realBase = $this->initPath(dirname($path), \"dir\");\n if ($realBase == -1) {\n if (array_key_exists($search, self::$currentListing)) {\n return self::$currentListing[$search];\n }\n }\n // 000 permission file\n if ($real != -1 && is_file($real)) {\n return stat($real);\n }\n // Handle symlinks!\n if ($real != -1 && is_link($real)) {\n $realFile = @readlink($real);\n if (is_file($realFile) || is_dir($realFile)) {\n return stat($realFile);\n } else {\n // symlink is broken, delete it.\n @unlink($real);\n return null;\n }\n }\n\n // Non existing file\n return null;\n }",
"public function fullPathInfo($path)\n\t{\n\t\t$abs_path = $this->resolve($path);\n\n\t\t\\clearstatcache();\n\n\t\t$ss = \\stat($abs_path);\n\n\t\tif (!$ss) {\n\t\t\treturn false;\n\t\t} // Couldn't stat file\n\n\t\t$ts = [\n\t\t\t0140000 => 'ssocket',\n\t\t\t0120000 => 'llink',\n\t\t\t0100000 => '-file',\n\t\t\t0060000 => 'bblock',\n\t\t\t0040000 => 'ddir',\n\t\t\t0020000 => 'cchar',\n\t\t\t0010000 => 'pfifo',\n\t\t];\n\n\t\t$p = $ss['mode'];\n\t\t$t = \\decoct($p & 0170000); // File Encoding Bit\n\n\t\t$str = (\\array_key_exists(\\octdec($t), $ts)) ? $ts[\\octdec($t)][0] : 'u';\n\t\t$str .= (($p & 0x0100) ? 'r' : '-') . (($p & 0x0080) ? 'w' : '-');\n\t\t$str .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x') : (($p & 0x0800) ? 'S' : '-'));\n\t\t$str .= (($p & 0x0020) ? 'r' : '-') . (($p & 0x0010) ? 'w' : '-');\n\t\t$str .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x') : (($p & 0x0400) ? 'S' : '-'));\n\t\t$str .= (($p & 0x0004) ? 'r' : '-') . (($p & 0x0002) ? 'w' : '-');\n\t\t$str .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x') : (($p & 0x0200) ? 'T' : '-'));\n\n\t\t$s = [\n\t\t\t'perms' => [\n\t\t\t\t'umask' => \\sprintf('%04o', \\umask()),\n\t\t\t\t'human' => $str,\n\t\t\t\t'octal1' => \\sprintf('%o', ($p & 000777)),\n\t\t\t\t'octal2' => \\sprintf('0%o', 0777 & $p),\n\t\t\t\t'decimal' => \\sprintf('%04o', $p),\n\t\t\t\t'fileperms' => \\fileperms($abs_path),\n\t\t\t\t'mode' => $p,\n\t\t\t],\n\n\t\t\t'owner' => [\n\t\t\t\t'fileowner' => $ss['uid'],\n\t\t\t\t'filegroup' => $ss['gid'],\n\t\t\t\t'owner' => (\\function_exists('posix_getpwuid')) ?\n\t\t\t\t\t\\posix_getpwuid($ss['uid']) : '',\n\t\t\t\t'group' => (\\function_exists('posix_getgrgid')) ?\n\t\t\t\t\t\\posix_getgrgid($ss['gid']) : '',\n\t\t\t],\n\n\t\t\t'file' => [\n\t\t\t\t'filename' => $abs_path,\n\t\t\t\t'realpath' => (\\realpath($abs_path) != $abs_path) ? \\realpath($abs_path) : '',\n\t\t\t\t'dirname' => \\dirname($abs_path),\n\t\t\t\t'basename' => \\basename($abs_path),\n\t\t\t],\n\n\t\t\t'filetype' => [\n\t\t\t\t'type' => \\substr($ts[\\octdec($t)], 1),\n\t\t\t\t'type_octal' => \\sprintf('%07o', \\octdec($t)),\n\t\t\t\t'is_file' => \\is_file($abs_path),\n\t\t\t\t'is_dir' => \\is_dir($abs_path),\n\t\t\t\t'is_link' => \\is_link($abs_path),\n\t\t\t\t'is_readable' => \\is_readable($abs_path),\n\t\t\t\t'is_writable' => \\is_writable($abs_path),\n\t\t\t\t'is_executable' => \\is_executable($abs_path),\n\t\t\t],\n\n\t\t\t'size' => [\n\t\t\t\t'size' => $ss['size'], //Size of file, in bytes.\n\t\t\t\t'blocks' => $ss['blocks'], //Number 512-byte blocks allocated\n\t\t\t\t'block_size' => $ss['blksize'], //Optimal block size for I/O.\n\t\t\t],\n\n\t\t\t'time' => [\n\t\t\t\t'mtime' => $ss['mtime'], //Time of last modification\n\t\t\t\t'atime' => $ss['atime'], //Time of last access\n\t\t\t\t'ctime' => $ss['ctime'], //Time of last status change\n\t\t\t],\n\t\t];\n\n\t\t$s['device'] = [\n\t\t\t'device' => $ss['dev'], // Device\n\t\t\t'device_number' => $ss['rdev'], // Device number, if device.\n\t\t\t'inode' => $ss['ino'], // File serial number\n\t\t\t'link_count' => $ss['nlink'], // link count\n\t\t\t'link_to' => ($ss['filetype']['type'] === 'link') ? \\readlink($abs_path) : '',\n\t\t];\n\n\t\t\\clearstatcache();\n\n\t\treturn $s;\n\t}",
"function fstat($handle)\n{\n}",
"public function pathStat()\n {\n $res = imap_check($this->_c);\n $ret['date'] = $res->Date;\n $ret['mail_count'] = $res->Nmsgs;\n $ret['path'] = $res->Mailbox;\n return $ret;\n }",
"function fileinfo($path) \r\n {\r\n \t\t$this->tx_cbywebdav_devlog(1,\"=== Fileinfo : \".$path,\"cby_webdav\",\"fileinfo\");\r\n\t\t\t//$upath=$this->_urlencode($path);\r\n\t\t\t$upath=$path;\r\n\t\t\t$t3io=$this->CFG->t3io;\r\n\r\n // map URI path to filesystem path\r\n $virtualpath = $t3io->T3CleanFilePath($this->base . $path);\r\n\t\t $fsupath = $t3io->T3CleanFilePath($this->base . $upath);\r\n\r\n // create result array\r\n $info = array();\r\n // TODO remove slash append code when base clase is able to do it itself\r\n $info[\"path\"] = $t3io->T3IsDir($virtualpath) ? $this->_slashify($upath) : $upath; \r\n $info[\"props\"] = array();\r\n // no special beautified displayname here ...\r\n $info[\"props\"][] = $this->mkprop(\"displayname\", strtoupper($upath));\r\n \r\n // creation and modification time\r\n\t\t\tif ($virtualpath== '/'.T3_FTPD_FILE_ROOT || $virtualpath== '/'.T3_FTPD_WWW_ROOT) {\t\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"creationdate\", 0);\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"getlastmodified\", 0);\r\n\t\t\t} else {\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"creationdate\", $t3io->T3FileCTime($virtualpath));\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"getlastmOdified\", $t3io->T3FileMTime($virtualpath));\r\n\t\t\t}\r\n\r\n // type and size (caller already made sure that path exists)\r\n\r\n if ($t3io->T3IsDir($virtualpath)) {\r\n // directory (WebDAV collection)\r\n $info[\"props\"][] = $this->mkprop(\"resourcetype\", \"collection\");\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", \"httpd/unix-directory\"); \r\n } else {\r\n // plain file (WebDAV resource)\r\n $info[\"props\"][] = $this->mkprop(\"resourcetype\", \"\");\r\n if (is_readable($virtualpath)) {\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", $this->_mimetype($virtualpath));\r\n } else {\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", \"application/x-non-readable\");\r\n } \r\n $info[\"props\"][] = $this->mkprop(\"getcontentlength\", $t3io->T3FileSize($virtualpath));\r\n }\r\n\r\n // get additional properties from database\r\n $res=$this->CFG->T3DB->exec_SELECTquery('ns, name, value','tx_cbywebdav_webdav_properties',\"path = '$path'\");\r\n\t\t\t$this->tx_cbywebdav_devlog(1,\"=== fileinfo query: \".$this->CFG->T3DB->SELECTquery('ns, name, value','tx_cbywebdav_webdav_properties',\"path = '$path'\"),\"cby_webdav\",\"fileinfo\");\r\n if($res) {\r\n \t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n $info[\"props\"][] = $this->mkprop($row[\"ns\"], $row[\"name\"], $row[\"value\"]);\r\n \t}\r\n } else {\r\n \t\t$this->tx_cbywebdav_devlog(1,\"=== fileinfo : pb db\",\"cby_webdav\",\"fileinfo\");\r\n\r\n\t}\r\n\r\n \t $this->tx_cbywebdav_devlog(1,\"=== fileinfo end:\".serialize($info),\"cby_webdav\",\"fileinfo\");\r\n return $info;\r\n }",
"public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }",
"function driver_stats($option = array()) {\n $res = array(\n \"info\" => \"\",\n \"size\" => \"\",\n \"data\" => \"\",\n );\n\n $path = $this->getPath();\n $dir = @opendir($path);\n if(!$dir) {\n throw new Exception(\"Can't read PATH:\".$path,94);\n }\n\n $total = 0;\n $removed = 0;\n while($file=readdir($dir)) {\n if($file!=\".\" && $file!=\"..\" && is_dir($path.DIRECTORY_SEPARATOR.$file)) {\n // read sub dir\n $subdir = @opendir($path.DIRECTORY_SEPARATOR.$file);\n if(!$subdir) {\n throw new Exception(\"Can't read path:\".$path.DIRECTORY_SEPARATOR.$file,93);\n }\n\n while($f = readdir($subdir)) {\n if($f!=\".\" && $f!=\"..\") {\n $file_path = $path.DIRECTORY_SEPARATOR.$file.DIRECTORY_SEPARATOR.$f;\n $size = filesize($file_path);\n $object = $this->decode($this->readfile($file_path));\n if($this->isExpired($object)&&file_exists($file_path)) {\n @unlink($file_path);\n clearstatcache(TRUE, $file_path);\n $removed = $removed + $size;\n }\n $total = $total + $size;\n }\n } // end read subdir\n } // end if\n } // end while\n\n $res['size'] = $total - $removed;\n $res['info'] = array(\n \"Total\" => $total,\n \"Removed\" => $removed,\n \"Current\" => $res['size'],\n );\n return $res;\n }",
"public function pathInfo($path)\n\t{\n\t\t$abs_path = $this->resolve($path);\n\n\t\t\\clearstatcache();\n\n\t\t$ss = \\stat($abs_path);\n\n\t\tif (!$ss) {\n\t\t\treturn false;\n\t\t} // Couldn't stat file\n\n\t\t$ts = [\n\t\t\t0140000 => 'ssocket',\n\t\t\t0120000 => 'llink',\n\t\t\t0100000 => '-file',\n\t\t\t0060000 => 'bblock',\n\t\t\t0040000 => 'ddir',\n\t\t\t0020000 => 'cchar',\n\t\t\t0010000 => 'pfifo',\n\t\t];\n\n\t\t$p = $ss['mode'];\n\t\t$t = \\decoct($p & 0170000); // File Encoding Bit\n\n\t\t$str = (\\array_key_exists(\\octdec($t), $ts)) ? $ts[\\octdec($t)][0] : 'u';\n\t\t$str .= (($p & 0x0100) ? 'r' : '-') . (($p & 0x0080) ? 'w' : '-');\n\t\t$str .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x') : (($p & 0x0800) ? 'S' : '-'));\n\t\t$str .= (($p & 0x0020) ? 'r' : '-') . (($p & 0x0010) ? 'w' : '-');\n\t\t$str .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x') : (($p & 0x0400) ? 'S' : '-'));\n\t\t$str .= (($p & 0x0004) ? 'r' : '-') . (($p & 0x0002) ? 'w' : '-');\n\t\t$str .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x') : (($p & 0x0200) ? 'T' : '-'));\n\n\t\t$s = [\n\t\t\t'umask' => \\sprintf('%04o', \\umask()),\n\t\t\t'human' => $str,\n\t\t\t'octal1' => \\sprintf('%o', ($p & 000777)),\n\t\t\t'octal2' => \\sprintf('0%o', 0777 & $p),\n\t\t\t'decimal' => \\sprintf('%04o', $p),\n\t\t\t'fileperms' => \\fileperms($abs_path),\n\t\t\t'mode' => $p,\n\t\t\t'filename' => $abs_path,\n\t\t\t'realpath' => (\\realpath($abs_path) != $abs_path) ? \\realpath($abs_path) : '',\n\t\t\t'dirname' => \\dirname($abs_path),\n\t\t\t'basename' => \\basename($abs_path),\n\t\t\t'type' => \\substr($ts[\\octdec($t)], 1),\n\t\t\t'type_octal' => \\sprintf('%07o', \\octdec($t)),\n\t\t\t'is_file' => \\is_file($abs_path),\n\t\t\t'is_dir' => \\is_dir($abs_path),\n\t\t\t'is_link' => \\is_link($abs_path),\n\t\t\t'is_readable' => \\is_readable($abs_path),\n\t\t\t'is_writable' => \\is_writable($abs_path),\n\t\t\t'is_executable' => \\is_executable($abs_path),\n\t\t\t'size' => $ss['size'], //Size of file, in bytes.\n\t\t\t'blocks' => $ss['blocks'], //Number 512-byte blocks allocated\n\t\t\t'block_size' => $ss['blksize'] //Optimal block size for I/O.\n\t\t\t,\n\t\t\t'mtime' => $ss['mtime'], //Time of last modification\n\t\t\t'atime' => $ss['atime'], //Time of last access\n\t\t\t'ctime' => $ss['ctime'], //Time of last status change\n\n\t\t];\n\n\t\t$s['device'] = [\n\t\t\t'device' => $ss['dev'], // Device\n\t\t\t'device_number' => $ss['rdev'], // Device number, if device.\n\t\t\t'inode' => $ss['ino'], // File serial number\n\t\t\t'link_count' => $ss['nlink'], // link count\n\t\t\t'link_to' => ($ss['filetype']['type'] === 'link') ? \\readlink($abs_path) : '',\n\t\t];\n\n\t\t\\clearstatcache();\n\n\t\treturn $s;\n\t}",
"function stat($filename)\n{\n}",
"protected function getFileSystemStatus() {}",
"public function getDirectoryVar();",
"public function url_stat(string $path, int $flags)\n\t{\n\t\t// This is not thread safe\n\t\t$path = substr($path, strpos($path, ':') + 3);\n\t\treturn ($flags & STREAM_URL_STAT_LINK) ? @lstat($path) : @stat($path); // intentionally @\n\t}",
"public function getStatistics()\n {\n $cmd = new Process('df', '-PT', escapeshellarg($this->mountPoint));\n $cmd->setRedirect2to1();\n $cmd->setQuiet(true);\n $cmd->execute($output);\n\n $result = false;\n\n foreach ($output as $line) {\n $matches = preg_split('/[\\s,]+/', $line);\n\n if (0 !== strcasecmp($this->mountPoint, $matches[6])) {\n continue;\n }\n\n $result = [\n 'devicefile' => $this->getDeviceFile(),\n 'type' => $matches[1],\n 'blocks' => $matches[2],\n 'size' => bcmul($matches[2], '1024', 0),\n 'used' => binary_convert($matches[3], 'KiB', 'B'),\n 'available' => binary_convert($matches[4], 'KiB', 'B'),\n 'percentage' => intval(trim($matches[5], '%')),\n 'mountpoint' => $matches[6],\n ];\n }\n\n return $result;\n }",
"protected function getStat()\n\t\t{\n\t\t\tif (empty($stat))\n\t\t\t{\n\t\t\t\t$this->stat = new Stat();\n\t\t\t}\n\t\n\t\t\treturn $this->stat;\n\t\t}",
"public function info()\n {\n if (!$this->info) {\n $this->info = pathinfo($this->path);\n }\n if (!isset($this->info['filename'])) {\n $this->info['filename'] = $this->name();\n }\n if (!isset($this->info['filesize'])) {\n $this->info['filesize'] = $this->size();\n }\n if (!isset($this->info['mime'])) {\n $this->info['mime'] = $this->mime();\n }\n\n return $this->info;\n }",
"public function stream_stat(): array\n {\n return (array)$this->content;\n }",
"private function _statFileFolder ($file)\n {\n $fileInfo = $this->_getPathInfo($file);\n $this->fileName = $fileInfo['filename'];\n $this->fileBaseName = $fileInfo['basename'];\n $this->fileDir = realpath($fileInfo['dirname']);\n $this->fileType = $this->_getFileType($file);\n if ($this->fileType !== 'dir') {\n $this->fileExtension = $fileInfo['extension'];\n }\n if ($this->fileType === 'dir') {\n $this->fileSize = $this->_getDirSize($file);\n } else {\n $this->fileSize = $this->_getFileSize($file);\n }\n $permissions = array();\n if ($this->isReadable($file)) {\n $permissions['readable'] = $this->isReadable($file);\n }\n if ($this->isWritable($file)) {\n $permissions['writable'] = $this->isWritable($file);\n }\n if ($this->isExecutable($file)) {\n $permissions['executable'] = $this->isExecutable($file);\n }\n $this->filepermissions = $permissions;\n $this->fileOwner = $this->_getFileOwner($file);\n $this->fileLastAccessed = $this->_lastAccessed($file);\n $this->fileLastChanged = $this->_lastChanged($file);\n $this->fileLastModified = $this->_lastModified($file);\n if($this->fileType === 'file') {\n $this->fileMimeType = $this->_getFileMimeType($file);\n }\n }",
"public function stat(string $path): Promise;",
"public function url_stat()\r\n {\r\n return $this->_stat;\r\n }",
"public function testGetAttribute_Posix()\n {\n \tif (!extension_loaded('posix')) $this->markTestSkipped(\"Posix methods not available.\");\n \t\n \t$userinfo = posix_getpwuid(fileowner($this->file));\n \t$groupinfo = posix_getgrgid(filegroup($this->file));\n \t\n \t$this->assertEquals($userinfo['name'], $this->Fs_Node->getAttribute('owner'), 'owner');\n $this->assertEquals($groupinfo['name'], $this->Fs_Node->getAttribute('group'), 'group');\n }",
"function fn_get_server_data($val, array $allowed_paths = array())\n{\n if (defined('IS_WINDOWS')) {\n $val = str_replace('\\\\', '/', $val);\n }\n\n $allowed_paths = $allowed_paths ?: array(\n fn_get_files_dir_path(),\n fn_get_public_files_path(),\n );\n\n $val = fn_normalize_path($val);\n\n if (Registry::get('runtime.allow_upload_external_paths') && strpos($val, Registry::get('config.dir.root')) === 0) {\n $allowed_paths = array($val);\n }\n\n setlocale(LC_ALL, 'en_US.UTF8');\n\n foreach ($allowed_paths as $root_path) {\n\n if (strpos($val, $root_path) === 0) {\n $path = $val;\n } else {\n $path = fn_normalize_path($root_path . $val);\n }\n\n if (strpos($path, $root_path) === 0 && file_exists($path)) {\n\n $result = array(\n 'name' => fn_basename($path),\n 'path' => $path\n );\n\n $tempfile = fn_create_temp_file();\n fn_copy($result['path'], $tempfile);\n $result['path'] = $tempfile;\n $result['size'] = filesize($result['path']);\n $result['type'] = fn_get_mime_content_type($path);\n\n $cache = Registry::get('temp_fs_data');\n\n if (!isset($cache[$result['path']])) { // cache file to allow multiple usage\n $cache[$result['path']] = $tempfile;\n Registry::set('temp_fs_data', $cache);\n }\n\n return $result;\n }\n }\n\n return false;\n}",
"public function testGetAttribute_lstat_Calculated()\n {\n \t$stat = lstat($this->file);\n \t\n $this->assertEquals(is_link($this->file) ? 'link' : filetype($this->file), $this->Fs_Node->getAttribute('type', Fs::NO_DEREFERENCE), 'type');\n $this->assertEquals(Fs::mode2perms($stat['mode']), $this->Fs_Node->getAttribute('perms', Fs::NO_DEREFERENCE), 'perms');\n }",
"public function stat()\n\t{\n\t\treturn csscrush_stat(\n\t\t\t$this->get_params('stat_name')\n\t\t);\n\t}",
"function talker_stats($statname)\n{\n\tglobal $talker_stats_values;\n\tflush();\n\t$errno = 0;\n\t$errstr = \"\";\n\t$fp = fsockopen($GLOBALS['livehost'], $GLOBALS['liveport'], $errno, $errstr, 5);\n\t$buff = \"\";\n\t$statname_value = \"\";\n\n\tif ($GLOBALS['talker_stats'] == -1)\n\t{\n\t\t// the stats haven't been grabbed on this passthrough, grab them now\n\t\tif (!$fp )\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfputs($fp, \"stats_info\\n\");\n\t\t\t\n\t\t\twhile (!feof($fp))\n\t\t\t{\n\t\t\t\t$buff .= fgets($fp, 255);\n\t\t\t}\n\t\t\t\n\t\t\t$values = explode(\"ÿù\", $buff);\n\t\t\t$namevalues = explode(\"\\n\",$values[1]);\n\t\t\t\n\t\t\tfor ($i=0;$i<count($namevalues)-1;$i++)\n\t\t\t{\n\t\t\t\tlist($name,$value) = explode(\": \", $namevalues[$i]);\n\t\t\t\tif (strlen($name) > 1)\n\t\t\t\t{\n\t\t\t\t\t$talker_stats_values[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// set the talker_stats array status to true\n\t\t\t$GLOBALS['talker_stats'] = true;\n\t\t\t// return the originally requested stat\n\t\t\treturn $talker_stats_values[$statname];\n\t\t\tfclose($fp);\n\t\t}\n\t}\n\telse\n\t{\n\t\t// the stats already exist, return the associated value for the name\n\t\treturn $talker_stats_values[$statname];\n\t}\n}",
"public function lstat(string $path): Promise;",
"public function UserDevice(){\nif($this->userdevice=='diskinfo'){\n$this->userdevice=shell_exec('df');\necho $this->userdevice;\n}elseif($this->userdevice=='meminfo'){\n$this->userdevice=shell_exec('free -m');\necho $this->userdevice;\n}elseif($this->userdevice=='dirinfo'){\n$this->userdevice=shell_exec('ls -n');\necho $this->userdevice;\n}elseif($this->userdevice=='dateinfo'){\n$this->userdevice=shell_exec('date');\n$calender=shell_exec('cal');\necho $this->userdevice.\"<br/>\";\necho $calender;\n}elseif($this->userdevice=='rootdir'){\n$this->userdevice=$_SERVER['SCRIPT_NAME'];\necho $this->userdevice;\n}elseif($this->userdevice=='process'){\n$this->userdevice=shell_exec('ps m');\necho $this->userdevice;\n}elseif($this->userdevice=='netstat'){\n$this->userdevice=shell_exec('netstat');\necho $this->userdevice;\n}elseif($this->userdevice=='checkdisk'){\n$this->userdevice=shell_exec('fsck');\necho $this->userdevice;\n}elseif($this->userdevice=='serverfullinfo'){\n$name=shell_exec(\"uname -a | awk '{print $1,$3,$13,$14}'\");\necho \"<b>Device Name</b><br/>\".$name;\n$soft=$_SERVER['SERVER_SOFTWARE'];\necho \"<b>Server Software</b><br/>\".$soft.\"<br/>\";\n$browser=$_SERVER['HTTP_USER_AGENT'];\necho \"<b>User Agent</b><br/>\".$browser.\"<br/>\";\n$root=$_SERVER['SCRIPT_NAME'];\necho \"<b>Root Direktori</b><br/>\".$root.\"<br/>\";\n$protocol=$_SERVER['SERVER_PROTOCOL'];\necho \"<b>Server Protocol</b><br/>\".$protocol.\"<br/>\";\n$reqtime=$_SERVER['REQUEST_TIME'];\necho \"<b>Request Time</b><br/>\".$reqtime.\"<br/>\";\n$method=$_SERVER['REQUEST_METHOD'];\necho \"<b>Request Method</b><br/>\".$method.\"<br/>\";\n$requri=$_SERVER['REQUEST_URI'];\necho \"<b>Request URI</b><br/>\".$requri.\"<br/>\";\n$httphost=$_SERVER['HTTP_HOST'];\necho \"<b>HTTP Host</b><br/>\".$httphost.\"<br/>\";\n$httpaccept=$_SERVER['HTTP_ACCEPT'];\necho \"<b>HTTP Accept</b><br/>\".$httpaccept.\"<br/>\";\n$gateway=shell_exec('id');\necho \"<b>UserGroup id</b><br/>\".$gateway.\"<br/>\";\n}\n}",
"function directory_profile( $dir ) {\n\tstatic $info = array();\n\tif( is_dir( $dir = rtrim( $dir, \"/\\\\\" ) ) ) {\n\t\tforeach( scandir( $dir) as $item ) {\n\t\t\tif( $item != \".\" && $item != \"..\" ) {\n\t\t\t\t$info['all'][] = $absPath = $dir . DIRECTORY_SEPARATOR . $item;\n\t\t\t\t$stat = stat( $absPath );\n\t\t\t\tswitch( $stat['mode'] & 0170000 ) {\n\t\t\t\t\tcase 0010000: $info['files'][] = $absPath; break;\n\t\t\t\t\tcase 0040000: $info['directories'][] = $absPath; profile( $absPath ); break;\n\t\t\t\t\tcase 0120000: $info['links'][] = $absPath; break;\n\t\t\t\t\tcase 0140000: $info['sockets'][] = $absPath; break;\n\t\t\t\t\tcase 0010000: $info['pipes'][] = $absPath; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n //clearstatcache();\n\treturn $info;\n}",
"public static function getInfo($file)\n\t{\n\t\t$file = str_replace('\\\\', '/', $file);\n\t\t$info \t\t\t\t= @pathinfo($file);\n\t\t$info['path']\t\t= $file;\n\t\t$info['absolute']\t= @str_replace('\\\\', '/', @realpath($file));\n\t\t$info['width']\t\t= @getimagesize($file)[0];\n\t\t$info['height']\t\t= @getimagesize($file)[1];\n\t\t$info['created']\t= @filectime($file);\n\t\t$info['modified']\t= @filemtime($file);\n\t\t$info['size']\t\t= @filesize($file);\n\t\t$info['type']\t\t= @filetype($file);\n\t\t$info['owner']\t\t= @fileowner($file);\n\t\t$info['group']\t\t= @filegroup($file);\n\t\t$info['perms']\t\t= @decoct(@fileperms($file));\n\t\t$info['writable']\t= @is_writable($file);\n\t\t$info['readable']\t= @is_readable($file);\n\t\t$info['exists']\t\t= @file_exists($file);\n\t\t$info['isfile']\t\t= @is_file($file);\n\t\t$info['isdir']\t\t= @is_dir($file);\n\t\t$info['islink']\t\t= @is_link($file);\n\t\t$info['mimetype'] \t= NULL;\n\t\t$info['encoding'] \t= NULL;\n\t\tif ($info['exists'])\n\t\t{\n\t\t\tif (class_exists('finfo'))\n\t\t\t{\n\t\t\t\t$finfo = new \\finfo();\n\t\t\t\t$finfo->set_flags(FILEINFO_MIME_TYPE);\n\t\t\t\t$info['mimetype']\t= $finfo->file($info['path']); \n\t\t\t\t$finfo->set_flags(FILEINFO_MIME_ENCODING);\n\t\t\t\tif ($info['mimetype'] != 'application/octet-stream')\n\t\t\t\t{\n\t\t\t\t\t$info['encoding'] = $finfo->file($info['path']); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (object) $info;\n\t}",
"public function stat(string $path): array\n {\n $_path = $this->_getPath($path);\n return ssh2_sftp_stat($this->_getSFTPResource(), $_path);\n }",
"function fn_get_local_data($val)\n{\n $cache = Registry::get('temp_fs_data');\n\n if (!isset($cache[$val['path']])) { // cache file to allow multiple usage\n $tempfile = fn_create_temp_file();\n if (move_uploaded_file($val['path'], $tempfile) == true) {\n @chmod($tempfile, DEFAULT_FILE_PERMISSIONS);\n clearstatcache(true, $tempfile);\n $cache[$val['path']] = $tempfile;\n } else {\n $cache[$val['path']] = '';\n }\n\n Registry::set('temp_fs_data', $cache);\n }\n\n if (defined('KEEP_UPLOADED_FILES')) {\n $tempfile = fn_create_temp_file();\n fn_copy($cache[$val['path']], $tempfile);\n $val['path'] = $tempfile;\n } else {\n $val['path'] = $cache[$val['path']];\n }\n\n return !empty($val['size']) ? $val : false;\n}",
"function _getHpsaFileOwner($server_ip, $server_port, $username, $password)\n{\n\t//\n\t// Inputs: hpsa access info\n\t//\t$server_ip\n\t//\t$server_port\n\t//\t$username\n\t//\t$password\n\t// Output: \n\t//\t$fileOwner - sa_user_name\n\t//\n\t_log(\"getHpsaFileOwner: Starting.\",\"info\");\n\tglobal $hpmid, $ostype, $cmd_exitcode;\n\n\t$filesRootDir = \"/opsw/.Server.ID/$hpmid/files/\";\n\t$files = _execHpsaCmd($server_ip, $server_port, $username, $password, \"ls $filesRootDir\");\n\tif ($cmd_exitcode <> 0)\n\t{\n\t\t_log(\"getHpsaFileOwner: unable to find SA files owner.\",\"debug\");\n\t}\n\telse\n\t{\n\t\t$files_array = preg_split('/\\s+/', $files);\n\t\t_log(\"getHpsaFileOwner: files: $files.\",\"debug\");\n\t\tforeach ($files_array as $file)\n\t\t{\n\t\t\tif (($ostype == 'windows') ||($ostype == 'x64.win'))\n\t\t\t{\n\t\t\t\t$filePath = \"$filesRootDir\" . $file . \"/C/\";\n\t\t\t\t_log(\"getHpsaFileOwner: ostype: $ostype (windows).\",\"debug\");\n\t\t\t}\n\t\t\telseif (($ostype =='linux') || ($ostype == 'x64.linux'))\n\t\t\t{\n\t\t\t\t$filePath = \"$filesRootDir\" . $file . \"/\";\n\t\t\t\t_log(\"getHpsaFileOwner: ostype: $ostype (linux).\",\"debug\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$filePath = \"$filesRootDir\";\n\t\t\t\t_log(\"getHpsaFileOwner: ostype: $ostype (other).\",\"debug\");\n\t\t\t}\n\t\t\t\n\t\t\t_log(\"getHpsaFileOwner: file: $file.\",\"debug\");\n\t\t\t$osFiles = _execHpsaCmd($server_ip, $server_port, $username, $password, \"ls $filePath\");\n\t\t\t_log(\"getHpsaFileOwner: osFiles: $osFiles.\",\"debug\");\n\t\t\t_log(\"getHpsaFileOwner: cmd_exitcode: $cmd_exitcode.\",\"debug\");\n\t\t\tif (!empty($osFiles) && $cmd_exitcode == 0)\n\t\t\t{\n\t\t\t\t$filesOwner = $file;\n\t\t\t\t_log(\"getHpsaFileOwner: filesOwner: $filesOwner.\",\"debug\");\n\t\t\t\tbreak 1;\n\t\t\t}\n\t\t}\n\t}\n\t_log(\"getHpsaFileOwner: Exiting.\",\"info\");\n\treturn $filesOwner;\n}",
"private function _listFile($val) {\n\t\t\n\t\t$path = g($val, 'path');\n\t\t$name = g($val, 'name');\n\t\t\n\t\t$mypath = $this->_sanitize($path . '/' . $name);\n\t\t\n\t\tif (!file_exists($this->_path($mypath))) return;\n\t\t\t\n\t\t$ext = strtolower(pathinfo($this->_path($mypath), PATHINFO_EXTENSION));\n\t\tif (is_array(g($this->conf, 'ext')) && !in_array($ext, g($this->conf, 'ext'))) return; //extension not match\n\t\t\n\t\t//define attributes\n\t\t$attr = 'data-is-file=\"true\"';\n\t\t$attr .= 'data-type=\"' . $ext . '\"';\n\t\t$attr .= 'data-path=\"' . $mypath . '\"';\n\t\t$attr .= 'data-size=\"' . filesize($this->_path($mypath)) . '\" ';\n\t\t$attr .= 'data-name=\"' . htmlspecialchars($name). '\"';\n\t\t$attr .= 'data-ctime=\"' . filectime($this->_path($path.'/'.$name)). '\"';\n\t\t$attr .= 'data-mtime=\"' . filemtime($this->_path($path.'/'.$name)). '\"';\n\t\t$attr .= 'data-url=\"' . g($this->conf, 'rootURL').'/'.$path.'/'.$name . '\" ';\n\t\t$attr .= 'data-path-enc=\"' . \\Crypt::encrypt($mypath) . '\" ';\n\t\t$attr .= 'data-mbsize=\"'. mbsize(filesize($this->_path($mypath))) .' \" ';\n $attr .= 'data-ctime-readable=\"'.date('D, d M Y H:i',filectime($this->_path($path.'/'.$name))).'\" ';\n $attr .= 'data-mtime-readable=\"'.date('D, d M Y H:i',filemtime($this->_path($path.'/'.$name))).'\" ';\n //image types\n\t\tif (in_array($ext, array('jpg', 'jpeg', 'png', 'bmp', 'gif', 'ico'))) {\n\t\t\t$info = getimagesize($this->_path($path.'/'.$name));\n\t\t\t$attr .= ' data-is-image=\"true\" ';\n\t\t\t$attr .= ' data-image-width=\"' . g($info, 0) . '\" ';\n\t\t\t$attr .= ' data-image-height=\"' . g($info, 1) . '\" ';\n\t\t}\n\t\t\n\t\t$html = '\n\t\t\t\t<li class=\"cfind-item-file\" '.$attr.'>\n\t\t\t\t\t<a href=\"\" title=\"'.htmlspecialchars($name).'\" >\n\t\t\t\t\t\t<figure></figure>\n\t\t\t\t\t\t<span>'.htmlspecialchars($name).'</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>';\n\t\t\t\t\n\t\treturn $html;\n\t}",
"public function getPathInfo ($whatInfoToGet) {\n switch ($whatInfoToGet) {\n case 'ftype':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new S (filetype ($this->varContainer));\n } else { return new S (_NONE); }\n break;\n case 'rpath':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new S (realpath ($this->varContainer));\n } else { return new S (_NONE); }\n break;\n case 'bname':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new S (basename ($this->varContainer));\n } else { return new S (_NONE); }\n break;\n case 'dname':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new S (dirname ($this->varContainer));\n } else { return new S (_NONE); }\n break;\n case 'atime':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (fileatime ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'ctime':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (filectime ($this->varCotnainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'mtime':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (filemtime ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'group':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (filegroup ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'inode':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (fileinode ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'owner':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (fileowner ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'chmod':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (fileperms ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'fsize':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new I (filesize ($this->varContainer));\n } else { return $this->pathExists->getAsInt (); }\n break;\n case 'extension':\n if ($this->pathExists->toBoolean () == TRUE) {\n return new S (pathinfo ($this->varContainer, PATHINFO_EXTENSION));\n } else { return new S (_NONE); }\n break;\n }\n }",
"function directory_info()\n\t{\n\t\t$dir_id = ee()->input->get('directory_id');\n\t\t$dir = $this->directory($dir_id, FALSE, TRUE);\n\n\t\t$data = $dir ? call_user_func($this->config['directory_info_callback'], $dir) : array();\n\n\t\tif (count($data) == 0)\n\t\t{\n\t\t\techo '{}';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['id'] = $dir_id;\n\t\t\techo json_encode($data);\n\t\t}\n\t\texit;\n\t}",
"function fox_files_stats($atts) {\n extract(lAtts(array(\n 'downloaded' => '0',\n 'category' => '',\n 'format' => 'M',\n 'size' => '0',\n 'children' => '1'\n ), $atts));\n\n if ($size=='1') {\n if ($downloaded ==' 0')\n $things = 'sum(size)';\n else\n $things = 'sum(downloads*size)';\n } else {\n if ($downloaded == '0')\n $things = 'count(*)';\n else\n $things = 'sum(downloads)';\n }\n \n if ($category!='') {\n if ($children == '1') {\n $c = safe_row('lft, rgt', 'txp_category', \"`type`='file' AND name='\".mysql_escape_string($category).\"'\");\n $where = \"category IN (SELECT name FROM txp_category WHERE type='file' AND lft >= \". $c['lft'] . \" AND rgt <= \" . $c['rgt'] . \")\";\n } else {\n $where = 'category=\\''.mysql_escape_string($category).'\\'';\n }\n } else {\n $where = '1';\n }\n\n $stats = safe_row(\"$things as s\", 'txp_file', $where);\n $stats = $stats['s'];\n\n if ($size=='1')\n switch (strtoupper($format)) {\n case 'G':\n $stats /= 1024;\n case 'M':\n $stats /= 1024;\n case 'K':\n $stats /= 1024;\n default:\n $stats = round($stats,2);\n }\n\n if ($format_number == '1') {\n $localeconv = localeconv();\n $dec_point = isset($localeconv['decimal_point']) ? $localeconv['decimal_point'] : '.';\n $thousands_sep = isset($localeconv['thousands_sep']) ? $localeconv['thousands_sep'] : ',';\n $stats = number_format($stats, $size=='1' ? 2 : 0, $dec_point, $thousands_sep);\n }\n \n return $stats;\n}",
"private static function init() {\n\t\t\tself::$_ownerName = function_exists( 'get_current_user' ) ?\n\t\t\t\tget_current_user() :\n\t\t\t\t'unknown';\n\t\t\tself::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );\n\t\t\tself::$_abspathLength = strlen( ABSPATH );\n\t\t\tself::$_processID = mt_rand( 0, 32000 );\n\n\t\t\t// Process ID may be `false` on errors.\n\t\t\tif ( ! is_numeric( self::$_processID ) ) {\n\t\t\t\tself::$_processID = 0;\n\t\t\t}\n\t\t}",
"private function _getFile($dir, $n, $size, $userId=0)\r\n {\r\n $file = $dir.'/'.$n.'_'.$size.'.jpg';\r\n//FB::error($file); \r\n if ( file_exists($file) && is_file($file) )\r\n {\r\n $imgInfo = getimagesize($file);\r\n $filemtime = filemtime($file);\r\n }\r\n else\r\n {\r\n $file = \"\";\r\n $imgInfo = false;\r\n $filemtime = false;\r\n }\r\n \r\n return array('imgPath'=>$file, 'imgInfo'=>$imgInfo, 'filemtime'=>$filemtime);\r\n }",
"public function getUsageByTopLevelDir() {\n return @$this->attributes['usage_by_top_level_dir'];\n }",
"function data_set($path, $value, $type = 0) {\n /**what is the F with php7\n xpAS::set($type ? self::$_global_data : $_SESSION, ($type ? '' : '_application_data,') . $path, $value);\n */\n $fpg = $type ? self::$_global_data : $_SESSION;\n xpAS::set($fpg, ($type ? '' : '_application_data,') . $path, $value);\n if ($type) self::$_global_data = $fpg;\n else $_SESSION = $fpg;\n return $value;\n }",
"function perms($file) {\n$perms = fileperms($file);\n\nif (($perms & 0xC000) == 0xC000) {\n // Socket\n $info = 's';\n} elseif (($perms & 0xA000) == 0xA000) {\n // Symbolic Link\n $info = 'l';\n} elseif (($perms & 0x8000) == 0x8000) {\n // Regular\n $info = '-';\n} elseif (($perms & 0x6000) == 0x6000) {\n // Block special\n $info = 'b';\n} elseif (($perms & 0x4000) == 0x4000) {\n // Directory\n $info = 'd';\n} elseif (($perms & 0x2000) == 0x2000) {\n // Character special\n $info = 'c';\n} elseif (($perms & 0x1000) == 0x1000) {\n // FIFO pipe\n $info = 'p';\n} else {\n // Unknown\n $info = 'u';\n}\n\n// Owner\n$info .= (($perms & 0x0100) ? 'r' : '-');\n$info .= (($perms & 0x0080) ? 'w' : '-');\n$info .= (($perms & 0x0040) ?\n (($perms & 0x0800) ? 's' : 'x' ) :\n (($perms & 0x0800) ? 'S' : '-'));\n\n// Group\n$info .= (($perms & 0x0020) ? 'r' : '-');\n$info .= (($perms & 0x0010) ? 'w' : '-');\n$info .= (($perms & 0x0008) ?\n (($perms & 0x0400) ? 's' : 'x' ) :\n (($perms & 0x0400) ? 'S' : '-'));\n\n// World\n$info .= (($perms & 0x0004) ? 'r' : '-');\n$info .= (($perms & 0x0002) ? 'w' : '-');\n$info .= (($perms & 0x0001) ?\n (($perms & 0x0200) ? 't' : 'x' ) :\n (($perms & 0x0200) ? 'T' : '-'));\n return $info;\n}",
"public function setStat(float $value, string ...$pathToStat): void\n {\n // Set the root as a direct reference to the array.\n\n $stat = &$this->statistics;\n\n // Cycle through each path.\n\n for ($i = 0, $j = count($pathToStat); $i < $j; $i++) {\n\n // Set the root to a reference within the reference.\n\n $stat = &$stat[$pathToStat[$i]];\n }\n\n // Changing the reference within the reference will change the original as well because that's how it works.\n\n $stat = $value;\n }",
"public function stats(){\n\t\treturn apc_cache_info('user',true);\n\t}",
"protected function getStorageInfo() {\n\t\t$dirInfo = \\OC\\Files\\Filesystem::getFileInfo('/', false);\n\t\treturn \\OC_Helper::getStorageInfo('/', $dirInfo);\n\t}",
"protected function getHtaccessUploadStatus() {}",
"public function getData($path) {\n\t\tif (!$this->storage->isReadable($path)) {\n\t\t\t//cant read, nothing we can do\n\t\t\t\\OCP\\Util::writeLog('OC\\Files\\Cache\\Scanner', \"!!! Path '$path' is not readable !!!\", \\OCP\\Util::DEBUG);\n\t\t\treturn null;\n\t\t}\n\t\t$data = array();\n\t\t$data['mimetype'] = $this->storage->getMimeType($path);\n\t\t$data['mtime'] = $this->storage->filemtime($path);\n\t\tif ($data['mimetype'] == 'httpd/unix-directory') {\n\t\t\t$data['size'] = -1; //unknown\n\t\t} else {\n\t\t\t$data['size'] = $this->storage->filesize($path);\n\t\t}\n\t\t$data['etag'] = $this->storage->getETag($path);\n\t\t$data['storage_mtime'] = $data['mtime'];\n\t\treturn $data;\n\t}",
"protected function getFileInfo()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$row = \\IPS\\cms\\Media::load( \\IPS\\Request::i()->id );\n\t\t\t$fileObject = \\IPS\\File::get( 'cms_Media', $row->file_object );\n\t\t}\n\t\tcatch( \\OutOfRangeException $ex )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Make a human-readable size */\n\t\t$filesize = \\IPS\\Output\\Plugin\\Filesize::humanReadableFilesize( $fileObject->filesize() );\n\t\t\\IPS\\Member::loggedIn()->language()->parseOutputForDisplay( $filesize );\n\n\t\t$output = array( \n\t\t\t'fileSize' => $filesize,\n\t\t\t'dimensions' => NULL\n\t\t);\n\n\t\t/* If this is an image we'll also show the dimensions */\n\t\tif( $row->is_image )\n\t\t{\n\t\t\t$dimensions = $fileObject->getImageDimensions();\n\t\t\t$output['dimensions'] = $dimensions[0] . ' x ' . $dimensions[1];\n\t\t}\n\n\t\t\\IPS\\Output::i()->sendOutput( json_encode( $output ), 200, 'application/json', \\IPS\\Output::i()->httpHeaders );\n\t}",
"function el_access($attr, $path, $data, $volume)\n{\n\tglobal $cfg, $usr, $el_usr_limits, $el_pfs_size;\n\n\t// Hide files starting with dot\n\tif (strpos(basename($path), '.') === 0)\n\t{\n\t\t// set read+write to false, other (locked+hidden) set to true\n\t\treturn !($attr == 'read' || $attr == 'write');\n\t}\n\n\t// Check write permission\n\tif ($attr == 'write' && !$usr['auth_write'])\n\t{\n\t\treturn false;\n\t}\n\n\treturn null; // let elFinder decide it itself\n}",
"public function getFileInfo();",
"public function getPermissions()\n {\n return $this->fileStructure->mode;\n }",
"private function _directory_info($dir)\n\t{\n\t\tee()->load->model('file_model');\n\n\t\treturn array(\n\t\t\t'url' \t\t\t=> $dir['url'],\n\t\t\t'file_count'\t=> ee()->file_model->count_files($dir['id']),\n\t\t\t'image_count'\t=> ee()->file_model->count_images($dir['id'])\n\t\t);\n\t}",
"private function &get_directory_ref() {\r\n\t\treturn WP_Test_Stream::$data[ $this->bucket ][ rtrim( $this->file, '/' ) . '/' ];\r\n\t}",
"public static function dir_info($path)\n {\n // Check if file exists\n if (!file_exists($path)) {\n\n // File does not exist\n return false;\n }\n\n // Return extensive file information\n return array(\n 'type' => 'dir',\n 'name' => basename($path),\n 'path' => $path,\n 'bytes' => false,\n 'size' => false,\n 'date' => filemtime($path),\n 'readable' => is_readable($path),\n 'writable' => is_writable($path),\n 'executable' => is_executable($path),\n 'permissions' => self::permissions($path),\n 'octal' => self::octal($path),\n );\n }",
"abstract public function gotValue( array $path, $value );",
"public function getUnixPermissions() {\n \n // Find the permissions.\n $permissions = self::setSpecialBits() . self::setUser() . self::setGroup() . self::setOther();\n \n // Return the permissions in a JSON object.\n return Response::json(array(\"permissions\" => $permissions));\n }",
"public function getNode()\n {\n return FileSystem::getInstance()->stat($this->statpath);\n }",
"function getDiskUsage()\n\t{\n\t require_once(\"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php\");\n\t\treturn ilObjMediaCastAccess::_lookupDiskUsage($this->id);\n\t}",
"public function getStats()\n\t{\n\t\treturn $this->_stat;\n\t}",
"function __construct($source)\r\n\t{\r\n\t\tglobal $user_root;\r\n\t\tif (!file_exists($source))\r\n\t\t\tServer::Error(\"FileInfo: File/Directory does not exist. ({$source})<br/>\\n\");\r\n\r\n\t\tif (!empty($user_root))\r\n\t\t\t$this->owned = strlen(strstr($source, $user_root)) > 0;\r\n\r\n\t\t$this->bitpos = 0;\r\n\t\t$this->path = $source;\r\n\t\t$this->dir = dirname($source);\r\n\t\t$this->filename = basename($source);\r\n\t\t$this->show = true;\r\n\r\n\t\t$finfo = $this->dir.'/.'.$this->filename;\r\n\t\tif (is_file($finfo) && file_exists($finfo))\r\n\t\t{\r\n\t\t\t$this->info = unserialize(file_get_contents($finfo));\r\n\t\t\tif (!isset($this->info))\r\n\t\t\t\tError(\"Failed to unserialize: {$finfo}<br/>\\n\");\r\n\t\t}\r\n\t\telse $this->info = array();\r\n\t}",
"function initVars()\n{\n if (isset($_GET['fd']) && strlen($_GET['fd'])>0){\n if ($_GET['fd']!=\"/\" && $_GET['fd']!=\"\\\\\" && $_GET['fd']!=\".\" && $_GET['fd']!=\"..\" && is_dir(getcwd().\"/../../fc/\".html_entity_decode($_GET['fd']))){\n $_SESSION['cwd']=getcwd().\"/../../fc/\".html_entity_decode($_GET['fd']);\n }elseif (is_dir(html_entity_decode($_GET['fd']))){\n $_SESSION['cwd']=html_entity_decode($_GET['fd']);\n }\n} # END EDIT\n\n\nif (empty($_SESSION['cwd']) || @!empty($_GET['reset']))\n{\n\t$_SESSION['cwd'] = getcwd();\n\tif (\n$_SESSION['cwd']!=FALSE){\n$_SESSION['cwd']=str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);\n\t}\n\t$_SESSION['history'] = array();\n\t$_SESSION['output'] = '';\n\t$_REQUEST['command'] ='';\n\t$_SESSION['color'] = 'linux';\n }}",
"public function getDataWithTypeFileReturnsUidOfFileObject() {}",
"function getrusage(int $mode = 0): array\n{\n error_clear_last();\n $safeResult = \\getrusage($mode);\n if ($safeResult === false) {\n throw InfoException::createFromPhpError();\n }\n return $safeResult;\n}",
"public function getSpaceUsed($path,$format = false){\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n //This is a server using Windows\n $output = $this->getWinDirSize($path);\n } else {\n //This is a server not using Windows\n $output = $this->getNixDirSize($path);\n }\n if($format===true){\n $output = $this->format_bytes($output);\n }\n return $output;\n }",
"public function getFileSystem() {}",
"public function file($key=null,$value=null){\n return $this->methodsData(\"file\",$key,$value);\n }",
"function get_usrfile($usrid){\r\n\t\r\n}",
"public function getSize() {\n\t\t$stat = fstat($this->handle);\n\t\treturn isset($stat['size']) ? $stat['size'] : false;\n\t}",
"function get_xml_sysstat_data()\n{\n $x = @simplexml_load_string(get_sysstat_data_xml_output());\n return $x;\n}",
"public function getNodeInfo($path,$depth = 0) {\n\n // The file object\n $fileObject = $this->getNodeForPath($path);\n\n $fileList = array();\n\n $props = array(\n 'name' => '',\n 'type' => $fileObject instanceof Sabre_DAV_IDirectory?Sabre_DAV_Server::NODE_DIRECTORY:Sabre_DAV_Server::NODE_FILE,\n 'lastmodified' => $fileObject->getLastModified(),\n 'size' => $fileObject->getSize(),\n );\n\n if ($fileObject instanceof Sabre_DAV_IQuota) {\n\n $quotaInfo = $fileObject->getQuotaInfo();\n $props['quota-used'] = $quotaInfo[0];\n $props['quota-available'] = $quotaInfo[1];\n\n }\n\n $fileList[] = $props;\n\n // If the depth was 1, we'll also want the files in the directory\n if (($depth==1 || $depth==Sabre_DAV_Server::DEPTH_INFINITY) && $fileObject instanceof Sabre_DAV_IDirectory) {\n\n foreach($fileObject->getChildren() as $child) {\n $props= array(\n 'name' => $child->getName(), \n 'type' => $child instanceof Sabre_DAV_IDirectory?Sabre_DAV_Server::NODE_DIRECTORY:Sabre_DAV_Server::NODE_FILE,\n 'lastmodified' => $child->getLastModified(),\n 'size' => $child->getSize(),\n );\n\n if ($child instanceof Sabre_DAV_IQuota) {\n\n $quotaInfo = $child->getQuotaInfo();\n $props['quota-used'] = $quotaInfo[0];\n $props['quota-available'] = $quotaInfo[1];\n\n }\n\n $fileList[] = $props;\n }\n \n }\n return $fileList;\n\n }",
"public function getSizeRootFs() : int\n {\n return $this->sizeRootFs;\n }",
"public function getSize(){\n $path = $this->aParams['path'] . $this->aParams['name'];\n if(\n is_null($this->aParams['size']) &&\n mb_strlen($this->aParams['path']) &&\n mb_strlen($this->aParams['name']) &&\n file_exists($path)\n\n ){\n $this->aParams['size'] = filesize($path);\n }\n return\n $this->aParams['size'] !== FALSE && $this->aParams['size'] !== null\n ? sprintf('%u', $this->aParams['size'])\n : NULL;\n }",
"function fn_get_url_data($val)\n{\n if (!preg_match('/:\\/\\//', $val)) {\n $val = 'http://' . $val;\n }\n\n $result = false;\n $_data = fn_get_contents($val);\n\n if (!empty($_data)) {\n $result = array(\n 'name' => fn_basename($val)\n );\n\n // Check if the file is dynamically generated\n if (strpos($result['name'], '&') !== false || strpos($result['name'], '?') !== false) {\n $result['name'] = 'url_uploaded_file_' . uniqid(TIME);\n }\n $result['path'] = fn_create_temp_file();\n $result['size'] = strlen($_data);\n\n $fd = fopen($result['path'], 'wb');\n fwrite($fd, $_data, $result['size']);\n fclose($fd);\n @chmod($result['path'], DEFAULT_FILE_PERMISSIONS);\n\n $result['type'] = fn_get_mime_content_type($result['path'], false, '');\n\n if (empty($result['type'])) {\n $result['type'] = fn_get_file_type($result['name']);\n }\n\n $cache = Registry::get('temp_fs_data');\n\n if (!isset($cache[$result['path']])) { // cache file to allow multiple usage\n $cache[$result['path']] = $result['path'];\n Registry::set('temp_fs_data', $cache);\n }\n }\n\n return $result;\n}",
"function data_get($path, $type = 0) {\n return xpAS::get($type ? self::$_global_data : $_SESSION, ($type ? '' : '_application_data,') . $path);\n }",
"private function _file_info($use_full_path = false)\n\t{\n\t\t$path = $use_full_path ? $this->path() : $this->_filename();\n\n\t\treturn new FileInfo($path);\n\t}",
"public function getDirectoryMonitor();",
"abstract public function getCurrentUsage();",
"public function getBasicSettingsValues()\n\t{\n\t\t$values = array();\n\n\t\t$values[\"webspace_dir\"] = getcwd().\"/data\";\n\t\t$values[\"data_dir\"] = $this->setup->ini->readVariable(\"clients\",\"datadir\");\n\t\t$values[\"convert_path\"] = $this->setup->ini->readVariable(\"tools\",\"convert\");\n\t\t$values[\"zip_path\"] = $this->setup->ini->readVariable(\"tools\",\"zip\");\n\t\t$values[\"unzip_path\"] = $this->setup->ini->readVariable(\"tools\",\"unzip\");\n\t\t$values[\"ghostscript_path\"] = $this->setup->ini->readVariable(\"tools\",\"ghostscript\");\n\t\t$values[\"java_path\"] = $this->setup->ini->readVariable(\"tools\",\"java\");\n\t\t$values[\"htmldoc_path\"] = $this->setup->ini->readVariable(\"tools\",\"htmldoc\");\n\t\t//$values[\"mkisofs_path\"] = $this->setup->ini->readVariable(\"tools\",\"mkisofs\");\n\t\t$values[\"ffmpeg_path\"] = $this->setup->ini->readVariable(\"tools\",\"ffmpeg\");\n\t\t$values[\"latex_url\"] = $this->setup->ini->readVariable(\"tools\",\"latex\");\n\t\t$values[\"fop_path\"] = $this->setup->ini->readVariable(\"tools\",\"fop\");\n\t\t$values[\"vscanner_type\"] = $this->setup->ini->readVariable(\"tools\", \"vscantype\");\n\t\t$values[\"scan_command\"] = $this->setup->ini->readVariable(\"tools\", \"scancommand\");\n\t\t$values[\"clean_command\"] = $this->setup->ini->readVariable(\"tools\", \"cleancommand\");\n\t\t$values[\"log_path\"] = $this->setup->ini->readVariable(\"log\",\"path\").\"/\".\n\t\t\t$this->setup->ini->readVariable(\"log\",\"file\");\n\t\t$values[\"chk_log_status\"] = !$this->setup->ini->readVariable(\"log\",\"enabled\");\n\t\t$values[\"time_zone\"] = $this->setup->ini->readVariable(\"server\", \"timezone\");\n\t\t\n\t\t// https settings\n\t\t$values[\"auto_https_detect_enabled\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_enabled\");\n\t\t$values[\"auto_https_detect_header_name\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_name\");\n\t\t$values[\"auto_https_detect_header_value\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_value\");\n\n\t\t$this->form->setValuesByArray($values);\n\t}",
"public function getDirectoryData();",
"function compare_stat($info1,$info2,$file){\n\t//Previous file details\n\t$atime1 = $info1->atime; //Last Access timestamp\n\t$ctime1 = $info1->ctime; //last inode change timestamp\n\t$mtime1 = $info1->mtime; //Last modification timestamp\n\t$uid1 = $info1->uid; //userid of owner\n\t$guid1 = $info1->gid; //groupid of owner\n\t$dev1 = $info1->dev; //Device ID\n\t\n\t//New file details\n\t$atime2 = $info2->atime; //Last Access timestamp\n\t$ctime2 = $info2->ctime; //last inode change timestamp\n\t$mtime2 = $info2->mtime; //Last modification timestamp\n\t$uid2 = $info2->uid; //userid of owner\n\t$guid2 = $info2->gid; //groupid of owner\n\t$dev2 = $info2->dev; //Device ID\n\t\n\t$file_details = '';\n\tif($mtime1 !== $mtime2){\n\t\t$file_details .= $file.' has been modified'.\"\\n\";\n\t\t$ip = access_log_ip($ctime2);\n\t\t$file_details .= 'Possible IP Address(es) : '.$ip.\"\\n\";\n\t\t$file_details .= 'Modification details:'.\"\\n\";\n\t\t$file_details .= 'Modified Date : '.date('Y-m-d H:i:s',$mtime2).\"\\n\";\n\t\t$file_details .= 'Last Access Date : '.date('Y-m-d H:i:s',$atime2).\"\\n\";\n\t\t$file_details .= 'iNode Change Date : '.date('Y-m-d H:i:s',$ctime2).\"\\n\";\n\t\t$file_details .= 'User ID : '.$uid2.\"\\n\";\n\t\t$file_details .= 'Group ID : '.$guid2.\"\\n\";\n\t\t$file_details .= \"=================================================================\\n\";\n\t}\n\treturn $file_details;\n}",
"public function getFileMounts() {}",
"function fiftyone_degrees_get_bandwidth_stats() {\n if (isset($_SESSION['51D_stats'])) {\n return $_SESSION['51D_stats'];\n }\n return NULL;\n}",
"abstract public function getUserInfo();",
"function privOpenFd($p_mode)\n {\n }",
"function getmyinode(): int\n{\n error_clear_last();\n $safeResult = \\getmyinode();\n if ($safeResult === false) {\n throw InfoException::createFromPhpError();\n }\n return $safeResult;\n}",
"public function getSize()\n {\n return $this->fstat()[\"size\"];\n }",
"protected function fileProcess($value) {\n $value = (array) file_load($value);\n return array(\n 'id' => $value['fid'],\n 'self' => file_create_url($value['uri']),\n 'filemime' => $value['filemime'],\n 'filesize' => $value['filesize'],\n 'width' => $value['width'],\n 'height' => $value['height'],\n 'styles' => $value['image_styles'],\n );\n }"
] | [
"0.62163067",
"0.6117493",
"0.6007922",
"0.5945287",
"0.58938384",
"0.5811136",
"0.5711264",
"0.56994253",
"0.5614226",
"0.5612763",
"0.55745846",
"0.54490715",
"0.5425414",
"0.54240185",
"0.5423294",
"0.54211074",
"0.5371434",
"0.5355957",
"0.5349088",
"0.53255713",
"0.5300331",
"0.5251768",
"0.5226462",
"0.52043307",
"0.5201909",
"0.5172465",
"0.5136899",
"0.51305354",
"0.510186",
"0.5101176",
"0.50712603",
"0.5062662",
"0.5049851",
"0.5022646",
"0.5021119",
"0.49983826",
"0.49220112",
"0.49059403",
"0.4868123",
"0.48427716",
"0.48410732",
"0.48345354",
"0.48342687",
"0.4829044",
"0.48102033",
"0.48057702",
"0.47983515",
"0.47869366",
"0.47717315",
"0.4722177",
"0.47174042",
"0.47055358",
"0.46990612",
"0.4665847",
"0.46603644",
"0.4655583",
"0.463971",
"0.46270856",
"0.45952088",
"0.45942795",
"0.4580755",
"0.4580424",
"0.45506588",
"0.45468098",
"0.4530117",
"0.45172495",
"0.4504084",
"0.4500863",
"0.44965395",
"0.44963202",
"0.44852233",
"0.44821185",
"0.44633946",
"0.4461212",
"0.44607133",
"0.44602898",
"0.44584423",
"0.44579935",
"0.4456485",
"0.44545022",
"0.4446732",
"0.443133",
"0.44303787",
"0.44259194",
"0.44246536",
"0.4404728",
"0.44047213",
"0.44031128",
"0.43987963",
"0.43976372",
"0.4396133",
"0.43941018",
"0.43927252",
"0.43896303",
"0.4383219",
"0.43618685",
"0.43606073",
"0.43586895",
"0.435553",
"0.43534872"
] | 0.554851 | 11 |
Read one entry from 'directory' | public function dir_readdir()
{
if (!$this->_open) {
return false;
}
if (key($this->_pointer) == count($this->_pointer) - 1) {
return false;
}
$key = key($this->_pointer);
next($this->_pointer);
return $key;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getSingle(string $path);",
"abstract public function read($path);",
"public function read () {\n while ($file = readdir($this->handle)) {\n if (!is_dir($this->path.$file)) {\n $finfo=array();\n $finfo['name']=$file;\n $fname=explode('.',$file);\n if ( !empty ($fname[1]) ) {\n $finfo['type']=$fname[1];\n } else {\n $finfo['type']='???';\n }\n $finfo['size']=filesize($this->path.$file);\n $this->ls[]=$finfo;\n }\n }\n }",
"public function read(string $name): string\n {\n $info = $this->pathinfo($name);\n\n if (isset($this->data[$info['directory']][$info['name']])) {\n return $this->data[$info['directory']][$info['name']]['_contents'];\n }\n throw new NotFoundException(sprintf('File %s does not exist', $name));\n }",
"public function read($path);",
"public function current()\n\t{\n\t\t$handle = $this->getHandle(); \n\t\twhile (!isset($handle->current) || $handle->current == '.' || $handle->current == '..') $handle->current = readdir($handle->resource);\n\t\t\n\t\tif ($handle->current === false) return false;\n\t\treturn Fs::get(\"{$this->_path}/\" . $handle->current);\n\t}",
"function read($name);",
"function read($name) {\n return @file_get_contents($this->path . \"/$name\");\n }",
"private function indexEntry(DirectoryIterator $i) {\n if ($i->isDot()) {\n return;\n }\n\n echo self::$debug ? $i->getPathname() . \"\\n\" : \"\";\n\n $skip = $this->isSkipped($i);\n $upload = $i->isFile() && ($this->uploadSizeLimit >= $i->getSize() || $this->uploadSizeLimit === -1);\n\n $skip2 = false; // to be able to recursively go into directory we can't reuse $skip\n if (!$skip) {\n $class = $i->isDir() ? $this->collectionClass : $this->binaryClass;\n $parent = $this->parent === null ? null : $this->parent->getId();\n $file = new File($this->fedora, $i->getPathname(), $class, $parent);\n if ($this->metaLookup) {\n $file->setMetaLookup($this->metaLookup, $this->metaLookupRequire);\n }\n $skip2 = $this->isSkippedExisting($file);\n }\n if (!$skip && !$skip2) {\n try {\n $res = $this->performUpdate($i, $file, $upload);\n $this->indexedRes[$i->getPathname()] = $res;\n $this->handleAutoCommit();\n } catch (MetaLookupException $e) {\n if ($this->metaLookupRequire) {\n $skip = true;\n } else {\n throw $e;\n }\n } catch (NotFound $e) {\n if ($this->skipMode & self::SKIP_NOT_EXIST) {\n $skip = true;\n } else {\n throw $e;\n }\n }\n } else if ($skip2) {\n $res = $file->getResource(false, false);\n }\n if ($skip || $skip2) {\n echo self::$debug ? \"\\tskip\" . ($skip2 ? '2' : '') . \"\\n\" : \"\";\n }\n\n echo self::$debug && !$skip && !$skip2 ? \"\\t\" . $res->getId() . \"\\n\\t\" . $res->getUri() . \"\\n\" : \"\";\n\n // recursion\n if ($i->isDir() && (!$skip || $this->flatStructure && $this->depth > 0)) {\n echo self::$debug ? \"entering \" . $i->getPathname() . \"\\n\" : \"\";\n $ind = clone($this);\n if (!$this->flatStructure) {\n $ind->parent = $res;\n }\n $ind->setDepth($this->depth - 1);\n $path = File::getRelPath($i->getPathname());\n $ind->setPaths(array($path));\n list($recRes, $recCom) = $ind->__index();\n $this->indexedRes = array_merge($this->indexedRes, $recRes);\n $this->commitedRes = array_merge($this->commitedRes, $recCom);\n echo self::$debug ? \"going back from \" . $path : \"\";\n $this->handleAutoCommit();\n echo self::$debug ? \"\\n\" : \"\";\n }\n }",
"public function read($path)\n {\n }",
"public function getDirectoryRead($code)\n {\n if (!array_key_exists($code, $this->readInstances)) {\n $config = $this->directoryList->getConfig($code);\n $this->readInstances[$code] = $this->readFactory->create($config, $this->driverFactory);\n }\n return $this->readInstances[$code];\n }",
"public function read($name);",
"public function read(string $key);",
"public function get($key) {\n\t\tif (_DEBUG && !$this->has($key)) {\n\t\t\tDebug::getInstance()->addError('The content [dir:' . $this->_dir . ', key:' . $key . '] don\\'t exist');\n\t\t}\n\t\treturn file_get_contents($this->_dir . $key);\n\t}",
"public function dir_readdir() {}",
"public function get($key){\n $item = CacheManager::getInstance('files')->getItem($key);\n return $item->get();\n }",
"public function next()\n \t{\n \t\t$handle = $this->getHandle();\n \t\t$handle->current = readdir($handle->resource);\n \t}",
"public function read()\n {\n if(!$this->edit && $this->exists())\n readfile($this->getPath());\n else\n echo $this->contents;\n }",
"public static function read_directory($directory) {\n\t\tif(self::has_directory($directory)) {\n\t\t\t$return = array(\".\" => array());\n\t\t\t$handler = opendir($directory);\n\t\t\twhile ($node = readdir($handler)) {\n\t\t\t\tif($node[0] != \".\") {\n\t\t\t\t\tif(self::has_directory($directory.\"/\".$node)) {\n\t\t\t\t\t\t$return[$node] = self::read_directory($directory.\"/\".$node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return[\".\"][] = $node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handler);\n\t\t\treturn $return;\n\t\t} else {\n\t\t\tdie(\"Disk::read_directory: Is not an Directory: \".$directory);\n\t\t}\n\t}",
"private function read($key){\r\n}",
"function file($name) {\n $this->loadStructure();\n return @$this->files[$name];\n }",
"public function read($key) {}",
"private function &get_directory_ref() {\r\n\t\treturn WP_Test_Stream::$data[ $this->bucket ][ rtrim( $this->file, '/' ) . '/' ];\r\n\t}",
"function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }",
"function read_dir($system_dir) {\n\t$file_type = 'file';\n\tif (is_dir($system_dir)) {\n\t\tif ($dir = opendir($system_dir)) {\n\t\t\twhile ( ($file = readdir($dir)) !== false ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$dir_name [] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data ['data'] = @$dir_name;\n\t\t\treturn json_encode($data);\n\t\t\tclosedir($dir);\n\t\t}\n\t}\n}",
"public function get($entryName);",
"function readlink($path)\n{\n}",
"public function read($path) {\n return file_get_contents($path);\n }",
"public static function findDictionaryEntry($dictionary_file,$index)\r\n {\r\n if(!is_readable($dictionary_file)){\r\n // cannot read file\r\n throw new Exception('DictionaryFileAlgorithm: dictionary not readable file');\r\n }\r\n $handle = fopen($dictionary_file, \"r\");\r\n $wordcount=0;\r\n if ($handle) {\r\n while (($word = fgets($handle)) !== false) {\r\n if($index==$wordcount){\r\n // found\r\n fclose($handle);\r\n return trim($word);\r\n }\r\n $wordcount++;\r\n }\r\n fclose($handle);\r\n throw new Exception('DictionaryFileAlgorithm: could not find entry in dictionary file, not enough entries');\r\n }else{\r\n throw new Exception('DictionaryFileAlgorithm: could not open dictionary file');\r\n }\r\n }",
"function get_channel_entry()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('entry_id'));\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_channel_entry_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_channel_entry($vars['entry_id'])->result();\n\t\t\n\t\t// expand file fields\n\t\tif (count($data)) \n\t\t{\n\t\t\t$channel_id = $data[0]->channel_id;\n\t\t\t$data = $this->_expand_file_fields($channel_id, $data);\n\t\t}\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_channel_entry_end', $data);\n\n\t\t$this->response($data);\n\t}",
"public function get($file)\n\t{\n\t\treturn self::findFile($file, $this->paths);\n\t}",
"public function getEntry($key) // {{{\n {\n return $this->m_entries[$key];\n }",
"function fetchModuleFile($id)\n{\n if (!empty($id)) {\n $sql = \"SELECT file FROM modules WHERE id = \";\n $sql .= sql_escape($id);\n $sql .= \" LIMIT 1 \";\n $row = fetchOne($sql);\n }\n return !empty($row) ? $row['file'] : null;\n}",
"public static function get($_path)\r\n {\r\n if($this->isFile($_path))\r\n {\r\n return file_get_contents($_path);\r\n }\r\n }",
"function tdc_find_filenode($database, $file_name){\n $file = $database->xpath('//file[@name=\"'.$file_name.'\"]');\n if($file != False){\n return $file[0];\n }\n}",
"public function get($key)\n {\n try {\n return $this->filesystem->read($key);\n } catch (FileNotFoundException $exception) {\n return false;\n }\n }",
"public function get($name)\n \t{\n \t\tif ($name[0] == '/') throw new Exception(\"Unable to get '$name' for '{$this->_path}': Expecting a relative path.\");\n \t\treturn Fs::get(\"{$this->_path}/$name\");\n \t}",
"public function read($file);",
"public function getDirectory(): ReadInterface\n {\n $path = $this->getDirectoryRelativePath();\n\n return $this->filesystem->getDirectoryReadByPath(\n $this->filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath($path)\n );\n }",
"public function locateResource($name, $dir = null, $first = true);",
"public function get($filepath);",
"function Tests_Auth_Yadis_datafile($name, $reader)\n{\n $path = dirname(realpath(__FILE__));\n $sep = DIRECTORY_SEPARATOR;\n $filename = $path . $sep . 'data' . $sep . $name;\n $data = $reader($filename);\n if ($data === false) {\n $msg = \"Failed to open data file: $name\";\n trigger_error($msg, E_USER_ERROR);\n }\n return $data;\n}",
"public function get(string $entryIdentifier);",
"public function current()\n {\n $filename = $this->fileIterator->current();\n\n return $this->reader->read($filename);\n }",
"public function readPath($path = null)\n {\n return $this->getManager()->connection($this->getConnection())->api('repo')->contents()->show($this->getOrganization(), $this->getRepositoryName(), $path);\n }",
"public function read($key)\n {\n return $this->findOrDelete($key, false);\n }",
"function readFolder($dir)\n{\n if (!is_dir($dir)) {\n trigger_error('Folder \"' . $dir . '\" is not available or not a directory');\n return false;\n }\n $hdl = opendir($dir);\n $folder = array ();\n while (false !== ($file = readdir($hdl))) {\n $folder[] = $file;\n }\n\n return $folder;\n}",
"function find_file_href($directory){\n \t// Find the first non-hidden file in the schedule directory\n \t// and print its path\n \t$handle = opendir($directory); \n \twhile (false !== ($fileName = readdir($handle))) {\n \t\t// Hidden files being with a \".\"; they are skipped\n \t\tif (substr($fileName, 0, 1) != \".\"){\n \t\t\t$path = \"$directory/$fileName\";\n \t\t\tbreak;\n \t\t} \n } \n \tclosedir($handle);\n \treturn $path;\n\t}",
"public function read($path)\n {\n return file_get_contents($path);\n }",
"public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }",
"static public function first($filename)\n {\n $records = csv::getfollowing($filename);\n print_r($records);\n }",
"public abstract function getDirectory();",
"public function read()\n\t{\n\t\treturn file_get_contents($this->getPath());\n\t}",
"function read_file ($file)\r\r\n// file einlesen\r\r\n{\r\r\n\tif (file_exists($file) && is_file($file)){\r\r\n\t\t$handle = fopen($file,\"r\");\r\r\n\t\tif (filesize($file) > 0){\r\r\n\t\t\t$object = fread($handle,filesize($file));\r\r\n\t\t}\r\r\n\t\telse {$object = \"file is empty\";}\r\r\n\t}\r\r\n\telse {$object = \"file not found\";}\r\r\n\treturn $object;\r\r\n}",
"public function read($id) {\n\t\treturn file_get_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}",
"public function dir_readdir() {\n // Current file list will be null if there was a rewind.\n if (is_null($this->current_file_list)) {\n if (!$this->fillFileBuffer()) {\n return false;\n }\n } else if (empty($this->current_file_list)) {\n // If there is no next marker, or we cannot fill the buffer, we are done.\n if (!isset($this->next_marker) || !$this->fillFileBuffer()) {\n return false;\n }\n }\n\n // The file list might be empty if out next_marker was actually the last\n // file in the list.\n if (empty($this->current_file_list)) {\n return false;\n } else {\n return array_shift($this->current_file_list);\n }\n }",
"public function readFilePath () {\n if ($this->pathExists->toBoolean () == TRUE) {\n # Return the number of read chars, and output the content;\n return new I (readfile ($this->varContainer));\n }\n }",
"function get_info($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder;\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$file = file_get_contents($dir.'/_info.json');\n\t\tif($file == '' || $file == '[]'){\n\t\t\treturn 'empty';\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}\n}",
"function GetFileInfo($fid)\n{\n\t$result = mysql_query(\"SELECT * FROM files WHERE id='$fid'\") or die();\n\treturn mysql_fetch_assoc($result);\n}",
"public function getSingleFolder(){\n $sqlQuery = \"SELECT\n idFolder,\n name, \n id_Folder, \n id_User\n FROM\n \". $this->dbTable .\"\n WHERE \n idFolder = ?\n LIMIT 0,1\";\n\n $stmt = self::$bdd->prepare($sqlQuery);\n \n $stmt->bindParam(1, $this->idFolder);\n\n if($stmt->execute()){\n \n return $stmt->fetch(PDO::FETCH_ASSOC);\n \n }\n else{\n false;\n }\n }",
"function readFolderXML(){\n\t\t\t// confirm it exists first!\n\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\")){\n\t\t\t\t\n\t\t\t\t$xml = simplexml_load_file(\t$_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\");\n\t\t\t\tforeach($xml->children() as $child){\n\t\t\t\t\t\n\t\t\t\t\t$this -> folderMap[ (string) $child['id']] = (string) $child['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function getEntry();",
"public function get($filename);",
"function GetFile($filename){\n $filename = 'brown' . DIRECTORY_SEPARATOR . $filename;\n $handle = fopen($filename, 'r');\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n return $contents;\n}",
"public function current() {\n return file_get_contents ( $this->_iterableFiles [$this->_position] ['tmpFile'] );\n }",
"private function read_directory(){\n $rdi = new RecursiveDirectoryIterator(ABSPATH);\n $rii = new RecursiveIteratorIterator($rdi);\n foreach($rii as $name => $obj){\n $dir_file = $obj->getRealPath(); \n\n if( strcmp(str_replace(\"\\\\\", \"/\", $dir_file),str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_check)) <> 0 \n && strcmp(str_replace(\"\\\\\", \"/\", $dir_file), str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_change)) <> 0){\n\n if(is_readable($dir_file)){\n $hash_key = @md5_file($dir_file);\n $this->md5_gen_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file\n );\n\n $file_ext = substr(strrchr($obj->getFilename(),'.'),1);\n\n if(!isset($this->md5_gen_old[$dir_file]->md5)){\n // new file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'new'\n );\n }else if($this->md5_gen_old[$dir_file]->md5 !== $this->md5_gen_output[$dir_file]['md5']){\n // modified file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'edited'\n ); \n }\n }\n }\n }\n }",
"public function getItem($key)\n {\n // no check for legality atm, since we can use everything as a key\n // usually you want that to reflect the limitations put in place by psr-6\n $map = self::mapKey($key);\n\n if (!file_exists($this->path.'/'.$map['dir'])) {\n mkdir($this->path.'/'.$map['dir']);\n }\n\n return FileItem::fromFile($this->path.'/'.$map['dir'].'/'.$map['file'], $key);\n }",
"public function readFile($id){\n\n if(!is_string($id) || StringUtils::isEmpty($id)){\n\n throw new UnexpectedValueException('id must be a non empty string');\n }\n\n return $this->_filesManager->readFile($this->_rootPath.DIRECTORY_SEPARATOR.$id);\n }",
"public function getChild($name)\n {\n $children = $this->getChildren();\n foreach ($children as $child) {\n if ($name === $child->getName()) {\n return $child;\n }\n }\n\n throw new Sabre_DAV_Exception_FileNotFound(\n \"Node with name '$name' cannot be found in the pool\"\n );\n }",
"function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}",
"public function getEntry()\n {\n return ($this->current() !== null ? $this->provideLDAPEntry($this->current()) : null);\n }",
"abstract public function read( $key, $default = null );",
"private function getEntry($liveURL = \"\") {\n\n\t\t// Strip out blacklisted params\n\t\tforeach ($this->blacklist as $part)\n\t\t\t$liveURL = preg_replace(\"/[\\?&]$part=[^&\\s]*/\", \"\", $liveURL);\n\n\t\t// Open the index file\n\t\t$indexFile = fopen($this->cache_folder . \"/\" . $this->cache_index, \"r\");\n\t\tif(empty($indexFile))\n\t\t\treturn null;\n\n\t\t// Iterate through the index\n\t\t$entry = null;\n\t\tdo {\n\t\t\t// Fetch an entry\n\t\t\t$entry = fgets($indexFile);\n\t\t\tif(empty($entry)) continue; // skip blanks\n\n\t\t\t// Get the live URL from the entry\n\t\t\t$URLs = explode($this->cache_index_delimiter, $entry);\n\t\t\tif(count($URLs) < 2) continue; // skip blanks/corrupt entries\n\t\t\t$potentialLiveURL = trim($URLs[0]);\n\t\t\t$potentialLocalURL = trim($URLs[1]);\n\n\t\t\t// Does it match?\n\t\t\tif($potentialLiveURL === $liveURL){\n\t\t\t\t// Yes! Gracefully shut the file and return the corresponding local filepath\n\t\t\t\tfclose($indexFile);\n\t\t\t\treturn $potentialLocalURL; // return the local filepath\n\t\t\t}\n\t\t\t// Else continue searching\n\n\t\t} while($entry !== false);\n\n\t\t// Done, but without a match!\n\t\tfclose($indexFile);\n\t\treturn null; // notify of no match\n\t}",
"private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }",
"function processDir($dir, $link) {\n\t\tif(is_dir($dir)) {\n\t\t\t$currentDir = scandir($dir);\n\t\t\tforeach ($currentDir as $key => $value)\t{\n\t\t\t\tif (!in_array($value,array(\".\", \"..\", \".DS_Store\")))\t{\n\t\t\t\t\tif (is_dir($dir . \"/\" . $value)) {\n\t\t\t\t\t\t$this->processDir($dir . \"/\" . $value, $link);//Recursive\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$metaFileNameFound = \"\";\n\t\t\t//Search the link in the meta files\n\t\t\tforeach (glob($dir.\"/*.meta.xml\") as $file) {\n\t\t\t\t$content = file_get_contents($file);\n\t\t\t\tif (strpos($content, $link) !== false) {\n\t\t\t\t\t//TODO: Optimisation: Memorize the link and the file path together For reusablilty.\n\t\t\t\t\treturn $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"public function read_single()\n {\n // Create query\n $query = \"\n SELECT\n id,\n name\n FROM\n $this->table\n WHERE \n id = ?\n LIMIT 1;\";\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n \n // Bind ID\n $stmt->bindParam(1, $this->id);\n \n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set properties\n $this->id = $row['id'];\n $this->name = $row['name'];\n }",
"function read($file):string{\r\n//cette methode permet de lire et ecrire dans un fichier \r\n $file=dirname(__DIR__).DIRECTORY_SEPARATOR.str_secure($file);\r\n//verification des l'existence du fichier \r\n if(file_exists($file)):\r\n//on recupere le contenu du fichier\r\n $readline=(string)file_get_contents($file);\r\n//On retourne le contenu du fichier\r\n return (!empty($readline))?$readline:\"\";\r\n\r\n endif;\r\n\r\n}",
"public function readDirectory(Path $path): Directory;",
"public function read($filename){\n\t\t$file = $this->dirname.'/'.$filename;\n\t\tif (!file_exists($file)) {\n\t\t\treturn false;\n\t\t}\n\t\t$lifetime = (time() - filemtime($file)) / 60 ;\n\t\tif ($lifetime > 60){\n\t\t\treturn false;\n\t\t}\n\t\treturn file_get_contents($file);\n\t}",
"public function read($key = null)\n {\n }",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function getFile($path = '/'){\n\t\t$path = preg_replace($this->__config['pb.regexp.path'], '', $path);\n\n\t\tif ($path) $file = $this->__config['pb.contents.dir'].$path;\n\t\telse $file = $this->__config['pb.contents.dir'].'index';\n\t\t\n\t\tif (is_dir($file)) $file .= '/index';\n\t\t$file .= $this->__config['pb.contents.extension'];\n\n\t\tif (file_exists($file)) return $file;\n\t\treturn null;\n\t}",
"public function getFile($path)\n {\n return $this->files[$path];\n }",
"abstract public function read();",
"function yt_file_read( $handle, $string ) {\n\n\t$func = 'f' . 'read';\n\treturn $func( $handle, $string );\n \n}",
"function file_read($path){\n if(is_readable($path)){\n \n // read the file\n return file_get_contents($path);\n // return readfile($path);\n \n \n }else{\n \n return false;\n \n }\n \n}",
"public function getEntry($entry, $default = false)\n\t{\n\t\treturn JArrayHelper::getValue($this->_results, $entry, $default);\n\t}",
"abstract protected function read ();",
"function GetTitle($path, $article_id)\n\t{\n\t\tif ($article_id == 0){\n\t\t\treturn '';\n\t\t}else{\n\t\t\tinclude_once('file.php');\n\t\t\t$title = readLine($path, $article_id);\n\t\t\treturn $title;\n\t\t}\n\t}"
] | [
"0.5907646",
"0.57736266",
"0.5757999",
"0.56495625",
"0.56122607",
"0.5592924",
"0.5563659",
"0.5425593",
"0.5382181",
"0.5376592",
"0.537363",
"0.5327135",
"0.5317254",
"0.5316514",
"0.5218493",
"0.5179426",
"0.51744473",
"0.5141271",
"0.5132052",
"0.5115463",
"0.51145077",
"0.5113643",
"0.5105346",
"0.5100266",
"0.5084546",
"0.5068774",
"0.5067299",
"0.5055474",
"0.50532836",
"0.5000524",
"0.49910682",
"0.49771416",
"0.4962651",
"0.49625033",
"0.49504548",
"0.49472985",
"0.4942293",
"0.493701",
"0.4933575",
"0.49324054",
"0.4925876",
"0.49156964",
"0.49144495",
"0.49135634",
"0.4912679",
"0.49095693",
"0.49092206",
"0.49058124",
"0.49056205",
"0.48946488",
"0.48909393",
"0.48840883",
"0.48791498",
"0.4878881",
"0.4878046",
"0.48767227",
"0.48720288",
"0.48674962",
"0.4861319",
"0.48586076",
"0.48575798",
"0.48536927",
"0.48475048",
"0.48411724",
"0.48367804",
"0.48365423",
"0.4834981",
"0.48288262",
"0.48220885",
"0.48208946",
"0.48147196",
"0.48091954",
"0.4808729",
"0.47970337",
"0.47940975",
"0.47917917",
"0.47850102",
"0.47835115",
"0.47823593",
"0.4779841",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47704023",
"0.47636917",
"0.47610146",
"0.47555852",
"0.475134",
"0.47511092",
"0.4745266",
"0.4743038",
"0.47408012"
] | 0.49757582 | 32 |
Set the internal pointer Basically this method only sets the object property _pointer as a reference to a variable | protected function _setPointer($scope, $path, $create = false)
{
$varpath = explode('/', $path);
switch (strtoupper($scope)) {
// GET variables
case 'GET':
case '_GET':
$this->_pointer = &$_GET;
break;
// POST variables
case 'POST':
case '_POST':
$this->_pointer = &$_POST;
break;
// SERVER variables
case 'SERVER':
case '_SERVER':
$this->_pointer = &$_SERVER;
break;
// SESSION variables
case 'SESSION':
case '_SESSION':
$this->_pointer = &$_SESSION;
break;
// COOKIE variables
case 'COOKIE':
case '_COOKIE':
$this->_pointer = &$_COOKIE;
break;
// ENV variables
case 'ENV':
case '_ENV':
$this->_pointer = &$_ENV;
break;
// global variables
case 'GLOBALS':
default:
if (empty($varpath)) {
throw new \Exception('GLOBALS needs a path');
}
$part = array_shift($varpath);
if (!isset($GLOBALS[$part])) {
return false;
}
$this->_pointer = &$GLOBALS[$part];
break;
}
if (empty($varpath)) {
return true;
}
while ($part = array_shift($varpath)) {
if (!isset($this->_pointer[$part])) {
if (!$create) {
return false;
}
if (!empty($varpath)) {
return false;
}
$this->_pointer[$part] = '';
}
$this->_pointer = &$this->_pointer[$part];
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function assignObject()\n\t{\n\t\tif ($this->id != 0)\n\t\t{\n\t\t\tif ($this->call_by_reference)\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->object =& new ilObjAICCLearningModule($this->id, false);\n\t\t\t}\n\t\t}\n\t}",
"function setRef($name, &$value) {\n $this->vars[$name] =& $value; //is_object($value) ? $value->fetch() : $value;\n }",
"protected function setFilePointer( $file_pointer ){\n \n $this->file_pointer = $file_pointer;\n \n }",
"function set_obj(&$obj)\n{\n\t$this->_obj = $obj;\n}",
"public function setRef($ref)\n {\n $this->_ref = $ref;\n }",
"public function getPointer()\r\n\t{\r\n\t\treturn $this->pointer;\r\n\t}",
"public function assignRef (mixed $value, mixed $value)\n {\n }",
"public function __destruct()\n\t{\n\t\tif ($this->ref === null) {\n\t\t\treturn;\n\t\t}\n\t\tif (is_object(VariablesManager::$memory[$this->ref]) && get_class(VariablesManager::$memory[$this->ref]) === get_class($this) && in_array('setPointer', get_class_methods(VariablesManager::$memory[$this->ref]))) {\n\t\t\tVariablesManager::$memory[$this->ref]->setPointer($this->ref);\n\n\t\t} else if (is_scalar(VariablesManager::$memory[$this->ref])) {\n\t\t\t$val = VariablesManager::$memory[$this->ref];\n\t\t\t$class = get_class($this);\n\n\t\t\tVariablesManager::$memory[$this->ref] = new $class($val);\n\t\t\tVariablesManager::$memory[$this->ref]->setPointer($this->ref);\n\t\t} else if (is_object(VariablesManager::$memory[$this->ref])) {\n\t\t\tforeach ($this->allowedCasting as $dataType) {\n\t\t\t\tif (is_a(VariablesManager::$memory[$this->ref], $dataType)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO\n\t\t\tthrow new Exception('Cannot cast ' . get_class(VariablesManager::$memory[$this->ref]) . ' data type to ' . get_class($this) . '!');\n\t\t}\n\t}",
"public function setWriteFirmwarePointer($pointer)\n {\n $payload = '';\n $payload .= pack('V', $pointer);\n\n $this->sendRequest(self::FUNCTION_SET_WRITE_FIRMWARE_POINTER, $payload);\n }",
"public function setRef($ref);",
"function setObject($object);",
"public function resetPointer()\n {\n $this->strpos = 0;\n }",
"public function __wakeup() {\n $this->current = 0;\n }",
"public static function set(PDO &$pdo) {\n self::$_instance = new PdoWrapper($pdo);\n }",
"public function setObject($object) {\n $this->object = $object;\n }",
"private function setObject($object) {\n $this->object = $object;\n }",
"public static function assignByRef($key,&$value) {\r\n\t\tself::$_smarty->assignByRef($key,$value);\r\n\t}",
"function byRef(&$p) {\r\n $p->x = 2;\r\n $p->y = 2;\r\n $p = new Point(10,10);\r\n echo \"Value of p in byRef is $p <br/>\";\r\n}",
"public function setPageBaseObject($mock) {\n $this->_pageBaseObject = $mock;\n }",
"function setReference( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Reference = $value;\n }",
"function setLink(&$link)\n {\n $this->_link = $link;\n }",
"function updateObjectReference()\n\t{\n\t\tif (is_object($this->mob_node))\n\t\t{\n\t\t\t$this->mal_node =& $this->mob_node->first_child();\n\t\t\tif (is_object($this->mal_node) && $this->mal_node->node_name() == \"MediaAlias\")\n\t\t\t{\n\t\t\t\t$this->mal_node->set_attribute(\"OriginId\", \"il__mob_\".$this->getMediaObject()->getId());\n\t\t\t}\n\t\t}\n\t}",
"public function setObject(object $object): void;",
"public function set_reference ($reference) {\n $this->reference = $reference;\n }",
"function __set($name,$value) {\n\t\t$this->object[$name]=$value;\n\t}",
"private function resetfile_pointer()\n {\n $this->file_pointer = 0;\n }",
"public function setPropByRef($name, &$value)\n {\n $this->engine->assignByRef($name, $value);\n }",
"public function setReference($reference) {\n $this->reference = $reference;\n }",
"public function setReference(string $reference):void\n {\n $this->reference = $reference;\n }",
"public function setIndirectObject(\\SetaPDF_Core_Type_IndirectObjectInterface $indirectReference) {}",
"public function setIndirectObject(\\SetaPDF_Core_Type_IndirectObjectInterface $indirectReference) {}",
"public function reference() {\r\n\t\t$this->parseJavaName();\r\n\t\t$this->parseMultiObject();\r\n\t\tif (count($this->properties)) {\r\n\t\t\tforeach ($this->properties as $prop) {\r\n\t\t\t\t$prop->reference();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->arrayType) {\r\n\t\t\t$this->arrayType->reference();\r\n\t\t}\r\n\t\t// add to classes array so we can generate the java classes easily (but only \"global objects\").\r\n\t\tif ($this->id) {\r\n\t\t\tif (!array_key_exists($this->javaClass, self::$classes)) {\r\n\t\t\t\tself::$classes[$this->javaClass] = array();\r\n\t\t\t}\r\n\t\t\tself::$classes[$this->javaClass][$this->javaType] = $this;\r\n\t\t}\r\n\t}",
"public function __set ($psProperty, $pmValue)\n\t{\n\t\t$this->set($psProperty, $pmValue);\n\t}",
"public function setInternalData($data): void\n {\n $this->internal_data = $data;\n }",
"function setRefFields($val) {\n $this->_refFields = $val;\n }",
"function setLink($link) {\r\n $this->_link = $link;\r\n }",
"function setLink($link) {\r\n $this->_link = $link;\r\n }",
"public function setValue($value)\n {\n $this->_value = new Zend_Memory_Value($value, $this);\n }",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"public function set($object, $mapping);",
"public function getSetPublicPtr()\n {\n return isset($this->set_public_ptr) ? $this->set_public_ptr : false;\n }",
"public function setDataAsRef(array &$data)\n {\n $this->data = &$data;\n }",
"function Linktracker_upd()\n\t{\n\t\t$this->EE =& get_instance();\n\t}",
"function __construct(&$reference) {\n $this->reference = &$reference;\n }",
"function __construct( $pObj )\n {\n $this->pObj = $pObj;\n }",
"function __construct( $pObj )\n {\n $this->pObj = $pObj;\n }",
"public function setParameterByRef ($name, $value)\n {\n\n $this->parameters[$name] =& $value;\n\n }",
"public function __wakeup();",
"private function _setEntryPointer($index)\n\t{\n\t\t$this->_entryPointer = $index;\n\t}",
"public function __set($key, $value)\n {\n return $this->var_holder->setByRef($key, $value);\n }",
"public function __wakeup ();",
"function setPID($pid) {\n\t\t$this->_pid = $pid;\n\t}",
"public function setPropArrayByRef(&$array)\n {\n $this->engine->assignByRef($array);\n }",
"public function setSetPublicPtr($var)\n {\n GPBUtil::checkBool($var);\n $this->set_public_ptr = $var;\n\n return $this;\n }",
"public function set($s) {\r\n\t\t$this->current = $s;\r\n\t}",
"private function __wakeup() {\r\n }",
"public function setRefToSomething($refToSomething)\r\n {\r\n $this->refToSomething = $refToSomething;\r\n }",
"public function setInternal($internal) {\n $this->_internal = $internal;\n }",
"private function __wakeup() {\n\t}",
"private function __wakeup() {\n\t}",
"private function __wakeup() {\n\t}",
"private function setQuestionObject(){\n $questionID = (int)$this->connectObj->SocialQuestion->ID;\n if($questionID && $socialQuestion = get_instance()->model('SocialQuestion')->get($questionID)->result){\n $this->socialQuestion = $socialQuestion;\n }\n\n if($commentAuthorID = (int)$this->connectObj->CreatedBySocialUser->ID){\n $this->commentAuthorID = $commentAuthorID;\n }\n }",
"function offsetSet(/*. mixed .*/ $object_, /*. mixed .*/ $info){}",
"private function __wakeup()\n {\n }",
"function set_property(){\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"private function __wakeup(){}",
"private function __wakeup(){}",
"public function setInternal($bool)\n {\n $this->arguments['internal'] = (bool) $bool;\n }",
"private function __wakeup()\n\t{\n\n\t}",
"private function __wakeup()\n\t{\n\n\t}",
"private function __wakeup()\r\n {\r\n }",
"public function setObject(object $object): self;",
"public function setProperties() {\n\t\t$this->public_prop = 'public';\n\t\t$this->protected_prop = 100;\n\t\t$this->private_prop = true;\n\n\t\t// Set a non-predefined property.\n\t\t$this->dynamic = new self();\n\t}",
"public function __wakeup()\n {\n }",
"public function __wakeup()\n {\n }",
"private function __wakeup() {\n }",
"public function setUp()\n {\n $this->stubRefProperty = new stubReflectionProperty('stubTestProperty1', 'property');\n }",
"abstract public function set();",
"public function setItem(object $item): void\n {\n $this->item = $item;\n }",
"public function setStatement($objStatement)\r\n\t{\r\n\t\t$this->objStatement = $objStatement;\r\n\t}",
"public static function admin_pointer() {\n\t\t\treturn self::$admin_pointer;\n\t\t}",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"private function __wakeup()\n {\n }",
"public function set($fk, $ref_model){\n $this->fk = $fk;\n \n //model que está chamando\n $this->ref = $ref_model;\n }",
"public function set_buffer(&$buffer)\r\n\t{\r\n\t\t$this->buffer = $buffer;\r\n\t\t$this->_isExternalBuffer = true;\r\n\t\t$this->buffer->register_var($this->sorting);\r\n\t\t$this->buffer->register_var($this->pagenum);\r\n\t\t$this->buffer->register_var($this->sortdir);\r\n\t}"
] | [
"0.5907162",
"0.58758235",
"0.58386946",
"0.57590497",
"0.56614566",
"0.5538449",
"0.5504496",
"0.5496631",
"0.5494627",
"0.54057527",
"0.5360355",
"0.52570283",
"0.52497846",
"0.52421397",
"0.52356654",
"0.5219282",
"0.52126855",
"0.5211147",
"0.52003795",
"0.51917976",
"0.5166873",
"0.5161995",
"0.51616985",
"0.5140811",
"0.5100311",
"0.50965244",
"0.50662625",
"0.5065028",
"0.5062493",
"0.50594544",
"0.50586814",
"0.50487244",
"0.50461686",
"0.5045933",
"0.4979049",
"0.49786744",
"0.49786744",
"0.49701607",
"0.49235404",
"0.49235404",
"0.4904273",
"0.4901546",
"0.4874508",
"0.4869005",
"0.4864766",
"0.48559108",
"0.48559108",
"0.48490316",
"0.4842353",
"0.4837762",
"0.48279622",
"0.48246887",
"0.48204294",
"0.48015514",
"0.4788233",
"0.47869873",
"0.4785092",
"0.47800097",
"0.47794968",
"0.477742",
"0.477742",
"0.477742",
"0.47624782",
"0.475013",
"0.47476098",
"0.47457528",
"0.47448233",
"0.47448233",
"0.47357753",
"0.47357753",
"0.47356555",
"0.4728664",
"0.4728664",
"0.47221383",
"0.47189862",
"0.47173858",
"0.4708082",
"0.4706625",
"0.47066012",
"0.47050044",
"0.470274",
"0.4699055",
"0.46920478",
"0.4685075",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46834975",
"0.46810332",
"0.4680443"
] | 0.51763755 | 20 |
Set the internal pointer variable from the given variable path. | protected function setPointerFromPath($path, $create = false)
{
$url = parse_url($path);
$scope = $url['host'];
if (isset($url['path'])) {
$varpath = substr($url['path'], 1);
} else {
$varpath = '';
}
return $this->_setPointer($scope, $varpath, $create);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set(string $path, $value);",
"protected function _setPointer($scope, $path, $create = false)\n {\n $varpath = explode('/', $path);\n\n switch (strtoupper($scope)) {\n // GET variables\n case 'GET':\n case '_GET':\n $this->_pointer = &$_GET;\n break;\n\n // POST variables\n case 'POST':\n case '_POST':\n $this->_pointer = &$_POST;\n break;\n\n // SERVER variables\n case 'SERVER':\n case '_SERVER':\n $this->_pointer = &$_SERVER;\n break;\n\n // SESSION variables\n case 'SESSION':\n case '_SESSION':\n $this->_pointer = &$_SESSION;\n break;\n\n // COOKIE variables\n case 'COOKIE':\n case '_COOKIE':\n $this->_pointer = &$_COOKIE;\n break;\n\n // ENV variables\n case 'ENV':\n case '_ENV':\n $this->_pointer = &$_ENV;\n break;\n\n // global variables\n case 'GLOBALS':\n default:\n if (empty($varpath)) {\n throw new \\Exception('GLOBALS needs a path');\n }\n $part = array_shift($varpath);\n if (!isset($GLOBALS[$part])) {\n return false;\n }\n $this->_pointer = &$GLOBALS[$part];\n break;\n }\n if (empty($varpath)) {\n return true;\n }\n\n while ($part = array_shift($varpath)) {\n if (!isset($this->_pointer[$part])) {\n if (!$create) {\n return false;\n }\n if (!empty($varpath)) {\n return false;\n }\n $this->_pointer[$part] = '';\n }\n $this->_pointer = &$this->_pointer[$part];\n }\n return true;\n }",
"function set($path, $value)\n\t\t{\n\t\t\t$this->Init();\n\t\t\t$path = explode(\"/\", $path);\n\t\t\t$pointer = end($path);\n\t\t\t$tmp = $value;\n\t\t\twhile($pointer){\n\t\t\t\tif (!empty($pointer)){\n\t\t\t\t\t$tmp = array($pointer=>$tmp);\n\t\t\t\t\t$pointer = prev($path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->settings = array_merge_recursive_overwrite($this->settings, $tmp);\n\t\t\t$this->saveSettings();\n\t\t}",
"function set_path($path, $value) {\n\t$GLOBALS['laravel_paths'][$path] = $value;\n}",
"function set_path($path, $value)\n{\n\t$GLOBALS['laravel_paths'][$path] = $value;\n}",
"public function set($variable, $value);",
"public static function set_path($path) {\n\t\tstatic::$path = $path;\n\t}",
"public function setGlobalPath($path, $reference);",
"public static function setPath($path)\n\t{\n\t\tself::$path = $path;\n\t}",
"function set_path($path, $value)\n{\n $GLOBALS['laravel_paths'][$path] = $value;\n}",
"public function set(string $variableName, $value): void;",
"public function __set ($variableName, $value) {\n // write\n }",
"public function setVar($key, $value);",
"function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (!$_GET[\"__shared__\"][\"vars\"]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"] = array();\n\t\t}\n\t\tforeach ($vars as $varNamespace => $varArray) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$varNamespace] = $varArray;\n\t\t}\n\t\t\n\t\t// Register namespace if not existing\n\t\tif (!$_GET[\"__shared__\"][\"vars\"][$_argv[0]]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]] = array();\n\t\t}\n\t\tif ($_argc == 2) {\n\t\t\tif (is_array($_argv[1])) {\n\t\t\t\tforeach ($_argv[1] as $var => $val) {\n\t\t\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$var] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_argc == 3) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$_argv[1]] = $_argv[2];\n\t\t}\n\t\t\n\t\t// save vars\n\t\t\n\t\tsaveVars();\n\t}",
"public function variable_set($name, $value) {\n // TODO\n variable_set($name, $value);\n }",
"public function setPath($path)\n\t{\n\t\t\n\t\t$this->__path = (string)$path;\n\n\t}",
"public static function setPath($path)\n {\n static::$pathTop = $path;\n }",
"function setRef($name, &$value) {\n $this->vars[$name] =& $value; //is_object($value) ? $value->fetch() : $value;\n }",
"public function set_path($path)\n\t{\n\t\t$this->route_stack[self::SEG_PATH] = $path;\n\t}",
"public function setPath(string $path)\n {\n $this->path = $path;\n\t}",
"public function setPath( $path );",
"public function setVariable($key, $value, & $data) {\n\n if (strpos($key, $this->scopeGlue) === false) {\n $parts = explode('.', $key);\n } else {\n $parts = explode($this->scopeGlue, $key);\n }\n\n $i = 0;\n $count = count($parts);\n $d = & $data;\n\n while ($i < $count) {\n\n $key_part = $parts[$i];\n $key_part_int = filter_var($key_part, FILTER_VALIDATE_INT);\n $key_part_is_int = $key_part_int !== false;\n $set_value = ($i + 1) == $count;\n\n if ($key_part_is_int && is_object($d)) {\n $d = (array) $d;\n }\n\n if (!is_array($d) && !is_object($d)) {\n $d = array();\n }\n\n if (is_array($d)) {\n\n if ($key_part_is_int && !array_key_exists($key_part, $d)) {\n $key_part = $key_part_int;\n }\n\n if ($set_value) {\n\n $d[$key_part] = $value;\n\n } else {\n\n if (!isset($d[$key_part])) {\n $d[$key_part] = array();\n }\n\n $d = & $d[$key_part];\n }\n\n } else {\n\n if ($set_value) {\n\n $d->{$key_part} = $value;\n\n } else {\n\n if (!property_exists($d, $key_part)) {\n $d->{$key_part} = array();\n }\n\n $d = & $d->{$key_part};\n }\n }\n\n $i++;\n }\n }",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function set_path($path) {\n $this->path = $path;\n }",
"function drush_variable_realm_set($realm_name, $realm_key, $variable_name, $value) {\n variable_realm_set($realm_name, $realm_key, $variable_name, $value);\n drush_print('Variable set.');\n}",
"public function setPath( $path )\n {\n $this->path = us($path);\n }",
"public function assignVar($key, &$value) {\n\t\t$this->_vars[$key]->value = $value;\n\t}",
"function set($name, $value) {\n $this->vars[$name] = $value; //is_object($value) ? $value->fetch() : $value;\n }",
"public function setPath(string $path): void\n {\n $this->path = (string) $path;\n }",
"function set_var($var_name, $var_value)\r\n\t{\r\n\t\tif (is_array($var_value)) \r\n\t\t{\r\n\t\t\tforeach($var_value as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\t$this->set_var($var_name . '.' . $key, $value); // recursion for array branches\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // normal variable\r\n\t\t{\r\n\t\t\t$this->vars[$var_name] = $var_value;\r\n\t\t}\r\n\t}",
"public static function setPath($path)\n {\n }",
"function setID($path);",
"public function setPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"static function set_url_segment($path) {\r\n\t\tself::$url_path = $path;\r\n\t}",
"public function setPath($path){ }",
"function set($name, $value){\n\t\t$this->vars[$name] = $value;\n\t}",
"public function setMeta( $path, $value ) {\n\t\t$ref = &$this->__info;\n\t\t$parts = explode(\".\", $path);\n\t\t$lastpart = array_pop( $parts );\n\t\tforeach($parts as $part) {\n\t\t\tif (!isset($ref[$part])) {\n\t\t\t\t$ref[$part] = array();\n\t\t\t}\n\t\t\t$ref = &$ref[$part];\n\t\t}\n\t\t$ref[$lastpart] = $value;\n\t}",
"protected function setPath( string $path ) : void\n {\n $this->path = DIGITAL_BASE_PATH.$path;\n }",
"public function setDataFileFromPath($path)\n {\n $this->dataFile = FileReference::fromFile($path);\n }",
"public function SetPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"public function setPath( $path )\n\t{\n\t\t$this->path = $path;\n\t\t$this->modified = true;\n\t}",
"public function set($var, $value){\n\t\t\t$this->template_vars[$var] = $value;\n\t\t}",
"public function __set($key, $var){\n\t\t$this->vars[$key] = $var;\n\t}",
"function _set( $varname, $value, $scope='' ){\n if( $scope=='global' ){\n $this->ctx[0]['_scope_'][$varname] = $value;\n return;\n }\n\n if( $scope=='parent' ){\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) && isset($this->ctx[$x]['_scope_'][$varname]) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( isset($this->ctx[$x]['_scope_']) ){\n $this->ctx[$x]['_scope_'][$varname] = $value;\n return;\n }\n }\n\n }",
"public function __set($var, $val) {\n\t\t$this->view_variables[$var] = $val;\n\t}",
"public function setPath($path)\r\n\t{\r\n\t\t$this->path=$path;\r\n\t}",
"static function set(array &$data, $path, $value) {\n\t\t$keys = explode('.', $path);\n\t\t$last = array_pop($keys);\n\t\tforeach($keys as $k){\n\t\t\tif(isset($data[$k]) && is_array($data[$k])){\n\t\t\t\t$data = & $data[$k];\n\t\t\t}else{\n\t\t\t\t$data[$k] = array();\n\t\t\t\t$data = & $data[$k];\n\t\t\t}\n\t\t}\n\t\t$data[$last] = $value;\n\t}",
"public function setByPath($path, $data)\n {\n $path2 = explode('/', $path);\n\n $data2 =& $this->data;\n\n foreach ($path2 as $node) {\n if (!$data2[$node]) {\n $data2[$node] = array();\n }\n $data2 =& $data2[$node];\n }\n\n if ($data2) {\n $data2 = $data;\n }\n\n }",
"public function setVariable(string $variable, Node $value)\n {\n $this->variables[$variable] = $value;\n }",
"function assign($var,$val) {\n\t\t$this->_viewVars[$var]=$val;\n\t}",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function __set(string $path, /* mixed */ $component) : void\n {\n $this->add($path, $component);\n }",
"public function setSubProperty($path,$value)\n\t{\n\t\t$object=$this;\n\t\tif(($pos=strrpos($path,'.'))===false)\n\t\t\t$property=$path;\n\t\telse\n\t\t{\n\t\t\t$object=$this->getSubProperty(substr($path,0,$pos));\n\t\t\t$property=substr($path,$pos+1);\n\t\t}\n\t\t$object->$property=$value;\n\t}",
"public function set( $path ) {\n\t\t$this->path = $path;\n\n\t\t$path_info = pathinfo( $this->path );\n\n\t\t$this->file = $path_info['basename'];\n\t\t$this->extension = $path_info['extension'] == 'jpg' ? 'jpeg' : $path_info['extension'];\n\t\t$this->filename = $path_info['filename'];\n\n\t\t$this->server = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];\n\n\t\t$this->url = $this->server.str_replace( $this->base_dir, '', $this->path );\n\t}",
"private function setVar($var)\n {\n $this->var = $var;\n }",
"public function setPath( $val ) { $this->__set('path', $val); }",
"public static function setPathOfAlias($alias,$path) {\n if(empty($path)) {\n unset(self::$_aliases[$alias]);\n } else {\n self::$_aliases[$alias] = rtrim($path,'\\\\/');\n }\n }",
"protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}",
"public function setPath($path = '');",
"public function setVar( $var, $val ) {\n $this->vars[$var] = $val;\n }",
"protected function setData($key, $path)\n {\n if (method_exists($this, 'set') &&\n in_array('ArrayAccess', class_implements($this))\n ) {\n $this->set($key, require $path);\n }\n }",
"public function SetVariable($var,$value) {\n\t\techo $var.\" = \".$value.\"<br>\";\n\t\t$this->$var=$value;\n\t}",
"function set($name, $value) {\r\n $this->vars[$name] = $value;\r\n }",
"private function setPath($path) {\n return;\n }",
"public function SetVar($channel, $variable, $value);",
"public function assign($variable , $value)\n {\n $this->data[$variable] = $value;\n }",
"public function set_var ($a_name, $a_value) {\n\t\t\n\t\tif ($this->loaded == 0) {\n\t\t\t$this->load();\n\t\t}\n\t\t\n\t\t$this->data[$a_name] = $a_value;\n\t\t\n\t}",
"public function assign( $variable, $value ) {\n $this->variables[ $variable ] = $value;\n }",
"function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}",
"public function __set($varName, $value) {\n\t\t$this->add($varName, $value);\n\t}",
"function data_set($path, $value, $type = 0) {\n /**what is the F with php7\n xpAS::set($type ? self::$_global_data : $_SESSION, ($type ? '' : '_application_data,') . $path, $value);\n */\n $fpg = $type ? self::$_global_data : $_SESSION;\n xpAS::set($fpg, ($type ? '' : '_application_data,') . $path, $value);\n if ($type) self::$_global_data = $fpg;\n else $_SESSION = $fpg;\n return $value;\n }",
"public function setVar($name, $value)\n {\n $this->var_holder->set($name, $value);\n }",
"function setXTemplatePath($value) {\n $this->xTemplatePath= $value;\n}",
"public function setVariable($key, $value)\n {\n $key = strtolower($key);\n $this->variables[$key] = $value;\n }",
"public static function setPath($path){\n \\Illuminate\\View\\Compilers\\BladeCompiler::setPath($path);\n }",
"public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }",
"public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }",
"public function assign($name, $value){\r\n\t\t$this->vars[$name] = $value; \r\n\t}",
"function SetVar( $var, $value )\r\n {\r\n $this->_vars[$var] = $value;\r\n }",
"public function setData($path, $value = null)\n {\n if (\\is_string($path)) {\n $path = \\preg_split('#[\\./]#', $path);\n $ref = &$this->data;\n foreach ($path as $k) {\n $ref = &$ref[$k];\n }\n $ref = $value;\n } else {\n $this->data = \\array_merge($this->data, $path);\n }\n if (!$this->data['log']) {\n $this->data['groupStacks']['main'] = array();\n }\n if (!$this->data['logSummary']) {\n $this->data['groupStacks'] = \\array_intersect_key(\n $this->data['groupStacks'],\n array('main' => true)\n );\n $this->data['groupPriorityStack'] = array();\n }\n $this->setLogDest();\n }",
"public function setVar($name, $value) {\n\t\t$this->vars[$name] = $value;\n\t}",
"public function assign($var, $value) {\n\t\tparent::assign($var, $value);\n\t}",
"public function setReference(VariableName $varName, VariableReference $reference)\n {\n throw new RuntimeError('Cannot set reference in OptionsContext');\n }",
"public function set($key, $variable) {\n $this->variabeles[$key] = $variable;\n }",
"function __set($name, $value) {\n $this->vars[$name] = $value;\n }",
"function __set($name, $value) {\n\t\t\t\t\tif (!empty($name)) {\n\t\t\t\t\t\t$this->vars[$name] = $value;\n\t\t\t\t\t}\n\t\t\t\t}",
"public function set($xPathKey, $value, $file) {\n\n\t\t$settings = new Modules_XML();\n\n\t\t$configFile = $this->app->getPath('/Extensions/' . $file);\n\t\t$settings->load($configFile);\n\n\t\t$nodes = $settings->XPath()->query($xPathKey);\n\n\t\tif($nodes->length == 1) {\n\t\t\t$nodes->item(0)->nodeValue = $value;\n\t\t\t$settings->save($settingsFile);\n\t\t}\n\n\t}",
"function set_path($path) \n {\n $this->path = \"/\" . trim($path, \"/\");\n }",
"public function set($key, $value)\n {\n $this->variables[$key] = $value;\n }",
"public function __set($name, $value)\n {\n $this->__variables[(string) $name] = $value;\n }",
"public function __set($name, $value) {\n\t\t$this->_vars[$name]->set($value);\n\t}"
] | [
"0.6412926",
"0.624664",
"0.61674225",
"0.61657435",
"0.61447185",
"0.61103237",
"0.6087896",
"0.60496175",
"0.60336685",
"0.59558386",
"0.5936602",
"0.5916707",
"0.58972484",
"0.58775276",
"0.58516604",
"0.5839962",
"0.58289194",
"0.58236367",
"0.58195466",
"0.58160836",
"0.57574326",
"0.5740263",
"0.5737838",
"0.5737838",
"0.5737838",
"0.5737838",
"0.57363135",
"0.5733795",
"0.5723621",
"0.5713029",
"0.57014",
"0.56882256",
"0.56881946",
"0.56881225",
"0.5680885",
"0.5662725",
"0.5661323",
"0.56371903",
"0.56308377",
"0.5629547",
"0.56255776",
"0.56239057",
"0.5618787",
"0.56166863",
"0.5589222",
"0.55868113",
"0.55838346",
"0.5580915",
"0.5570998",
"0.5564204",
"0.5554311",
"0.5544561",
"0.5538725",
"0.5519582",
"0.5519582",
"0.5519582",
"0.5519582",
"0.5519582",
"0.5519582",
"0.5519582",
"0.55021816",
"0.5470894",
"0.5468003",
"0.54638374",
"0.5451829",
"0.5450201",
"0.54498535",
"0.5446169",
"0.54402405",
"0.54376864",
"0.54355097",
"0.5428756",
"0.5414763",
"0.54043454",
"0.54034495",
"0.5403135",
"0.53949195",
"0.53845334",
"0.53802925",
"0.53727734",
"0.5367969",
"0.53623664",
"0.5360209",
"0.5359965",
"0.53459734",
"0.53459734",
"0.5342762",
"0.53336465",
"0.53286254",
"0.5328117",
"0.532461",
"0.53193426",
"0.53128326",
"0.53056437",
"0.5299621",
"0.52931654",
"0.5292171",
"0.5291394",
"0.52911603",
"0.5284569"
] | 0.6150392 | 4 |
funcao construtor da classe | function cl_sau_receitamedica() {
//classes dos rotulos dos campos
$this->rotulo = new rotulo("sau_receitamedica");
$this->pagina_retorno = basename($GLOBALS["HTTP_SERVER_VARS"]["PHP_SELF"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct() ;",
"function _construct() {\n \t\n\t\t\n\t}",
"function __construct (){\n\t\t}",
"function _construct(){ }",
"public function _construct()\n\t{\n\n\t}",
"function __construct(){\n\n\t\t}",
"function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct()\n\t{\n\t\t\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}",
"public function __construct()\n\t\t{\n\t\t\t\n\t\t}",
"function __construct() {\n\t\t\t\n\t\t}",
"function __construct() {}",
"function __construct(){\n\t\t// nowt much...\n\t}",
"function __construct(){}",
"function __construct(){}",
"function __construct(){}",
"public function __construct (){}",
"function __construct(){\n\t\t}",
"function __construct()\n\t{\n\n\t}",
"function __construct() {\n\n\t\t}",
"function __construct(){\r\n\t\t}",
"public function __construct() { \n\t\t\n\n\t\t}",
"function __construct()\r\n\t{\r\n\t}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private final function __construct() {}",
"private function __construct() { \n\t\t\n\n\t}",
"function __construct()\n\t{\n\t\t# code...\n\t}",
"function __construct()\r\n\t{\r\n\t\t\r\n\t}",
"function __construct()\n\t{\n\t}",
"function __construct()\n\t{\n\t}",
"function __construct()\n\t{\n\t}",
"private function __construct()\t{}",
"public function __construct()\n\t{\n\t}",
"final private function __construct(){\r\r\n\t}",
"public function __construct()\n\t\t{\n\t\t\t//\n\t\t}",
"private function __construct(){\n\t\t }",
"protected abstract function __construct();",
"function __construct(){\n\n\t}",
"public function __construct()\r\n\t\t{\r\n\t\t}",
"public function __construct()\n\t{\n\t\n\t}",
"public function __construct()\n\t{\n\t\n\t}",
"function __construct(){\r\n\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"public function __construct()\n\t{}",
"function __construct()\n\t{\n \n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t\n\t}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct(){\n\t\t//\n\t}",
"public function __construct(){\n\t\t//\n\t}",
"public function __construct()\n\t\t{\t\t\t\n\t\t}",
"private function __construct(){\n\t\n\t}",
"function __construct() {\n\n\t}",
"public function __construct() {\n\t\t\n\t}",
"public function __construct() {\n\t\t\n\t}",
"public function __construct() {\n\t\t\n\t}",
"public function __construct() {\n\t\t\n\t}",
"public function __construct() {\n\t\t\n\t}",
"private function __construct( )\n {\n\t}",
"public function __construct() {\n\n\t\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"private function __construct(){\n \t\n }",
"private function __construct() {\r\n\t\r\n\t}",
"function __construct() {\r\n\t}",
"function __construct() {\r\n\t}"
] | [
"0.82710814",
"0.8201428",
"0.8043516",
"0.80062735",
"0.796183",
"0.7928873",
"0.7894286",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.78932434",
"0.7892753",
"0.7887893",
"0.788242",
"0.78764445",
"0.7872269",
"0.78641057",
"0.78625774",
"0.78625774",
"0.78625774",
"0.78494614",
"0.78404146",
"0.782691",
"0.7825362",
"0.78223693",
"0.7772932",
"0.7767797",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77637684",
"0.77618545",
"0.7750897",
"0.77469",
"0.77464163",
"0.7745494",
"0.7745494",
"0.7745494",
"0.7743061",
"0.7741989",
"0.7735934",
"0.7732405",
"0.7731418",
"0.77172667",
"0.77101105",
"0.77092403",
"0.7702783",
"0.7702783",
"0.77001476",
"0.76978403",
"0.76866823",
"0.76810014",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7678487",
"0.7661576",
"0.7661576",
"0.7661576",
"0.7661339",
"0.7661339",
"0.7661082",
"0.76529324",
"0.76510185",
"0.7649274",
"0.7649274",
"0.7649274",
"0.7649274",
"0.7649274",
"0.76464516",
"0.7643331",
"0.76395047",
"0.76395047",
"0.76395047",
"0.76395047",
"0.76395047",
"0.7639284",
"0.7633727",
"0.7633691",
"0.7633691"
] | 0.0 | -1 |
funcao para atualizar campos | function atualizacampos($exclusao=false) {
if($exclusao==false){
$this->s158_i_codigo = ($this->s158_i_codigo == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_codigo"]:$this->s158_i_codigo);
$this->s158_i_profissional = ($this->s158_i_profissional == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_profissional"]:$this->s158_i_profissional);
$this->s158_i_tiporeceita = ($this->s158_i_tiporeceita == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_tiporeceita"]:$this->s158_i_tiporeceita);
$this->s158_t_prescricao = ($this->s158_t_prescricao == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_t_prescricao"]:$this->s158_t_prescricao);
$this->s158_i_situacao = ($this->s158_i_situacao == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_situacao"]:$this->s158_i_situacao);
if($this->s158_d_validade == ""){
$this->s158_d_validade_dia = ($this->s158_d_validade_dia == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_validade_dia"]:$this->s158_d_validade_dia);
$this->s158_d_validade_mes = ($this->s158_d_validade_mes == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_validade_mes"]:$this->s158_d_validade_mes);
$this->s158_d_validade_ano = ($this->s158_d_validade_ano == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_validade_ano"]:$this->s158_d_validade_ano);
if($this->s158_d_validade_dia != ""){
$this->s158_d_validade = $this->s158_d_validade_ano."-".$this->s158_d_validade_mes."-".$this->s158_d_validade_dia;
}
}
$this->s158_i_login = ($this->s158_i_login == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_login"]:$this->s158_i_login);
if($this->s158_d_data == ""){
$this->s158_d_data_dia = ($this->s158_d_data_dia == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_data_dia"]:$this->s158_d_data_dia);
$this->s158_d_data_mes = ($this->s158_d_data_mes == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_data_mes"]:$this->s158_d_data_mes);
$this->s158_d_data_ano = ($this->s158_d_data_ano == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_d_data_ano"]:$this->s158_d_data_ano);
if($this->s158_d_data_dia != ""){
$this->s158_d_data = $this->s158_d_data_ano."-".$this->s158_d_data_mes."-".$this->s158_d_data_dia;
}
}
$this->s158_c_hora = ($this->s158_c_hora == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_c_hora"]:$this->s158_c_hora);
}else{
$this->s158_i_codigo = ($this->s158_i_codigo == ""?@$GLOBALS["HTTP_POST_VARS"]["s158_i_codigo"]:$this->s158_i_codigo);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _updatefields() {}",
"function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}",
"private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }",
"public function actualizarCampos(){\n //---- eliminamos todos los registros\n $sql = \"DELETE FROM \". TABLE_EMPRESA .\"_campo WHERE uid_empresa = \". $this->getUID();\n if( !$this->db->query($sql) ){ return $this->db->lastErrorString(); }\n\n //---- asignamos los que se han indicado en el formulario\n $inserts = array();\n $asignados = isset($_REQUEST[\"elementos-asignados\"]) ? $_REQUEST[\"elementos-asignados\"] : [];\n foreach ($asignados as $idCampoAsignado) {\n $inserts[] = \"(\". $this->getUID() .\", \". $idCampoAsignado .\")\";\n }\n\n if (!count($inserts)) return true;\n\n $sql = \"INSERT INTO \". TABLE_EMPRESA .\"_campo ( uid_empresa, uid_campo ) VALUES \". implode(\",\", $inserts);\n if( !$this->db->query($sql) ){ return $this->db->lastErrorString(); }\n\n //----- si todo va bien\n return true;\n }",
"protected abstract function setFields();",
"function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}",
"private function resetInputFields(){\n $this->nom = '';\n $this->departements_id = '';\n $this->arrondissement_id = '';\n }",
"function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }",
"public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }",
"public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }",
"private function resetInputFields()\n {\n $this->name = '';\n $this->code = '';\n $this->agency_id = '';\n\n $this->phone = '';\n $this->fax = '';\n\n $this->email = '';\n $this->address = '';\n $this->country = '';\n }",
"function set_field($field,$edit=\"\",$view=\"\")\r\n {\r\n $userID = session::get(\"user\");\r\n \r\n if ($userID)\r\n {\r\n if (!right::get_field($field))\r\n database::query(\"INSERT INTO system SET name='$field',edit='$edit',view='$view'\");\r\n else\r\n database::query(\"UPDATE system SET edit='$edit',view='$view' WHERE name='$field'\");\r\n } \r\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }",
"private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }",
"function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }",
"function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}",
"private function resetInputFields(){\n $this->teacher_id = '';\n $this->lending_id = '';\n $this->note = '';\n $this->device_id = '';\n $this->org_id_1 = '';\n $this->org_id_2 = '';\n $this->lendingDate = '';\n $this->returnDate = '';\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}",
"private function setAutofillFields() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof AutofillField) {\n $this->values[$field_name] = $field->fill();\n }\n }\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }",
"private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}",
"public function atualizar()\n {\n //Executa o processo de validação\n $validacao = self::validar('update');\n\n //Verifica o status da validação do formulário\n //Se não houveram erros, insere no banco de dados\n //Caso contrário, informa ao usuário os erros de validação\n if($validacao)\n {\n //Obtem os dados do formulário preenchido\n $empresa = $this->input->post();\n\n //Obtem o id da empresa a ser atualizada\n $id = $empresa['id_empresa'];\n\n //Atualiza os dados da empresa a partir do seu id e retorna o status da operação\n $status = $this->EmpresasModel->atualizar($id, $empresa);\n\n //Checa o status da operação\n //Se bem sucedida, carrega a tela de visualizar a empresa \n //Caso contrário, informa ao usuário\n if(!$status){\n\t\t\t\t$this->session->set_flashdata('error', 'Não foi possível alterar as informações.');\n\t\t\t}else{\n //Consulta os dados da empresa que foi atualizada\n $resultado = $this->EmpresasModel->getById($id);\n $dados = array(\"empresaid\" => $resultado, \"success\" => 'Informações alteradas com sucesso.'); \n //Carrega a tela com os dados atualizados\n $this->load->view(\"Empresas/empresa\", $dados);\n\t\t\t}\n }\n else\n {\n\t\t\t$this->session->set_flashdata('error', validation_errors('<p>','</p>'));\n }\n //Carrega a página de alterar os dados da empresa com as informações atuais\n $dados['empresaid'] = $this->EmpresasModel->getById($id);\n $this->load->view(\"Empresas/altera\", $dados); \n }",
"private function resetInputFields()\n {\n $this->agency_id = '';\n $this->state_id = '';\n $this->name = '';\n $this->logo = '';\n $this->email = '';\n $this->phone = '';\n $this->fax = '';\n $this->address = '';\n $this->facebook = '';\n $this->instagram = '';\n $this->youtube = '';\n $this->viber = '';\n $this->whatsapp = '';\n $this->url = '';\n }",
"public function atualizar() {\n $query = '\n UPDATE tb_atividade \n set \n nome = :nome,\n qntd_part = :qntd_part,\n inscricao = :inscricao,\n valor = :valor,\n tipo = :tipo,\n carga_hr = :carga_hr,\n data_inicio = :data_inicio,\n data_fim = :data_fim\n WHERE\n id = :id\n ';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n $stmt->bindValue(':nome', $this->atividade->__get('nome'));\n $stmt->bindValue(':qntd_part', $this->atividade->__get('qntd_part'));\n $stmt->bindValue(':inscricao', $this->atividade->__get('inscricao'));\n $stmt->bindValue(':valor', $this->atividade->__get('valor'));\n $stmt->bindValue(':tipo', $this->atividade->__get('tipo'));\n $stmt->bindValue(':carga_hr', $this->atividade->__get('carga_hr'));\n $stmt->bindValue(':data_inicio', $this->atividade->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->atividade->__get('data_fim'));\n\n return $stmt->execute();\n }",
"public function testUpdateExtraFields(): void { }",
"protected function setupUpdateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n $readonly = [];\n if (User::min('id') !== backpack_user()->id) {\n $readonly = ['readonly' => 'readonly'];\n }\n\n CRUD::field('key')->type('text')->label('ID key')->attributes($readonly);\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('value')->type(CRUD::getCurrentEntry()->type)->label('Contenu');\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_asignatura('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_situacion('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"private function resetInputFields(){\n $this->name = '';\n $this->content = '';\n $this->todo_id = '';\n }",
"public function prepAttributesForSave()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\t$this->setAttribute($name, ModelHelper::packageAttributeValue($config, $value, true));\n\t\t}\n\n\t\t// Populate dateCreated and uid if this is a new record\n\t\tif ($this->isNewRecord())\n\t\t{\n\t\t\t$this->dateCreated = DateTimeHelper::currentTimeForDb();\n\t\t\t$this->uid = StringHelper::UUID();\n\t\t}\n\n\t\t// Update the dateUpdated\n\t\t$this->dateUpdated = DateTimeHelper::currentTimeForDb();\n\t}",
"function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}",
"function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }",
"public function beforeSave() {\n\t\t\t\t\t\t\tif ($this->isNewRecord) {\n\t\t\t\t\t\t\t\t\t\t$this->usuario=Yii::app()->user->name;\n\t\t\t\t\t\t\t\t\t\t$this->creadoel=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t\t $this->iduser=Yii::app()->user->id;\n\t\t\t\t\t\t\t\t\t\t$this->mes=substr($this->fechacontable,5,2);\n\t\t\t\t\t\t\t\t\t\t$this->ano=substr($this->fechacontable,0,4);\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn parent::beforeSave();\n\t\t\t\t}",
"function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }",
"protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }",
"private function resetInputFields(){\n $this->title = '';\n $this->original_url = '';\n $this->platform_id = '';\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_situacion('');\n $this->setDescripcion('');\n $this->setSuperada('');\n $this->setBreve('');\n $this->setPrimary_key($aPK);\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}",
"public function update($aluno){\n\t\t$campos = \"\";\n \n \n\t\t if(!empty($aluno->nome)) $campos .=' nome = ?,';\n\t\t if(!empty($aluno->endereco)) $campos .=' endereco = ?,';\n\t\t if(!empty($aluno->numero)) $campos .=' numero = ?,';\n\t\t if(!empty($aluno->bairro)) $campos .=' bairro = ?,';\n\t\t if(!empty($aluno->cidade)) $campos .=' cidade = ?,';\n\t\t if(!empty($aluno->nacionalidade)) $campos .=' nacionalidade = ?,';\n\t\t if(!empty($aluno->cep)) $campos .=' cep = ?,';\n\t\t if(!empty($aluno->uf)) $campos .=' uf = ?,';\n\t\t if(!empty($aluno->local)) $campos .=' local = ?,';\n\t\t if(!empty($aluno->complemento)) $campos .=' complemento = ?,';\n\t\t if(!empty($aluno->inep)) $campos .=' inep = ?,';\n\t\t if(!empty($aluno->ni)) $campos .=' nis = ?,';\n\t\t if(!empty($aluno->telefone)) $campos .=' telefone = ?,';\n\t\t if(!empty($aluno->celular)) $campos .=' celular = ?,';\n\t\t if(!empty($aluno->email)) $campos .=' email = ?,';\n\t\t if(!empty($aluno->peso)) $campos .=' peso = ?,';\n\t\t if(!empty($aluno->altura)) $campos .=' altura = ?,';\n\t\t if(!empty($aluno->raca)) $campos .=' raca = ?,';\n\t\t if(!empty($aluno->tipoDefic)) $campos .=' tipo_defic = ?,';\n\t\t if(!empty($aluno->tipoTranspEscolar)) $campos .=' tipo_transp_escolar = ?,';\n\t\t if(!empty($aluno->idEducCenso)) $campos .=' id_educ_censo = ?,';\n\t\t if(!empty($aluno->tipoUsoInternet)) $campos .=' tipo_uso_internet = ?,';\n\t\t if(!empty($aluno->sexo)) $campos .=' sexo = ?,';\n\t\t if(!empty($aluno->regNascimento)) $campos .=' reg_nascimento = ?,';\n\t\t if(!empty($aluno->regLivroNum)) $campos .=' reg_livro_num = ?,';\n\t\t if(!empty($aluno->regFolhaNum)) $campos .=' reg_folha_num = ?,';\n\t\t if(!empty($aluno->regComarca)) $campos .=' reg_comarca = ?,';\n\t\t if(!empty($aluno->rg)) $campos .=' rg = ?,';\n\t\t if(!empty($aluno->rgOrgao)) $campos .=' rg_orgao = ?,';\n\t\t if(!empty($aluno->rgDataExpedicao)) $campos .=' rg_data_expedicao = ?,';\n\t\t if(!empty($aluno->titulo)) $campos .=' titulo = ?,';\n\t\t if(!empty($aluno->tituloZona)) $campos .=' titulo_zona = ?,';\n\t\t if(!empty($aluno->tituloSecao)) $campos .=' titulo_secao = ?,';\n\t\t if(!empty($aluno->reservista)) $campos .=' reservista = ?,';\n\t\t if(!empty($aluno->reservistaSerie)) $campos .=' reservista_serie = ?,';\n\t\t if(!empty($aluno->reservistaNumero)) $campos .=' reservista_numero = ?,';\n\t\t if(!empty($aluno->reservistaCategNum)) $campos .=' reservista_categ_num = ?,';\n\t\t if(!empty($aluno->reservistaCsm)) $campos .=' reservista_csm = ?,';\n\t\t if(!empty($aluno->cartProf)) $campos .=' cart_prof = ?,';\n\t\t if(!empty($aluno->grupoSangue)) $campos .=' grupo_sangue = ?,';\n\t\t if(!empty($aluno->grupoSangueRh)) $campos .=' grupo_sangue_rh = ?,';\n\t\t if(!empty($aluno->grupoSangueAlergia)) $campos .=' grupo_sangue_alergia = ?,';\n\t\t if(!empty($aluno->grupoSangueDiabetico)) $campos .=' grupo_sangue_diabetico = ?,';\n\t\t if(!empty($aluno->outraDoenca)) $campos .=' outra_doenca = ?,';\n\t\t if(!empty($aluno->familiaComposta)) $campos .=' familia_composta = ?,';\n\t\t if(!empty($aluno->estadoCivil)) $campos .=' estado_civil = ?,';\n\t\t if(!empty($aluno->usaOculo)) $campos .=' usa_oculos = ?,';\n\t\t if(!empty($aluno->destro)) $campos .=' destro = ?,';\n\t\t if(!empty($aluno->convenio)) $campos .=' convenio = ?,';\n\t\t if(!empty($aluno->nomePai)) $campos .=' nome_pai = ?,';\n\t\t if(!empty($aluno->paiVivo)) $campos .=' pai_vivo = ?,';\n\t\t if(!empty($aluno->paiNacionalidade)) $campos .=' pai_nacionalidade = ?,';\n\t\t if(!empty($aluno->paiNaturalidade)) $campos .=' pai_naturalidade = ?,';\n\t\t if(!empty($aluno->paiNivEscolar)) $campos .=' pai_niv_escolar = ?,';\n\t\t if(!empty($aluno->paiReligiao)) $campos .=' pai_religiao = ?,';\n\t\t if(!empty($aluno->paiProfissao)) $campos .=' pai_profissao = ?,';\n\t\t if(!empty($aluno->paiEnderTrab)) $campos .=' pai_ender_trab = ?,';\n\t\t if(!empty($aluno->paiTelefone)) $campos .=' pai_telefone = ?,';\n\t\t if(!empty($aluno->paiEmail)) $campos .=' pai_email = ?,';\n\t\t if(!empty($aluno->paiTitulo)) $campos .=' pai_titulo = ?,';\n\t\t if(!empty($aluno->paiTituloZona)) $campos .=' pai_titulo_zona = ?,';\n\t\t if(!empty($aluno->paiTituloSecao)) $campos .=' pai_titulo_secao = ?,';\n\t\t if(!empty($aluno->nomeMae)) $campos .=' nome_mae = ?,';\n\t\t if(!empty($aluno->maeViva)) $campos .=' mae_viva = ?,';\n\t\t if(!empty($aluno->maeNacionalidade)) $campos .=' mae_nacionalidade = ?,';\n\t\t if(!empty($aluno->maeNaturalidade)) $campos .=' mae_naturalidade = ?,';\n\t\t if(!empty($aluno->maeNivEscolar)) $campos .=' mae_niv_escolar = ?,';\n\t\t if(!empty($aluno->maeReligiao)) $campos .=' mae_religiao = ?,';\n\t\t if(!empty($aluno->maeProfissao)) $campos .=' mae_profissao = ?,';\n\t\t if(!empty($aluno->maeEnderTrab)) $campos .=' mae_ender_trab = ?,';\n\t\t if(!empty($aluno->maeTelefone)) $campos .=' mae_telefone = ?,';\n\t\t if(!empty($aluno->maeEmail)) $campos .=' mae_email = ?,';\n\t\t if(!empty($aluno->maeTitulo)) $campos .=' mae_titulo = ?,';\n\t\t if(!empty($aluno->maeTituloZona)) $campos .=' mae_titulo_zona = ?,';\n\t\t if(!empty($aluno->maeTituloSecao)) $campos .=' mae_titulo_secao = ?,';\n\t\t if(!empty($aluno->maeNi)) $campos .=' mae_nis = ?,';\n\t\t if(!empty($aluno->paiNi)) $campos .=' pai_nis = ?,';\n\t\t if(!empty($aluno->nomeResponsavel)) $campos .=' nome_responsavel = ?,';\n\t\t if(!empty($aluno->parentescoResponsavel)) $campos .=' parentesco_responsavel = ?,';\n\t\t if(!empty($aluno->nacionalResponsavel)) $campos .=' nacional_responsavel = ?,';\n\t\t if(!empty($aluno->naturalResponsavel)) $campos .=' natural_responsavel = ?,';\n\t\t if(!empty($aluno->nivEscolarResponsavel)) $campos .=' niv_escolar_responsavel = ?,';\n\t\t if(!empty($aluno->religiaoResponsavel)) $campos .=' religiao_responsavel = ?,';\n\t\t if(!empty($aluno->profissaoResponsavel)) $campos .=' profissao_responsavel = ?,';\n\t\t if(!empty($aluno->enderTrabResponsavel)) $campos .=' ender_trab_responsavel = ?,';\n\t\t if(!empty($aluno->telefResponsavel)) $campos .=' telef_responsavel = ?,';\n\t\t if(!empty($aluno->emailResponsavel)) $campos .=' email_responsavel = ?,';\n\t\t if(!empty($aluno->tituloResponsavel)) $campos .=' titulo_responsavel = ?,';\n\t\t if(!empty($aluno->tituloZonaResponsavel)) $campos .=' titulo_zona_responsavel = ?,';\n\t\t if(!empty($aluno->tituloSecaoResponsavel)) $campos .=' titulo_secao_responsavel = ?,';\n\t\t if(!empty($aluno->descriTranspEscolar)) $campos .=' descri_transp_escolar = ?,';\n\t\t if(!empty($aluno->paiUf)) $campos .=' pai_uf = ?,';\n\t\t if(!empty($aluno->maeUf)) $campos .=' mae_uf = ?,';\n\t\t if(!empty($aluno->responsavelUf)) $campos .=' responsavel_uf = ?,';\n\t\t if(!empty($aluno->dataNascimento)) $campos .=' data_nascimento = ?,';\n\t\t if(!empty($aluno->ufRegComarca)) $campos .=' uf_reg_comarca = ?,';\n\t\t if(!empty($aluno->cpfAluno)) $campos .=' cpf_aluno = ?,';\n\t\t if(!empty($aluno->cpfPai)) $campos .=' cpf_pai = ?,';\n\t\t if(!empty($aluno->cpfMae)) $campos .=' cpf_mae = ?,';\n\t\t if(!empty($aluno->cpfResponsavel)) $campos .=' cpf_responsavel = ?,';\n\t\t if(!empty($aluno->codUf)) $campos .=' cod_uf = ?,';\n\t\t if(!empty($aluno->codCidade)) $campos .=' cod_cidade = ?,';\n\t\t if(!empty($aluno->codPai)) $campos .=' cod_pais = ?,';\n\t\t if(!empty($aluno->created)) $campos .=' created = ?,';\n\t\t if(!empty($aluno->status)) $campos .=' status = ?,';\n\t\t if(!empty($aluno->senha)) $campos .=' senha = ?,';\n\t\t if(!empty($aluno->foto)) $campos .=' foto = ?,';\n\t\t if(!empty($aluno->colaboraRendaFamiliar)) $campos .=' colabora_renda_familiar = ?,';\n\n \n $campos = substr($campos,0,-1);\n \n $sql = 'UPDATE aluno SET '.$campos.' WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t if(!empty($aluno->nome)) \t\t$sqlQuery->set($aluno->nome);\n\t\t if(!empty($aluno->endereco)) \t\t$sqlQuery->set($aluno->endereco);\n\t\t if(!empty($aluno->numero)) \t\t$sqlQuery->set($aluno->numero);\n\t\t if(!empty($aluno->bairro)) \t\t$sqlQuery->set($aluno->bairro);\n\t\t if(!empty($aluno->cidade)) \t\t$sqlQuery->set($aluno->cidade);\n\t\t if(!empty($aluno->nacionalidade)) \t\t$sqlQuery->set($aluno->nacionalidade);\n\t\t if(!empty($aluno->cep)) \t\t$sqlQuery->set($aluno->cep);\n\t\t if(!empty($aluno->uf)) \t\t$sqlQuery->set($aluno->uf);\n\t\t if(!empty($aluno->local)) \t\t$sqlQuery->set($aluno->local);\n\t\t if(!empty($aluno->complemento)) \t\t$sqlQuery->set($aluno->complemento);\n\t\t if(!empty($aluno->inep)) \t\t$sqlQuery->set($aluno->inep);\n\t\t if(!empty($aluno->ni)) \t\t$sqlQuery->set($aluno->ni);\n\t\t if(!empty($aluno->telefone)) \t\t$sqlQuery->set($aluno->telefone);\n\t\t if(!empty($aluno->celular)) \t\t$sqlQuery->set($aluno->celular);\n\t\t if(!empty($aluno->email)) \t\t$sqlQuery->set($aluno->email);\n\t\t if(!empty($aluno->peso)) \t\t$sqlQuery->set($aluno->peso);\n\t\t if(!empty($aluno->altura)) \t\t$sqlQuery->set($aluno->altura);\n\t\t if(!empty($aluno->raca)) \t\t$sqlQuery->set($aluno->raca);\n\t\t if(!empty($aluno->tipoDefic)) \t\t$sqlQuery->set($aluno->tipoDefic);\n\t\t if(!empty($aluno->tipoTranspEscolar)) \t\t$sqlQuery->set($aluno->tipoTranspEscolar);\n\t\t if(!empty($aluno->idEducCenso)) \t\t$sqlQuery->set($aluno->idEducCenso);\n\t\t if(!empty($aluno->tipoUsoInternet)) \t\t$sqlQuery->set($aluno->tipoUsoInternet);\n\t\t if(!empty($aluno->sexo)) \t\t$sqlQuery->set($aluno->sexo);\n\t\t if(!empty($aluno->regNascimento)) \t\t$sqlQuery->set($aluno->regNascimento);\n\t\t if(!empty($aluno->regLivroNum)) \t\t$sqlQuery->set($aluno->regLivroNum);\n\t\t if(!empty($aluno->regFolhaNum)) \t\t$sqlQuery->set($aluno->regFolhaNum);\n\t\t if(!empty($aluno->regComarca)) \t\t$sqlQuery->set($aluno->regComarca);\n\t\t if(!empty($aluno->rg)) \t\t$sqlQuery->set($aluno->rg);\n\t\t if(!empty($aluno->rgOrgao)) \t\t$sqlQuery->set($aluno->rgOrgao);\n\t\t if(!empty($aluno->rgDataExpedicao)) \t\t$sqlQuery->set($aluno->rgDataExpedicao);\n\t\t if(!empty($aluno->titulo)) \t\t$sqlQuery->set($aluno->titulo);\n\t\t if(!empty($aluno->tituloZona)) \t\t$sqlQuery->set($aluno->tituloZona);\n\t\t if(!empty($aluno->tituloSecao)) \t\t$sqlQuery->set($aluno->tituloSecao);\n\t\t if(!empty($aluno->reservista)) \t\t$sqlQuery->set($aluno->reservista);\n\t\t if(!empty($aluno->reservistaSerie)) \t\t$sqlQuery->set($aluno->reservistaSerie);\n\t\t if(!empty($aluno->reservistaNumero)) \t\t$sqlQuery->set($aluno->reservistaNumero);\n\t\t if(!empty($aluno->reservistaCategNum)) \t\t$sqlQuery->set($aluno->reservistaCategNum);\n\t\t if(!empty($aluno->reservistaCsm)) \t\t$sqlQuery->set($aluno->reservistaCsm);\n\t\t if(!empty($aluno->cartProf)) \t\t$sqlQuery->set($aluno->cartProf);\n\t\t if(!empty($aluno->grupoSangue)) \t\t$sqlQuery->set($aluno->grupoSangue);\n\t\t if(!empty($aluno->grupoSangueRh)) \t\t$sqlQuery->set($aluno->grupoSangueRh);\n\t\t if(!empty($aluno->grupoSangueAlergia)) \t\t$sqlQuery->set($aluno->grupoSangueAlergia);\n\t\t if(!empty($aluno->grupoSangueDiabetico)) \t\t$sqlQuery->set($aluno->grupoSangueDiabetico);\n\t\t if(!empty($aluno->outraDoenca)) \t\t$sqlQuery->set($aluno->outraDoenca);\n\t\t if(!empty($aluno->familiaComposta)) \t\t$sqlQuery->set($aluno->familiaComposta);\n\t\t if(!empty($aluno->estadoCivil)) \t\t$sqlQuery->set($aluno->estadoCivil);\n\t\t if(!empty($aluno->usaOculo)) \t\t$sqlQuery->set($aluno->usaOculo);\n\t\t if(!empty($aluno->destro)) \t\t$sqlQuery->set($aluno->destro);\n\t\t if(!empty($aluno->convenio)) \t\t$sqlQuery->set($aluno->convenio);\n\t\t if(!empty($aluno->nomePai)) \t\t$sqlQuery->set($aluno->nomePai);\n\t\t if(!empty($aluno->paiVivo)) \t\t$sqlQuery->set($aluno->paiVivo);\n\t\t if(!empty($aluno->paiNacionalidade)) \t\t$sqlQuery->set($aluno->paiNacionalidade);\n\t\t if(!empty($aluno->paiNaturalidade)) \t\t$sqlQuery->set($aluno->paiNaturalidade);\n\t\t if(!empty($aluno->paiNivEscolar)) \t\t$sqlQuery->set($aluno->paiNivEscolar);\n\t\t if(!empty($aluno->paiReligiao)) \t\t$sqlQuery->set($aluno->paiReligiao);\n\t\t if(!empty($aluno->paiProfissao)) \t\t$sqlQuery->set($aluno->paiProfissao);\n\t\t if(!empty($aluno->paiEnderTrab)) \t\t$sqlQuery->set($aluno->paiEnderTrab);\n\t\t if(!empty($aluno->paiTelefone)) \t\t$sqlQuery->set($aluno->paiTelefone);\n\t\t if(!empty($aluno->paiEmail)) \t\t$sqlQuery->set($aluno->paiEmail);\n\t\t if(!empty($aluno->paiTitulo)) \t\t$sqlQuery->set($aluno->paiTitulo);\n\t\t if(!empty($aluno->paiTituloZona)) \t\t$sqlQuery->set($aluno->paiTituloZona);\n\t\t if(!empty($aluno->paiTituloSecao)) \t\t$sqlQuery->set($aluno->paiTituloSecao);\n\t\t if(!empty($aluno->nomeMae)) \t\t$sqlQuery->set($aluno->nomeMae);\n\t\t if(!empty($aluno->maeViva)) \t\t$sqlQuery->set($aluno->maeViva);\n\t\t if(!empty($aluno->maeNacionalidade)) \t\t$sqlQuery->set($aluno->maeNacionalidade);\n\t\t if(!empty($aluno->maeNaturalidade)) \t\t$sqlQuery->set($aluno->maeNaturalidade);\n\t\t if(!empty($aluno->maeNivEscolar)) \t\t$sqlQuery->set($aluno->maeNivEscolar);\n\t\t if(!empty($aluno->maeReligiao)) \t\t$sqlQuery->set($aluno->maeReligiao);\n\t\t if(!empty($aluno->maeProfissao)) \t\t$sqlQuery->set($aluno->maeProfissao);\n\t\t if(!empty($aluno->maeEnderTrab)) \t\t$sqlQuery->set($aluno->maeEnderTrab);\n\t\t if(!empty($aluno->maeTelefone)) \t\t$sqlQuery->set($aluno->maeTelefone);\n\t\t if(!empty($aluno->maeEmail)) \t\t$sqlQuery->set($aluno->maeEmail);\n\t\t if(!empty($aluno->maeTitulo)) \t\t$sqlQuery->set($aluno->maeTitulo);\n\t\t if(!empty($aluno->maeTituloZona)) \t\t$sqlQuery->set($aluno->maeTituloZona);\n\t\t if(!empty($aluno->maeTituloSecao)) \t\t$sqlQuery->set($aluno->maeTituloSecao);\n\t\t if(!empty($aluno->maeNi)) \t\t$sqlQuery->set($aluno->maeNi);\n\t\t if(!empty($aluno->paiNi)) \t\t$sqlQuery->set($aluno->paiNi);\n\t\t if(!empty($aluno->nomeResponsavel)) \t\t$sqlQuery->set($aluno->nomeResponsavel);\n\t\t if(!empty($aluno->parentescoResponsavel)) \t\t$sqlQuery->set($aluno->parentescoResponsavel);\n\t\t if(!empty($aluno->nacionalResponsavel)) \t\t$sqlQuery->set($aluno->nacionalResponsavel);\n\t\t if(!empty($aluno->naturalResponsavel)) \t\t$sqlQuery->set($aluno->naturalResponsavel);\n\t\t if(!empty($aluno->nivEscolarResponsavel)) \t\t$sqlQuery->set($aluno->nivEscolarResponsavel);\n\t\t if(!empty($aluno->religiaoResponsavel)) \t\t$sqlQuery->set($aluno->religiaoResponsavel);\n\t\t if(!empty($aluno->profissaoResponsavel)) \t\t$sqlQuery->set($aluno->profissaoResponsavel);\n\t\t if(!empty($aluno->enderTrabResponsavel)) \t\t$sqlQuery->set($aluno->enderTrabResponsavel);\n\t\t if(!empty($aluno->telefResponsavel)) \t\t$sqlQuery->set($aluno->telefResponsavel);\n\t\t if(!empty($aluno->emailResponsavel)) \t\t$sqlQuery->set($aluno->emailResponsavel);\n\t\t if(!empty($aluno->tituloResponsavel)) \t\t$sqlQuery->set($aluno->tituloResponsavel);\n\t\t if(!empty($aluno->tituloZonaResponsavel)) \t\t$sqlQuery->set($aluno->tituloZonaResponsavel);\n\t\t if(!empty($aluno->tituloSecaoResponsavel)) \t\t$sqlQuery->set($aluno->tituloSecaoResponsavel);\n\t\t if(!empty($aluno->descriTranspEscolar)) \t\t$sqlQuery->set($aluno->descriTranspEscolar);\n\t\t if(!empty($aluno->paiUf)) \t\t$sqlQuery->set($aluno->paiUf);\n\t\t if(!empty($aluno->maeUf)) \t\t$sqlQuery->set($aluno->maeUf);\n\t\t if(!empty($aluno->responsavelUf)) \t\t$sqlQuery->set($aluno->responsavelUf);\n\t\t if(!empty($aluno->dataNascimento)) \t\t$sqlQuery->set($aluno->dataNascimento);\n\t\t if(!empty($aluno->ufRegComarca)) \t\t$sqlQuery->set($aluno->ufRegComarca);\n\t\t if(!empty($aluno->cpfAluno)) \t\t$sqlQuery->set($aluno->cpfAluno);\n\t\t if(!empty($aluno->cpfPai)) \t\t$sqlQuery->set($aluno->cpfPai);\n\t\t if(!empty($aluno->cpfMae)) \t\t$sqlQuery->set($aluno->cpfMae);\n\t\t if(!empty($aluno->cpfResponsavel)) \t\t$sqlQuery->set($aluno->cpfResponsavel);\n\t\t if(!empty($aluno->codUf)) \t\t$sqlQuery->set($aluno->codUf);\n\t\t if(!empty($aluno->codCidade)) \t\t$sqlQuery->set($aluno->codCidade);\n\t\t if(!empty($aluno->codPai)) \t\t$sqlQuery->set($aluno->codPai);\n\t\t if(!empty($aluno->created)) \t\t$sqlQuery->set($aluno->created);\n\t\t if(!empty($aluno->status)) \t\t$sqlQuery->set($aluno->status);\n\t\t if(!empty($aluno->senha)) \t\t$sqlQuery->set($aluno->senha);\n\t\t if(!empty($aluno->foto)) \t\t$sqlQuery->set($aluno->foto);\n\t\t if(!empty($aluno->colaboraRendaFamiliar)) \t\t$sqlQuery->set($aluno->colaboraRendaFamiliar);\n\n\t\t$sqlQuery->setNumber($aluno->id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setId_tarifa('');\n $this->setYear('');\n $this->setCantidad('');\n $this->setObserv('');\n $this->setId_serie('');\n $this->setPrimary_key($aPK);\n }",
"protected function setDbalInputFieldsToRender() {}",
"public static function setters();",
"private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }",
"protected function prepareForValidation()\n {\n $this->merge([\n 'nome' => $this->nome,\n 'nascimento' => convertDateToDatabase($this->nascimento),\n 'cpf' => returnOnlyNumbers($this->cpf),\n 'email' => $this->email,\n ]);\n }",
"public function atualizar(){\r\n return (new Database('atividades'))->update('id = '.$this->id,[\r\n 'titulo' => $this->titulo,\r\n 'descricao' => $this->descricao,\r\n 'ativo' => $this->ativo,\r\n 'data' => $this->data\r\n ]);\r\n }",
"function _prep_for_form($field)\r\n\t{\r\n\t\t$this->{$field} = $this->form_validation->prep_for_form($this->{$field});\r\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }",
"protected function prepareForValidation(): void\n {\n // $this->merge([\n // 'created_by' => Auth::user()->id\n // ]);\n // $this->merge([\n // 'updated_by' => Auth::user()->id\n // ]);\n\n // $this->merge([\n // 'status' => 'Active',\n // 'name' => $this->input('display_name'),\n // 'password' => ''\n // ]);\n\n\n // $this->merge([\n // 'slug' => str_slug($this->input('title'))\n // ]);\n // $this->merge([\n // 'posted_at' => Carbon::parse($this->input('posted_at'))\n // ]);\n }",
"function asignar_valores3(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->temporada=$_POST['temporada'];\n\t\t$this->nombre=$_POST['nombre_plan'];\n\t\t$this->descripcion=$_POST['descripcion_plan'];\n\t\t$this->precio=$_POST['precio_plan'];\n\t\t$this->maxadultos=$_POST['maxadultos'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t}",
"function asignar_valores2(){\n\t\t/* Metodo para recibir valores del exterior. */\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->desde=$_POST['desde'];\n\t\t$this->hasta=$_POST['hasta'];\n\t\t$this->titulo=$_POST['titulo'];\n\t\t$this->alternativo=$_POST['alternativo'];\n\t\t$this->paxadicional=$_POST['paxadicional'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t\t$this->desde_a=$_POST['desde_a'];\n\t\t$this->hasta_a=$_POST['hasta_a'];\n\t\t$this->precio_a=$_POST['precio_a'];\n\t\t$this->desde_b=$_POST['desde_b'];\n\t\t$this->hasta_b=$_POST['hasta_b'];\n\t\t$this->precio_b=$_POST['precio_b'];\n\t\t\n\t}",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed222_i_codigo = ($this->ed222_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed222_i_codigo\"]:$this->ed222_i_codigo);\n $this->ed222_i_itinerario = ($this->ed222_i_itinerario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed222_i_itinerario\"]:$this->ed222_i_itinerario);\n $this->ed222_i_escolaproc = ($this->ed222_i_escolaproc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed222_i_escolaproc\"]:$this->ed222_i_escolaproc);\n }else{\n $this->ed222_i_codigo = ($this->ed222_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed222_i_codigo\"]:$this->ed222_i_codigo);\n }\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y78_codtipo = ($this->y78_codtipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_codtipo\"]:$this->y78_codtipo);\n $this->y78_receit = ($this->y78_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_receit\"]:$this->y78_receit);\n $this->y78_valor = ($this->y78_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_valor\"]:$this->y78_valor);\n $this->y78_descr = ($this->y78_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_descr\"]:$this->y78_descr);\n }else{\n $this->y78_codtipo = ($this->y78_codtipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_codtipo\"]:$this->y78_codtipo);\n $this->y78_receit = ($this->y78_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y78_receit\"]:$this->y78_receit);\n }\n }",
"public function postHydrate(): void\n {\n if ('invalid' === $this->value) {\n $this->value = 'valid';\n }\n }",
"public function setAttributes()\n\t{\n\t\t$this->title \t\t= Input::get( 'title' );\n\t\t$this->description \t= Input::get( 'description' );\n\t\t$this->color \t\t= Input::get( 'color' );\n\t\t$this->type \t\t= Input::get( 'type' );\n\t\t$this->canvas_id\t= Input::get( 'canvas_id', Input::get( 'canvasId' ) );\n\t}",
"function after_validation_on_update() {}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"public function actualiza($dataArray){\n //deleted, created_at y updated_at son comunes, pero estos jamas se actualizaran por acá\n if (array_key_exists('fechaNac',$dataArray))\n $dataArray['fechaNac'] = DateFormat::spanishDateToEnglishDate($dataArray['fechaNac']);\n if (array_key_exists('password',$dataArray))\n $dataArray['password'] = bcrypt($dataArray['password']);\n $this->personaNatural->update($dataArray);\n $this->model->update($dataArray); //set data only in its PersonaNatural model\n }",
"function setInputValues()\n {\n // Set input type based on GET/POST\n $inputType = ($_SERVER['REQUEST_METHOD'] === 'POST') ? INPUT_POST : INPUT_GET;\n // Init global variables\n global $typeID, $classID, $makeID, $price, $model, $year;\n global $sort, $sortDirection;\n // Set each variable, escape special characters\n $typeID = filter_input($inputType, 'typeID', FILTER_VALIDATE_INT);\n $classID = filter_input($inputType, 'classID', FILTER_VALIDATE_INT);\n $makeID = filter_input($inputType, 'makeID', FILTER_VALIDATE_INT);\n $sort = filter_input($inputType, 'sort', FILTER_VALIDATE_INT);\n $sortDirection = filter_input($inputType, 'sortDirection', FILTER_VALIDATE_INT);\n $price = filter_input($inputType, 'price', FILTER_VALIDATE_INT);\n $year = filter_input($inputType, 'year', FILTER_VALIDATE_INT);\n $model = htmlspecialchars(filter_input($inputType, 'model'));\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed03_i_codigo = ($this->ed03_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed03_i_codigo\"]:$this->ed03_i_codigo);\n $this->ed03_i_rechumanoativ = ($this->ed03_i_rechumanoativ == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed03_i_rechumanoativ\"]:$this->ed03_i_rechumanoativ);\n $this->ed03_i_relacaotrabalho = ($this->ed03_i_relacaotrabalho == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed03_i_relacaotrabalho\"]:$this->ed03_i_relacaotrabalho);\n }else{\n $this->ed03_i_codigo = ($this->ed03_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed03_i_codigo\"]:$this->ed03_i_codigo);\n }\n }",
"public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->c64_codpla = ($this->c64_codpla == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c64_codpla\"]:$this->c64_codpla);\n $this->c64_estrut = ($this->c64_estrut == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c64_estrut\"]:$this->c64_estrut);\n $this->c64_descr = ($this->c64_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c64_descr\"]:$this->c64_descr);\n }else{\n $this->c64_codpla = ($this->c64_codpla == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c64_codpla\"]:$this->c64_codpla);\n }\n }",
"public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed77_i_codigo = ($this->ed77_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_codigo\"]:$this->ed77_i_codigo);\n $this->ed77_i_base = ($this->ed77_i_base == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]:$this->ed77_i_base);\n $this->ed77_i_escola = ($this->ed77_i_escola == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"]:$this->ed77_i_escola);\n $this->ed77_i_basecont = ($this->ed77_i_basecont == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_basecont\"]:$this->ed77_i_basecont);\n }else{\n $this->ed77_i_codigo = ($this->ed77_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_codigo\"]:$this->ed77_i_codigo);\n }\n }",
"public function atualizar($oficina){\r\n\t\t$sql = 'UPDATE oficina SET id = :id, nome = :nome, data = :data, carga_horaria = :carga_horaria, horario = :horario, id_evento = :id_evento, tipo = :tipo, vagas = :vagas WHERE id = :id';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->bindValue(':id',$oficina->getId()); \n\r\t\t$consulta->bindValue(':nome',$oficina->getNome()); \n\r\t\t$consulta->bindValue(':data',$oficina->getData()); \n\r\t\t$consulta->bindValue(':carga_horaria',$oficina->getCarga_horaria()); \n\r\t\t$consulta->bindValue(':horario',$oficina->getHorario()); \n\r\t\t$consulta->bindValue(':id_evento',$oficina->getId_evento()); \n\r\t\t$consulta->bindValue(':tipo',$oficina->getTipo()); \n\r\t\t$consulta->bindValue(':vagas',$oficina->getVagas()); \r\n\t\t$consulta->execute();\r\n\t}",
"function before_validation_on_update() {}",
"public function onBeforeWrite()\n {\n foreach (self::$defaults as $field => $value) {\n if (empty($this->$field)) {\n $this->$field = $value;\n }\n }\n //TODO: prevent non-heirarichal entries, eg country = '*', then state = 'blah'\n parent::onBeforeWrite();\n }",
"protected function editar()\n {\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->fa35_i_codigo = ($this->fa35_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa35_i_codigo\"]:$this->fa35_i_codigo);\n $this->fa35_i_listacontrolado = ($this->fa35_i_listacontrolado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa35_i_listacontrolado\"]:$this->fa35_i_listacontrolado);\n $this->fa35_i_medanvisa = ($this->fa35_i_medanvisa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa35_i_medanvisa\"]:$this->fa35_i_medanvisa);\n }else{\n $this->fa35_i_codigo = ($this->fa35_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa35_i_codigo\"]:$this->fa35_i_codigo);\n }\n }",
"public function beforeSave()\n {\n $value = $this->getValue();\n $value = $this->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }",
"public function beforeValidation() {\n\t\t$this->modified = new RawValue('now()');\n\t}",
"public function setFielda($campos) {\n $fields = $this->separate($campos[0]);\n\n # Get the query based in filters\n $this->checkFields($fields);\n # If exists two type fields, check table\n $this->checkTable($campos[1]);\n # Check type of data\n $this->checkType();\n}",
"function SeteoCampos(){\n\t\t// Campos que van en en detalle, deben empezar su nombre con 'C'\n\t\t$this->addField('C1', 99999,\t0, 15);\n $this->addField('C2', 99999,\t0, 15);\n $this->addField('C3', 99999,\t0, 40);\t\t\n $this->addField('C4', 99999,\t0, 65);\t\t\n $this->addField('C5', 99999,\t0, 40);\n $this->addField('C6', 99999,\t0, 25);\t\t\n $this->addField('C7', 99999,\t0, 65);\t\t\n\t\t\n\t\t$this->addField('HG1', 0,\t0,\t160);\n\t\t\t\t\n\t}",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tr20_id = ($this->tr20_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_id\"]:$this->tr20_id);\n if($this->tr20_dtalvara == \"\"){\n $this->tr20_dtalvara_dia = ($this->tr20_dtalvara_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_dia\"]:$this->tr20_dtalvara_dia);\n $this->tr20_dtalvara_mes = ($this->tr20_dtalvara_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_mes\"]:$this->tr20_dtalvara_mes);\n $this->tr20_dtalvara_ano = ($this->tr20_dtalvara_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_ano\"]:$this->tr20_dtalvara_ano);\n if($this->tr20_dtalvara_dia != \"\"){\n $this->tr20_dtalvara = $this->tr20_dtalvara_ano.\"-\".$this->tr20_dtalvara_mes.\"-\".$this->tr20_dtalvara_dia;\n }\n }\n $this->tr20_numcgm = ($this->tr20_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_numcgm\"]:$this->tr20_numcgm);\n $this->tr20_ruaid = ($this->tr20_ruaid == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_ruaid\"]:$this->tr20_ruaid);\n $this->tr20_nro = ($this->tr20_nro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_nro\"]:$this->tr20_nro);\n $this->tr20_bairroid = ($this->tr20_bairroid == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_bairroid\"]:$this->tr20_bairroid);\n $this->tr20_complem = ($this->tr20_complem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_complem\"]:$this->tr20_complem);\n $this->tr20_fone = ($this->tr20_fone == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_fone\"]:$this->tr20_fone);\n $this->tr20_prefixo = ($this->tr20_prefixo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_prefixo\"]:$this->tr20_prefixo);\n }else{\n $this->tr20_id = ($this->tr20_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_id\"]:$this->tr20_id);\n }\n }",
"protected function prepareForValidation()\n {\n\n $attrs = $this->all();\n $attrs['day'] = ucfirst($attrs['day']);\n $hours = $this->transformHoursAndMinutes();\n $attrs['time_start'] = $hours[0];\n $attrs['time_end'] = $hours[1];\n $this->replace($attrs);\n }",
"function save_user_fields ($user_id) {\n if ( isset($_POST['billing_first_name']) ){\n update_user_meta($user_id, 'billing_first_name', sanitize_text_field($_POST['billing_first_name']));\n }\n \n if ( isset($_POST['billing_last_name']) ){\n update_user_meta($user_id, 'billing_last_name', sanitize_text_field($_POST['billing_last_name']));\n }\n\n if ( isset($_POST['billing_tipo_documento']) ){\n update_user_meta($user_id, 'billing_tipo_documento', sanitize_text_field($_POST['billing_tipo_documento']));\n }\n\n if ( isset($_POST['billing_numero_documento']) ){\n update_user_meta($user_id, 'billing_numero_documento', sanitize_text_field($_POST['billing_numero_documento']));\n }\n \n}",
"private function setupFieldsAttributes() {\n\n\t\tforeach ( $this->form as $field ) {\n\n\t\t\tif ( ! $field->hasAttribute( 'id' ) ) {\n\t\t\t\t$field->setAttribute( 'id', esc_attr( sanitize_title( $field->getName() ) ) );\n\t\t\t}\n\t\t}\n\n\t}",
"public function atualiza($aluno){\n\t\t\t$sql = \"UPDATE aluno SET nome=:nome,turma=:turma,telefone=:telefone,cidade=:cidade,bairro=:bairro,rua=:rua,numero_casa=:numero_casa,complementos=:complementos WHERE id=:id\";\n\n\t\t\t$query = $this->conexao->prepare($sql);\n\n\t\t\t$query->execute(['nome'=>$aluno->getNome(),'turma'=>$aluno->getTurma(),'telefone'=>$aluno->getTelefone(), 'cidade'=>$aluno->getCidade(), 'bairro'=>$aluno->getBairro(), 'rua'=>$aluno->getRua(), 'numero_casa'=>$aluno->getNumeroCasa(), 'complementos'=>$aluno->getComplementos(), 'id'=>$aluno->getId()]);\n\n\t\t}",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed276_i_codigo = ($this->ed276_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_i_codigo\"]:$this->ed276_i_codigo);\n $this->ed276_i_alunoalt = ($this->ed276_i_alunoalt == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_i_alunoalt\"]:$this->ed276_i_alunoalt);\n $this->ed276_c_campo = ($this->ed276_c_campo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_c_campo\"]:$this->ed276_c_campo);\n $this->ed276_c_contant = ($this->ed276_c_contant == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_c_contant\"]:$this->ed276_c_contant);\n $this->ed276_c_contatual = ($this->ed276_c_contatual == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_c_contatual\"]:$this->ed276_c_contatual);\n }else{\n $this->ed276_i_codigo = ($this->ed276_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed276_i_codigo\"]:$this->ed276_i_codigo);\n }\n }",
"public function actualizar_perfil(Request $request){\n // 'dato_opcion1' => $request->dato_opcion1 , 'dato_opcion2' => $request->dato_opcion2 , 'dato_opcion3' => $request->dato_opcion3 , 'opcion1_valor' => $request->opcion1_valor , 'opcion2_valor' => $request->opcion2_valor, 'opcion3_valor' => $request->opcion3_valor]);\n\nif ($request->nombre != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['nombre' => $request->nombre]);\n}\nif ($request->apellidos != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['apellidos' => $request->apellidos]);\n}\nif ($request->dni != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['dni' => $request->dni]);\n}\nif ($request->email != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['alumno.email' => $request->email]);\n}\nif ($request->direccion != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['direccion' => $request->direccion]);\n}\nif ($request->carrera != \"-\") {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['carrera' => $request->carrera]);\n}\n\nif ($request->dato_opcion1 != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['dato_opcion1' => $request->dato_opcion1]);\n}\nif ($request->dato_opcion2 != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['dato_opcion2' => $request->dato_opcion2]);\n}\nif ($request->dato_opcion3 != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['dato_opcion3' => $request->dato_opcion3]);\n}\n\nif ($request->opcion1_valor != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['opcion1_valor' => $request->opcion1_valor]);\n}\nif ($request->opcion2_valor != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['opcion2_valor' => $request->opcion2_valor]);\n}\nif ($request->opcion3_valor != NULL) {\n DB::table('alumno')\n ->join('users','users.id','=','user_id')\n ->where('users.id','=', Auth::user()->id)\n ->update(['opcion3_valor' => $request->opcion3_valor]);\n}\n\nreturn redirect()->back()->with('message', 'INFORMACIÓN DE PERFIL ACTUALIZADA CORRECTAMENTE');\n\n\n}",
"function save() {\n //save the added fields\n }",
"public function beforeSave()\n {\n $this->setParams([\n 'url' => $this->getValue(),\n 'apiKey' => $this->getFieldsetDataValue('api_key'),\n 'version' => $this->getFieldsetDataValue('api_version')\n ]);\n\n if (!$this->isUrl($this->getValue())) {\n throw new \\Magento\\Framework\\Exception\\ValidatorException(__('Invalid CRM url'));\n }\n\n if (!$this->isHttps($this->getValue())) {\n $this->schemeEdit($this->getValue());\n }\n\n if ($this->validateApiUrl($this->api)) {\n $this->setValue($this->getValue());\n }\n\n parent::beforeSave();\n }",
"public function actualizar(){\n }",
"public function actualizar(){\n }",
"protected function setNullAllAttributes()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\tif( $value == \"real\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"int\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"date\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"string\" ) $this->$field = null ;\n\t\t}\n\t}",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->l30_codigo = ($this->l30_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_codigo\"]:$this->l30_codigo);\n if($this->l30_data == \"\"){\n $this->l30_data_dia = ($this->l30_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_dia\"]:$this->l30_data_dia);\n $this->l30_data_mes = ($this->l30_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_mes\"]:$this->l30_data_mes);\n $this->l30_data_ano = ($this->l30_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_ano\"]:$this->l30_data_ano);\n if($this->l30_data_dia != \"\"){\n $this->l30_data = $this->l30_data_ano.\"-\".$this->l30_data_mes.\"-\".$this->l30_data_dia;\n }\n }\n $this->l30_portaria = ($this->l30_portaria == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_portaria\"]:$this->l30_portaria);\n if($this->l30_datavalid == \"\"){\n $this->l30_datavalid_dia = ($this->l30_datavalid_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_dia\"]:$this->l30_datavalid_dia);\n $this->l30_datavalid_mes = ($this->l30_datavalid_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_mes\"]:$this->l30_datavalid_mes);\n $this->l30_datavalid_ano = ($this->l30_datavalid_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_ano\"]:$this->l30_datavalid_ano);\n if($this->l30_datavalid_dia != \"\"){\n $this->l30_datavalid = $this->l30_datavalid_ano.\"-\".$this->l30_datavalid_mes.\"-\".$this->l30_datavalid_dia;\n }\n }\n $this->l30_tipo = ($this->l30_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_tipo\"]:$this->l30_tipo);\n $this->l30_nomearquivo = ($this->l30_nomearquivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_nomearquivo\"]:$this->l30_nomearquivo);\n }else{\n $this->l30_codigo = ($this->l30_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_codigo\"]:$this->l30_codigo);\n }\n }",
"public function beforeSave()\n {\n $value = $this->getValue();\n if (is_array($value)) {\n $value = $this->_helper->makeStorableArrayFieldValue($value);\n }\n \n $this->setValue($value);\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->v59_inicial = ($this->v59_inicial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_inicial\"]:$this->v59_inicial);\n $this->v59_numpre = ($this->v59_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_numpre\"]:$this->v59_numpre);\n }else{\n $this->v59_inicial = ($this->v59_inicial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_inicial\"]:$this->v59_inicial);\n $this->v59_numpre = ($this->v59_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_numpre\"]:$this->v59_numpre);\n }\n }",
"public function beforeValidationOnUpdate()\n {\n // Timestamp on the update\n $this->modifyAt = time();\n }",
"public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }",
"private function before_custom_save()\n\t\t{\n\t\t\t$fields = self::$db->table_info($this->table_name);\n\t\t\tforeach($fields AS $field)\n\t\t\t{\n\t\t\t\tif(!strlen($this->$field['name'])) {\n\t\t\t\t\t$this->$field['name'] = 'NULL';\n\t\t\t\t}\n\t\t\t\tif(method_exists($this, 'preSave_'.$field['name'])) {\n\t\t\t\t\t$this->{'preSave_'.$field['name']}($field);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private function resetInputFields(){\n $this->name = '';\n }",
"protected function _beforeSave()\n {\n $value = $this->getValue();\n $value = Mage::helper('mail/connectfields')->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pc31_orcamforne = ($this->pc31_orcamforne == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_orcamforne\"]:$this->pc31_orcamforne);\n $this->pc31_nomeretira = ($this->pc31_nomeretira == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_nomeretira\"]:$this->pc31_nomeretira);\n if($this->pc31_dtretira == \"\"){\n $this->pc31_dtretira_dia = ($this->pc31_dtretira_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_dia\"]:$this->pc31_dtretira_dia);\n $this->pc31_dtretira_mes = ($this->pc31_dtretira_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_mes\"]:$this->pc31_dtretira_mes);\n $this->pc31_dtretira_ano = ($this->pc31_dtretira_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_ano\"]:$this->pc31_dtretira_ano);\n if($this->pc31_dtretira_dia != \"\"){\n $this->pc31_dtretira = $this->pc31_dtretira_ano.\"-\".$this->pc31_dtretira_mes.\"-\".$this->pc31_dtretira_dia;\n }\n }\n $this->pc31_horaretira = ($this->pc31_horaretira == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_horaretira\"]:$this->pc31_horaretira);\n $this->pc31_liclicitatipoempresa = ($this->pc31_liclicitatipoempresa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_liclicitatipoempresa\"]:$this->pc31_liclicitatipoempresa);\n $this->pc31_tipocondicao = ($this->pc31_tipocondicao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_tipocondicao\"]:$this->pc31_tipocondicao);\n }else{\n $this->pc31_orcamforne = ($this->pc31_orcamforne == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_orcamforne\"]:$this->pc31_orcamforne);\n }\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh157_sequencial = ($this->rh157_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh157_sequencial\"]:$this->rh157_sequencial);\n $this->rh157_usuario = ($this->rh157_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh157_usuario\"]:$this->rh157_usuario);\n $this->rh157_lotacao = ($this->rh157_lotacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh157_lotacao\"]:$this->rh157_lotacao);\n }else{\n $this->rh157_sequencial = ($this->rh157_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh157_sequencial\"]:$this->rh157_sequencial);\n }\n }",
"public function actualizar(){\n }",
"function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ov01_sequencial = ($this->ov01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_sequencial\"]:$this->ov01_sequencial);\n $this->ov01_situacaoouvidoriaatendimento = ($this->ov01_situacaoouvidoriaatendimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_situacaoouvidoriaatendimento\"]:$this->ov01_situacaoouvidoriaatendimento);\n $this->ov01_tipoprocesso = ($this->ov01_tipoprocesso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_tipoprocesso\"]:$this->ov01_tipoprocesso);\n $this->ov01_formareclamacao = ($this->ov01_formareclamacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_formareclamacao\"]:$this->ov01_formareclamacao);\n $this->ov01_tipoidentificacao = ($this->ov01_tipoidentificacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_tipoidentificacao\"]:$this->ov01_tipoidentificacao);\n $this->ov01_usuario = ($this->ov01_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_usuario\"]:$this->ov01_usuario);\n $this->ov01_depart = ($this->ov01_depart == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_depart\"]:$this->ov01_depart);\n $this->ov01_instit = ($this->ov01_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_instit\"]:$this->ov01_instit);\n $this->ov01_numero = ($this->ov01_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_numero\"]:$this->ov01_numero);\n $this->ov01_anousu = ($this->ov01_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_anousu\"]:$this->ov01_anousu);\n if($this->ov01_dataatend == \"\"){\n $this->ov01_dataatend_dia = ($this->ov01_dataatend_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_dia\"]:$this->ov01_dataatend_dia);\n $this->ov01_dataatend_mes = ($this->ov01_dataatend_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_mes\"]:$this->ov01_dataatend_mes);\n $this->ov01_dataatend_ano = ($this->ov01_dataatend_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_ano\"]:$this->ov01_dataatend_ano);\n if($this->ov01_dataatend_dia != \"\"){\n $this->ov01_dataatend = $this->ov01_dataatend_ano.\"-\".$this->ov01_dataatend_mes.\"-\".$this->ov01_dataatend_dia;\n }\n }\n $this->ov01_horaatend = ($this->ov01_horaatend == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_horaatend\"]:$this->ov01_horaatend);\n $this->ov01_requerente = ($this->ov01_requerente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_requerente\"]:$this->ov01_requerente);\n $this->ov01_solicitacao = ($this->ov01_solicitacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_solicitacao\"]:$this->ov01_solicitacao);\n $this->ov01_executado = ($this->ov01_executado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_executado\"]:$this->ov01_executado);\n }else{\n $this->ov01_sequencial = ($this->ov01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_sequencial\"]:$this->ov01_sequencial);\n }\n }",
"public function atualizar(){\r\n return (new Database('cartao'))->update(' id = '.$this->id, [\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n }",
"private function resetInput()\n {\t\t\n //Que id es para las acciones\n $this->selected_id = null;\n $this->cob_solicitud = null;\n $this->cob_comproban = null;\n $this->cob_serie = null;\n $this->cob_numero = null;\n $this->con_subtotal = null;\n $this->cob_igv = null;\n $this->cob_total = null;\n \n }"
] | [
"0.6695341",
"0.6605308",
"0.64370596",
"0.6316871",
"0.6283973",
"0.6258171",
"0.61481196",
"0.6110965",
"0.60848427",
"0.60702395",
"0.60149026",
"0.599725",
"0.59970146",
"0.5989812",
"0.59833664",
"0.59787756",
"0.5958578",
"0.5952102",
"0.5949218",
"0.58850634",
"0.58798766",
"0.58768326",
"0.5876628",
"0.5858562",
"0.5850082",
"0.58473146",
"0.5845345",
"0.5844452",
"0.58374846",
"0.5832204",
"0.5821885",
"0.5819664",
"0.5812444",
"0.5810945",
"0.5801257",
"0.5798577",
"0.5796496",
"0.57763314",
"0.5760644",
"0.57575405",
"0.5756319",
"0.5751845",
"0.5736158",
"0.5734885",
"0.57137454",
"0.5707973",
"0.57073426",
"0.5679917",
"0.56780595",
"0.5669278",
"0.5661958",
"0.5659978",
"0.565698",
"0.5650588",
"0.5648171",
"0.5644754",
"0.5625338",
"0.5624294",
"0.56232595",
"0.56150866",
"0.56145936",
"0.5612502",
"0.5606811",
"0.5600033",
"0.5599975",
"0.55907667",
"0.5577752",
"0.5573324",
"0.5572444",
"0.55716074",
"0.5569206",
"0.5566881",
"0.5566866",
"0.55666983",
"0.5553846",
"0.5552441",
"0.55479354",
"0.55443203",
"0.55438894",
"0.55432594",
"0.5542165",
"0.5540224",
"0.5540033",
"0.55380124",
"0.5536279",
"0.5536279",
"0.5535149",
"0.55267227",
"0.5523294",
"0.55213153",
"0.5519469",
"0.5515962",
"0.55152893",
"0.55141896",
"0.549482",
"0.54921424",
"0.5490246",
"0.5487981",
"0.5484655",
"0.54841876",
"0.54806924"
] | 0.0 | -1 |
/ PUBLIC STATIC METHODS | public static function getInstance( $key )
{
if ( !array_key_exists( $key, self::$_instanceMap ) ) self::$_instanceMap[ $key ] = new View( $key );
return self::$_instanceMap[ $key ];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final private function __construct() {}",
"final private function __construct() {}",
"protected function __init__() { }",
"public function __init(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct () {}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"private function __construct()\t{}",
"protected final function __construct() {}",
"final private function __construct(){\r\r\n\t}",
"private function __() {\n }",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private final function __construct() {}",
"private function __construct(){ }",
"private function __construct(){ }",
"private function __construct() {\r\n\t\r\n\t}",
"protected function __construct(){}",
"protected function __construct(){}",
"protected function __construct(){}",
"final private function __construct() {\n\t\t\t}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}"
] | [
"0.7062266",
"0.7062266",
"0.7059086",
"0.7045581",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6985032",
"0.6942497",
"0.6942085",
"0.6942085",
"0.6942085",
"0.6940323",
"0.69052947",
"0.68739456",
"0.6873702",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68663",
"0.68652713",
"0.68627006",
"0.68627006",
"0.68118453",
"0.6799262",
"0.6799262",
"0.679532",
"0.67925346",
"0.67925346",
"0.67925346",
"0.67604256",
"0.6744721",
"0.6744721",
"0.6744721",
"0.6744721",
"0.6744721"
] | 0.0 | -1 |
Specifies the access control rules. This method is used by the 'accessControl' filter. | public function accessRules()
{
return array(
array('allow',
'actions'=>array('index','view'),
'users'=>array("@")
),
array('allow',
'actions'=>array('delall','add','edit'),
'users'=>User::model()->getManage(4)
),
array('deny',
'users'=>array('*'),
),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admins only\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t\t\t/*'users' => array(\"?\"),*/\n 'expression' => array($this,'isLogedInOrHasKey'),\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('login','error','logout'),\n 'users'=>array('*'),\n ),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','delivery','settings'),\n\t\t\t\t'users'=>array('@'),\n 'expression'=>'AdmAccess::model()->accessAdmin()'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','index','delete', 'setIsShow', 'setIsAvailable', 'setIsNew'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('allotMore','allotOne'),\n\t\t\t\t'expression'=>array('PlaneAllotController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'expression'=>array('PlaneAllotController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('list','show','captcha','PostedInMonth','PostedOnDate', 'search'),\n 'users'=>array('*'),\n ),\n array('allow',\n 'actions'=>array('ajaxBookmark','create'),\n 'users'=>array('@'),\n ),\n array('allow',\n 'expression'=>'Yii::app()->user->status=='.User::STATUS_ADMIN.\n '||Yii::app()->user->status=='.User::STATUS_WRITER,\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','view'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','view'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array(\n 'allow',\n 'actions' => array('index', 'archive', 'view', 'read', 'userListResults'),\n 'users' => array('@')\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('create','admin', 'update'),\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array(\n 'deny', // deny all users\n 'users' => array('*')\n )\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'update' and 'dynamicUpdate' actions\n\t\t\t\t'actions'=>array('update', 'dynamicUpdate'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'delete' actions\n\t\t\t\t'actions'=>array('create','delete'),\n\t\t\t\t'expression'=>'Yii::app()->user->isManager()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n Yii::app()->user->loginUrl = array(\"/cruge/ui/login\");\n\t\treturn array(\n\t\t\t\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('ajaxCopia','editaTemp','index','view','admin','revisaPendientes', 'create','update','admin','motMuestraPlan','checkPlanMot'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\t\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('deny', // deny not login users\n\t\t\t\t'users'=>array('?'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n 'actions'=>array('admin','view'),\n 'roles'=>array('reader', 'writer')\n ),\n array('allow',\n\t\t\t\t'actions'=>array('create', 'update', 'delete'),\n 'roles'=>array('writer')\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin \n\t\t\t\t'actions' => array('customize'),\n\t\t\t\t'users' => array('@'),\n\t\t\t\t'expression' => '$user->isAdmin',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array(\n 'deny',\n 'actions' => array('oauthadmin'),\n ),\n );\n }",
"public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t\t'actions'=>array('admin','update','create'), //adapted from code.google.com/p/yii-user/wiki/API\n\t\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', \n 'actions'=>array('del','parse','authorize','operate'),\n 'users'=>array('@'),\n ),\n array('deny', \n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user\n\t\t\t\t'roles'=>array('arckanto-admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\t return array(\n array('allow',\n 'actions'=>array(),\n 'roles'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow authenticated users to access all actions\n 'users' => array(Yii::app()->user->name),\n ),\n array('deny'),\n );\n }",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array(\r\n 'admin',\r\n\r\n //Users\r\n\r\n 'users',\r\n 'checkstatus',\r\n 'activate',\r\n\r\n //Drivers\r\n 'drivers',\r\n 'loaddriverform',\r\n 'validatedriver',\r\n 'driverstatus',\r\n 'savedriverstatus',\r\n\r\n //Cars\r\n 'cars',\r\n 'loadcarform',\r\n 'validatecar',\r\n 'carstatus',\r\n 'savecarstatus',\r\n 'repairlogform',\r\n 'saverepairlog',\r\n ),\r\n\t\t\t\t'roles'=>array('rxAdmin'),\r\n\t\t\t),\r\n\r\n\t\t\tarray('deny', \r\n\t\t\t\t'actions'=>array(\r\n 'admin',\r\n 'users',\r\n 'checkstatus',\r\n 'activate',\r\n 'drivers',\r\n 'loaddriverform',\r\n 'validatedriver',\r\n 'driverstatus',\r\n 'savedriverstatus',\r\n 'cars',\r\n 'loadcarform',\r\n 'validatecar',\r\n 'carstatus',\r\n 'savecarstatus',\r\n 'repairlogform',\r\n 'saverepairlog',\r\n ),\r\n\t\t\t\t'roles'=>array('rxClient'),\r\n\t\t\t),\r\n \r\n array('allow', \r\n\t\t\t\t'actions'=>array(\r\n ),\r\n\t\t\t\t'roles'=>array('rxClient'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\tarray('deny', // deny all other users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t 'actions'=>array('global', 'backup'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->isAdmin'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('index', 'selanno'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin'),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','changeToStudent','update','create'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t'expression' => 'Yii::app()->user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'popup',\n 'gridView',\n 'excel',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'limited_admin')\n ),\n array('allow',\n 'actions' => array(\n 'updateStatus',\n 'list',\n 'update',\n 'delete',\n 'count',\n 'excelSummary',\n ),\n 'users' => array('@')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'expression'=>'helpers::isadmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n//\t\t\t\t'users'=>array('@'),\n 'expression'=>'yii::app()->admin->isWAdmin()'\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n//\t\t\t\t'users'=>array('admin'),\n 'expression'=>'yii::app()->admin->isWDAdmin()'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('view', 'updateAttribute', 'createContact', 'deleteContact'),\n 'users' => array('@'),\n ),\n/* array('allow',\n 'actions' => array('create', 'update', 'index', 'admin', 'delete'),\n 'roles' => array('ApplicationAdministrator'),\n ),*/\n array('deny',\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array( \n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n );\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('form','save'),\n 'expression'=>array('OrderAccController','allowReadOnly'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n//\t\t\tarray('allow', allow admin user to perform 'admin' and 'delete' actions\n//\t\t\t\t'actions'=>array('admin','delete','upload'),\n//\t\t\t\t'users'=>array('admin'),\n//\t\t\t),\n// array('allow',\n// 'actions'=>array('download'),\n// 'users'=>'@',\n// ),\n//\t\t\tarray('deny', deny all users\n//\t\t\t\t'users'=>array('*'),\n//\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'create'\n 'actions' => array('create'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('update', 'view', 'index'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'createtechnician'),\n 'expression' => 'Yii::app()->user->checkAccess(\\'manager\\')'\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('admin', 'view', 'update','response','exportPdf','viewPdf','uploadPdf','agreementPdf','viewAgreement','generalDataEntry','financeDataEntry','externalForm','prospect','create','delete'),\n\t\t\t\t'roles'=>array('admin', 'commercial', 'commercial_manager', 'media_manager','finance','affiliates_manager', 'media_buyer_admin','account_manager_admin','operation_manager'),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('financeDataEntry','generalDataEntry'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t// array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t// \t'actions'=>array('create','update'),\n\t\t\t// \t'users'=>array('@'),\n\t\t\t// ),\n\t\t\t// array('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t// \t'actions'=>array('admin','delete'),\n\t\t\t// \t'users'=>array('admin'),\n\t\t\t// ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array(\n \t'login', 'registration', 'captcha', \n \t'verify', 'forget'\n ),\n 'users' => array('*'),// для всех\n ),\n array('allow',\n 'actions' => array(\n \t'index', 'range', 'logout', \n \t'file', 'commercial', 'data', \n \t'view', 'payRequest', 'offers',\n 'onOffer', 'offOffer', 'changeOffer', 'change',\n ),\n 'roles' => array('user'),// для авторизованных\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array('bind', 'merge', 'index'),\n 'users' => array('@'),\n ),\n array('allow',\n 'actions' => array('list'),\n 'expression' => array(__CLASS__, 'allowListOwnAccessRule'),\n 'users' => array('@'),\n ),\n array('allow',\n 'actions' => array('delete', 'edit'),\n 'expression' => array(__CLASS__, 'allowModifyOwnAccessRule'),\n ),\n array('allow',\n 'actions' => array('list', 'delete', 'index', 'edit'),\n 'roles' => array('admin'),\n 'users' => array('@'),\n ),\n array('deny',\n 'actions' => array('bind', 'delete', 'index', 'list', 'merge'),\n ),\n );\n }",
"public function accessRules() {\n\t\treturn array();\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // @代表有角色的\n 'actions'=>array('view','change','see'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('create','see','update','delete'),\n 'expression'=>'$user->getState(\"info\")->authority >= 1',//,array($this,\"isSuperUser\"),\n ),\n array('deny', // *代表所有的用户\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'create', 'update', 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>Yii::app()->user->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n \treturn array (\n \t\t\tarray (\n \t\t\t\t\t'allow',\n \t\t\t\t\t//'actions' => array ('*'),\n \t\t\t\t\t'roles' => array ('admin')\n \t\t\t),\n \t\t\tarray (\n \t\t\t\t\t'deny', // deny all users\n \t\t\t\t\t'users' => array ('*')\n \t\t\t)\n \t);\n }",
"public function accessRules()\n {\n return array(\n array('deny',\n 'actions'=>array('login', 'register'),\n 'users'=>array('@'),\n ),\n array('deny',\n 'actions'=>array('customer', 'history', 'historyItem'),\n 'users'=>array('?'),\n ),\n array('allow',\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\n $admins = CatNivelAcceso::getAdmins();\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('view','create','update','delete','getDetalle','exportToPdf','exportarExcel',\n 'index','autocompleteCatPuesto'),\n\t\t\t\t'users'=>array('@')\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*')\n\t\t\t)\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array( 'allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array( 'index', 'view' ),\n 'users' => array( '*' ),\n ),\n array( 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array( 'create', 'update', \n Helper::CONST_updateaccountsurcharge,\n Helper::CONST_updateaccountordersamount,\n Helper::CONST_invoicepdf,\n Helper::CONST_ae_loadPartyOrdersOrTasks,\n Helper::CONST_ae_loadParties,\n ),\n 'users' => array( '@' ),\n ),\n array( 'allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array( 'admin', 'delete' ),\n 'users' => array( 'admin' ),\n ),\n array( 'deny', // deny all users\n 'users' => array( '*' ),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // admins only\n 'actions' => array('index', 'job', 'client', 'details', 'view'),\n 'users' => array('admin')\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'manageMissionsCarers', 'delete', 'updateStatuses', 'carerMissionsAll', 'setCarerSelected',\n 'missionCarersApplied', 'missionsNoCarerApplied', 'missionsNoCarerSelected', 'viewMission', 'missionsCarerNotConfirmed', 'missionsCarerAssigned',\n 'changeCarerSelected', 'updateMissionStatuses', 'updateDiscarded', 'deleteSelected', 'updateMissionStatuses2', 'missionsCarerAssignedNotStarted',\n 'createApplyRelation', 'cancelByAdmin', 'setCarerAssigned'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('audit','edit','delete','save','finish','orderGoodsDelete','validateAjax'),\n 'expression'=>array('OrderController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('OrderController','allowReadOnly'),\n ),\n array('allow',\n 'actions'=>array('activity','new','save','audit','delete','orderGoodsDelete','validateAjax'),\n 'expression'=>array('OrderController','addReadWrite'),\n ),\n/* array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('OrderController','addReadOnly'),\n ),*/\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user\n\t\t\t\t'actions'=>array('preview', 'view', 'update', 'delete', 'upload', 'download', 'rate', 'report', 'review', 'updateCourses'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('banbandynamic', 'banbanactivity','banbannews','dynamicdetail'),\n 'users' => array('*'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array(),\n 'users' => array('@'),\n //'expression'=>array($this,'loginAndNotDeleted'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('new','edit','delete','save','submit','request','cancel','fileupload','fileremove'),\n\t\t\t\t'expression'=>array('PayreqController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view','check','filedownload','void','listtax','Listfile'),\n\t\t\t\t'expression'=>array('PayreqController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('new','edit','save','test'),\n 'expression'=>array('EmployeeController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('EmployeeController','allowReadOnly'),\n ),\n array('allow',\n 'actions'=>array('FileDownload','DownAgreement','DownOnlyContract','Downfile','Generate'),\n 'expression'=>array('EmployeeController','allowWrite'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'searchList', 'Approvalstatus', 'Allprojects', 'fetchSubProjectIdAndHours', 'checkHoursAndBudget'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'fetchSubProjectIdAndHours', 'checkHoursAndBudget'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n//\t\t\t\t'users'=>array('admin'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\t return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'expression' => '!Yii::app()->user->isAdmin()',\n ),\n );\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','test','view','renderButtons','update'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('getBatch','create','StudentAdministration','getAdmission'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete',),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('@'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'details', 'IL', 'lookup'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'noProspect', 'noProspectHistory'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('@'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array('morecomments', 'approve', 'dashboard', 'create', 'list', 'update', 'delete', 'deleteall', 'index', 'view', 'replay', 'message.msg'),\n 'expression' => '$user->isAdministrator()',\n ),\n array('deny',\n 'users' => array('*'),\n )\n// array('allow', // allow all users to perform 'index' and 'view' actions\n// 'actions' => array('index', 'view'),\n// 'users' => array('*'),\n// ),\n// array('allow', // allow authenticated user to perform 'create' and 'update' actions\n// 'actions' => array('create', 'update'),\n// 'users' => array('@'),\n// ),\n// array('allow', // allow dashboard user to perform 'dashboard' and 'delete' actions\n// 'actions' => array('dashboard', 'delete'),\n// 'users' => array('dashboard'),\n// ),\n// array('deny', // deny all users\n// 'users' => array('*'),\n// ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','lista_materia','lista_actas_materia','reporte_acta','historico','listarhistoricomatria','generarpensum'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','lista_materia','lista_actas_materia', 'reporte_acta', 'hisotrico','listarhistoricomatria', 'generarpensum'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('index', 'getcompanyinfo', 'getfiltereduserstoapprovelist', 'approveusers',\n 'getfilteredclientslist', 'getclientuserslist', 'changeclientadmins', 'getfiltereduserslist',\n 'assignusertoclient', 'getclientuserslistapprvalue', 'updateusersapprovalvalues', 'getfiltereduserstoactivelist',\n 'setactiveusers', 'finduserbylogin', 'getfiltereddocumentslist', 'reassigndocumentsclients', 'getdocumentfile',\n 'getuserfile', 'getfiltereduserstotypelist', 'settypeusers', 'getclientsprojectslist', 'getuserclientprojects',\n 'getfilteredemptycompanieslist', 'getemptycompanyinfo', 'generateletter', 'checkuserapprovalvalue',\n 'getimageviewblock', 'getusertypeinfo', 'getclientactiveinfo', 'getfilteredclientstoactivelist', 'setactiveclients',\n 'updateservicelevelsettings', 'getcompanyservicelevelsettings', 'getservicelevelsettings', 'updatecompanyservicelevel',\n 'addcompanypayment','ManageExistingUsersList'\n ),\n 'users'=>array('admin', 'db_admin'),\n ),\n array('deny',\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\n\t\treturn array(\n\t\t\tarray('allow', /// allow authenticated user to perform this: index,update,create,delete,errer,content\n\t\t\t\t'actions'=>array('index','update','create','delete','error','content'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', /// allow authenticated user to perform this: ua + allupdate\n\t\t\t\t'actions'=>array('index','update','allupdate','create','delete','error','content'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', /// deny all not login users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('manage','delete','view','status','gallery'),\n\t\t\t\t'expression'=>'helpers::isadmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index','view'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('create','update','createAddDomain','createDeleteDomain','updateDeleteDomain','updateAddDomain','createByDomain','CreateDomain'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin','delete'),\r\n\t\t\t\t// 'users'=>array('admin'),\n\t\t\t\t'roles'=>array('administrator', 'koordynator'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','index','update','createLc'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'category'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'rate', 'print','activate'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array(Yii::app()->controller->action->id),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules() {\n return array(\n /* array('allow', \n 'actions'=>array('*'),\n 'roles'=>array('events'),\n ), */\n array('deny', // deny all users\n 'actions'=>array( 'negotiatingAdd'),\n 'users'=>array('?'),\n ),\n \n array('allow', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow view user to perform 'view' and 'delete' actions\n 'users' => User::getAdmins(),\n ),\n array('deny', // deny all users\n 'users' => array(\"*\"),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\t\t\t\t\n\t\t\t\tarray('allow', // allow authenticated users to access all actions\n\t\t\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated admins to perform any action\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'Yii::app()->user->role>=5'\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t\t'deniedCallback' => array($this, 'actionError')\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('view', 'create', 'update', 'delete', 'index', 'logout','admin', 'upload', 'ajaxUpload', 'editProfile', 'editPassword', 'crop'),\n 'roles' => array('bloger', 'admin'),// для авторизованных\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'roles' => array('admin'),\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('Ind1','Ind2','ind3','ind4','ind5','ind6','ind7','ind8','ind9','ind10','ind11','ind12','ind'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions'=>array(''),\n 'users'=>array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('create','delete','update','lock','index','view','map','locked','index'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('admin','editableSaver','setup'),\n 'users'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update','EnviaEmail','Rank'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'deletar'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','admin'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('relaciona','recibevalor','create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n {\r\n return array(\r\n array(\r\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array(\r\n 'DailyScan',\r\n 'DailyScanByItemNo',\r\n 'DetailScan',\r\n ),\r\n 'users' => array('@'),\r\n ),\r\n array(\r\n 'deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }",
"public function accessRules() {\n return array(\n array(\n 'allow',\n 'actions' => array('scientificName'),\n 'users' => array('*'),\n ),\n array('allow',\n 'actions' => array('location', 'person', 'acquisitionSource'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users by default\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'roles'=>Yii::app()->getModule('d_export')->accessPermissionRoles,\n ),\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'users'=>Yii::app()->getModule('d_export')->accessPermissionUsers,\n ),\n\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view',),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'recherche', 'profile', 'base', 'list', 'test','toggle'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'adjunto', 'admin'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions' => array('index', 'worldMap', 'ownIslands', 'research', 'highscore', 'enterWorld', 'playWorld'),\n\t\t\t\t'users' => array('@'),\n\t\t\t),\n\t\t\tarray('deny',\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','setHitterBase','setBatterBase','stats','getBasesEvent'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','scorecard','submitBall'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'roles'=>array('admins'),\n\t\t\t),\n\t\t\t/*array('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),*/\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('create','view','autocomplete'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // Allow superusers to access Rights\n\t\t\t\t'actions'=>array(\n\t\t\t\t\t'permissions',\n\t\t\t\t\t'operations',\n\t\t\t\t\t'tasks',\n\t\t\t\t\t'roles',\n\t\t\t\t\t'generate',\n\t\t\t\t\t'create',\n\t\t\t\t\t'update',\n\t\t\t\t\t'delete',\n\t\t\t\t\t'removeChild',\n\t\t\t\t\t'assign',\n\t\t\t\t\t'revoke',\n\t\t\t\t\t'sortable',\n\t\t\t\t),\n\t\t\t\t'users'=>$this->_authorizer->getSuperusers(),\n\t\t\t),\n\t\t\tarray('deny', // Deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index', 'error', 'login', 'logout'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update', 'resultsload', 'instrumentsresultsload', 'overviewload', 'details', 'admin', 'repview', 'filteredrepview', 'pdf' ),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t//'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','getWorkflow','getStageDetails','updateStageDetails','startStage','completeStage','revertStage','getStageMembers','getStages'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','create','update','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'roles' => array(\n\t\t\t\t\tUser::ROLE_ADMIN,\n\t\t\t\t\tUser::ROLE_POWERADMIN,\n\t\t\t\t\tUser::ROLE_SEO,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'getinvoicedata', 'paynow', 'print'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','votar'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t/*array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','admin','delete'),\n\t\t\t\t'users'=>array(Yii::app()->getModule('user')->user()->username),\n\t\t\t),*/\n\t\t\t/*array('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array(Yii::app()->getModule('user')->user()->username),\n\t\t\t),*/\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t return array(\n\t\t array('allow', // allow all users to perform 'index' and 'view' actions\n\t\t 'actions'=>array('Update_hecho','index','procesa_renap','explota_renap','Save_denunciante','Save_Ubicacion','ProcesaHechos','Save_hechos','Mostrar_hechos','Eliminar_hecho','Save_Relato','Show_Resumen'),\n\t\t 'users'=>array('oficinista','root','developer','supervisor_comisaria'),\n\t\t ),\n\t\t array('allow', // allow all users to perform 'index' and 'view' actions\n\t\t 'actions'=>array('pruebas','resumen','relato','hechos','mapa','persona'),\n\t\t 'users'=>array('developer'),\n\t\t ),\n\t\t array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t 'actions'=>array('selector'),\n\t\t 'users'=>array('@'),\n\t\t ),\n\t\t\n\t\t array('deny', // deny all users\n\t\t 'users'=>array('*'),\n\t\t ),\n\t );\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array(/* 'index','view', 'report'*/'index'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array(/* 'create','update' */),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(/* 'admin','delete' */),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete','adminAssignment','reset'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n array('allow',\n 'actions'=>array('password','profile'),\n 'users'=>array('@')\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','principal','administrador','colaborador','consultor','visitante','verChat'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdministradores(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','changeStatus','report'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','changeStatus','report'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','changeStatus'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('autocomplete'),\r\n\t\t\t\t'users'=>array(\"*\"),\r\n\t\t\t),\r\n\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','imprime','reporte1','reporte2','reporte3','admin','delete'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('index', 'myEvents', 'detail', 'subscribe', 'unsubscribe', 'subscribers', 'invites', 'add', 'edit', 'saveImage', 'delete', 'calendar', 'map', 'comments', 'addComment', 'gallery', 'getAlbum', 'addAlbum', 'renameAlbum', 'deleteAlbum', 'addImage', 'deleteImage', 'downloadImage', 'addImageToAlbum', 'removeImageFromAlbum', 'comingEvents', 'pastEvents'),\n 'roles' => array('user'),\n ),\n array('allow',\n 'actions' => array('share'),\n 'users' => array('*'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'error' and 'contact' actions\n 'actions'=>array('error'),\n 'users'=>array('*'),\n ),\n array('allow', // allow only authenticated users to perform 'index' actions\n 'actions'=>array('index', 'areaTree', 'areaTreeData', 'getAttributes', 'getForm', 'update', 'import'),\n 'expression'=>'!Yii::app()->user->isGuest && (Yii::app()->user->isAdmin() || Yii::app()->user->isSuperUser())',\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','pronostico','actRecargas'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'category'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('new', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array(''),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() \r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index'),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('suggest'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level)',\r\n\t\t\t\t//'expression'=>'isset(Yii::app()->user->level) && (Yii::app()->user->level != 1)',\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('manage','add','delete','status'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level) && in_array(Yii::app()->user->level, array(1,2))',\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array(),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}"
] | [
"0.7228763",
"0.7199851",
"0.70905805",
"0.7083254",
"0.7078831",
"0.7078758",
"0.7078758",
"0.7071383",
"0.7071383",
"0.70645475",
"0.70633864",
"0.70073724",
"0.7003613",
"0.70006496",
"0.6997435",
"0.698881",
"0.69828933",
"0.6975965",
"0.6973628",
"0.6971721",
"0.6969118",
"0.69682443",
"0.69656295",
"0.6958319",
"0.69555074",
"0.6953717",
"0.69481105",
"0.6941781",
"0.6935866",
"0.6933203",
"0.69313914",
"0.69309664",
"0.69288826",
"0.6928292",
"0.69239074",
"0.6923314",
"0.69231474",
"0.6922118",
"0.6920906",
"0.69165194",
"0.6909425",
"0.69062144",
"0.6904068",
"0.6903091",
"0.6898845",
"0.6892586",
"0.6891618",
"0.68899095",
"0.6886707",
"0.688601",
"0.688147",
"0.6880977",
"0.6879312",
"0.68793005",
"0.6875101",
"0.6868632",
"0.68651056",
"0.68594044",
"0.68585354",
"0.68567634",
"0.6856665",
"0.6852904",
"0.68494564",
"0.68475974",
"0.6844904",
"0.68448156",
"0.6844316",
"0.6842479",
"0.68357974",
"0.6835573",
"0.68346846",
"0.68340164",
"0.68323034",
"0.6824216",
"0.6822136",
"0.6818642",
"0.681848",
"0.68184257",
"0.6817723",
"0.6815226",
"0.68136406",
"0.68103886",
"0.6809766",
"0.68083704",
"0.68031543",
"0.6802247",
"0.67991245",
"0.6798179",
"0.67946714",
"0.6790232",
"0.67885536",
"0.6788438",
"0.6786919",
"0.6786548",
"0.6785128",
"0.6784468",
"0.678403",
"0.67839247",
"0.67831194",
"0.6782517",
"0.67789865"
] | 0.0 | -1 |
Return true if timer is elapsed. | public function isElapsed()
{
return ($this->isTimeout() || $this->isLimitExceeded());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testElapsed() {\n // Stop the timer\n $this->timer->stop();\n\n // Get the elapsed time\n $elapsed_time = $this->timer->get_elapsed();\n\n // It should be less than a second\n $this->assertTrue( $elapsed_time > 0 && $elapsed_time < 1 );\n }",
"public function has_ended() {\r\n\t\treturn 0 == $this->get_seconds_left();\r\n\t}",
"public function haveTime(){\n\t\tif($this->mCallbackHaveTime){\n\t\t\treturn call_user_func_array($this->mCallbackHaveTime, [$this]);\n\t\t}\n\t\treturn microtime(true) - $this->fStartTime < $this->fStepTime;\n\t}",
"public function checkTimeEnd(): bool;",
"public function has_time() {\n return in_array( $this->duration_unit, array( 'hour', 'minute' ) );\n }",
"public function getTimeElapsed()\n {\n $start_time = $this->getStartTime();\n\n if (isset($start_time)) {\n $end_time = $this->getEndTime();\n\n if (!isset($end_time)) {\n $end_time = microtime(true);\n }\n\n return $end_time - $this->getStartTime();\n }\n\n return false;\n }",
"public function hasDuration(): bool;",
"public function isInTimeout();",
"public function hasTimeout()\n {\n return isset($this->timeout);\n }",
"public function hasMovementTimerS()\n {\n return $this->movement_timer_s !== null;\n }",
"public function isEnded()\n {\n return $this->ended_at > 0;\n }",
"public function hasSeconds()\n {\n return $this->seconds !== null;\n }",
"private function isStopped($timer = 'default')\r\n\t{\r\n\t\treturn ! is_null(static::$stoppedAt[$timer]);\r\n\t}",
"private static function startTimer(): bool\n {\n self::$TimerBegin = microtime(true);\n return true;\n }",
"public function has_expired()\n\t{\n\t\treturn $this->until < time();\n\t}",
"protected function hasTimeLimitReached()\n\t{\n\t\tif ($this->timeLimit > 0)\n\t\t{\n\t\t\tif ($this->timeLimitReached)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ((time() - $this->hitStartTime) >= $this->timeLimit)\n\t\t\t{\n\t\t\t\t$this->timeLimitReached = true;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function hasAttackTimerS()\n {\n return $this->attack_timer_s !== null;\n }",
"protected function hasExpired()\r\n {\r\n return isset($this->_session[$this->_timeoutKey]) && $this->_session[$this->_timeoutKey] < time();\r\n }",
"public function is_complete() {\n return (bool) $this->timecompleted;\n }",
"public function hasStopped() {\n return (bool) $this->stoppedAt;\n }",
"protected function isTimeLimit(): bool\n {\n return (microtime(true) - $this->startTime) > $this->options->timeLimit;\n }",
"private function isTimeLimitReached() \n {\n return $this->timeLimit < (microtime(true) - $this->startTime);\n }",
"public function testGetElapsed() {\n // Stop the timer\n $this->timer->stop();\n\n // It should return an int\n $this->assertEquals( $this->timer->get_elapsed(), $this->timer->get_stop() - $this->timer->get_start() );\n }",
"public function isTime() : bool {\n return $this->isMinute() && $this->isHour() && $this->isDayOfMonth() && $this->isMonth() && $this->isDayOfWeek();\n }",
"function equals( &$time )\r\n {\r\n $ret = false;\r\n\r\n if ( is_a( $time, \"eZTime\" ) )\r\n {\r\n if ( $time->secondsElapsed() == $this->SecondsElapsed )\r\n {\r\n $ret = true;\r\n }\r\n }\r\n return $ret;\r\n }",
"public function delTimer(): bool {}",
"public function hasExpired() {\n return $this->getExpirationTime() <= time();\n }",
"public function hasExpired() {\n return $this->getExpirationTime() <= time();\n }",
"public function hasStartTimeMs()\n {\n return $this->start_time_ms !== null;\n }",
"public function hasEnded()\n {\n return $this->ended;\n }",
"public function addTimer(float $timeout = -1): bool {}",
"private function isStarted($timer = 'default')\r\n\t{\r\n\t\treturn !$this->isStopped($timer) && ! is_null(static::$startedAt[$timer]);\r\n\t}",
"public function isExpired() :bool\n {\n return ($this->expires < time());\n }",
"public function has_finished()\n {\n return $this->days_left() == 0;\n }",
"public function hasCooldownCompleteMs()\n {\n return $this->CooldownCompleteMs !== null;\n }",
"public function isExpired()\n {\n $dataTimeSec = $this->getTime() / 1000;\n\n return ($dataTimeSec < time());\n }",
"public function hasTime(){\n return $this->_has(6);\n }",
"public function isExpired()\n {\n return ((time() - $this->expireTime) > 0);\n }",
"public function isExpired(): bool\n {\n return $this->expires != 0 && $this->expires < time();\n }",
"public function hasTime(){\n return $this->_has(3);\n }",
"abstract protected function isRealTime();",
"public function hasTime() {\n\n return $this->getDateType()!==DateTime::DATE;\n\n }",
"public function hasThreadTs(): bool\n {\n return ! empty($this->threadTS);\n }",
"public function isStartedAndNotFinished()\r\n {\r\n $now = Zend_Date::now();\r\n \r\n $date = new Zend_Date($this->start_time);\r\n $afterStart = $now->compare($date) === 1;\r\n\r\n $date->addDay($this->duration);\r\n $beforeEnd = $now->compare($date) === -1;\r\n \r\n return $afterStart && $beforeEnd;\r\n }",
"public function isExpired()\n {\n if (!$this->expiration) {\n return false;\n }\n\n return $this->expiration < new DateTime();\n }",
"public function hasExpired() {\n if (is_null($this->end_date)) {\n return true;\n }\n\n return ($this->end_date->isFuture()) ? true : false;\n }",
"public function isStarted()\n {\n return $this->started_at > 0;\n }",
"public function hasEndtime(){\n return $this->_has(8);\n }",
"protected function diffTokenTimeExpire()\n {\n $tokenLife = $this->tokenTime + $this->tokenExpire;\n\n return ($tokenLife < time()) ? false : true;\n }",
"public function hasExpired()\n {\n return (new Time($this->expires->getTimestamp()))->isPast();\n }",
"public function sessionIsTimedOut()\n {\n if ($this->sessionTimeout <= $this->sessionAge()) {\n return true;\n }\n\n return false;\n }",
"public function isEnded();",
"public static function timer_start() {\n $mtime = microtime();\n $mtime = explode(' ', $mtime);\n self::$time_start = $mtime[1] + $mtime[0];\n return true;\n }",
"public function hasStarted() {\n return (bool) $this->startedAt;\n }",
"public function is_expired() {\n\t\treturn $this->get_expires() < time();\n\t}",
"public function hasExpired(): bool\n {\n $expiry = $this->expiry();\n\n return $expiry !== null && time() > $expiry;\n }",
"function VerifyTime() {\r\n $current = time();\r\n // check if the session has expired\r\n $this->err_level = 16;\r\n $this->err = \"Verify expire. LastUsed: \" . (string)$this->sessdata[\"lastused\"] . \" ExpireTime: \" . (string)$this->expire_time . \" Current: \" . (string)$current ;\r\n $this->err_no = 0;\r\n $this->DbgAddSqlLog();\r\n if ($this->sessdata[\"lastused\"]+$this->expire_time<$current) {\r\n return 0;\r\n }\r\n return 1;\r\n }",
"public function isExpired()\n {\n return $this->expireAt < new DateTime();\n }",
"public function hasPassed() {\n \treturn $this < new \\DateTime();\n }",
"public function finished()\n {\n return ! is_null($this->finishedAt);\n }",
"public function hasExpired(){\n if($this->isIndefinied())\n return false;\n\n \\Log::info('Hoy'.print_r(Carbon::now(),true));\n \\Log::info('Expira'.print_r(Carbon::parse($this->expires_on),true));\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }",
"public function isEnded() {}",
"public function hasTokenExpired()\n {\n $tokenTimestamp = $this->flagManager->getFlagData(self::TOKEN_RECEIVED_TIMESTAMP);\n if ($tokenTimestamp !== null) {\n $date = (new \\DateTime())->getTimestamp();\n $validity = $this->flagManager->getFlagData(self::TOKEN_EXPIRES_IN_FLAG_NAME);\n return $date > $tokenTimestamp + $validity - self::TOKEN_VALIDITY_MARGIN_IN_SECONDS;\n }\n return true;\n }",
"public function isExpired ()\n {\n return $this->getExpirationDate()->getTimestamp() < time();\n }",
"public function isTimedOut(): bool\n {\n return $this->getCommunicationDisabledUntil() !== 0;\n }",
"function isOverExecuted()\n {\n if ($this->start_time+$this->max_execution_time<time()) return true;\n else return false;\n }",
"public function isExpired(): bool\n {\n return $this->expired;\n }",
"public function getIsExpired(): bool\n {\n $expirationDuration = $this->getExpireDuration();\n if ($expirationDuration === null) {\n return false;\n }\n\n return time() >= ($this->createTimestamp + $expirationDuration);\n }",
"public function hasTimeLimitReached(): bool;",
"public function check()\n {\n return time()%2==1; // condition\n }",
"protected static function checkIfSpecifiedTimePassed()\n {\n $passed = false;\n $specified_time = env('APIMO_TIME_SYNC');\n $now = time();\n $last_sync_time = self::queryLastSyncTimeOnDb();\n if (($now - $specified_time) > $last_sync_time) {\n $passed = true;\n }\n\n return $passed;\n }",
"public function isTime();",
"public function hasRelivetime(){\n return $this->_has(3);\n }",
"public function isDayPassed()\n {\n return ($this->declineTime < (time() - self::ONE_DAY_IN_SECONDS));\n }",
"public function hasStarttime(){\n return $this->_has(2);\n }",
"public function isExpired()\n\t{\n\t\tif ($this->lastModified) {\n\t\t\t$modifiedHeader = filter_input(INPUT_SERVER, \"HTTP_IF_MODIFIED_SINCE\");\n\t\t\t$modified = strtotime($modifiedHeader) !== $this->lastModified;\n\t\t\t\n\t\t\treturn $modified;\n\t\t}\n\t\t\n\t\tif ($this->expires) {\n\t\t\t$now = new \\DateTime();\n\t\t\treturn $now > $this->expires;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function sessionIdIsTimedOut()\n {\n if ($this->sessionIdTimeout <= $this->sessionAge()) {\n return true;\n }\n\n return false;\n }",
"protected function is_timed_out( )\n\t{\n\t\t$user = $this->php_session->get('user');\n\t\tif( $user['last_active'] <= time()-1800 ) //times out in 30 minutes\n\t\t\treturn False; \n\t\treturn True;\t\n\t}",
"protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\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 hasLastTime(){\n return $this->_has(18);\n }",
"public function isExpired(): bool\n {\n if (!FS::isFile($this->resultFile)) {\n return true;\n }\n\n $fileAge = \\time() - (int)\\filemtime($this->resultFile);\n $fileAge = \\abs($fileAge);\n\n if ($fileAge >= $this->cacheTtl) {\n return true;\n }\n\n $firstLine = \\trim((string)FS::firstLine($this->resultFile));\n $expected = \\trim($this->getHeader());\n\n return $expected !== $firstLine;\n }",
"public function hasClearTime(){\n return $this->_has(2);\n }",
"public function hasCompleted() : bool\n {\n return $this->completed_at !== null;\n }",
"public function hasTimeoutList()\n {\n return $this->get(self::TIMEOUTLIST) !== null;\n }",
"function timer_start(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$this->time_start = $mtime[1] + $mtime[0];\n\t\treturn true;\n\t}",
"public function get_timers() {\n\t\t//Returns true or false. Values are set in $timers.\n\t\treturn $this->_get_timers();\n\t}",
"public function hasLockTime()\n {\n return $this->lock_time !== null;\n }",
"protected function _IsSessionTimeout()\n\t{\n\t\t// ...\n\t\t$bRet = false;\n\n\t\t// ...\n\t\t$bValidSession = true;\n\t\t$cSession\t= new CUCSession();\n\n\t\t//\n\t\t//\tCheck session via Redis service if T->CKT_REFRESHTM is overdue\n\t\t//\n\t\t$nRefreshTime = $this->GetXTValue( $this->m_sMKeyT, self::CKT_REFRESHTM );\n\t\tif ( time() - $nRefreshTime > 0 )\n\t\t{\n\t\t\t//\trefresh time is overdue, it's time to check via Redis\n\t\t\t//\t...\n\t\t\t$bValidSession = $cSession->IsValidSession();\n\t\t}\n\n\t\t// ...\n\t\tif ( $bValidSession )\n\t\t{\n\t\t\tif ( $this->IsKeepAlive() )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t//\treturn false if user set to keep alive\n\t\t\t\t//\n\t\t\t\t$bRet = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//\t...\n\t\t\t\t$nLoginTime = $this->GetXTValue( $this->m_sMKeyT, self::CKT_LOGINTM );\n\t\t\t\tif ( is_numeric( $nLoginTime ) )\n\t\t\t\t{\n\t\t\t\t\t//\tescaped time in seconds after user logged in\n\t\t\t\t\t// the default timeout is 1 day.\n\t\t\t\t\t$term = floatval( time() - floatval( $nLoginTime ) );\n\t\t\t\t\t$bRet = ( $term > $this->m_arrCfg[ self::CFGKEY_STIMEOUT ] );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// login time is invalid\n\t\t\t\t\t// So, we marked this session as timeout\n\t\t\t\t\t$bRet = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// session is timeout.\n\t\t\t// So, we marked this session as timeout\n\t\t\t$bRet = true;\n\t\t}\n\n\t\treturn $bRet;\n\t}",
"private function checkIfTimeLeft()\r\n {\r\n if($this->expireDateTime < strtotime(\"now\"))\r\n {\r\n generic::successEncDisplay(\"Emails have been sent out, however, there are a number of emails to be sent, and the server run out of time.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public function hasLogintime(){\n return $this->_has(2);\n }",
"public function isCleared()\n {\n return $this->expire < time();\n }",
"function isStarted()\n {\n return (TRUE == $this->started);\n }",
"public function tokenExpired()\n {\n if (empty($this->token_expires)) {\n return true;\n }\n\n return new FrozenTime($this->token_expires) < FrozenTime::now();\n }",
"public function isExpired() : bool\n {\n return $this->getExpiryAttribute()->timestamp < Carbon::now()->timestamp\n && $this->length !== 0\n && !$this->isRemoved();\n }",
"public function isExpired(): bool;",
"public function isExpired()\n {\n if (!$this->hasExpirationDate()) {\n return false;\n }\n\n return ($this->expires_at->isPast())\n ? true\n : false;\n }",
"protected function expired()\n {\n return Carbon::now()->diffInSeconds($this->valid, false) < 0;\n }",
"public function expired()\n {\n return !$this->subscribed() && $this->billing_trial_ends_at && strtotime($this->billing_trial_ends_at) <= time();\n }",
"function isStopped($event) {\n return Filter::get(\n Filter::get(Timer::timers(), $event, array()), \n 'stopped', \n true\n );\n }",
"public function hasStarted(){\n return (bool) Carbon::now()->greaterThanOrEqualTo(Carbon::parse($this->starts_on));\n }"
] | [
"0.7291701",
"0.72388834",
"0.7129007",
"0.6868388",
"0.680269",
"0.67644596",
"0.6743978",
"0.66864604",
"0.6598486",
"0.6591055",
"0.64075446",
"0.63855726",
"0.63587296",
"0.6354655",
"0.6304697",
"0.62776744",
"0.6229328",
"0.62247473",
"0.6218459",
"0.61759305",
"0.61748064",
"0.6133107",
"0.613228",
"0.6127219",
"0.6123302",
"0.6100431",
"0.6085163",
"0.6085163",
"0.6067129",
"0.6052479",
"0.6048652",
"0.60416776",
"0.6030952",
"0.60266644",
"0.6019313",
"0.60136646",
"0.6002941",
"0.5999492",
"0.5997036",
"0.5993357",
"0.598933",
"0.5983785",
"0.59726685",
"0.59692234",
"0.5967589",
"0.5954796",
"0.5943419",
"0.5920775",
"0.5897496",
"0.5884765",
"0.58758956",
"0.5874581",
"0.58705854",
"0.58688486",
"0.5864441",
"0.58511263",
"0.5848631",
"0.5834614",
"0.58278924",
"0.5816883",
"0.58117086",
"0.5803886",
"0.5791651",
"0.5774215",
"0.57737744",
"0.5756478",
"0.5747684",
"0.5743916",
"0.5739847",
"0.57149214",
"0.5712178",
"0.57093835",
"0.56959736",
"0.56902444",
"0.5689378",
"0.5675756",
"0.56698775",
"0.5663646",
"0.56370753",
"0.56354284",
"0.5622053",
"0.5614165",
"0.560638",
"0.5605173",
"0.56035423",
"0.5603321",
"0.5568128",
"0.5567231",
"0.55556655",
"0.5552",
"0.5551068",
"0.55493915",
"0.55375665",
"0.553755",
"0.5528736",
"0.55234724",
"0.55186325",
"0.5514997",
"0.55135137",
"0.55087125"
] | 0.7796271 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.