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
Set a value to the given URL parameter or remove it from the array if null.
protected function setParameter($parameter, $value) { if ($value === null) { if (is_string($parameter)) { unset($this->params[$parameter]); } elseif (is_int($parameter)) { $this->params[$parameter] = null; } } else { $this->params[$parameter] = $value; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setParam($name, $value = null) {\n\t\tif (is_array($name))\n\t\t{\n\t\t\t$this->params = $this->params + (array)$name;\n\n\t\t\t/*foreach ($name as $key => $value) {\n\t\t\t\tif (null === $value) {\n\t\t\t\t\tunset($this->_params[$key]);\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = (string)$name;\n\n\t\t\t/*if ((null === $value) && isset($this->_params[$name])) {\n\t\t\t\tunset($this->_params[$name]);\n\t\t\t} elseif (null !== $value) {\n\t\t\t\t$this->_params[$name] = $value;\n\t\t\t}*/\n\t\t\t$this->params[$name] = $value;\n\t\t}\n\n\t\treturn $this;\n\t}", "public static function setParameter($name,$value) {\n\t if($value === null) {\n\t unset($_REQUEST[$name]);\n\t return null;\n\t }\n\t\treturn ($_REQUEST[$name] = $value);\n\t}", "function _wp_array_set(&$input_array, $path, $value = \\null)\n {\n }", "public function set( $name, $value )\n\t{\n\t\t$this->params[ $name ] = $value;\n\t\tif( $value === null ) unset( $this->params[ $name ] );\n\t\t\n\t\t$this->modified = true;\n\t}", "public function offsetSet($param, $value)\n\t{\n\t\t$this->params[(string) $param] = $value;\n\t}", "function set_get_parameter($param, $value) {\n\n $get_value = \\M\\Config::get('GET');\n $get_value[$param] = $value;\n\n \\M\\Config::set('GET', $get_value);\n}", "public function setStatusUrlParam($key, $value)\n {\n $this->_urlParams[$key] = $value;\n }", "public function setParams($value)\n {\n if (!empty($value)) {\n $listParams = explode('&', $value);\n\n foreach ($listParams as $param) {\n $value = explode('=', $param);\n $this->setParam($value[0], $value[1]);\n }\n }\n }", "private function set_if_not_null( $key, $value, &$array )\n {\n if ( $value !== null ) {\n $array[ $key ] = $value;\n }\n }", "public function setUrls(?array $value): void {\n $this->getBackingStore()->set('urls', $value);\n }", "function setParamaters($valuetoadd=null) {\n if (empty($valuetoadd)) {\n $this->preparedvalues = array();\n return null;\n } else \n return array_push($this->preparedvalues, $valuetoadd); \n\t}", "public function offsetSet($offset, $value)\n {\n $this->params[$offset] = $value;\n }", "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 setParameter(string $paramName, $paramValue = NULL);", "public function setParam($key, $value);", "public function set_query_arg($key, $value)\n {\n }", "public function setGET(string $key, ?string $value): bool\n {\n if ($value === null && isset($this->get[$key])) {\n unset($this->get[$key]);\n return true;\n }\n $this->get[$key] = $value;\n return true;\n }", "private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}", "public static function setQueryParam(string $key, string $value)\n {\n $queryParams = self::$__query ? explode('&', self::$__query) : []; \n array_push($queryParams, $key . '=' . $value); \n self::$__query = implode('&', $queryParams); \n }", "public function set($path, $value = null)\n {\n if (\\is_array($path)) {\n $values = $this->normalizeArray($path);\n return $this->doSet($values);\n }\n $path = $this->normalizePath($path);\n $values = array();\n $this->debug->arrayUtil->pathSet($values, $path, $value);\n $return = $this->doSet($values);\n return $this->debug->arrayUtil->pathGet($return, $path);\n }", "public function offsetUnset($param)\n\t{\n\t\tunset($this->params[(string) $param]);\n\t}", "public function set($parameter, $value = null) {\n if (is_array($parameter)) {\n return $this->parameters = $parameter;\n }\n return $this->parameters[$parameter] = $value;\n }", "public function set( $name, $value = NULL );", "public function set($value = null);", "public function setParam($name, $value);", "public function __set($param, $value);", "private static function set($key)\n {\n return (isset($_GET[$key]) && !empty($_GET[$key])) ? $_GET[$key]: null; \n }", "public function setParam($param, $value);", "public function setTag($value)\n {\n if ($value !== null) {\n $this->_params['tag'] = $value;\n } else {\n unset($this->_params['tag']);\n }\n }", "function setValues($list) {\n global $params;\n if ( count($list )) {\n foreach ($list as $k => $v ) {\n $params[$k] = $v;\n }\n }\n}", "public function param($key, $value=null)\n {\n $key = trim((string) $key);\n\n if (!is_null($value)) {\n $this->_array['params'][$key] = $value;\n }\n\n // Return null if index is not defined\n if (!isset($this->_array['params'][$key])) {\n return null;\n }\n\n return $this->_array['params'][$key];\n }", "public function setParameter($name, $value);", "private function cleanParams(){\n $brokenUrl = explode(\"&\", iWeb::currentUrl());\n unset($brokenUrl[0]);\n $brokenUrl = array_values($brokenUrl);\n foreach ($brokenUrl as $param){\n $paramaters = explode(\"=\",$param);\n $this->params[$paramaters[0]] = $paramaters[1];\n }\n\n }", "public function set( $name, $value )\n\t{\n\t\t$this->_params[$name] = $value;\n\t}", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "public function set( $key, $value = null )\n\t{\n\t\tif ( is_array( $key ) )\n\t\t\tforeach ( $key as $innerKey => $innerValue )\n\t\t\t\tArr::set( $this->items, $innerKey, $innerValue );\n\t\telse\n\t\t\tArr::set( $this->items, $key, $value );\n\t}", "function set_post_parameter($param, $value) {\n\n $post_value = \\M\\Config::get('POST');\n $post_value[$param] = $value;\n\n \\M\\Config::set('POST', $post_value);\n}", "public function setParameter($name, $value)\n {\n $this->params[$name] = $value;\n $this->processFilters();\n }", "public static function setOrReplaceParamValue(\n $paramName, $paramValue, $uri=null){\n\n if(is_null($uri)){\n $uri = self::getCurrentUri(true);\n }\n\n $paramArr = [];\n parse_str( parse_url($uri, PHP_URL_QUERY), $paramArr);\n $paramArr[$paramName] = $paramValue;\n\n //rebuild the uri\n return strtok($uri, '?').'?'.http_build_query($paramArr);\n\n }", "function remove_query( $key, $value ) {\r\n\t\t\t$this->current_url = remove_query_arg( $key, $this->current_url );\r\n\t\t\treturn $this->current_url;\r\n\t\t}", "public function __set($name, $value)\n {\n $this->params[$name] = $value;\n }", "function set_query_var($query_var, $value)\n {\n }", "public function setUrlSegment($num, $value) {\n\t\t$num = (int) $num; \n\t\t$maxLength = $this->wire('config')->maxUrlSegmentLength;\n\t\tif($maxLength < 1) $maxLength = 128;\n\t\tif(is_null($value)) {\n\t\t\t// unset\n\t\t\t$n = 0;\n\t\t\t$urlSegments = array();\n\t\t\tforeach($this->urlSegments as $k => $v) {\n\t\t\t\tif($k == $num) continue;\n\t\t\t\t$urlSegments[++$n] = $v;\n\t\t\t}\n\t\t\t$this->urlSegments = $urlSegments;\n\t\t} else {\n\t\t\t// sanitize to standard PW name format\n\t\t\t$urlSegment = $this->wire('sanitizer')->name($value, false, $maxLength);\n\t\t\t// if UTF-8 mode and value changed during name sanitization, try pageNameUTF8 instead\n\t\t\tif($urlSegment !== $value && $this->wire('config')->pageNameCharset == 'UTF8') {\n\t\t\t\t$urlSegment = $this->wire('sanitizer')->pageNameUTF8($value, $maxLength);\n\t\t\t}\n\t\t\t$this->urlSegments[$num] = $urlSegment;\n\t\t}\n\t\t\n\t}", "public function set($path = null, $value = []): self\n {\n if (func_num_args() < 2) {\n $value = $path;\n $path = null;\n }\n\n $settings = $this->all();\n\n Arr::set($settings, $path, $value);\n\n return $this->apply($settings);\n }", "public function testParamUnset()\n {\n $driverPassesEndpoint = new DriverPassesEndpoint(getenv('MRP_API_KEY'));\n $array = $driverPassesEndpoint->setClassId(1000)\n ->setClassId(1000)\n ->setScheduleId(5508)\n ->setScheduleId(5508)\n ->setDataOrder('nameAsc')\n ->setDataOrder('nameAsc')\n ->setDriverId(1023)\n ->setDriverId(1023)\n ->setEndDate('8/21/2016')\n ->setEndDate('8/21/2016')\n ->setStartDate('8/21/2015')\n ->setStartDate('8/21/2015')\n ->setEventId(2)\n ->setEventId(2)\n ->getUrlParams();\n\n $this->assertTrue(is_array($array));\n $this->assertEquals(7, count($array));\n }", "public function set($parameter, $value);", "public function set_query_var($key, $value)\n {\n }", "public function setParam($paramName, $value){\n\t\t\tparent::setParam($paramName, $value, self::NAG_OBJ_NAME_PARAM, self::$stringListParams);\n\n\t\t\tif(!array_key_exists($paramName, self::$stringListExclude) && !is_array($value)){\n\t\t\t\t$value = $this->convertStringListToArray($value);\n\t\t\t}\n\n\t\t\t$this->params[$paramName] = $value;\n\t\t}", "public function set(string $key, $value = null);", "function setValues($list) {\n global $params;\n if (count($list)) {\n\tforeach ($list as $k=>$v) {\n\t $params[$k] = $v;\n\t}\n }\n}", "public function __set($name, $value){\n\t\t\t//echo $name.'<br>'.$value.'<br>';\n\t\t\t//IMP po tozi na4in zadavam klu4 imeto na promenlivata ! i stoinost \n\t\t\t//ravna na stoinostta na promenlivata !!!\n\t\t\t//oba4e ne mi dava da go 4eta i polzvam __GET !\n\t\t\t$this->data[$name] = $value;\n\t\t}", "public function setParameter( $key, $value ) {\n\t\tif ( array_key_exists( $key, $this->smoValues[\"simple\"] ) && !empty( $value ) ) {\n\t\t\t$this->smoValues[\"simple\"][$key] = $value;\n\t\t}\n\t}", "public function set($key, $value = null);", "public function set($key, $value = null);", "abstract protected function setParameter($key, $value);", "protected function set_url_this_dele($val){ $this->input ['delete_url'] = $val ; }", "public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}", "function addParam($name, $value) {\n if (!isset($this->params[$name])) {\n $this->setParam($name, $value);\n }\n else {\n $oldParam = $this->getParam($name);\n if (!is_array($oldParam)) {\n $oldParam = array($oldParam);\n }\n array_push($oldParam, $value);\n $this->setParam($name, $oldParam);\n }\n }", "protected function setParam($name, $value) {\n if (!array_key_exists($name, $this->params)) {\n throw new \\Exception(E()->Utils->translate('ERR_DEV_NO_PARAM').': '.$name.' @'.$this->getName() , SystemException::ERR_DEVELOPER);\n }\n if ($name == 'active') {\n $value = (bool)$value;\n }\n if (is_scalar($value)) {\n $value = explode('|', $value);\n $this->params[$name] =\n (sizeof($value) == 1) ? current($value) : $value;\n } elseif (is_array($value)) {\n $this->params[$name] = $value;\n } else {\n $this->params[$name] = $value;\n }\n }", "function set($name = '', $value = \\null)\n {\n }", "private function arrayPath( &$array, $path = array(), &$value = null ) {\n\t\t$args = func_get_args();\n\t\t$ref = &$array;\n\t\tforeach ( $path as $key ) {\n\t\t\tif ( !is_array( $ref ) ) {\n\t\t\t\t$ref = [];\n\t\t\t}\n\t\t\t$ref = &$ref[$key];\n\t\t}\n\t\t$prev = $ref;\n\t\tif ( array_key_exists(\n\t\t\t2,\n\t\t\t$args\n\t\t) ) {\n\t\t\t// value param was passed -> we're setting\n\t\t\t$ref = $value; // set the value\n\t\t}\n\n\t\treturn $prev;\n\t}", "public function set($key,$value=null){\n if(is_array($key)){\n $this->vars += $key;\n }else{\n $this->vars[$key]=$value;\n }\n }", "public function offsetSet($name, $value)\n {\n if (is_int($name)) {\n parent::offsetSet($name, $value);\n // @codeCoverageIgnoreStart\n // This will never be reached, because an exception is always\n // thrown.\n return;\n // @codeCoverageIgnoreEnd\n }\n\n $param = new Parameter($this->root, $name, $value);\n $this->parameters[$param->name] = $param;\n }", "public function __set($param, $value)\r\n {\r\n $this->params_named->set($param, $value);\r\n }", "private function setParameters(){\n\t\tif(is_array($this->rawData) and count($this->rawData) > 2){\n\t\t\t$params = array();\n\t\t\tforeach($this->rawData as $paramid => $param){\n\t\t\t\tif($paramid > 1){ # Exclude page and method.\n\t\t\t\t\t$params[$paramid-1] = $param; \n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Store value */\n\t\t\treturn $params;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "function setParams($param_array) {\n\t\tif ( count($param_array) > 0 ) {\n\t\t\t// read the existing component value(s)\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$db->setQuery('SELECT params FROM #__extensions WHERE name = \"com_mapyandex\"');\n\t\t\t$params = json_decode( $db->loadResult(), true );\n\t\t\t// add the new variable(s) to the existing one(s)\n\t\t\tforeach ( $param_array as $name => $value ) {\n\t\t\t\t$params[ (string) $name ] = (string) $value;\n\t\t\t}\n\t\t\t// store the combined new and existing values back as a JSON string\n\t\t\t$paramsString = json_encode( $params );\n\t\t\t$db->setQuery('UPDATE #__extensions SET params = ' .\n\t\t\t\t$db->quote( $paramsString ) .\n\t\t\t\t' WHERE name = \"com_mapyandex\"' );\n\t\t\t\t$db->query();\n\t\t}\n\t}", "public function setParams($params = null)\n {\n self::clearParams();\n if($params && is_array($params)){\n foreach($params as $key => $value){\n if(!$key || trim($key) == ''){\n continue;\n }\n\n $this->params[$key] = $value;\n }\n }\n }", "public function remove_value(string $value)\n {\n if(gettype($this -> value) === \"string\"){\n if($this -> value === $value) $this -> value = null;\n }else{\n if (($key = array_search($value, $this -> value)) !== false) {\n #unset($this -> value[$key]);\n array_splice($this -> value, $key, 1);\n }\n }\n }", "public function set($params) {}", "public function set_param($key, $value)\n {\n }", "public function testParamUnset()\n {\n $driversEndpoint = new DriverClassesEndpoint('MRP_API_KEY');\n $array = $driversEndpoint->setDriverCount(1)\n ->setOrder('name')\n ->setIncludeStats('true')\n ->setScheduleYear(2016)\n ->setFeaturedOnly('true')\n ->setForcePic('false')\n ->setIncludeDrivers('true')\n ->setDriverCount(1)\n ->setOrder('name')\n ->setIncludeStats('true')\n ->setScheduleYear(2016)\n ->setFeaturedOnly('true')\n ->setForcePic('false')\n ->setIncludeDrivers('true')\n ->getUrlParams();\n\n $this->assertTrue(is_array($array));\n $this->assertEquals(7, count($array));\n }", "public function setSpecificWebsitesOnly(?array $value): void {\n $this->getBackingStore()->set('specificWebsitesOnly', $value);\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}", "function setQueryParameter($value)\r\n {\r\n if(preg_match('[\\S]', $_POST[$value]) || $_POST[$value] != \"\")\r\n return filter_var($_POST[$value], FILTER_SANITIZE_STRING);\r\n else\r\n return \"%\";\r\n }", "public function set_parameters($value)\n\t{\n\t\t$this->parameters = array_merge($this->parameters, $value);\n\t}", "public function _put($url = null, array $parameters = []);", "public function setParam(string $name, $value): void\n {\n $this->params[$name] = $value;\n }", "function rest_sanitize_request_arg($value, $request, $param)\n {\n }", "public function __unset($param)\r\n {\r\n $this->params_named->remove($param);\r\n }", "function set($value) {\n\t\tif (!is_array($value))\n\t\t\t$value = array($value);\n\t\treturn (empty($this->_data)) ? $this->_data = $value : $this->_data = array_merge($this->_data,$value);\n\t}", "function _set_config_param($name,$value)\r\n\t{\r\n\t\t$this->db->query(\"update m_config_params set value = ? where name = ? limit 1\",array($value,$name));\r\n\t}", "public function setParameter($params)\r\n\t{\r\n\t\tif (is_array($params))\r\n\t\t\t$this->params = array_merge($this->defaultParams(), $params);\r\n\t\telse\r\n\t\t\t$this->params = $this->defaultParams();\r\n\t}", "public function setURIData(string $name, string $value) {\n $this->URIData[$name] = $value;\n }", "public function setParam($key, $value)\n\t{\n\t\treturn $this->_params->set($key, $value);\n\t}", "function FreeSessionParam($param) {\n \n //get session array\n $sesp = (array)GetSessionParam('SESARRAY');\n \n //save param\n if (!in_array($param,$sesp)) $sesp[] = $param;\n //print_r($sesp);\n //print_r($__SESSION);\n \n //save array \n SetSessionParam('SESARRAY',$sesp);\n}", "public function setIpReferenceData(?array $value): void {\n $this->getBackingStore()->set('ipReferenceData', $value);\n }", "public function __set(string $key, array|string|null $value) {\n\tforeach($this->_elArray as $el) {\n\t\t$el->$key = $value;\n\t}\n}", "public static function removeUrlParam($url, $varname) {\n list($urlpart, $qspart) = array_pad(explode('?', $url), 2, '');\n parse_str($qspart, $qsvars);\n unset($qsvars[$varname]);\n $newqs = http_build_query($qsvars);\n if(empty($newqs)) {\n return $urlpart;\n } else {\n return $urlpart . '?' . $newqs;\n }\n }", "public function setRedirectArray(array $param) {\n $this->redirect = $param;\n return;\n }", "public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }", "public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }", "public function addUrlParameter($key, $value)\n {\n $this->urlParameters[$key] = $value;\n }", "public function setWebsiteList(?array $value): void {\n $this->getBackingStore()->set('websiteList', $value);\n }", "public function setParameter($param, $value)\n {\n $this->params[$param] = $value;\n }", "function setPageParams($param) {\n\t//echo \"gelen\"; var_dump($param);\n\tif(is_array($param) && count($param)>0) {\n\t\tforeach($param as $key=>$value) {\n\t\t\t$_REQUEST[$key] = $value; \n\t\t}\n\t}\n\treturn true;\n}", "function setParameter($key, $value) {\n $this->parameters[$key] = $value;\n }", "function set_allowed_uri_params_list()\r\n{\r\n //allowed params disabled. All allowed\r\n//\tif ($ar_params = func_get_args())\r\n//\t{\r\n//\t\tglobal $tpl_allowed_uri_params_list;\r\n//\r\n//\t\tif (is_array($tpl_allowed_uri_params_list))\r\n//\t\t{\r\n//\t\t\tforeach ($ar_params as $val)\r\n//\t\t\t{\r\n//\t\t\t\t$tpl_allowed_uri_params_list[] = $val;\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\telse\r\n//\t\t{\r\n//\t\t\t$tpl_allowed_uri_params_list = $ar_params;\r\n//\t\t}\r\n//\t}\r\n}", "public function set($key, $value = null)\n {\n DotArr::set($this->data, $key, $value);\n }", "function setParams($param_array) {\n $db = JFactory::getDbo();\n \n \n if ( count($param_array) > 0 ) {\n // read the existing component value(s)\n $db = JFactory::getDbo();\n $db->setQuery('SELECT params FROM #__extensions WHERE name = \"joomleague\"');\n $params = json_decode( $db->loadResult(), true );\n // add the new variable(s) to the existing one(s)\n foreach ( $param_array as $name => $value ) {\n $params[ (string) $name ] = (string) $value;\n }\n // store the combined new and existing values back as a JSON string\n $paramsString = json_encode( $params );\n $db->setQuery('UPDATE #__extensions SET params = ' .\n $db->quote( $paramsString ) .\n ' WHERE name = \"joomleague\"' );\n $db->query();\n }\n \n }", "private static function set_array_value(&$array, $key, $value = null)\n\t{\n\t\t$keys = explode('.', $key);\n\n\t\twhile (count($keys) > 1)\n\t\t{\n\t\t\t$key = array_shift($keys);\n\n\t\t\tif (!array_key_exists($key, $array))\n\t\t\t{\n\t\t\t\t$array[$key] = array();\n\t\t\t}\n\n\t\t\t$array =& $array[$key];\n\t\t}\n\n\t\t$array[array_shift($keys)] = $value;\n\t}", "public function setValue($value)\n {\n $value = arr::get($value, 'value', NULL);\n\n if ($value !== NULL)\n {\n //pokud prisla prazdna hodnota, tak do modelu ukladam NULL\n if (empty($value))\n {\n $value = NULL;\n }\n\n parent::setValue($value);\n }\n }" ]
[ "0.62114054", "0.611041", "0.6056248", "0.5937544", "0.5906946", "0.58134925", "0.5716021", "0.5703754", "0.56769025", "0.563895", "0.5621342", "0.5608077", "0.55519795", "0.55410105", "0.55278784", "0.5520644", "0.5476593", "0.5476259", "0.5418395", "0.54177326", "0.5385158", "0.53712", "0.53671885", "0.5360787", "0.53405035", "0.5320567", "0.52942497", "0.5256587", "0.52476174", "0.52276784", "0.52210987", "0.5207697", "0.52073", "0.5204418", "0.5201213", "0.519977", "0.519971", "0.51980835", "0.51956046", "0.519254", "0.51921386", "0.51886743", "0.51860195", "0.51805955", "0.5179452", "0.5175883", "0.5164579", "0.51567465", "0.5155933", "0.5153867", "0.51492345", "0.5147813", "0.51457477", "0.51457477", "0.51386195", "0.51377755", "0.5133932", "0.5129689", "0.51117635", "0.5108217", "0.5103493", "0.509939", "0.50937414", "0.5087233", "0.5083464", "0.5075981", "0.5075879", "0.50695634", "0.5067488", "0.5067339", "0.50576824", "0.5051012", "0.50417775", "0.5041403", "0.50408757", "0.504034", "0.5036896", "0.5036695", "0.50365627", "0.50347656", "0.5031267", "0.5019654", "0.5014899", "0.50134003", "0.5008552", "0.4992715", "0.49862072", "0.49803057", "0.49790642", "0.49748978", "0.49748978", "0.4968762", "0.4963227", "0.49616063", "0.49596584", "0.49594644", "0.495811", "0.4957867", "0.49570414", "0.4955592", "0.49545035" ]
0.0
-1
Save Access Token to a text file
public function saveAccessToken($accessToken) { file_put_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile, serialize($accessToken)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WriteTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"w+\");\n fwrite($fh, $this->_props['RequestToken']);\n fclose($fh);\n }\n }", "public function saveAccessToken($accessToken);", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function saveAccessToken($accessToken)\n {\n // This should write more than one byte as such any falsey value is a problem\n if (file_put_contents('./wpOauthToken', serialize($accessToken))) {\n return true;\n }else{\n return false;\n }\n }", "public function saveAccessToken($accessToken)\n {\n session()->put('drive-access-token', $accessToken);\n }", "public function saveAccessTokenToDB($accessToken);", "function write_new_token($tokenId)\n{\n global $tokenFile;\n global $tokenFilePath;\n\n // write new tokenId to tokens file\n $tokenFile->tokenId = $tokenId;\n\n //Format XML to save indented tree rather than one line\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($tokenFile->asXML());\n $dom->save($tokenFilePath);\n}", "function getToken(): string {\n //return $this->_c['inseeToken'];\n if ($this->inseeToken)\n return $this->inseeToken;\n if (($contents = @file_get_contents(__DIR__.'/inseetoken.json')) === false) {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n return $this->inseeToken;\n }\n $contents = json_decode($contents, true);\n \n $mtime = filemtime(__DIR__.'/inseetoken.json');\n //echo \"fichier modifié le \",date(DATE_ATOM, $mtime),\"<br>\\n\";\n //echo \"fichier modififié il y a \",time()-$mtime,\" secondes<br>\\n\";\n if (time() - $mtime < $contents['expires_in'] - 3600) { // vérification que le token est encore valide\n if (!isset($contents['access_token']))\n throw new Exception(\"Erreur access_token absent du fichier inseetoken.json\");\n $this->inseeToken = $contents['access_token'];\n }\n else {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n }\n return $this->inseeToken;\n }", "protected function store_access_token($token) {\n global $SESSION;\n $SESSION->{self::SESSIONKEY} = $token;\n }", "public function storeAccessToken(AccessToken $token):static;", "private static function storeAccessToken(array $accessToken, string $credentialsPath): void\n {\n // Store the credentials to disk.\n if (!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n }", "private function StoreAccessToken($access_token)\n\t{\n\t\t$_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url] = $access_token;\n\t}", "private function fetchAccessToken()\n\t{\n\t\tif (file_exists($this->refreshToken))\n\t\t{\n\t\t\t$parameters = array(\n\t\t\t\t'refresh_token' => file_get_contents($this->refreshToken),\n\t\t\t\t'client_id' => $this->googleClientId,\n\t\t\t\t'client_secret' => $this->googleClientSecret,\n\t\t\t\t'grant_type' => 'refresh_token'\n\t\t\t);\n\n\t\t\t$response = $this->makeRequest($parameters);\n\n\t\t\tif (isset($response->access_token))\n\t\t\t{\n\n\t\t\t\tfile_put_contents($this->accessToken, $response->access_token);\n\t\t\t}\n\t\t}\n\t}", "function saveToken($token) {\r\n\t\t$_SESSION['token'] = $token;\r\n\t}", "function ReadTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"r\");\n $this->_props['RequestToken'] = trim(fread($fh, filesize($fname)));\n fclose($fh);\n }\n }", "function fbComments_storeAccessToken() {\n\tfbComments_log('In ' . __FUNCTION__ . '()');\n\tglobal $fbc_options;\n\n\tif (!$fbc_options['accessToken']) {\n\t\t$accessToken = fbComments_getUrl(\"https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={$fbc_options['appId']}&client_secret={$fbc_options['appSecret']}\");\n\t\tfbComments_log(\" got an access token of [$accessToken]\");\n\t\tif (strpos($accessToken,'<div class=\"error\">') == 0) { $accessToken = substr($accessToken, 13); }\n\t\telse { echo '<hr />didnt find accesstoken line 161 comments-core<hr />'; $accessToken = ''; }\n\t\tif ($accessToken != '') {\n\t\t\tfbComments_log(\" Storing an access token of $accessToken\");\n\t\t\t$fbc_options['accessToken'] = $accessToken;\n\t\t\tupdate_option('fbComments', $fbc_options);\n\t\t} else {\n\t\t\tfbComments_log(' FAILED to obtain an access token');\n\t\t}\n\t}\n}", "public function addToTxtFile($auth_code);", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "protected function createToken()\n {\n if ($this->client->getRefreshToken()) {\n $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n $this->client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($this->token))) {\n mkdir(dirname($this->token), 0700, true);\n }\n file_put_contents($this->token, json_encode($this->client->getAccessToken()));\n }", "private function getAccessToken(): string\n {\n try {\n $token = Storage::disk('local')->get(self::ALIGO_ACCESS_TOKEN_FILE);\n } catch (\\Exception $exception) {\n $token = null;\n }\n\n if (empty($token)) {\n try {\n $response = $this->call('/akv10/token/create/10/y');\n $data = json_decode((string) $response->getBody(), false);\n } catch (\\Throwable $exception) {\n throw CouldNotSendNotification::serviceRespondedWithAnError($exception);\n }\n Storage::disk('local')->put(self::ALIGO_ACCESS_TOKEN_FILE, $data->token);\n\n return $data->token;\n }\n\n return $token;\n }", "function create_token($filename = '.token')\n{\n try {\n $dir = VAR_FOLDER . DS;\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n $file = fopen($dir . DS . $filename, \"w\");\n fwrite($file, bin2hex(random_bytes(32)) . \"\\n\");\n fclose($file);\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), $e->getCode());\n }\n}", "private function save_refresh_token() {\n global $DB, $USER;\n\n $newdata = new stdClass();\n $newdata->refreshtokenid = $this->client->getRefreshToken();\n $newdata->gmail = $this->get_user_info()->email;\n\n if (!is_null($newdata->refreshtokenid) && !is_null($newdata->gmail)) {\n $rectoken = $DB->get_record('repository_gdrive_tokens', array ('userid' => $USER->id));\n if ($rectoken) {\n $newdata->id = $rectoken->id;\n if ($newdata->gmail === $rectoken->gmail) {\n unset($newdata->gmail);\n }\n $DB->update_record('repository_gdrive_tokens', $newdata);\n } else {\n $newdata->userid = $USER->id;\n $newdata->gmail_active = 1;\n $DB->insert_record('repository_gdrive_tokens', $newdata);\n }\n }\n\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_created::create_from_userid($USER->id);\n $event->trigger();\n }", "function login_details(){\n $filename = '../logs/logs.txt';\n $format = \"%m/%d/%Y %H:%M \";\n $time = strftime($format, filectime($filename));\n $name = isset($_POST['username'])?$_POST['username']:'null';\n $string = strtolower($name).' Logged in at '.$time. \"\\n\";\n file_put_contents($filename, $string, FILE_APPEND | LOCK_EX);\n}", "abstract public function url_access_token();", "public function generateAccessToken()\n {\n $this->access_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function testBasicTest()\r\n {\r\n $client = new LoginClient();\r\n\r\n $result = $client->getToken('您的帳號', '您的密碼');\r\n\r\n// echo $result['access_token'];\r\n if (!empty($result['access_token'])) {\r\n // save token to local\r\n file_put_contents(\"token.txt\", $result['access_token']);\r\n }\r\n var_dump($result);\r\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function save_access_token($api_id, $token_name, $hash) {\n\t\t$data = array(\n\t\t\t'api_id' => sanitize_text_field($api_id),\n\t\t\t'token_name' => sanitize_text_field($token_name),\n\t\t\t'hash' => sanitize_text_field($hash),\n\t\t\t);\n\n\t\t// check if token already exists\n\t\t$tokens = $this->get_access_tokens();\n\n\t\t$key = false;\n\t\tif (count($tokens)) {\n\t\t\t$ids = wp_list_pluck($tokens, 'hash');\n\t\t\t$key = array_search($hash, $ids);\n\t\t}\n\n\t\t// this is a new token\n\t\tif ($key === false) {\n\t\t\t$tokens[] = $data;\n\t\t}\n\t\t// this is an existing token\n\t\telse {\n\t\t\t$tokens[$key] = $data;\n\t\t}\n\n\t\t// re-index array and update key in user meta storage\n\t\tupdate_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, array_values($tokens));\n\t}", "function SaveInfo()\r\n\t{\r\n\t\t//Access is not stored in files, just directories.\r\n\t\tif (is_file($this->path)) unset($this->info['access']);\r\n\t\t$info = $this->dir.'/.'.$this->filename;\r\n\t\t$fp = fopen($info, 'w+');\r\n\t\tfwrite($fp, serialize($this->info));\r\n\t\tfclose($fp);\r\n\t}", "public function setaccess_token($value);", "function saveToken (string $token = '', string $id = 'default') : void {\n\t$user = getUserObject($id);\n\tif(!$user){\n\t\treturn;\n\t}\n\t$tokenProvided = true;\n\tif($token === ''){\n\t\t$token = md5(uniqid());\n\t\tfor($i = 0; $i < getConfig(\"LOGIN_TOKEN_32_CHAR_CHUNKS\") - 1; $i++){\n\t\t\t$token .= md5($token.uniqid());\n\t\t}\n\t\t$token .= md5($token);\n\t\t$tokenProvided = false;\n\t}\n\t$expiration = new DateTime('now');\n\t$expiration = $expiration->add(new DateInterval(\"PT\".getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").\"H\"));\n\tif($tokenProvided){\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'UPDATE user_token SET expiration = DATE_ADD(CURDATE(), INTERVAL '.getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").' HOUR) WHERE token = ?;',\n\t\t\t[['s' => $token]]\n\t\t);\n\t}else{\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'INSERT INTO user_token VALUES (NULL, ?, ?, ?)',\n\t\t\t[\n\t\t\t\t['i' => $user['id']],\n\t\t\t\t['s' => $token],\n\t\t\t\t['s' => $expiration->format('Y-m-d')]\n\t\t\t]\n\t\t);\n\t}\n\n\tsetcookie(getConfig(\"SITE_TITLE\").'-logintoken', $token, time() + (3600 * getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\")), '/');\n}", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "public function generateAccessToken()\n\t{\n\t\t$this->access_token = Yii::$app->security->generateRandomString();\n\t}", "public function postToken()\n {\n // include our OAuth2 Server object\n require_once __DIR__.'/server.php';\n\n $request = OAuth2\\Request::createFromGlobals();\n\n // Handle a request for an OAuth2.0 Access Token and send the response to the client\n $server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n \n }", "public function saveToFile($filePath)\n {\n return KeyFactory::save($this->secret_key, $filePath);\n }", "protected function saveAccessToken(OAuthToken $token)\n\t{\n\t\treturn $this->setState('token', $token);\n\t}", "public function getToken()\n {\n $accessToken = null;\n if (file_exists($_SERVER['DOCUMENT_ROOT'].$this->tokenFile)) {\n $accessToken = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile));\n }\n\n return json_decode($accessToken);\n }", "private function saveCredentials($credentials)\n {\n $ttl = (int) $credentials->expires_in - 120;\n\n $this->engine->cache->put(static::AC_TOKEN, $credentials->access_token, $ttl);\n }", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "public function save_user_log($filename) {\r\n\t\tfile_put_contents($this->path_user.$filename, json_encode($this->request));\t\t\t\r\n\t}", "public function createToken();", "public function generateAccessToken()\n {\n return Yii::$app->security->generateRandomString();\n }", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "function writeToFile($handle, $cleanData){\n $username = htmlentities($cleanData['username']);\n $password = htmlentities($cleanData['password']);\n $title = htmlentities($cleanData['title']);\n $firstname = htmlentities($cleanData['firstname']);\n $surname = htmlentities($cleanData['surname']);\n $email = htmlentities($cleanData['email']);\n /* The verification process ensured that none of the inputs can contain commas, so they are an effective delimiter */\n $text = $username.','.$password.','. $title .','. $firstname.','. $surname.','. $email.PHP_EOL;\n fwrite( $handle , $text ) ;\n}", "public function getAccessToken()\n {\n return json_encode($this->accessToken);\n }", "private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }", "public function generateAccessToken()\n {\n $this->verification_token = Yii::$app->security->generateRandomString($length = 16);\n }", "public function saveStorage($file){\n\t\t$ser_storage = serialize($this->user);\n\t\tfile_put_contents($file, $ser_storage) or die(\"save: unable to open File\");\t\t\n\t}", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function savePasswdFile($htpasswd = null)\n {\n if (is_null($htpasswd)) {\n $htpasswd = $this->htpasswdFile;\n }\n $handle = fopen($this->htpasswdFile, \"w\");\n if ($handle) {\n foreach ($this->users as $name => $passwd) {\n if (!empty($name) && !empty($passwd)) {\n fwrite($handle, \"{$name}:{$passwd}\\n\");\n }\n }\n fclose($handle);\n }\n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "function save($filePath);", "public function run()\n {\n $accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMjkiLCJqdGkiOiI5NDdjODdlMWI0MTU1N2Q1NzRiMmIzOTgzM2ViZWJjZWY3NjZmZTA3Yjc5NjllYTI3NTc1NTgwNTYzNTBlOGUyMjBlMDhhZTA0ZjhlYzM3MyIsImlhdCI6MTYyNTI0MjM0MywibmJmIjoxNjI1MjQyMzQzLCJleHAiOjE2NTY3NzgzNDMsInN1YiI6IjE0NjEiLCJzY29wZXMiOltdfQ.RjIAPcd6oSptTTKM0HhDIp8vA_xqhI5iccoxw1whZRvCzYHVii-WHiHU3JwRQDtJXKzRheqqcioUKkpoHH2SZQ1biWX0S5mqmunITFLoIHXhi61YYp4ctvlfvxud-9EGeQ4agqLazGDwxgCAwbo5dJRhvSX_SLcq0XLIdHU-_WqYXyb1Cy7vejsfR2Tx26vDqKsneHOiOTji7RT8TRg0Ej222WivgfBfcB-FzKPlFoKp6kYoSeLBvd5hZLERzFjfeWDVd38S4zxTFoSZH6Sg-WqZ5s3472CJ36_zWsh3R3Ebu0S7s-0uriCkdrVlzNY1xZABkVAedd-JyNgmKgA-zVb4AsNUXOqKJ-S7Nn3uVZmdbBWYjMPJBomsjt3xSSP4zq3-aJGJabG-GMvzWSGMxBDQeYlzFy_B3JLK0ZWaWLFN8eLJsHuHhF2zjypcPZkOajuQvrXNSFgm69_x57SSveM0eFkcbcvYzfHDcw6EvBrwPcvGE9RDajqBz3_So57WJRx2P_S7DJm64O_1m53AsmJz34MQxwCcDSUc7ZKwEX8mRRcu2RjWWoCLvOtA3mWx7v8nuREKXweBeHgSoPwXAJLIlsLT0yWVT603mseTVZ1MDSdtr46demlr_FGwqsKHyu5Fz54SBMpUEsqD3qIkFDT4VMc6Ge8v3ll_WVRui3M';\n\n $client = new ClientGuzzle([\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$accessToken,\n 'Content-Type' => 'application/json'\n ],\n ]);\n\n $response = $client->get('https://www.lioren.cl/api/ciudades');\n $responseBody = json_decode((string) $response->getBody(), true);\n foreach($responseBody as $ciudad){\n Ciudad::create([\n 'nombre' => $ciudad['nombre'],\n 'codigo' => $ciudad['id'],\n ]);\n }\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function testExportToken()\n {\n $response = $this->actingAsTestingUser()\n ->withEncryptionKey()\n ->get(route('tokens.export', [$this->token->path]));\n\n $response->assertStatus(200);\n $response->assertViewIs('tokens.export');\n }", "private function saveAccessTokenDataToSession($accessTokenData){\n\t\t$tokenDataForSession = array(\n\t\t\t\"twitter_oauth_access_token\"\t=>\t$accessTokenData[\"oauth_token\"],\n\t\t\t\"twitter_oauth_access_token_secret\"\t=>\t$accessTokenData[\"oauth_token_secret\"]\n\t\t);\n\n\t\t$this->CI->session->set_userdata($tokenDataForSession);\n\t}", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "public function generateToken();", "public function saveRefreshToken($refreshToken);", "private function getToken($payload) {\n // Gets the acces token following the OAuth workflow\n // https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow\n\n // The header needs to be set to our clientId and clientSecret\n $headers = array('Authorization: Basic ' . base64_encode($this->clientId.':'.$this->clientSecret));\n\n $ch = curl_init('https://accounts.spotify.com/api/token');\n // It's a POST request\n curl_setopt($ch, CURLOPT_POST, 1);\n // The provided payload\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n // The headers as defined above\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n // If false it would directly output it to the browser, we don't want that.\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Grab the data\n $data = curl_exec($ch);\n // Close the CURL request to free up server resources\n curl_close($ch);\n\n // If the data is not false we decode it and save it\n if ($data !== false) {\n $data = json_decode($data);\n\n // If there is an error we throw an exception which we capture to display the error\n if (isset($data->error)) {\n throw new Exception($data->error_description);\n }\n\n // Here we set the three fields.\n $this->accessToken = $data->access_token;\n // The expiration date is the current time + the expire time we got from spotify\n $this->expirationDate = time() + intval($data->expires_in);\n // The refresh_token is only provided on the authorization_code request, not in the refresh_token request\n // so we want to make sure we only set it if it is present.\n if (isset($data->refresh_token)) $this->refreshToken = $data->refresh_token;\n\n // Lastly we save it to disk\n $this->saveData();\n }\n }", "private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "private function saveMemberToFile($user) {\n $this->users[count($this->users)] = $user;\n $usersJSON = json_encode($this->users);\n if (file_put_contents(self::$storageFile, $usersJSON) == false) {\n throw new \\Exception(\"Could not save user\");\n \n }\n}", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "function atkWriteToFile($text, $file=\"\")\n{\n\t$fp = @fopen($file, \"a\");\n\tif ($fp)\n\t{\n\t\tfwrite($fp, $text.\"\\n\");\n\t\tfclose($fp);\n\t}\n}", "public function _getAccessToken()\n {\n $this->setAccessToken($this->_getStoreConfig($this->path_access_token));\n }", "function create_account($uname, $pwd) {\n $account_info = \"{$uname}:{$pwd}\\n\";\n add_item_to_file(\"users.txt\", $account_info);\n }", "private function createAuthFile()\r\n {\r\n $directory = $this->filesystem->getDirectoryWrite(DirectoryList::COMPOSER_HOME);\r\n\r\n if (!$directory->isExist(PackagesAuth::PATH_TO_AUTH_FILE)) {\r\n try {\r\n $directory->writeFile(PackagesAuth::PATH_TO_AUTH_FILE, '{}');\r\n } catch (Exception $e) {\r\n throw new LocalizedException(__(\r\n 'Error in writing Auth file %1. Please check permissions for writing.',\r\n $directory->getAbsolutePath(PackagesAuth::PATH_TO_AUTH_FILE)\r\n ));\r\n }\r\n }\r\n }", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "public function getAccessTokenString()\n {\n $request = $this->getRequest();\n $headers = $request->headers->all();\n\n return str_replace(\n 'Bearer ',\n '',\n $headers['authorization']\n );\n }", "private function writeCookieData($cookieHash) {\n $userId=$_SESSION['user_id'];\n $data = [\n \"user_id\" => $userId,\n \"last_activity\" => time(),\n \"bag\" => isset($_SESSION['bag']) ? $_SESSION['bag'] : []\n ];\n $cookieHash = preg_replace(\"/[^A-Za-z0-9]/\", '', $cookieHash);\n $cookieFile = $this->_cookiePath. $cookieHash . \".txt\"; \n file_put_contents($cookieFile, serialize($data));\n }", "function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }", "function log_in(){\n $filename = '../logs/logs.txt';\n if ($handle = fopen($filename, 'r')){\n if (is_writeable($filename)){\n if ($handle = fopen($filename, 'a+')) {\n $format = $format = \"%m/%d/%Y %H:%M \";\n $time = strftime($format, fileatime($filename));\n $name = isset($_POST['username'])?$_POST['username']:'null';\n $string = $time . $name ;\n fwrite($handle, $string);\n fclose($handle);\n }\n\n }\n}\n}", "public function saveToFile($file)\n {\n \n }", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "function get_access_token()\r\n {\r\n $script_location = $this->script_location.'Soundcloud_get_token.py';\r\n $params = $this->sc_client_id.\" \".$this->sc_secret.\" \".$this->sc_user.\" \".$this->sc_pass;\r\n //Execute python script and save results\r\n exec(\"python \\\"\".$script_location.\"\\\" \".$params, $result);\r\n return $result;\r\n }", "function assignToken($domain,$accesslevel) {\n\n}", "function accessTokenURL() { return 'https://www.dropbox.com/1/oauth/access_token'; }", "public function getApiResponseFile(){\n\t\treturn fopen(\"output/API Response Status.txt\",\"w\");\n\t}", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "protected function save()\n {\n return file_put_contents($this->outputPath() . '/' . $this->outputFile(), $this->stub); \n }", "function save_response($response){\n $f = fopen('response.html', 'w');\n fwrite($f, $response);\n fclose($f);\n}", "public function coppyAndPasteCredentials($credentialsPath)\n {\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $pasteYourVerificationCodeHere = '';\n $authCode = trim($pasteYourVerificationCodeHere);\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk, this credentials will expire in the set time\n if (!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n return $accessToken;\n //printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "protected function saveToFile($data, $file)\n {\n file_put_contents($file, \"<?php\\nreturn \".var_export($data, true).\";\\n\", LOCK_EX);\n }", "public function save($filename) {\r\n file_put_contents($filename, $this->contents);\r\n }" ]
[ "0.773946", "0.6335817", "0.6212518", "0.6045753", "0.5930729", "0.58840746", "0.58693653", "0.58662856", "0.58635217", "0.5844006", "0.58256173", "0.5773556", "0.5768012", "0.5749106", "0.57348484", "0.5732757", "0.5728807", "0.57190937", "0.5716746", "0.56892526", "0.56399244", "0.5632181", "0.55117357", "0.54210347", "0.53911895", "0.5378303", "0.5375917", "0.5368671", "0.5367459", "0.5324414", "0.53223556", "0.53185016", "0.53146386", "0.53086954", "0.5293514", "0.524026", "0.52363974", "0.52363557", "0.5221035", "0.522064", "0.5210706", "0.519645", "0.51617825", "0.5161522", "0.5138495", "0.51361763", "0.5105762", "0.5104905", "0.5079539", "0.5067498", "0.50557476", "0.50532484", "0.505255", "0.505255", "0.505255", "0.505255", "0.505255", "0.50510657", "0.50436836", "0.50374174", "0.5014907", "0.5007729", "0.50006354", "0.4996306", "0.49946266", "0.49940282", "0.49889594", "0.4987468", "0.49791706", "0.49743044", "0.49734262", "0.49727246", "0.49682575", "0.49660432", "0.49635428", "0.4963042", "0.49580956", "0.49508625", "0.49472073", "0.49437696", "0.4943415", "0.49415123", "0.49374995", "0.49346718", "0.49324748", "0.49260995", "0.49260995", "0.49260995", "0.49260995", "0.4924654", "0.49240047", "0.49228716", "0.4922782", "0.49177125", "0.49169064", "0.4914238", "0.49138242", "0.4913121", "0.49067488", "0.49062812" ]
0.7467016
1
Rakuten Make Request To API
public function loadAccessToken() { $this->setHeader(self::HEADER_TYPE_BASIC, self::TOKEN_HEADER); $curl = new Curl; $opt = [ 'grant_type' => $this->grant, 'username' => $this->username, 'password' => $this->password, 'scope' => $this->scope ]; $token = $curl->post(self::BASE_API_URL.self::TOKEN_END_POINT, $opt, $this->getHeader()); $this->saveAccessToken($token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function do_api_request();", "private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }", "public function makeRequest(): void\n {\n if (!$this->token) {\n $this->login();\n }\n\n try {\n $promise = $this->client->requestAsync('POST', 'https://api.jamef.com.br/rastreamento/ver',\n [\n 'headers' =>\n [\n 'Authorization' => 'Bearer ' . $this->token,\n ],\n 'json' => $this->buildRequest()\n ]\n )->then(function ($response) {\n $this->parseResult($response);\n });\n $promise->wait();\n } catch (RequestException $e) {\n $error = json_decode($e->getResponse()->getBody());\n if($error->message){\n $this->result->errors[] = utf8_decode($error->message->message);\n }\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n }", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function request();", "public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "function revSPORTapiRequest(string $api, string $endpoint, int $id = null, array $parameters = [])\n{\n date_default_timezone_set('Australia/Sydney');\n\n //Replace these with\n //revdemoclub\n $apiKey = '';\n $secretKey = '';\n $method = 'GET';\n //$url = 'https://lz-1.revolutionise.com.au/' . $api . '/' . $endpoint . '/';\n $url = 'https://lz-1-staging.revolutionise.com.au/' . $api . '/' . $endpoint . '/';\n //$url = 'https://lz-1.rev.local/' . $api . '/' . $endpoint . '/';\n\n if (empty($id) === false)\n {\n $url .= $id;\n }\n\n $now = time();\n $date = date('d M Y H:i:s', $now);\n $URLFriendlyDate = str_replace(' ', '', $date);\n $nonce = rand(100000, 999999); // generated randomly\n\n // Build the digest to send\n $digest = base64_encode(hash_hmac('sha256', $method . \"+/\" . $endpoint . \"/\" . (empty($id) ? '' : $id) . \"+$URLFriendlyDate+$nonce\", $secretKey));\n $x = array(\n 'api_key' => $apiKey,\n 'date' => $date,\n 'nonce' => $nonce,\n 'digest' => $digest\n );\n\n $postfields = array_merge($x, $parameters);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //make sure it returns a response\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); // allow https verification if true\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // allow https verification if true\n curl_setopt($ch, CURLOPT_POST, true); //tell it we are posting\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query_for_curl($postfields)); //tell it what to post\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); //response comes back as json\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: multipart/form-data')); //response comes back as json\n $response = curl_exec($ch);\n\n\n // Check if any error occurred\n if (!curl_errno($ch))\n {\n $info = curl_getinfo($ch);\n }\n // Close handle\n curl_close($ch);\n\n //$response = json_decode($response, true);\n\n return $response;\n}", "abstract protected function requestApi($action = '', $params = array(), $method = 'POST');", "private function _makeRequest($type)\n\t{\n\t\n\t\t$http = new Varien_Http_Adapter_Curl();\n\t\t$config = array('timeout' => 30);\n\t\t\n\t\t//Build URL from the \n\t\t$url = Wp_WhitePages_Model_Api::API_URL.'/'.$type.'/'.Wp_WhitePages_Model_Api::API_VERSION.'/'. $this->_requestQuery;\n\n\t\t//Magento logging\n\t\t$isLogsActive = Mage::getStoreConfig('dev/log/active');\n\t\tif($isLogsActive)\n\t\t{\n\t\t\t$this->wpDebug(\"Requests URL: \".$url);\n\t\t}\n\t\t//echo $url; die;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t//Make Curl Request\n\t\t\t$http->write('GET',\t$url, '1.1');\n\t\t\t$this->_result = json_decode(Zend_Http_Response::extractBody($http->read()), true );\n\t\t\t\n\t\t\t//Check for Curl Error\n\t\t\tif($http->getErrno() != 0)\n\t\t\t{\n\t\t\t\tMage::throwException($http->getError(). ' error number '. $http->getErrno());\n\t\t\t}\n\t\t\t//Check for API result Errors\n\t\t\telseif(array_key_exists('errors',$this->_result))\n\t\t\t{\n\t\t\t\tMage::throwException($this->_result[\"errors\"][0]);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) \n\t\t{\n\t\t \t$this->wpDebug($e->getMessage(), Zend_Log::ERR);\n\t\t\t$this->_hasError = true;\n\t\t}\n\t\t\n\t\t//Magento logging\n\t\tif($isLogsActive)\n\t\t{\n\t\t\t$this->wpDebug( \"Response Data: \".var_export($this->_result, true));\n\t\t}\n\t\t\n\t\treturn $this->_result;\n\t}", "public function testMakeGetRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse(['teacher' => 'Charles Xavier']),\n ]);\n\n $this->assertEquals($client->get('classes/1'), ['teacher' => 'Charles Xavier']);\n }", "abstract public function request();", "function api_request($zone_uri, $req_type, $api_params, $token)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); # TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.\n\tcurl_setopt($ch, CURLOPT_FAILONERROR, false); # Do not fail silently. We want a response regardless\n\tcurl_setopt($ch, CURLOPT_HEADER, false); # disables the response header and only returns the response body\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Auth-Token: '.$token)); # Set the token and the content type so we know the response format\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $req_type);\n\tcurl_setopt($ch, CURLOPT_URL, $zone_uri); # Where this action is going,\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($api_params));\n\t\n\t$http_result = curl_exec($ch);\n\t\n\t$decoded_result = json_decode($http_result); # Decode from JSON as our results are in the same format as our request\n\t$decoded_result = api_fail($token, $decoded_result);\t\n\treturn $decoded_result;\n}", "public function makeRequest( $url, $method = 'GET', $headers = null );", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "function request($httpMethod, $service, $apiMethod, array $parameters = array(), array $options = array());", "public function request( $request )\n {\n $request = $request->withHeader('ApiKey', $this->apikey);\n \n $result = $this->http_client->send($request); \n \n return json_decode($result->getBody(), true);\n }", "protected function makeRequest(): TestResponse\n {\n return $this->get(route('get-automations'));\n }", "private function Request($url,$params=false,$type=HTTP_GET){\n \n // Populate data for the GET request\n if($type == HTTP_GET) $url = $this->MakeUrl($url,$params);\n \n \n // borrowed from Andy Langton: http://andylangton.co.uk/\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n if ( isset($_SERVER['HTTP_USER_AGENT']) ) {\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );\n } else {\n // Handle the useragent like we are Google Chrome\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13.');\n }\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n //$acceptLanguage[] = \"Accept-Language:\" . $this->ClientLanguage;\n //curl_setopt($ch, CURLOPT_HTTPHEADER, $acceptLanguage); \n // Populate the data for POST\n if($type == HTTP_POST) {\n curl_setopt($ch, CURLOPT_POST, 1); \n if($params) curl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n }\n\n //execute\n $response=curl_exec($ch);\n $headers=curl_getinfo($ch);\n\n //fetch errors\n $errorNumber = curl_errno($ch);\n $errorMessage = curl_error($ch);\n\n curl_close($ch);\n\n // replace ids with their string values, added because of some\n // PHP-version can't handle these large values\n $response = preg_replace('/id\":(\\d+)/', 'id\":\"\\1\"', $response);\n\n // we expect JSON, so decode it\n $json = @json_decode($response, true);\n\n // validate JSON\n if ($json === null) {\n // should we provide debug information\n if (self::DEBUG) {\n // make it output proper\n echo '<pre>';\n\n // dump the header-information\n var_dump($headers);\n\n // dump the error\n var_dump($errorMessage);\n\n // dump the raw response\n var_dump($response);\n\n // end proper format\n echo '</pre>';\n }\n\n // throw exception\n throw new Exception('Invalid response.');\n }\n\n // any errors\n if (isset($json['diagnostic']['error_msgs'])) {\n // should we provide debug information\n if (self::DEBUG) { \n\n echo '<pre>';\n echo \"<h3>Header</h3>\";\n // dump the header-information\n var_dump($headers);\n\n echo \"<h3>Error message</h3>\";\n // dump the error\n var_dump($errorMessage);\n\n echo \"<h3>Raw Response</h3>\";\n // dump the raw response\n var_dump($response);\n\n echo \"<h3>Response</h3>\";\n var_dump($json);\n \n echo '</pre>';\n exit();\n }\n\n // throw exception\n /*\n if (isset($json['errors'][0]['message'])) {\n throw new Exception($json['errors'][0]['message']);\n } elseif (isset($json['errors']) && is_string($json['errors'])) {\n throw new Exception($json['errors']);\n } else throw new Exception('Invalid response.');\n */\n }\n\n return $json;\n }", "public function request($method, $url, array $body = [], array $headers = [], $version = '1.1');", "public function execute(): object\n {\n $this->buildRequest();\n $client = new HttpClient();\n Log::debug('Creating Digicert Request', [\n 'Method' => $this->requestMethod,\n 'RequestURI' => $this->requestUri,\n 'Options' => $this->options,\n ]);\n RateLimiter::checkLimit();\n $request = $client->request($this->requestMethod, $this->requestUri, $this->options);\n \n return json_decode($request->getBody());\n }", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "protected function makeRequest()\n {\n $this->buildRequestURL();\n \n $ch = curl_init($this->requestUrl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($ch);\n \n if ($output === false) {\n throw new \\ErrorException(curl_error($ch));\n }\n\n curl_close($ch);\n return $output;\n\n }", "public function request()\n {\n }", "public function request()\n {\n }", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }", "public function requestAction() {\n $this->api->login('request')->post()->loadTokenFromResponse();\n $_SESSION['request_token'] = $this->api->getOAuthToken();\n return $this->api->goRedirect('login');\n }", "function tincanlaunch_send_api_request($auth, $method, $url) {\n $options = func_num_args() === 4 ? func_get_arg(3) : array();\n\n if (!isset($options['contentType'])) {\n $options['contentType'] = 'application/json';\n }\n\n $http = array(\n // We don't expect redirects.\n 'max_redirects' => 0,\n // This is here for some proxy handling.\n 'request_fulluri' => 1,\n // Switching this to false causes non-2xx/3xx status codes to throw exceptions.\n // but we need to handle the \"error\" status codes ourselves in some cases.\n 'ignore_errors' => true,\n 'method' => $method,\n 'header' => array()\n );\n\n array_push($http['header'], 'Authorization: ' . $auth);\n\n if (($method === 'PUT' || $method === 'POST') && isset($options['content'])) {\n $http['content'] = $options['content'];\n array_push($http['header'], 'Content-length: ' . strlen($options['content']));\n array_push($http['header'], 'Content-Type: ' . $options['contentType']);\n }\n\n $context = stream_context_create(array('http' => $http));\n $fp = fopen($url, 'rb', false, $context);\n if (!$fp) {\n return array(\n \"metadata\" => null,\n \"content\" => null,\n \"status\" => 0\n );\n }\n $metadata = stream_get_meta_data($fp);\n $content = stream_get_contents($fp);\n $responsecode = (int) explode(' ', $metadata[\"wrapper_data\"][0])[1];\n\n fclose($fp);\n\n if ($options['contentType'] == 'application/json') {\n $content = json_decode($content);\n }\n\n return array(\n \"metadata\" => $metadata,\n \"content\" => $content,\n \"status\" => $responsecode\n );\n}", "public function doRequest()\n {\n $this->post('/api_v1/webhook/log/1',\n json_decode('{\n \"transaction_time\": \"1603711958\",\n \"id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\",\n \"event\": \"in-store-txn\",\n \"value\": 13.98,\n \"status\": \"complete\",\n \"customer_id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\"\n }'),\n [\n \"Accept\" => \"application/json\"\n ]\n );\n\n $this->assertEquals(\n 200, $this->response->getStatusCode()\n );\n }", "function rest_do_request($request)\n {\n }", "public function sendRequest($params) {\n \n // encrypt the request \n $request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->_app_key, json_encode($params), MCRYPT_MODE_ECB));\n //$request = base64_encode(json_encode($params));\n \n // redefine the parameters array so that it will be accepted by the api \n $params = array();\n $params['data'] = $request;\n $params['app_id'] = $this->_app_id;\n \n //initialize and setup the curl handler\n $handle = curl_init();\n curl_setopt($handle, CURLOPT_URL, $this->_api_url);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($handle, CURLOPT_POST, count($params));\n curl_setopt($handle, CURLOPT_POSTFIELDS, $params); \n $ans = curl_exec($handle); \n if ($ans === false) {\n printf(\"cUrl error (#%d): %s<br>\\n\", curl_errno($handle), htmlspecialchars(curl_error($handle)));\n } \n \n //echo \"GAC: \".$ans.\"\\n\";\n $rawans = $ans;\n $ans = json_decode($ans, true); \n //echo \"ABC: \".$ans.\"\\n\";\n \n //check if we're able to json_decode the result correctly\n if ($ans == false || isset($ans['success']) == false) { \n throw new Exception('Request was not correct in GeneralApiCaller: '.$rawans);\n }\n \n // if there was an error in the request, throw an exception\n if ($ans['success'] == false) {\n throw new Exception($ans['errormsg']);\n }\n \n // if reached here, the data component should have the result\n return $ans['data'];\n }", "public function doRequests();", "public function sendRequest( ) {\n\n }", "public function & GetRequest ();", "public function request_token() : object\n {\n $this->parameters = [\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'User-Agent' => $this->config['DISCOGS_USER_AGENT'],\n 'Authorization' => 'OAuth oauth_consumer_key=' . $this->config['DISCOGS_CONSUMER_KEY']\n . ',oauth_nonce=' . time() . ',oauth_signature=' . $this->config['DISCOGS_CONSUMER_SECRET']\n . '&,oauth_signature_method=PLAINTEXT,oauth_timestamp=' . time() . ',oauth_callback='\n . $this->config['OAUTH_CALLBACK'],\n ],\n ];\n\n return $this->response('GET', \"/oauth/request_token\");\n }", "function apiRequest($method, $data=[]) {\n // Define our target address for the API call.\n $url = \"https://api.telegram.org/bot\".API_KEY.\"/\".$method;\n\n // Perform cURL session.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n $result = curl_exec($ch);\n\n // Error checking. If successful, return data.\n if ( curl_error($ch) ) {\n return false;\n } else {\n return json_decode($result, TRUE);\n }\n }", "public function call()\r\n\t{\r\n\t\t// get the request XML from the DOM document\r\n\t\t$request_xml = $this->__toString();\r\n\t\t\r\n\t\t// get the API function name\r\n\t\t$function_name = get_class($this);\r\n\t\tif (substr($function_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$function_name = substr($function_name, 0, -4);\r\n\t\t}\r\n\t\t$function_name = substr($function_name, strrpos($function_name, '_') + 1);\r\n\t\t\r\n\t\t// make the API call\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// instantiate the SOAP client and make the API call\r\n\t\t\t$client = new SoapClient($this->props['remote_host'].'/external/api/api.wsdl', \r\n\t\t\t\tarray('location' => $this->props['remote_host'].'/external/api/api.php'));\r\n\t\t\t$result = $client->$function_name($this->props['api_version'], $this->props['auth_key'], $request_xml);\r\n\t\t} // end try\r\n\t\t// there was an error trying to make the API call\r\n\t\tcatch (SoapFault $fault)\r\n\t\t{\r\n\t\t\tthrow new Services_WorkXpress_API_Exception(\"SOAP Fault: (faultcode: {$fault->faultcode}; faultstring: {$fault->faultstring})\");\r\n\t\t} // end catch SoapFault\r\n\t\t\r\n\t\t// create a response object\r\n\t\t$class_name = str_replace('Request', 'Response', get_class($this));\r\n\t\tif (substr($class_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$class_name = substr($class_name, 0, -4);\r\n\t\t}\r\n\t\t$response = new $class_name($result);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "function requestToken() {\n\t\t$conn = new Connection('DB-Name');\n\n\t\t//instantiate login information, api_key, username, and password\n\t\t$api = $conn->tokenGrab(x);\n\t\t$user = $conn->tokenGrab(x);\n\t\t$pass = $conn->tokenGrab(x);\n\n\t\t//build fields to send to the token giver\n\t\t$fields = array(\n\t\t\t'grant_type' \t=> urlencode('password')\n\t\t\t, 'client_id' \t=> urlencode($api)\n\t\t\t, 'username' \t=> urlencode($user)\n\t\t\t, 'password'\t=> urlencode($pass));\n\n\t\t$fields_string = '';\n\t\tforeach ($fields as $key=>$value) { $fields_string .= $key . '=' . $value . '&'; }\n\t\trtrim($fields_string, '&');\n\n\t\t//send the request to token giver via cURL\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $conn->tokenGrab(x));\n\t\tcurl_setopt($ch, CURLOPT_POST, count($fields));\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t 'Content-Type' => urlencode('application/x-www-form-urlencoded')\n\t\t\t, 'Content-Length' => urlencode(strlen($fields_string))\n\t\t));\n\n\t\t$cherwellApiResponse = json_decode(curl_exec($ch), TRUE);\n\t\treturn $cherwellApiResponse['access_token'];\n\t}", "public function send() \n {\n if (!$this->getEndpoint()) {\n // Can't make a request without a URL\n Mage::throwException(\"Unable to send a Klevu Search API request: No URL specified.\");\n }\n\n $raw_request = $this->build();\n Mage::helper('klevu_search')->log(Zend_Log::DEBUG, sprintf(\"API request:\\n%s\", $this->__toString()));\n\n try {\n $raw_response = $raw_request->request();\n } catch (Zend_Http_Client_Exception $e) {\n // Return an empty response\n Mage::helper('klevu_search')->log(Zend_Log::ERR, sprintf(\"HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('klevu_search/api_response_empty');\n }\n\n Mage::helper('klevu_search')->log(\n Zend_Log::DEBUG, sprintf(\n \"API response:\\n%s\\n%s\",\n $raw_response->getHeadersAsString(true, \"\\n\"),\n $raw_response->getBody()\n )\n );\n\n $response = $this->getResponseModel();\n $response->setRawResponse($raw_response);\n\n return $response;\n }", "public function test_request(){\n\n return $this->send_request( 'en', 'es', array( 'about' ) );\n\n }", "private function makeRequest()\n\t{\n\t\t$this->webservice()->setRequestPath('/oauth/access_token.ws');\n\t\t$this->webservice()->setRequestMethod('post');\n\t\t$this->webservice()->setPostData(json_encode($this->_values));\n\t\t\n\t\tif ($this->webservice()->makeRequest())\n\t\t{\n\t\t\t$this->setJson($this->webservice()->getResponseJsonObject());\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function chargeAPI($api_url, $server_key, $request_body){\n $ch = curl_init();\n $curl_options = array(\n CURLOPT_URL => $api_url,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n // Tambahkan heder ke permintaan, termasuk Otorisasi yang dihasilkan dari kunci server\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'Accept: application/json',\n 'Authorization: Basic ' . base64_encode($server_key . ':')\n ),\n CURLOPT_POSTFIELDS => $request_body\n );\n curl_setopt_array($ch, $curl_options);\n $result = array(\n 'body' => curl_exec($ch),\n 'http_code' => curl_getinfo($ch, CURLINFO_HTTP_CODE),\n );\n return $result;\n}", "public function getRequest() {}", "public function getRequest() {}", "function json_api_request() {\n /** @var \\CloudCreativity\\LaravelJsonApi\\Services\\JsonApiService $service */\n $service = app('json-api');\n\n return $service->request();\n }", "private function PostToRapidAPI($url, $request, $IsPost = true) {\n //print_r($request);\n //echo \"<br />\";\n $url = $this->_url . $url;\n //echo \"<pre>\";print_r($this);echo \"</pre><br /><br />\";die();\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, Array(\"Content-Type: application/json\"));\n curl_setopt($ch, CURLOPT_USERPWD, $this->username . \":\" . $this->password);\n if ($IsPost)\n curl_setopt($ch, CURLOPT_POST, true);\n else\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n\n // Uncomment this if you are getting SSL errors (common in WAMP)\n // Make sure it is enabled when you go live!\n //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n // Ucomment for CURL debugging\n //curl_setopt($ch, CURLOPT_VERBOSE, true);\n\n $response = curl_exec($ch);\n //print_r($response);die();\n if (curl_errno($ch) != CURLE_OK) {\n echo \"<h2>POST Error: \" . curl_error($ch) . \" URL: $url</h2><pre>\";\n die();\n } else {\n $info = curl_getinfo($ch);\n if ($info['http_code'] == 401 || $info['http_code'] == 404) {\n $__is_in_sandbox = $this->sandbox ? ' (Sandbox)' : ' (Live)';\n echo \"<h2>Please check the API Key and Password $__is_in_sandbox</h2><pre>\";\n die();\n }\n\n curl_close($ch);\n //echo \"<pre>\";print_r($response);echo \"</pre><br /><br />\";die();\n return $response;\n }\n }", "public function serviceRequest()\n {\n API::post('ivr/serviceRequest', array(\n 'caller' => $this->caller,\n 'called' => $this->called\n ), $this->app->getAccessToken());\n }", "function makecurl($api,$data=array())\n{\n$options = array(\n);\n$ds1=array();\n$ds1['header']=\"Content-type: application/x-www-form-urlencoded\\r\\n\";\n$ds1['method']=\"POST\";\n$ds1['content']=http_build_query($data);\n$options['http']=$ds1;\n \n$context = stream_context_create($options);\n$result = file_get_contents($api, false, $context);\nif ($result === FALSE) { /* Handle error */ }\nreturn $result;\n}", "function getRequest();", "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "private function request($query)\n\t{\n\t\t$url = \"{$this->__url}/yourls-api.php\";\n\n\t\tif (!empty($this->__signature)) {\n\t\t\t$query = array_merge($query, array('signature' => $this->__signature));\n\t\t} elseif (!empty($this->__username) && !empty($this->__password)) {\n\t\t\t$query = array_merge($query, array('username' => $this->__username, 'password' => $this->__password));\n\t\t}\n\t\treturn $this->__httpSocket->{$this->requestMethod}($url, $query);\n\t}", "function mm_request($method, $params = array()) {\n\t$params = array_merge($params, array('apikey' => MXM_API_KEY, 'format' => 'json'));\n\t$qs = array();\n\tforeach ($params as $key => $value) {\n\t\t$qs[] = $key . '=' . urlencode($value);\n\t}\n\t$qs = implode('&', $qs);\n\t$url = \"http://api.musixmatch.com/ws/1.1/$method?$qs\";\n\t$rs = download_json($url)['message'];\n\tif ($rs['header']['status_code'] !== 200) {\n\t\tthrow new Exception('MusiXMatch error: ' . $rs['header']['status_code']);\n\t}\n\treturn $rs;\n}", "function __apiCall($url, $post_parameters = FALSE) {\n \n \t// Initialize the cURL session\n\t $curl_session = curl_init();\n\t \t\n\t // Set the URL of api call\n\t\tcurl_setopt($curl_session, CURLOPT_URL, $url);\n\t\t \n\t\t// If there are post fields add them to the call\n\t\tif($post_parameters !== FALSE) {\n\t\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $post_parameters);\n\t\t}\n\t\t \n\t\t// Return the curl results to a variable\n\t curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);\n\t\t \n\t // Execute the cURL session\n\t $contents = curl_exec ($curl_session);\n\t\t \n\t\t// Close cURL session\n\t\tcurl_close ($curl_session);\n\t\t \n\t\t// Return the response\n\t\treturn json_decode($contents);\n \n }", "private function sendGetRequest($url)\n {\n // Send the request and process the response\n $guzzleResponse = $this->client->request('GET', $url);\n $this->lastResponse = new SmartwaiverResponse($guzzleResponse);\n }", "function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}", "public function post()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'POST';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'POST::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'POST::DATA', $this->getData());\n Log::write('WebRequest', 'POST::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'POST::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if (!in_array($iHTTPCode, [200, 201, 204])) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200|201 on [POST] ' . $this->getApiRoot() . $this->getApiResource());\n }\n return $sOutput;\n }", "function request()\n {\n }", "public function api_call() {\n\n }", "public function send_request($url) {\n $headers = array('Content-Type' => 'application/json');\n $options = array($headers,);\n $request = drupal_http_request($url,$options );\n //dpm($request->data);\n \n if (($request->code!=200)) { \n drupal_set_message(t(\"URL request \" .$url. \" returned unexpected status code\" .$request->code. \",\" . \"error\" ));\n return FALSE;\n } \n // else uses drupal_json_decode to turn into array\n \n $json_responses = json_decode($request->data,true);\n \n //dpm($json_responses);\n \n \n \n return $json_responses;\n}", "public function execute(Carerix_Api_Rest_Request $request)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $request->getUrl());\n // This constant is not available when open_basedir or safe_mode are enabled.\n// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // [AY] CURLOPT_VERBOSE, CURLOPT_HEADER required for capturing response headers\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLINFO_HEADER_OUT, 1); // [AY] required for capturing request headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Expect:']);\n curl_setopt($ch, CURLOPT_USERAGENT, __CLASS__);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n $proxy = $request->getProxy();\n if ($proxy) {\n $proxy = parse_url($proxy);\n curl_setopt($ch, CURLOPT_PROXY, $proxy['host']);\n if (array_key_exists('port', $proxy)) {\n curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']);\n }\n }\n\n $username = $request->getUsername();\n $password = $request->getPassword();\n\n if ($username && $password) {\n curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);\n }\n\n switch ($request->getMethod()) {\n case self::POST:\n case self::PUT:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getMethod());\n switch ($request->getResponseType()) {\n case 'xml':\n $contentType = 'application/xml';\n break;\n\n case 'json':\n $contentType = 'application/json';\n break;\n\n case 'sencha':\n case 'js':\n $contentType = 'application/javascript';\n break;\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: ' . $contentType]);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request->getBody());\n break;\n case self::DELETE:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n case self::GET:\n default:\n break;\n }\n\n $response = curl_exec($ch);\n\n $this->last_request = curl_getinfo($ch, CURLINFO_HEADER_OUT);\n $this->last_request .= $request->getBody();\n // [AY] in case of 204 No content response response is always empty\n if ($response === false) {\n $errorNumber = curl_errno($ch);\n $error = curl_error($ch);\n curl_close($ch);\n\n throw new Exception($errorNumber . ': ' . $error);\n }\n\n $response = $this->parseResponse($response);\n $this->last_response = $response;\n\n [$header, $body] = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (!in_array($code, ['200', '201', '204'])) {\n throw new Carerix_Api_Rest_Exception($body, $code);\n }\n curl_close($ch);\n\n return $body;\n }", "public function sendRequestToEndpoint(): Response;", "function restAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, $request_data);\n }", "public function runRequest() {\n }", "function get_city($query,$type)\r\n{\r\nrequire_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('city/list', array(\r\n 'query' =&amp;gt; $query,\r\n 'type' =&amp;gt; $type,\r\n 'courier' =&amp;gt; 'jne',\r\n 'API-Key' =&amp;gt; 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ), 'JSON');\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n return $cities = $result['cities'];\r\n //print_r($cities);\r\n //foreach ($cities-&amp;gt;item as $item)\r\n //{\r\n //echo 'Kota: ' . $item . '&amp;lt;br /&amp;gt;';\r\n // }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan kota yang diawali &amp;quot;band&amp;quot;';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "public function request()\n {\n $request = new GuzzleHttp\\Psr7\\Request('GET', 'ProductsSimple');\n\n return $request->withUri($request->getUri()->withQuery(http_build_query([\n 'startRow' => $this->skip ? $this->skip + 1 : null,\n 'pageRows' => $this->take,\n 'updatedAfter' => $this->updatedAfter ? $this->updatedAfter->format('Y-m-d\\TH:i:s') : null\n ])));\n }", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "function Qassim_HTTP($method, $url, $header, $data){\r\n\r\n if( $method == 1 ){\r\n $method_type = 1; // 1 = POST\r\n }else{\r\n $method_type = 0; // 0 = GET\r\n }\r\n\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\r\n curl_setopt($curl, CURLOPT_HEADER, 0);\r\n\r\n if( $header !== 0 ){\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\r\n }\r\n\r\n curl_setopt($curl, CURLOPT_POST, $method_type);\r\n\r\n if( $data !== 0 ){\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n }\r\n\r\n $response = curl_exec($curl);\r\n $json = json_decode($response, true);\r\n curl_close($curl);\r\n\r\n return $json;\r\n}", "function activate_car($id)\n{\n $url = set_url('advert');\n $url .= '/' . $id . '/activate';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, '{}');\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n return $apiResponse;\n}", "protected function apiRequest()\n {\n $request = 'post';\n if ($this->method->isGetRequest()) {\n $request = 'get';\n }\n\n return $this->getTelegram()->{$request}($this->method->apiEndpoint(), $this->method->toArray());\n }", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "function makeRequest($post_data, $raw_data = false) {\n\t\t\n\t\t\n\t\t$client = new Zend_Http_Client ( $this->api_url );\n\t\tif (isset ( $post_data ['headers'] )) {\n\t\t\t$headers = $post_data ['headers'];\n\t\t\t$client->setHeaders ( $headers );\n\t\t}\n\t\t\n\t\t$data = array();\n\t\tif (isset ( $post_data ['body'] )) {\n\t\t\t$data = $post_data ['body'];\t\n\t\t}\n\t\t\n\t\tif($raw_data) {\n\t\t\t$client->setRawData($data);\n\t\t} else {\n\t\t\t$client->setParameterPost ( $data );\n\t\t\t$client->setParameterPost ( 'action', $post_data ['action'] );\t\n\t\t}\n\t\t\n\t\t\n\t\t$result = $client->request ( Zend_Http_Client::POST );\n\t\t$response = json_decode ( $result->getBody (), true );\n\t\t\n\t\treturn $response;\n\t}", "public function sendRequest()\n {\n }", "public function HTTPRequest(){\n\t}", "function GoCURL($campos, $url)\n{\n\n //url do destino da requsiçao, equivalente ao \"action\" de um formulário\n $url = 'http://localhost/API/'.$url;\n\n $token = GenerateToken();\n \n $campos['TokenRequest'] = $token; \n\n $string_campos = '';\n foreach($campos as $name => $valor) {\n $string_campos .= $name . '=' . $valor . '&';\n }\n $string_campos = rtrim($string_campos,'&');\n\n $ch = curl_init();\n //configurando as opções da conexão curl\n curl_setopt($ch,CURLOPT_URL,$url);\n //este parâmetro diz que queremos resgatar o retorno da requisição\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch,CURLOPT_POST,count($campos));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$string_campos);\n //manda a requisição post\n $resultado = curl_exec($ch);\n //echo '<Pre>';print_r($resultado);\n curl_close($ch);\n $json = json_decode($resultado,1);\n \n if(!$json['request'])\n { \n echo '<Pre>';print_r($resultado);\n echo '<Pre>';print_r($json);\n echo utf8_decode(\"ocorreu um erro na sua conexão, tente novamente\");\n exit;\n } \n\n return $json;\n}", "public function BabelNetRequest(){\n\n\t\t\tglobal $msg;\n\n\t\t\t$this->message = $this->errlog = NULL;\n\t\t\t\n\t\t\t$this->api_key\t\t\t= \"0323bb0e-3eab-4923-85bc-36f974868f88\";\n\t\t\t$this->key_string\t\t= \"key=\".$this->api_key;\n\t\t\t$this->service_name\t\t= \"BabelNet\";\n\t\t\t$this->url\t\t\t\t= \"https://babelnet.io/v3/\";\n\t\t\t$this->http\t\t\t\t= new HttpRequest();\n\t\t\t$this->setModes();\n\t\t\t$ok = $this->checkConnection();\n\t\t\t\n\t\t\tif ($ok){\n\t\t\t\t$msg->log(\"999\", __METHOD__, \"BabelNet version: \".$this->bn_version);\n\t\t\t\t$this->message\t= \"Class BabelNetRequest instanced successfully. BabelNet version: \".$this->bn_version.\" [BabelNetRequest.BabelNetRequest]\";\n\t\t\t\t$this->errlog\t.= \"[\".date(\"d-m-o H:i:s\").\"] \".$this->message.\"\\n\";\n\t\t\t\t$this->status\t= TRUE;\n\t\t\t}else{\n\t\t\t\t$msg->log(\"012\", __METHOD__);\n\t\t\t\t$this->message\t= \"Error code 011: BabelNet connection failed. [BabelNetRequest.BabelNetRequest]\";\n\t\t\t\t$this->errlog\t.= \"[\".date(\"d-m-o H:i:s\").\"] \".$this->message.\"\\n\";\n\t\t\t\t$this->status\t= FALSE;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "protected function send()\n {\n $this->addAuthorization();\n\n $response = $this->client->post(\n $this->apiUrl,\n array(\n 'json' => array(\n 'query' => $this->getQuery(),\n 'variables' => $this->variables,\n ),\n 'headers' => $this->headers,\n )\n );\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody === null) {\n throw new \\RuntimeException('Invalid api call: '.json_encode($this->getQuery()));\n }\n\n $this->body = $responseBody;\n if (isset($responseBody['errors'])) {\n $this->errors = $responseBody['errors'];\n } else {\n $this->response = $responseBody['data'];\n }\n }", "function MyFatoorah($api, $userData)\n{\n // dd($userData);\n $token = $api;\n $basURL = \"https://apitest.myfatoorah.com\";\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"$basURL/v2/ExecutePayment\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $userData,\n CURLOPT_HTTPHEADER => array(\"Authorization: Bearer $token\", \"Content-Type: application/json\"),\n ));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n if ($err) {\n return $err;\n } else {\n return $response;\n }\n}", "public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }", "function MakeSignedRequest()\n{\n $user_id = 1;\n $request_uri = SERVER_BASE . 'services.php';\n\n // Parameters, appended to the request depending on the request method.\n // Will become the POST body or the GET query string.\n $params = array(\n 'service' => 'rest',\n 'method' => 'Version',\n 'response' => RESPONSE\n );\n\n // Obtain a request object for the request we want to make\n $req = new OAuthRequester($request_uri, 'GET', $params);\n\n // Sign the request, perform a curl request and return the results, throws OAuthException exception on an error\n $result = $req->doRequest($user_id);\n\n // $result is an array of the form: array ('code'=>int, 'headers'=>array(), 'body'=>string)\n var_dump($result);\n echo $result['body'];\n}", "function makeRequest($url, $options = array(), $verbose = false) {\n return Helper::makeRequest($url, $options, $verbose);\n }", "function acapi_call($method, $resource, $args, $params = array(), $body = array(), $options = array()) {\n $default_options = array(\n 'display' => TRUE,\n );\n $options = array_merge($default_options, $options);\n\n $debug = drush_get_option('debug', FALSE);\n $verbose = drush_get_option('verbose', FALSE);\n $simulate = drush_get_option('simulate', FALSE);\n $format = acapi_get_option('format');\n\n // Build the API call URL.\n $url = acapi_get_option('endpoint');\n $url .= acapi_dt($resource, $args);\n $url .= '.json';\n\n foreach ($params as $k => $v) {\n if (is_array($v)) {\n unset($params[$k]);\n foreach ($v as $key => $val) {\n $params[\"$k-$key\"] = \"$k%5B%5D=\" . urlencode($val);\n }\n }\n else {\n $params[$k] = \"$k=\" . urlencode($v);\n }\n }\n\n $url .= '?' . implode('&', $params);\n\n $creds = acapi_get_creds();\n if (!$creds) {\n return FALSE;\n }\n\n // Build the body.\n $json_body = json_encode($body);\n\n $display = \"curl -X $method '$url'\";\n if ($debug) {\n $display .= \" ($creds)\";\n }\n if ($debug || $verbose || $simulate) {\n drush_print($display, 0, STDERR);\n if (!empty($body)) {\n drush_print(\" $json_body\", 0, STDERR);\n }\n }\n\n if ($simulate) {\n return;\n }\n\n $headers = array();\n $ch = curl_init($url);\n // Basic request settings\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n curl_setopt($ch, CURLOPT_USERAGENT, basename(__FILE__));\n if (!empty($options['result_stream'])) {\n curl_setopt($ch, CURLOPT_FILE, $options['result_stream']);\n }\n else {\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n }\n // User authentication\n curl_setopt($ch, CURLOPT_HTTPAUTH, TRUE);\n curl_setopt($ch, CURLOPT_USERPWD, $creds);\n // SSL\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, preg_match('@^https:@', acapi_get_option('endpoint')));\n curl_setopt($ch, CURLOPT_CAINFO, acapi_get_option('cainfo'));\n // Redirects\n if (!empty($options['redirect'])) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $options['redirect']+1);\n }\n /* Body\n We need to set a Content-Length header even on empty POST requests, or the webserver\n will throw a 411 Length Required.\n */\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_body);\n $headers[] = 'Content-Type: application/json;charset=utf-8';\n $headers[] = 'Content-Length: ' . strlen($json_body);\n // Headers\n if (!empty($headers)) {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n // Debugging\n curl_setopt($ch, CURLOPT_VERBOSE, $debug);\n // Go\n $content = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n return drush_set_error('ACAPI_CURL_ERROR', dt('Error accessing @url: @err', array('@url' => $url, '@err' => curl_error($ch))));\n }\n\n $result = json_decode($content);\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if (!empty($format)) {\n drush_print(drush_format($result, NULL, $format));\n }\n else if ($options['display']) {\n if (is_array($result)) {\n foreach ($result as $item) {\n if (! is_scalar($item)) {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($item)));\n }\n else {\n drush_print($item);\n }\n }\n }\n else {\n if ($method == 'POST') {\n // All POST actions return a task. Display something helpful.\n drush_log(dt('Task @taskid started.', array('@taskid' => $result->id)), 'ok');\n }\n else {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($result)));\n }\n }\n }\n\n if ($status != 200) {\n return drush_set_error('ACAPI_HTTP_STATUS_' . $status, dt('API status code @status', array('@status' => $status)));\n }\n\n return array($status, $result);\n}", "public function execute(){\n try {\n $request = $this->getRestClient();\n $raw_response = $request->request();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::helper('unbxd_recommendation')->log(Zend_Log::ERR,\n sprintf($this->getUrl() .\" failed because HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('unbxd_recommendation/api_response')\n ->setErrorMessage(Unbxd_Recommendation_Model_Api_Response::SERVER_ERR);\n }\n return Mage::getModel(\"unbxd_recommendation/api_response\")\n ->setJsonResponse($this->isJsonResponse())\n ->setResponse($raw_response, $this->getUrl());\n }", "private function makeRequestsFormula( $url, $params, $method ) {\n $query = \\http_build_query( $params );\n $ch = \\curl_init();\n \\curl_setopt( $ch, \\CURLOPT_RETURNTRANSFER, true );\n \\curl_setopt( $ch, \\CURLOPT_HEADER, false );\n \\curl_setopt( $ch, \\CURLOPT_URL, $url );\n \\curl_setopt( $ch, \\CURLOPT_CUSTOMREQUEST, $method );\n \\curl_setopt( $ch, \\CURLOPT_POSTFIELDS, $query );\n $response = \\curl_exec( $ch );\n \\curl_close( $ch );\n return $response;\n }", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function getRequestWrapper();", "function callApi($url) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt ($ch, CURLOPT_URL, $url);\n\n // Get the response and close the channel.\n $response = curl_exec ( $ch );\n\n if ($response === false) {\n echo \"Failed to \".$action.\" : \" . curl_error ( $ch );\n }\n\n curl_close($ch);\n\n return $response;\n}", "public function sendRequest()\n {\n $url = \"http://66.45.237.70/api.php\";\n $number = $this->senderObject->getMobile();\n $text = $this->senderObject->getMessage();\n\n try {\n $this->errorException();\n\n } catch (XenonException $exception) {\n $exception->showException($this->senderObject);\n }\n $config = $this->senderObject->getConfig();\n\n $data = array(\n 'username' => $config['username'],\n 'password' => $config['password'],\n 'number' => $number,\n 'message' => $text\n );\n try {\n $ch = curl_init(); // Initialize cURL\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $smsResult = curl_exec($ch);\n $status = $this->generateReport($smsResult, $data);\n\n } catch (XenonException $exception) {\n $exception->showException();\n }\n }", "public function request($path, $method = \"GET\", $vars = array(), $headers = array( 'Accept' => 'application/json', 'Content-Type' => 'application/json' ) ) {\n\n $encoded = \"\";\n /*foreach($vars AS $key=>$value)\n $encoded .= \"$key=\".urlencode($value).\"&\";*/\n //$encoded = substr($encoded, 0, -1);\n $encoded = json_encode($vars);\n $tmpfile = \"\";\n $fp = null;\n \n // construct full url\n $url = \"{$this->Endpoint}/$path\";\n \n // if GET and vars, append them\n if($method == \"GET\") \n $url .= (FALSE === strpos($path, '?')?\"?\":\"&\").$encoded;\n\n // initialize a new curl object \n $curl = curl_init($url);\n \n $opts = array();\n foreach ($headers as $k => $v) $opts[CURLOPT_HTTPHEADER][] = \"$k: $v\";\n curl_setopt_array($curl, $opts);\n \n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n \n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n switch(strtoupper($method)) {\n case \"GET\":\n curl_setopt($curl, CURLOPT_HTTPGET, TRUE);\n break;\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);\n break;\n case \"PUT\":\n // curl_setopt($curl, CURLOPT_PUT, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n file_put_contents($tmpfile = tempnam(\"/tmp\", \"put_\"),\n $encoded);\n curl_setopt($curl, CURLOPT_INFILE, $fp = fopen($tmpfile,\n 'r'));\n curl_setopt($curl, CURLOPT_INFILESIZE, \n filesize($tmpfile));\n break;\n case \"DELETE\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n break;\n default:\n throw(new PocketstopException(\"Unknown method $method\"));\n break;\n }\n \n // send credentials\n curl_setopt($curl, CURLOPT_USERPWD,\n $pwd = \"{$this->AccountId}:{$this->ApiKey}\");\n \n // do the request. If FALSE, then an exception occurred \n if(FALSE === ($result = curl_exec($curl)))\n throw(new PocketstopException(\n \"Curl failed with error \" . curl_error($curl)));\n \n // get result code\n $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n \n // unlink tmpfiles\n if($fp)\n fclose($fp);\n if(strlen($tmpfile))\n unlink($tmpfile);\n \n return new PocketstopRestResponse($url, $result, $responseCode);\n }", "private function sendRequest(string $url, array $obj = [], bool $array=false, string $method = 'GET'){\n $ret = '';\n $sign = JWT::encode($obj, $this->secret);\n $obj['signature'] = $sign;\n $client = new \\GuzzleHttp\\Client();\n $arg = strtoupper($method) == 'GET' ? 'query' : 'body';\n $r = $client->request(strtoupper($method), $url, [$arg => $obj]);\n if($r->getStatusCode()==200){\n $ret = json_decode($r->getBody()->getContents(), $array);\n }\n return $ret;\n }", "private function request($array)\n {\n $array['data']['CultureName'] = $this->cultureName;\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"{$this->apiUrl}{$array['url']}\");\n curl_setopt($curl, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, \"{$this->publicId}:{$this->apiSecret}\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($array['data']));\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/x-www-form-urlencoded'\n ));\n $out = curl_exec($curl);\n curl_close($curl);\n\n return json_decode($out, true);\n }", "private function PostToRapidAPI($path, $request, $isPost = true)\n {\n $this->lastRequest = $request;\n $this->lastResponse = '';\n\n $url = $this->url . $path;\n $ch = curl_init($url);\n $this->lastUrl = $url;\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'User-Agent: eWAY-PHP-1.2'\n ));\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $this->apiKey . \":\" . $this->apiPassword);\n if ($isPost) {\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n } else {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n\n if ($this->disableSslVerify) {\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n // Ucomment for CURL debugging\n //curl_setopt($ch, CURLOPT_VERBOSE, true);\n\n $response = curl_exec($ch);\n\n $this->lastResponse = $response;\n\n if (curl_errno($ch) != CURLE_OK) {\n echo \"<h2>Connection Error: \" . curl_error($ch) . \" URL: $url</h2><pre>\";\n die();\n } else {\n $info = curl_getinfo($ch);\n if ($info['http_code'] == 401 || $info['http_code'] == 404 || $info['http_code'] == 403) {\n $__is_in_sandbox = $this->sandbox ? ' (Sandbox)' : ' (Live)';\n echo \"<h2>Please check the API Key and Password $__is_in_sandbox</h2><pre>\";\n die();\n }\n\n curl_close($ch);\n $decode = json_decode($response);\n if ($decode === null) {\n die(\"Error decoding response from eWAY\");\n }\n\n return $decode;\n }\n }", "function request($url, $params = false) {\n\t\t$req =& new HTTP_Request($this->base . $url);\n\t\t//authorize\n\t\t$req->setBasicAuth($this->user, $this->pass);\n\t\t//set the headers\n\t\t$req->addHeader(\"Accept\", \"application/xml\");\n\t\t$req->addHeader(\"Content-Type\", \"application/xml\");\n\t\t//if were sending stuff\n\t\tif ($params) {\n\t\t\t//serialize the data\n\t\t\t//$xml = $this->serialize($params);\n\t\t\t//($xml)?$req->setBody($xml):false;\n\t\t\t$req->setBody($params);\n\t\t\t$req->setMethod(HTTP_REQUEST_METHOD_POST);\n\t\t}\n\t\t$response = $req->sendRequest();\n\t\t// print_r($req->getResponseHeader());\n\t\t// echo $req->getResponseCode() .\t\"\\n\";\n\t\t\n\t\tif (PEAR::isError($response)) {\n\t\t return $response->getMessage();\n\t\t} else {\n\t\t print_r($req->getResponseBody());\n\t\t return $req->getResponseBody();\n\t\t}\n\t}", "public function make_request() {\n $curl = curl_init();\n\n // Setting our options.\n $options = [\n CURLOPT_URL => $this->get_request_url(),\n CURLOPT_ENCODING => \"gzip\",\n CURLOPT_RETURNTRANSFER => true\n ];\n \n // Setting our extra options - please see top of class for info.\n if(SELF::DEBUG){ $options[CURLOPT_VERBOSE] = true; }\n if(!SELF::SECURE) { $options[CURLOPT_SSL_VERIFYPEER] = false; }\n\n curl_setopt_array($curl, $options);\n\n $this->results = curl_exec($curl);\n\n // https://www.php.net/manual/en/function.curl-errno.php\n if(curl_errno($curl)) {\n throw new \\Exception('Issue occurred with CURL request to server: ' . curl_errno($curl));\n }\n\n // If in debug mode print out the results of our request.\n if(SELF::DEBUG){\n echo '<pre>'.print_r(curl_getinfo($curl),1).'</pre>';\n }\n\n curl_close($curl);\n\n return $this->results;\n }" ]
[ "0.7155004", "0.7028688", "0.70044905", "0.693367", "0.6869007", "0.6764205", "0.6684785", "0.6520416", "0.64286214", "0.63899094", "0.6375227", "0.63673073", "0.63608444", "0.6314047", "0.63072467", "0.63065886", "0.626219", "0.6242517", "0.62314475", "0.6213064", "0.6207345", "0.6203112", "0.6194842", "0.619129", "0.619129", "0.6158797", "0.61482817", "0.6130772", "0.61200935", "0.6117659", "0.61168283", "0.6106596", "0.6105155", "0.6089253", "0.6084876", "0.60798705", "0.606896", "0.6061933", "0.6036384", "0.603158", "0.6023562", "0.60230416", "0.60205257", "0.60199606", "0.60199606", "0.6018113", "0.60074186", "0.60066336", "0.6006052", "0.6003907", "0.59897995", "0.59887904", "0.5981073", "0.59690034", "0.5962568", "0.59572935", "0.595036", "0.5950101", "0.5948587", "0.5945913", "0.5945641", "0.5943176", "0.5942651", "0.5931957", "0.5928396", "0.591481", "0.59042436", "0.59042436", "0.59042436", "0.59042436", "0.59042436", "0.59042436", "0.59042436", "0.59042436", "0.59036297", "0.5895904", "0.5888878", "0.5888481", "0.58867735", "0.5882473", "0.58821976", "0.5879591", "0.5877846", "0.5871649", "0.5866235", "0.58612853", "0.585996", "0.5851296", "0.5844712", "0.584395", "0.5841244", "0.5838424", "0.5829777", "0.58247405", "0.5823837", "0.581972", "0.58166647", "0.58143216", "0.581193", "0.5811498", "0.58106923" ]
0.0
-1
Get Advertisers of Account
public function merchant() { $this->setHeader(self::HEADER_TYPE_BEARER); $link = Rakuten::BASE_API_URL.'/'.self::API_NAME_ADVERTISER_SEARCH.'/'.self::API_VERSION; $curl = new Curl; $response = $curl->get($link, '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function accounts()\n {\n return $this->get('ach/relationships');\n }", "public function advertisers()\n {\n return $this->morphedByMany('App\\Advertiser', 'bucketable')\n ->withoutGlobalScope(MarketScope::class)\n ->withTimestamps()\n ->withPivot([\n 'notes',\n 'completed',\n ])\n ->using(BucketItem::class);\n }", "public function getAccounts();", "public function getAdvertisers(Request $request){\n return $this->repository->getAdvertisers($request->input('limit', env('PAGINATION_LIMIT', 10)));\n }", "Public Function getAllAccountsAdwords()\n\t{\n\t\t$AcctAdwords = new Accounts_Adwords($this->id);\n\t\treturn $AcctAdwords->GetAllAccounts();\n\t}", "public function getAccounts()\n {\n }", "public function getAccounts()\n\t{\n\t\treturn $this->accounts; \n\n\t}", "public function getAccounts()\n {\n return $this->accounts;\n }", "public static function accounts() {\n\t\t\treturn self::get('accounts');\n\t\t}", "public function findAccounts() {\n\t\t\n\t}", "Public Function getAllAccountsAnalytics()\n\t{\n\t\t$AcctAnalytics = new Accounts_Analytics($this->id);\n\t\treturn $AcctAnalytics->GetAllAccounts();\n\t}", "public function accounts()\n {\n $accounts = $this->morphToMany(\n Config::get('laraccount.models.account'),\n 'user',\n Config::get('laraccount.tables.account_user'),\n Config::get('laraccount.foreign_keys.user'),\n Config::get('laraccount.foreign_keys.account')\n );\n return $accounts;\n }", "public function get_accounts(){\n $items = array();\n if( ! $this->is_connect() ){\n return array();\n }\n //$this->new_request( \"GET\", \"/accounts\" );//$this->is_connect() hace la petición de las cuentas\n $response = json_decode( $this->ironman->get_response_body(), true );\n $accounts = isset( $response['accounts'] ) ? $response['accounts'] : array();\n foreach( $accounts as $account ){\n $items[$account['id']] = $account['name'];\n }\n return $items;\n }", "public function getAds() {\n return $this->getAdsFromSettings($this->getSettings());\n }", "public function getAccount();", "public function getLinkAccounts()\n {\n return $this->link_accounts;\n }", "public function accounts()\n {\n return $this->hasMany(Account::class, 'account_id');\n }", "function getAccounts() {\n $stmt = $this->pdo->query('SELECT * FROM get_accounts()');\n $accounts = [];\n while ($row = $stmt->fetch()) {\n $accounts[] = [\n 'id' => $row['id'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'plan' => $row['plan'],\n 'effective_date' => $row['effective_date']\n ];\n }\n return $accounts;\n }", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get($this->url.'accounts'));\n\t}", "function getAccounts() {\n $stmt = $this->pdo->query('SELECT * FROM get_accounts()');\n $accounts = [];\n while ($row = $stmt->fetch()) {\n $accounts[] = [\n 'id' => $row['id'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'plan' => $row['plan'],\n 'effective_date' => $row['effective_date']\n ];\n }\n return $accounts;\n }", "public function advertisingItems()\n {\n return $this->hasMany(AdvertisingItem::class, 'advertising_id');\n }", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get(static::URL.'accounts'));\n\t}", "public function getAccounts()\n {\n foreach ($this->accountIds as $id) {\n // Use a generator to save on memory/resources\n // load accounts from DB one at a time only when required\n yield (new AccountModel())->load($id);\n }\n }", "public function accounts()\n {\n return $this->hasMany(Account::class);\n }", "public function accounts()\n {\n return $this->hasMany(Account::class);\n }", "public function listAccounts()\n {\n return $this->execute('listaccts', []);\n }", "private function walletAccounts()\n {\n return Auth::user()->walletAccounts();\n }", "private function walletAccounts()\n {\n return Auth::user()->walletAccounts();\n }", "private function getTodayAdvertisements() {\n \treturn AdvertisementQuery::create()\n\t\t\t\t->filterByCurrent()\n\t\t\t\t->filterByBillboard($this)\n\t\t\t\t->find();\n }", "Public Function getAllAccounts()\n\t{\n\t\t$Output = array();\n\t\tforeach($this->GetAllAccountsAdwords() as $Adwords)\n\t\t\t$Output[] = $Adwords;\n\t\tforeach($this->GetAllAccountsYahoo() as $Yahoo)\n\t\t\t$Output[] = $Yahoo;\n\t\tforeach($this->GetAllAccountsMSN() as $MSN)\n\t\t\t$Output[] = $MSN;\n\t\t\t\n\t\treturn $Output;\n\t}", "public function getAllAcounts(){\n return $this->accountGateway->getAllAcounts();\n }", "Public Function getDailyAccountsAdwords()\n\t{\n\t\t$AcctAdwords = new Accounts_Adwords($this->id);\n\t\treturn $AcctAdwords->GetInstalledAccounts();\n\t}", "public function accounts()\n {\n return $this->belongsToMany(Account::class);\n }", "public function getAdvisors()\n {\n return $this->hasMany(Advisor::className(), ['i_ID' => 'ID']);\n }", "public function get_all_ads($limit, $offset) {\n $data = $this->db->get('advertisement', $limit, $offset);\n return $data->result();\n // $sql = \"select * from advertisement\";\n // $data = $this->db->query($sql);\n // return $data->result();\n }", "public function getInstagramAccounts() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(168, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n $insta_accounts = $facebookHelper->getAllInstagramAccounts($access_token);\n return $insta_accounts;\n }", "public function getInvAdjAccounts()\n {\n return $this->hasMany(InvAdjAccount::className(), ['gl_account_id' => 'account_id']);\n }", "public static function list () {\n // Retrieve account resources.\n $accounts = Json::get('account', null);\n\n // If account resource is not avaiable, internal server error.\n if ($accounts == 1)\n return 1;\n\n // Return accounts.\n return $accounts;\n }", "public function getAds(){\n return $this->ifsp->getAds();\n }", "public function get_all_ads_data()\n\t{\n\t\treturn $this->db->get('ads')->result();\n\t}", "public static function getAllAccounts(){\n\t\t$stmt = Dbh::connect()->query(\"SELECT * FROM accounts\");\n\t\t$accounts = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $accounts[] = new Account($row['account_id'], $row['email'], $row['first_name'], $row['last_name'], $row['account_type'], $row['password']);\n }\n return $accounts;\n\t}", "public function index()\n {\n $adverts = Advert::orderBy('updated_at', 'desc')->paginate(15);\n //->get();\n //->paginate(15);\n\n // Palauta kaikki resurssina\n return IlmoitusResource::collection($adverts);\n }", "public function advertisement()\n\t{\n\t\treturn $this->belogsTo('App\\Models\\Advertisement');\n\t}", "public function listAction(){\n\n $listAdverts = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('OCPlatformBundle:Advert')\n ->getAdvertWithApplications()\n ;\n\n foreach ($listAdverts as $advert) {\n // Ne déclenche pas de requête : les candidatures sont déjà chargées !\n // Vous pourriez faire une boucle dessus pour les afficher toutes\n $advert->getApplications();\n }\n }", "function get_accounts($user_id) {\n\t if ($this->ensure_portal() != -1) {\n\t\t $this->login();\n\t\t\t$ger_params = array(\n\t\t\t 'session' => $this->session,\n\t\t\t 'module_name' => 'Contacts',\n\t\t\t 'module_id' => $user_id,\n\t\t\t 'link_field_name' => 'accounts',\n\t\t\t 'related_module_query' => '',\n\t\t\t 'related_fields' => array(\n\t\t\t 'id',\n\t\t\t 'name',\n\t\t\t ),\n\t\t\t 'related_module_link_name_to_fields_array' => array(\n\t\t\t ),\n\t\t\t 'deleted'=> '0',\n\t\t\t 'order_by' => '',\n\t\t\t 'offset' => 0,\n\t\t\t 'limit' => 5,\n\t\t );\n\n\t\t $ger_result = $this->call(\"get_relationships\", $ger_params);\n\t\t $accounts = [];\n\n\t\t foreach($ger_result->entry_list as $entry) {\n\t\t \t$id = $entry->name_value_list->id->value;\n\t \t\t$name = $entry->name_value_list->name->value;\n\t \t\t$accounts[]= array(\"id\" => $id, \"name\" => $name);\n\t \t}\n\t \treturn $accounts;\n\t } else {\n\t $this->kick();\n\t }\n\t}", "public function getAddressesByAccount($account);", "public function getAccountInformation()\n {\n return $this->api->getBinanceApiRequest('v3/account');\n }", "protected function getAccountData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select('*')\n\t\t\t\t->from('#__accountdata')\n\t\t\t\t->where('(w20_facebook <> \"\" OR w20_twitter <> \"\")')\n\t\t\t\t->where('typ = 0')\n\t\t\t\t// ->where('bid IN (2657)')\n\t\t\t\t->where('status = 0');\n\n\n\t\t$db->setQuery($query);\n\t\t$this->adata = $db->loadObjectList();\n\n\t\treturn $this->adata;\n\t}", "function gatherResults($conn, $advert_id)\n {\n $query = \"SELECT whwp_Advert.* FROM whwp_Advert \"\n . \"WHERE whwp_Advert.advert_id = :advert_id \";\n $conn->prepQuery($query);\n $conn->bind('advert_id', $advert_id);\n $advert=[];\n $advert = $conn->single();\n return $advert;\n }", "public function getAccounts(){\n $accounts = [];\n foreach ($this->data['Items'] as $account) {\n $newAccount = [];\n $newAccount['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('UID', $account);\n $newAccount['code'] = IndexSanityCheckHelper::indexSanityCheck('DisplayID', $account);\n $newAccount['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $account);\n $newAccount['description'] = IndexSanityCheckHelper::indexSanityCheck('Description', $account);\n $newAccount['type'] = IndexSanityCheckHelper::indexSanityCheck('Type', $account);\n\n if (array_key_exists('Type', $account)) {\n if ($account['Type']) {\n $newAccount['is_bank_account'] = ($account['Type'] === 'Bank');\n }\n }\n\n if (array_key_exists('BankingDetails', $account)) {\n if ($account['BankingDetails']) {\n $newAccount['bank_account_number'] = IndexSanityCheckHelper::indexSanityCheck('BankAccountNumber', $account['BankingDetails']);\n }\n }\n\n if (array_key_exists('TaxCode', $account)) {\n if ($account['TaxCode']) {\n $newAccount['tax_type'] = IndexSanityCheckHelper::indexSanityCheck('Code', $account['TaxCode']);\n }\n }\n array_push($accounts, $newAccount);\n }\n\n return $accounts;\n }", "public function iN_ShowAds() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_advertisements WHERE ads_status = '1' ORDER BY RAND() LIMIT 2\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function linkedAccounts()\n {\n return $this->hasMany(LinkedAccount::class);\n }", "public function get_accounts() {\n\t\t$url = $this->api_end_point . 'accounts';\n\t\t$res = $this->make_request( $url );\n\n\t\treturn empty( $res ) ? false : $res;\n\t}", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAds(): string\n {\n $html = '';\n\n\n $adsService = new AdsService();\n $ads = $adsService->getAds();\n\n foreach ($ads as $ad) {\n $html .=\n '#' . $ad->getId() . ' ' .\n $ad->getTitle() . ' ' .\n $ad->getDescription() . ' ' .\n $ad->getUserId() . ' ' .\n $ad->getCarId() . '<br />';\n }\n\n return $html;\n }", "public function getAdvertiser(Request $request){\n return $this->repository->find((int) $request->route()->parameter('id'));\n }", "public function accounts(){\n return $this->hasMany(Accounts::class);\n }", "public function findByAdverts(Advert $adverts): ?array\n {\n\n $now = date(\"Y-m-d\");\n \n return $this->createQueryBuilder('r')\n ->addSelect('a.id')\n ->join('r.booking', 'b')\n ->join('App\\Entity\\advert\\Advert', 'a')\n ->andWhere('a = b.vehicle')\n ->andWhere('a in (:adverts)')\n ->andWhere('r.approvedRating = true')\n ->andWhere('b.endAt <= :now')\n ->groupBy('a.id')\n ->setParameter('adverts', $adverts)\n ->setParameter('now', $now)\n ->getQuery()\n ->getResult()\n ;\n\n }", "public function accounts()\n {\n return $this->belongsToMany('App\\Models\\Account');\n }", "public function getaddressesbyaccount($account = ''){\n return $this->bitcoin->getaddressesbyaccount($account);\n }", "public function index()\n {\n return Account::all();\n }", "public function account($id)\n {\n return $this->get(\"ach/relationships/{$id}\");\n }", "public function getAccount() {\n return $this->account;\n }", "public function getAllWithUsers()\n {\n $sql = \"SELECT \n a.id as 'adid',\n a.userid as 'userid',\n a.title as 'adtitle',\n u.name as 'username'\n from advertisements a \n left join users u ON a.userid = u.id;\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function get_account_data() {\n return array(\n 'accountId' => $this->accountId,\n 'email' => $this->email,\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'type' => $this->type,\n 'subscription' => $this->subscription\n );\n }", "public function likes()\n {\n return $this->hasMany(Models\\AccountLike::class, 'account_id');\n }", "public function all()\n {\n $accounts = $this->walletAccounts()->get()\n ->tap(function ($accounts) use (&$totalAvailablePrice) {\n $totalAvailablePrice = $accounts->sum('available_price');\n })\n ->each(function ($account) use ($totalAvailablePrice) {\n $divisor = $totalAvailablePrice > 0 ? $totalAvailablePrice : 1;\n $quota = ceil(($account->available_price * 100) / $divisor);\n $account->setAttribute('available_price_quota', $quota);\n });\n\n return WalletAccountResource::collection($accounts);\n }", "public function all(): array\n {\n return Billingo::get('bank_accounts');\n }", "public function getAdjAccount()\n {\n return $this->hasOne(InvAdjAccount::className(), ['account_id' => 'adj_account_id']);\n }", "public function getAccountInfo(): AccountInfo\n\t{\n\t\treturn $this->client->accountService->getAccountInfo($this->token);\n\t}", "public static function getAll($account = false)\n {\n return parent::get();\n }", "public function accounts()\n {\n return $this->hasMany(StationAccount::class, 'station_id', 'id');\n }", "public function index()\n {\n $ads = Advertisement::all();\n\n return view('admin.advertisements.index', compact('ads'));\n }", "public function getFbAdAccounts($appId) {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty($appId, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n $ad_accounts = $facebookHelper->getFacebookAdAccounts($access_token);\n return $ad_accounts ;\n }", "public function get_accounts( $as_array = false ) {\n\t\tif ( ! $as_array ) {\n\t\t\treturn $this->accounts;\n\t\t}\n\n\t\t$accounts = array();\n\n\t\tforeach ( $this->accounts as $type => $account ) {\n\t\t\t$accounts[ $type ] = $account->to_array();\n\t\t}\n\n\t\treturn $accounts;\n\t}", "public function all(array $fields = ['all'], array $params = [])\n {\n $this->prepareFields($fields, \\FacebookAds\\Object\\AdAccount::class);\n $this->prepareParams($params);\n $response = $this->user->getAdAccounts($fields, $params);\n\n return $this->response($response, AdAccount::class);\n }", "public function getAccountInfo() {\n\t\treturn $this->get($this->api_url . 'account/info');\n\n $data = $this->http_oauthed($this->api_url . 'account/info');\n return json_decode($data,true);\n\n }", "public function retrieveAccountDetails()\n {\n $segments = \"/account\";\n\n return $this->createRequest($segments);\n }", "public function getAllApplicants();", "public function index()\n {\n $adverts = Advert::paginate(10);\n return view('admin.adverts.index', compact('adverts'));\n }", "public function getAssets()\n {\n return $this->hasMany(Asset::className(), ['asset_gl_acc_id' => 'account_id']);\n }", "function getAllVirtualAccounts()\n\t{\n\n\t\t$rel_url = \"virtual_accounts\";\n\n\t\t$virtualAccounts = $this->getDatafromServerUsingCurl( $rel_url );\n\n\t\treturn $virtualAccounts;\n\t}", "public function getAuthorizations(): array;", "public function toArray(): array\n {\n return $this->facebookAdAccount->getData();\n }", "public function getAccountData() {\n\t\t$this->_loadAccountData();\n\t\treturn $this->_accountData;\n\t}", "public function getNInvAdjAccounts()\n {\n return $this->hasMany(NInvAdjAccount::className(), ['gl_account_id' => 'account_id']);\n }", "public function getOriginatingAccount(): iterable\n {\n return $this->originatingAccount;\n }", "public function getListAccount()\n {\n return view('PagePersonal.information_accounts');\n }", "public function getTopicAccounts(){\n $accounts = TopicAccount::all();\n $topicAccounts = [];\n foreach($accounts as $a=>$account){\n $topicAccounts[$a] = [];\n $topicAccounts[$a]['domain'] = $account->domain;\n $topicAccounts[$a]['username'] = $account->username;\n $topicAccounts[$a]['password'] = $account->password;\n }\n return $topicAccounts;\n }", "public function getAccountnumbers()\n {\n return $this->hasMany(AccountNumber::className(), ['company_id' => 'id']);\n }", "public function account()\n {\n return $this->belongsTo(CommunityFacade::getUserClass(), 'account_id');\n }", "function findAll(){\n $autor = new Autor();\n return $autor->findAll();\n }", "public function antecedents(){\n return $this->hasMany(Antecedent::class);\n }", "public function getAccount(): Account\n {\n return $this->model(Account::class);\n }", "public function getAdViews(){\n return $this->hasMany(AdsView::class, 'ads_id');\n }", "public function index()\n {\n $accounts = Account::take(5)\n ->orderBy('created_at', 'desc')\n ->get();\n return $accounts;\n }" ]
[ "0.71827", "0.71519214", "0.7147493", "0.7040499", "0.6879609", "0.68372005", "0.665782", "0.6645277", "0.6551947", "0.6358533", "0.6328473", "0.63213766", "0.62999195", "0.62586415", "0.62243843", "0.62029296", "0.62016547", "0.61821", "0.6152779", "0.61156726", "0.61043805", "0.6098971", "0.6076267", "0.60605216", "0.60605216", "0.60443926", "0.6037939", "0.6037939", "0.5965631", "0.59481966", "0.5929592", "0.5918891", "0.58747584", "0.5869646", "0.585265", "0.5847377", "0.58431584", "0.5834593", "0.5831927", "0.5826395", "0.58135223", "0.5798534", "0.5789738", "0.5771082", "0.574", "0.57345814", "0.57279646", "0.57277745", "0.57157445", "0.5707381", "0.56908214", "0.5640766", "0.56383294", "0.5628886", "0.5628886", "0.5628886", "0.5628886", "0.5628886", "0.5628886", "0.5609901", "0.5607169", "0.5605111", "0.5596001", "0.55860066", "0.5574691", "0.5569289", "0.55626374", "0.55442214", "0.5528097", "0.5523302", "0.5510255", "0.55072105", "0.5506337", "0.55062526", "0.55042505", "0.5487377", "0.5474401", "0.5459737", "0.5458823", "0.5446963", "0.54424924", "0.54333943", "0.54195976", "0.5417133", "0.5414082", "0.54131323", "0.5412037", "0.54049027", "0.5404365", "0.53994215", "0.53923327", "0.5389638", "0.5379918", "0.537435", "0.5367068", "0.5364302", "0.53608906", "0.5359112", "0.5358152", "0.5356916", "0.53533167" ]
0.0
-1
Allows you to download advertiser information by specifying the Application Status ID for the Application Status that you want to get the List of Merchants for. Application status options: approved approval extended wait temp removed temp rejected perm removed perm rejected self removed
public function merchantByAppStatus($status) { $this->setHeader(self::HEADER_TYPE_BEARER); $this->setLink(self::MERCHANT_BY_APP_STATUS.'/'.$status); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_ads($status = \"active\")\t{\n\n\t}", "public function merchant()\n {\n $this->setHeader(self::HEADER_TYPE_BEARER);\n $link = Rakuten::BASE_API_URL.'/'.self::API_NAME_ADVERTISER_SEARCH.'/'.self::API_VERSION;\n\n\n $curl = new Curl;\n $response = $curl->get($link, '', $this->getHeader());\n\n $xmlData = new SimpleXMLElement(XMLHelper::tidy($response));\n\n return $xmlData;\n }", "public function adminListWithdrawal($status)\n {\n $withdrawals = Withdrawal::select([\n 'code',\n 'amount',\n 'status',\n 'created_at',\n \"user_id\",\n 'completed_at',\n ])->with([\n 'user:id,code,first_name,last_name,email,profile_image',\n 'user.withdrawalBank:id,user_id,bank_code,account_name,account_number'\n ])\n ->where('status', $status)\n ->latest()\n ->paginate(10);\n $response['status'] = \"success\";\n $response['withdrawals'] = $withdrawals;\n return response()->json($response, Response::HTTP_OK);\n }", "public function retrieveConsents()\n {\n return $this->start()->uri(\"/api/consent\")\n ->get()\n ->go();\n }", "public function listAction(){\n\n $listAdverts = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('OCPlatformBundle:Advert')\n ->getAdvertWithApplications()\n ;\n\n foreach ($listAdverts as $advert) {\n // Ne déclenche pas de requête : les candidatures sont déjà chargées !\n // Vous pourriez faire une boucle dessus pour les afficher toutes\n $advert->getApplications();\n }\n }", "public function testMerchantsOneResponseStatus()\n\t{\n\t\tfor ($i = 0; $i < count($this->lightMerchantsIds); $i++) { \n\t\t\t$this->client->request('GET', \"/merchants/{$this->lightMerchantsIds[$i]}/$this->from/$this->to\");\n\t\t\t\n\t\t\tif ($this->lightMerchantsIds[$i] == -1) {\n\t\t\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode());\n\t\t\t} else {\n\t\t\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\t\t\t}\t\n\t\t}\n\t}", "public function get_bl_customers(){\r\n\t\t//ClientId: ed4d82fc-b6d7-4518-a292-abad6eadb9fb\r\n\t\t//ClientSecret: d8a11026-4a8c-4650-b159-32c791e7a1b9\r\n\r\n\t\t$post_data = array(\r\n\t\t\t\"grant_type\"=>\"client_credentials\",\r\n\t\t\t\"scope\"=>\"\",\r\n\t\t\t\"client_id\"=>\"ed4d82fc-b6d7-4518-a292-abad6eadb9fb\",\r\n\t\t\t\"client_secret\"=>\"d8a11026-4a8c-4650-b159-32c791e7a1b9\"\r\n\t\t);\r\n\r\n\t\t$this->call_bl_api_auth($post_data);\r\n\t\t//$result = CallAPI(\"POST\",\"https://apigateway.blinfo.se/auth/oauth/v2/token\")\r\n\t}", "function printToolAdmin() {\r\n $criteria = array('status' => Appeal::$STATUS_AWAITING_ADMIN);\r\n return printAppealList($criteria);\r\n}", "public function getReferralAccounts () \n {\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/referral/accounts';\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'ClickSendSDK'\n );\n\n //set HTTP basic auth parameters\n Request::auth(Configuration::$username, Configuration::$key);\n\n //and invoke the API call request to fetch the response\n $response = Request::get($_queryUrl, $_headers);\n\n //Error handling using HTTP status codes\n if ($response->code == 400) {\n throw new APIException('BAD_REQUEST', 400, $response->body);\n }\n\n else if ($response->code == 401) {\n throw new APIException('UNAUTHORIZED', 401, $response->body);\n }\n\n else if ($response->code == 403) {\n throw new APIException('FORBIDDEN', 403, $response->body);\n }\n\n else if ($response->code == 404) {\n throw new APIException('NOT_FOUND', 404, $response->body);\n }\n\n else if ($response->code == 405) {\n throw new APIException('METHOD_NOT_FOUND', 405, $response->body);\n }\n\n else if ($response->code == 429) {\n throw new APIException('TOO_MANY_REQUESTS', 429, $response->body);\n }\n\n else if ($response->code == 500) {\n throw new APIException('INTERNAL_SERVER_ERROR', 500, $response->body);\n }\n\n else if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK\n throw new APIException(\"HTTP Response Not OK\", $response->code, $response->body);\n }\n\n return $response->body;\n }", "public function getAnApplicant($application_id);", "public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken()\n\t\t\t\t\t\t. \"&filterType=\" . $this->filterType . \"&filterValues=\" . $this::csvString($this->filterValues);\n\t\t\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->nextPageToken;\n\t\t}\n\t\tif(isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\t\n\t\t//debug\n\t\t//echo '<p>url after = ' . $url . '</p>';\n\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "function olc_cfg_pull_down_customers_status_list($customers_status_id, $key = '') {\n\t$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n\treturn olc_draw_pull_down_menu($name, olc_get_customers_statuses(), $customers_status_id);\n}", "function _getActiveVendors() {\n $this->resetResponse();\n if ($this->ci->session->userdata('user_id') != null) {\n $archived = $this->ci->input->post('archived', true);\n\n $result = $this->model->getActiveVendors('*', array(\"person_type\" => Globals::PERSON_TYPE_VENDOR, \"person_archived\" => $archived))->result();\n\n if ($result) {\n $this->_status = true;\n $this->_message = '';\n $this->_rdata = $result;\n\n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('no_records_found');\n }\n \n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('invalid_user');\n \n }\n\n return $this->getResponse();\n }", "public function index()\n {\n //\n $absents = AbsentApplication::whereIn('user_id',\n User::whereIn('id',\n ProjectUser::whereIn('project_id',\n Project::where('managed',\n Auth::user()->id)->get()->pluck('id'))\n ->get()->pluck('user_id'))\n ->get()->pluck('id'))\n ->where('state', AbsentApplication::getAbsentWaitting())->get();\n\n\n return response()->json([\n 'absents' => $absents,\n ], 200);\n }", "public function applicants() {\n\t\t// Utility variables\n\t\t$db = Helium::db();\n\t\t$app = 'Applicant'; // change to BetterApplicant for optimization\n\n\t\t// Here's how this works:\n\t\t// 1. Read filter from query string\n\t\t// If there is no filter, apply default filter\n\t\t// 2. Display applicants based on params[view]\n\t\t// view=stats or view=list\n\t\t// If there is no view param, apply default view.\n\n\t\t// Filtering\n\t\t// Final product: $constraints\n\n\t\t// Filter by chapter\n\t\t// This can only be used by national admin\n\t\tif ($this->user->capable_of('national_admin')) {\n\t\t\tif ($this->params['chapter_id'] && $this->params['chapter_id'] != 1) {\n\t\t\t\t$constraints[] = 'chapter_id=' . $this->params['chapter_id'];\n\t\t\t\t$chapter = Chapter::find($this->params['chapter_id']);\n\t\t\t}\n\t\t}\n\t\t// Otherwise, only list applicants from user's chapter\n\t\telse {\n\t\t\t$constraints[] = 'chapter_id=' . $this->user->chapter_id;\n\t\t\t$chapter = $this->user->chapter;\n\t\t}\n\n\t\t// Filter by stage\n\t\t$current_stage = $this->params['stage'] ? $this->params['stage'] : 'active';\n\t\tswitch ($current_stage) {\n\t\t\tcase 'incomplete':\n\t\t\t\t$constraints[] = 'confirmed=0 AND finalized=0 AND expires_on > NOW()';\n\t\t\t\tbreak;\n\t\t\tcase 'expired':\n\t\t\t\t$constraints[] = 'confirmed=0 AND finalized=0 AND expires_on < NOW()';\n\t\t\t\tbreak;\n\t\t\tcase 'confirmed':\n\t\t\t\t$constraints[] = 'confirmed=1';\n\t\t\t\tbreak;\n\t\t\tcase 'finalized':\n\t\t\t\t$constraints[] = 'finalized=1';\n\t\t\t\tbreak;\n\t\t\tcase 'not_yet_confirmed':\n\t\t\t\t$constraints[] = 'expires_on <= NOW() AND confirmed=0 AND finalized=1';\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\tcase 'selection_1':\n\t\t\t\t$constraints[] = 'expires_on > NOW() OR finalized=1';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Specific filters -- through a custom search query\n\t\t$filter = $this->params['filter'];\n\t\tif (is_array($filter)) {\n\t\t\t$current_stage = 'search';\n\t\t\t$search_title = array();\n\n\t\t\t// Filter by school\n\t\t\tif ($filter['school_name']) {\n\t\t\t\t$constraints[] = \"sanitized_high_school_name='\" . $filter['school_name'] . \"'\";\n\t\t\t\t$search_title[] = $filter['school_name'];\n\t\t\t\tunset($filter['school_name']);\n\t\t\t}\n\n\t\t\t// Filter by name\n\t\t\tif ($filter['name']) {\n\t\t\t\t$constraints[] = $db->prepare(\"`sanitized_full_name` LIKE '%%%s%%'\", str_replace(' ', '%', $this->params['name']));\n\t\t\t\t$search_title = $filter['name'];\n\t\t\t\tunset($filter['name']);\n\t\t\t}\n\n\t\t\t// For other filters, merge them into constraints\n\t\t\tforeach ($filter as $k => $v) {\n\t\t\t\t$constraints[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\t// View selection\n\t\t$view = $this->params['view'];\n\t\t$acceptable_views = array('list', 'stats');\n\t\tif (!$view && !in_array($view, $acceptable_views)) {\n\t\t\t$view = 'list';\n\t\t}\n\n\t\tswitch ($view) {\n\t\t\tcase 'list':\n\t\t\t\t// List-specific magic here: pagination, etc.\n\t\t\t\t$applicants = $app::find('chapter_id=5');\n\t\t\t\tforeach ($constraints as $constraint) {\n\t\t\t\t\t$applicants->narrow('(' . $constraint . ')');\n\t\t\t\t}\n\t\t\t\t// -- Pagination --\n\t\t\t\t$batch_length = 100;\n\t\t\t\t$applicants->set_batch_length($batch_length);\n\t\t\t\tif (!$this->params['page'])\n\t\t\t\t\t$this->params['page'] = 1;\n\t\t\t\t$page = $this->params['page'];\n\t\t\t\t$count_all = $applicants->count_all();\n\t\t\t\t$applicants->set_batch_number($page);\n\t\t\t\t$first = (($page - 1) * $batch_length) + 1;\n\t\t\t\t$last = ($first + $batch_length - 1) > $count_all ? $count_all : ($first + $batch_length - 1);\n\n\t\t\t\t// Applicants is now ready for listing.\n\t\t\t\t$this['applicants'] = $applicants;\n\t\t\t\t$this['chapter'] = $chapter;\n\t\t\t\t$this['total_pages'] = $applicants->get_number_of_batches();\n\t\t\t\t$this['current_page'] = $page;\n\t\t\t\t$this['first'] = $first;\n\t\t\t\t$this['last'] = $last;\n\t\t\t\t$this['count_all'] = $count_all;\n\t\t\t\t$this['search_title'] = $search_title;\n\t\t\t\t$this['current_stage'] = $this->params['stage'];\n\t\t\t\tbreak;\n\t\t\tcase 'stats':\n\t\t\t\t$stats = array(\n\t\t\t\t\t'sex' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'sex',\n\t\t\t\t\t\t'partition' => 'applicant_personal_details',\n\t\t\t\t\t),\n\t\t\t\t\t'school' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'sanitized_high_school_name',\n\t\t\t\t\t\t'partition' => 'applicant_personal_details',\n\t\t\t\t\t),\n\t\t\t\t\t'chapter' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'chapter_id',\n\t\t\t\t\t\t'base_query' => \"SELECT COUNT(*) AS rows, %s AS chapter_id, chapter_name AS value FROM applicants INNER JOIN chapters %s ON chapter_id=chapters.id WHERE %s AND (applicants.expires_on > NOW() or applicants.finalized=1) GROUP BY %s ORDER BY rows DESC\",\n\t\t\t\t\t),\n\t\t\t\t\t'province' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'applicant_address_province',\n\t\t\t\t\t\t'partition' => 'applicant_contact_info',\n\t\t\t\t\t),\n\t\t\t\t\t'city' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => \"CONCAT(applicant_address_city, ', ', applicant_address_province)\",\n\t\t\t\t\t\t'partition' => 'applicant_contact_info',\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tif ($constraints)\n\t\t\t\t\t$constraint_string = implode(' AND ', $constraints);\n\t\t\t\telse\n\t\t\t\t\t$constraint_string = '1';\n\t\t\t\t\n\t\t\t\tforeach ($stats as $key => $group) {\n\t\t\t\t\tunset($type, $field, $partition, $base_query, $join_string);\n\t\t\t\t\textract($group);\n\t\t\t\t\tif (!$base_query)\n\t\t\t\t\t\t$base_query = \"SELECT COUNT(*) AS rows, %s AS value FROM applicants %s WHERE %s AND (applicants.expires_on > NOW() or applicants.finalized=1) GROUP BY %s ORDER BY rows DESC\";\n\n\t\t\t\t\tif ($partition)\n\t\t\t\t\t\t$join_string = $db->prepare(\"INNER JOIN `%s` ON `%s`.applicant_id = applicants.id\", $partition, $partition);\n\n\t\t\t\t\t$the_query = sprintf($base_query, $field, $join_string, $constraint_string, $field);\n\t\t\t\t\t$results = $db->get_results($the_query);\n\t\t\t\t\t\n\t\t\t\t\t$series = array();\n\t\t\t\t\t$total = 0;\n\t\t\t\t\tif (is_array($results)) {\n\t\t\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\t\t\t$rows = $row->rows;\n\t\t\t\t\t\t\t$value = $row->value;\n\t\t\t\t\t\t\t$value = trim($value); // perhaps more trimming could be in order\n\n\t\t\t\t\t\t\tif ($series[$value])\n\t\t\t\t\t\t\t\t$series[$value] += $rows;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$series[$value] = $rows;\n\n\t\t\t\t\t\t\t$total += $rows;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$stats[$key]['data'] = compact('series', 'total');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// country preferences - special stats\n\t\t\t\t/*\n\t\t\t\t$countries = $db->get_col(\"SELECT country_preference_1, COUNT(*) AS rows FROM applicant_program_choices WHERE country_preference_1 IS NOT NULL AND country_preference_1 != '' GROUP BY country_preference_1 ORDER BY rows DESC\");\n\t\t\t\t$country_stats = array();\n\t\t\t\tforeach ($countries as $country) {\n\t\t\t\t\t$numbers = array();\n\t\t\t\t\tfor ($i = 1; $i <= 10; $i++) {\n\t\t\t\t\t\t$cq = \"SELECT COUNT(*) FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE country_preference_$i='$country' AND $constraint_string\";\n\t\t\t\t\t\t$numbers[$i] = $db->get_var($cq);\n\t\t\t\t\t}\n\t\t\t\t\t$country_stats[$country] = $numbers;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$total_afs = $db->get_var(\"SELECT COUNT(*) FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE program_afs='1' AND $constraint_string\");\n\t\t\t\t\n\t\t\t\t// other countries - special stats\n\t\t\t\t$other_countries = $db->get_col(\"SELECT country_preference_other FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE country_preference_other != 'N/A' AND country_preference_other != 'NA' AND $constraint_string\");\n\t\t\t\t$split_pattern = \"/[,;\\/&]+|\\s+(dan|and)\\s+/i\";\n\t\t\t\t\n\t\t\t\t$country_cases = array();\n\t\t\t\t$other_countries_series = array();\n\t\t\t\t$other_countries_total = 0;\n\t\t\t\t\n\t\t\t\t$country_normalization_patterns = array(\n\t\t\t\t\t'/london|inggris|britania raya|england|uk/i' => 'United Kingdom',\n\t\t\t\t\t'/\\s+\\(.*\\)/' => '',\n\t\t\t\t\t'/korea( selatan)?|south korea/i' => 'South Korea',\n\t\t\t\t\t'/kanada/i' => 'Canada',\n\t\t\t\t\t'/singapura/i' => 'Singapore',\n\t\t\t\t\t'/spanyol/i' => 'Spain',\n\t\t\t\t\t'/^arab( saudi)?$/i' => 'Saudi Arabia',\n\t\t\t\t\t'/turki/i' => 'Turkey',\n\t\t\t\t\t'/rusia/i' => 'Russia',\n\t\t\t\t\t'/^(republik rakyat )?ch?ina$|^rrc$/i' => \"China, People's Republic of\",\n\t\t\t\t\t'/selandia baru|nz/i' => 'New Zealand'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tforeach ($other_countries as $list_of_countries) {\n\t\t\t\t\t$split_countries = preg_split($split_pattern, $list_of_countries);\n\t\t\t\t\tforeach ($split_countries as $country_name) {\n\t\t\t\t\t\t$country_name = trim($country_name, ' -');\n\t\t\t\t\t\tif (!$country_name)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t$country_name = preg_replace(array_keys($country_normalization_patterns), array_values($country_normalization_patterns), $country_name);\n\n\t\t\t\t\t\t$lowercased = strtolower($country_name);\n\t\t\t\t\t\tif ($proper_case = $country_cases[$lowercased]) {\n\t\t\t\t\t\t\t$other_countries_series[$proper_case]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$country_cases[$lowercased]\t= $country_name;\n\t\t\t\t\t\t\t$other_countries_series[$country_name] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$other_countries_total++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$stats['other_countries'] = array(\n\t\t\t\t\t'type' => 'bar',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'series' => $other_countries_series,\n\t\t\t\t\t\t'total' => $total_afs\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$this['stats'] = $stats;\n\t\t\t\t$this['country_stats'] = $country_stats;\n\t\t\t\t$this['total_afs'] = $total_afs;\n\t\t\t\t$this['chapter'] = $chapter;\n\t\t\t\t$this['search_title'] = $search_title;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this['current_stage'] = $current_stage;\n\t\t$this['view'] = $view;\n\t\t$this['search_title'] = $search_title ? implode(', ', $search_title) : '';\n\t}", "function _vendorCompanyList(){\n $this->resetResponse();\n if ($this->ci->session->userdata('user_id') != null) {\n $archived = $this->ci->input->post('archived', true);\n\n $result = $this->model->getVendorCompany('*', array(\"person_type\" => Globals::PERSON_TYPE_VENDOR))->result();\n if ($result) {\n $this->_status = true;\n $this->_message = '';\n $this->_rdata = $result;\n\n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('no_records_found');\n }\n \n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('invalid_user');\n \n }\n\n return $this->getResponse();\n }", "function query_campaigns($status = 'SENT')\n\t{\n\t\t$xml = $this->load_url('campaigns?status=' . urlencode($status));\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$campaigns = array();\n\t\t$_campaigns = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\tif(is_array($_campaigns)):\n\t\t\tif(isset($_campaigns[0]['link_attr']['href'])):\n\t\t\t\tforeach($_campaigns as $k => $v):\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t$campaign = $v['content']['Campaign'];\n\t\t\t\t\t$campaign['id'] = $id;\n\t\t\t\t\t$campaigns[] = $campaign;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$id = $this->get_id_from_link($_campaigns['link_attr']['href']);\n\t\t\t\t$campaign = $_campaigns['content']['Campaign'];\n\t\t\t\t$campaign['id'] = $id;\n\t\t\t\t$campaigns[] = $campaign;\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn $campaigns;\n\t}", "public function getMerchants()\n {\n $obj = new stdClass();\n\n // Must be in specific order for checksum --\n $obj->Timestamp = $this->getTimeStamp();\n $obj->SessionID = $this->getSessionID();\n $obj->PinCode = $this->getPinCode();\n $obj->UserAgent = $this->getUserAgent();\n // -----------------------------------------\n // Generate Checksum\n $obj->Checksum = $this->generateChecksum($obj);\n\n // Ask for getMerchants and get response\n $result = $this->client->getMerChants($obj);\n $result = $result->GetMerchantsResult;\n $merchants = isset($result->Merchants->Merchant) ? $result->Merchants->Merchant : null;\n\n $obj->Timestamp = $result->Timestamp;\n\n if (!is_null($merchants)) {\n // Assign all properties of the Merchants object as property of mainObject\n $obj = $this->parseForChecksum($obj, $merchants, true, array(\"MerchantID\", \"Description\", \"TestMode\"));\n }\n\n // Unset properties for new Checksum\n unset($obj->Checksum);\n\n // Verify response data by making a new Checksum\n $Checksum = $this->generateChecksum($obj);\n\n // Compare Checksums\n if ($result->Checksum != $Checksum)\n throw new Exception('Data could not be verified');\n\n return (array) $merchants;\n }", "public function getPromotedapplicantInfobyApplicationId($id) {\n\n\n $result = $this->db->get_where($this->_admissionpromotedapplicant, array('applicationId' => $id));\n $result_info = $result->result_array();\n if (!empty($result_info)) {\n return $result_info[0];\n }\n }", "function printCheckuserNeeded() {\r\n $criteria = array('status' => Appeal::$STATUS_AWAITING_CHECKUSER);\r\n return printAppealList($criteria);\r\n}", "public function getDownloadsList($customerId);", "public function show($id)\n {\n $leads = Leads::find($id);\n $status = new status;\n $data = $status->all();\n $sales_persons = Helpers::getUsersArrayByRole('Sales');\n $leads['statusid'] = $data;\n $users = User::all()->toArray();\n $leads['users'] = $users;\n $brands = Brand::all()->toArray();\n $leads['brands'] = $brands;\n $leads['selected_products_array'] = json_decode($leads['selected_product']);\n $leads['products_array'] = [];\n $leads['recordings'] = CallRecording::where('lead_id', $leads->id)->get()->toArray();\n $leads['customers'] = Customer::all();\n $tasks = Task::where('model_type', 'leads')->where('model_id', $id)->get()->toArray();\n // $approval_replies = Reply::where('model', 'Approval Lead')->get();\n // $internal_replies = Reply::where('model', 'Internal Lead')->get();\n $reply_categories = ReplyCategory::all();\n\n $leads['multi_brand'] = is_array(json_decode($leads['multi_brand'], true)) ? json_decode($leads['multi_brand'], true) : [];\n // $selected_categories = is_array(json_decode( $leads['multi_category'],true)) ? json_decode( $leads['multi_category'] ,true) : [] ;\n $data['category_select'] = Category::attr(['name' => 'multi_category', 'class' => 'form-control', 'id' => 'multi_category'])\n ->selected($leads->multi_category)\n ->renderAsDropdown();\n $leads['remark'] = $leads->remark;\n\n $messages = Message::all()->where('moduleid', '=', $leads['id'])->where('moduletype', '=', 'leads')->sortByDesc(\"created_at\")->take(10)->toArray();\n $leads['messages'] = $messages;\n\n if (!empty($leads['selected_products_array'])) {\n foreach ($leads['selected_products_array'] as $product_id) {\n $skuOrName = $this->getProductNameSkuById($product_id);\n\n $data['products_array'][$product_id] = $skuOrName;\n }\n }\n\n $users_array = Helpers::getUserArray(User::all());\n\n $selected_categories = $leads['multi_category'];\n return view('leads.show', compact('leads', 'id', 'data', 'tasks', 'sales_persons', 'selected_categories', 'users_array', 'reply_categories'));\n }", "public function offer_reports_get()\n {\n $this->verify_request(); \n $data = $this->Offer_model->offer_reports();\n $status = parent::HTTP_OK;\n $response = ['status' => $status, 'data' => $data];\n $this->response($response, $status);\n }", "public function getVendorData()\n {\n $ven = MasterVendor::latest()->get();\n return response([\n 'success' => true,\n 'message' => 'List All Vendor',\n 'data' => $ven\n ], 200);\n\n }", "public function index()\n {\n // $merchants = User::role('merchant')->get();\n $merchants = Merchant::all();\n\n return new MerchantIndexResponse($merchants);\n }", "public function getAllApplicants();", "public function getOffer($id = 0)\n\t{\n\t\t$offer=Offers::where('id',$id)->where('status',1)->get();\t\t\n\t\t\n\t\t/*$arr = str_split('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');\n\t\t$offer->code = '';\n\t\tfor($i = 0; $i <= 8; $i++)\n\t\t{\n\t\t\t$offer->code .= $arr[array_rand($arr)];\n\t\t}*/\n\t\t\n\t\t$offer=OffersResource::collection($offer);\n\t\treturn $this->apiDataResponse($offer);\n\t}", "abstract protected function getStatusesInfos();", "public function testMerchantsAllResponseStatus()\n\t{\n\t\t$this->client->request('GET', \"/merchants/$this->from/$this->to\");\n\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\n\t\t$this->client->request('GET', \"/merchants/$this->wrongFrom/$this->wrongTo\");\n\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode());\n\t}", "public function getapidetailsAction() {\n\t\t$this->loadLayout();\n\t\t$this->getLayout()->getBlock('logicbrokernotification')->setConfigValue(array(\n\t\t\t\t\t\t'scope' => 'default',\n\t\t\t\t\t\t'scope_id' => '0',\n\t\t\t\t\t\t'path' => 'logicbroker_integration/integration/notificationstatus',\n\t\t\t\t\t\t'value' => '0',\n\t\t\t\t));\n\t\tMage::app()->getCacheInstance()->cleanType('config');\t\t\n\t\tMage::getSingleton('adminhtml/session')->setNotification(false);\n\t\t$this->_redirectReferer();\n\t}", "public function index()\n {\n $part_dealer = $this->getUserDetail(\n $this->part_dealer->getVerifiedPartDealers()\n );\n \n return $part_dealer->additional([\n 'message' => 'All verified part dealers retrieved successfully',\n 'status' => \"success\"\n ]);\n }", "public function getMerchantList(){\r\n\t\t$result = array();\r\n\t\treturn $result;\r\n\t}", "public function getAuditionStatus(){\n if(isset($_GET['user_id'])){\n $user_id = $_GET['user_id'];\n \n $audition = Audition::where('user_id',$user_id)->first();\n if($audition == null){\n $responseData = Helper::setResponse('fail','User Has Not Submit Form','','');\n }\n else{\n if($app_status=\\App\\App::where('name','Registration')->first())\n {\n $audition->setAttribute('registration_open',$app_status->status==1?true:false);\n }\n $responseData = Helper::setResponse('success','Payment Information Listing Successfull',$audition,'');\n }\n\n return response()->json($responseData);\n\n }\n else{\n $responseData = Helper::setResponse('fail','Parameter Missing','','');\n return response()->json($responseData);\n }\n\n\n }", "public function getListAboutLoyalty()\n {\n $aboutLoyalty = Setting::where(['type' => 'about_loyalty'])->get(['field2 as voucher', 'field3 as stampcard']);\n\n if ($aboutLoyalty->isNotEmpty()) {\n return [self::STATUS => true, 'data' => $aboutLoyalty[0], self::MESSAGE => 'Loyalty Settings Found'];\n }\n else {\n return [self::STATUS => false, 'data' => [], self::MESSAGE => 'Loyalty Settings Not Found'];\n }\n }", "public function getApplicantShortInfo($applicationid) {\n\n $this->db->select('apd.*,stu_info.stuinfo_id,stu_info.applicationId,stu_info.admissionDate,stu_info.firstName,stu_info.lastName,stu_info.dateOfBirth,stu_info.gender,stu_info.religion,stu_info.photo,stu_info.fatherName,stu_info.fatherProfession,stu_info.fatherPhone,stu_info.motherName,stu_info.motherProfession,stu_info.motherPhone,stu_info.presentAddress,p.*');\n $this->db->from('studentinfo stu_info');\n $this->db->join('admissionapplicant apd', 'stu_info.applicationId=apd.applicationId');\n $this->db->join('programoffer p', 'p.programOfferId=apd.programOfferId');\n $this->db->where('stu_info.applicationId', $applicationid);\n\n $query = $this->db->get();\n $result = $query->row_array();\n if (!empty($result)) {\n return $result;\n }\n }", "function olc_get_customers_statuses() {\n\n\t$customers_statuses_array = array(array());\n\t$customers_statuses_query = olc_db_query(SELECT.\"customers_status_id, customers_status_name, customers_status_image, customers_status_discount, customers_status_ot_discount_flag, customers_status_ot_discount\".SQL_FROM . TABLE_CUSTOMERS_STATUS . SQL_WHERE.\"language_id = '\" . SESSION_LANGUAGE_ID . \"' order by customers_status_id\");\n\t$i=1; // this is changed from 0 to 1 in cs v1.2\n\twhile ($customers_statuses = olc_db_fetch_array($customers_statuses_query)) {\n\t\t$i=$customers_statuses['customers_status_id'];\n\t\t$customers_statuses_array[$i] = array('id' => $customers_statuses['customers_status_id'],\n\t\t'text' => $customers_statuses['customers_status_name'],\n\t\t'csa_public' => $customers_statuses['customers_status_public'],\n\t\t'csa_image' => $customers_statuses['customers_status_image'],\n\t\t'csa_discount' => $customers_statuses['customers_status_discount'],\n\t\t'csa_ot_discount_flag' => $customers_statuses['customers_status_ot_discount_flag'],\n\t\t'csa_ot_discount' => $customers_statuses['customers_status_ot_discount'],\n\t\t'csa_graduated_prices' => $customers_statuses['customers_status_graduated_prices']\n\t\t);\n\t}\n\treturn $customers_statuses_array;\n}", "public function listing_camp($stat='',$campid='',$adv='',$start=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = $campid;\n\t\t\t\t$data['sel_adv'] = $adv;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t$limit = $this->page_limit;\n\t\tif($campid!='')\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array('ox_banners.campaignid'=>$campid);\n }\n }\n else\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n }\n //print_r($where_arr);exit;\n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\n\t\t$data['tot_list'] = $list_data;\n\n\t\t$config['per_page'] \t= $limit;\n\t\tif($campid!='')\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat.\"/\".$campid);\n $config['uri_segment'] \t= 6;\n }\n else\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat);\n $config['uri_segment'] \t= 5;\n }\n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);\n\t\t$page_data = $this->mod_banner->get_banners($where_arr,$start,$limit);\n\t\t$data['banner_list']\t=\t$page_data;\n\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\n\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/\n if($campid!='')\n {\n $where_tot = array('ox_banners.campaignid'=>$campid);\n $where_act = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>0);\n $where_inact = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>1);\n }\n else\n {\n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n $where_inact = array('ox_banners.status'=>1);\n }\n\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\n\t}", "public function summarizeApprovalStages($appID) {\n\t\t\t$statuses['Sponsor'] = $this->CI->db->query(\"\n\t\t\t\tSELECT * FROM Approval appr\n\t\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\t\tAND ApprovalType = 'Sponsor'\n\t\t\t\")->result_array();\n\t\t\t$statuses['Venue'] = $this->CI->db->query(\"\n\t\t\tSELECT * FROM Approval appr\n\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\tAND ApprovalType = 'VenueOperator'\n\t\t\t\")->result_array();\n\t\t\t$statuses['Committee'] = $this->CI->db->query(\"\n\t\t\t\tSELECT * FROM Approval appr\n\t\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\t\tAND ApprovalType = 'Committee'\n\t\t\t\")->result_array();\n\n\t\t\tforeach($statuses as $key => $status) {\n\t\t\t\t//echo 'status: ';\n\t\t\t\t//var_dump($status);\n\t\t\t\t# For all stages there can be a mix of approvals and denials\n\t\t\t\t# Search for both and summarize the status accordingly\n\t\t\t\t$column = array_column($status, 'Descision');\n\t\t\t\t$approved = array_search('approved', $column);\n\t\t\t\t$denied = array_search('denied', $column);\n\n\t\t\t\t# If we see at least one approval, assume the status is approved\n\t\t\t\t# Else if we see no approvals and at least one denial, status is denied\n\t\t\t\t# Pending otherwise\n\t\t\t\tif($approved !== false) {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => $status[$approved]['Descision'], \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => $status[$approved]['DescisionRemark'],\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => $status[$approved]['ApprovalEndDate']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t} else if ($denied !== false) {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => $status[$denied]['Descision'], \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => $status[$denied]['DescisionRemark'],\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => $status[$denied]['ApprovalEndDate']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => 'Pending', \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => null,\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => 'Pending'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//var_dump($status);\n\t\t\t}\n\t\t\t# var_dump($statuses);\n\t\t\treturn $statuses;\n\t\t}", "public function GeteBayDetails() {\r\n $verb = 'GeteBayDetails';\r\n $requestxml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\t\t\t<GeteBayDetailsRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">\r\n\t\t <RequesterCredentials>\r\n <eBayAuthToken>' . $this->token . '</eBayAuthToken> \r\n </RequesterCredentials>\r\n\t\t\t</GeteBayDetailsRequest>';\r\n $session = new eBaySession('', $this->devID, $this->appID, $this->certID, $this->serverUrl, $this->compatabilityLevel, $this->siteID, $verb);\r\n $responseXml = $session->sendHttpRequest($requestxml);\r\n return XML_unserialize($responseXml);\r\n }", "public function vendor_app_version_get(){\n $data = $this->model->getAllwhere('vendor_app_version','','versioncode,versionname','id','DESC','1');\n\n $resp = array('rccode' => 1, 'version' => !empty($data) ? $data[0]:[]); \n $this->response($resp);\n \n }", "protected function getRefundApplicationsRequest($line_item_offer_id = null, $buyer_login = null, $status = null, $limit = 25, $offset = 0)\n {\n if ($limit !== null && $limit > 100) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling CommissionRefundsApi.getRefundApplications, must be smaller than or equal to 100.');\n }\n if ($limit !== null && $limit < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling CommissionRefundsApi.getRefundApplications, must be bigger than or equal to 1.');\n }\n\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling CommissionRefundsApi.getRefundApplications, must be bigger than or equal to 0.');\n }\n\n\n $resourcePath = '/order/refund-claims';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($line_item_offer_id !== null) {\n if('form' === 'form' && is_array($line_item_offer_id)) {\n foreach($line_item_offer_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['lineItem.offer.id'] = $line_item_offer_id;\n }\n }\n // query params\n if ($buyer_login !== null) {\n if('form' === 'form' && is_array($buyer_login)) {\n foreach($buyer_login as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['buyer.login'] = $buyer_login;\n }\n }\n // query params\n if ($status !== null) {\n if('form' === 'form' && is_array($status)) {\n foreach($status as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['status'] = $status;\n }\n }\n // query params\n if ($limit !== null) {\n if('form' === 'form' && is_array($limit)) {\n foreach($limit as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['limit'] = $limit;\n }\n }\n // query params\n if ($offset !== null) {\n if('form' === 'form' && is_array($offset)) {\n foreach($offset as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['offset'] = $offset;\n }\n }\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.allegro.public.v1+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function get_campaigns() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/campaigns.json\");\n }", "public function fetchCampaign_and_patrons() {\n return $this->QueryAPI(\"current_user/campaigns?include=rewards,creator,goals,pledges\");\n }", "public function getReferralAppointmentConversions($referrer_token)\n {\n $yesterday = new DateTime();\n $yesterday->add(DateInterval::createFromDateString('yesterday'));\n \n $xml = \"<?xml version='1.0'?><root>\";\n $xml .= \"<date>\" . $yesterday->format('Y-m-d') . \"</date>\";\n $xml .= \"<token>\" . $referrer_token . \"</token>\";\n $xml .= \"</root>\";\n\n $ch = curl_init(\"https://bamleadtracker.com/referrals/get-converted-appointments/\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, ['xml' => $xml]);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n curl_close($ch);\n \n $xml = simplexml_load_string($output);\n if ($xml !== false) {\n \n if ($xml->response->code == 1) {\n $leads = (array) $xml->response->leads;\n \n if (is_array($leads['lead'])) {\n return $leads['lead'];\n }\n return [$leads['lead']];\n }\n }\n return false;\n }", "public function getBrands($clientId)\n {\n $data = Brandcontacts::where('client_id',$clientId)->get();\n return $this->success('success','success',$data);\n }", "function getAcceptedApplications()\r\n {\r\n $db = db_connect();\r\n $sql = \"SELECT account.* FROM account, application WHERE account.accountID = application.accountID AND \r\n account.role = :role: AND application.applicationStatus = :applicationStatus: ORDER BY \r\n account.accountID DESC\";\r\n\r\n //Send query then store the results\r\n $results = $db->query($sql, [\r\n 'role' => 0,\r\n 'applicationStatus' => 'A'\r\n ]);\r\n\r\n return $results;\r\n }", "function get_ajax_models()\n {\n\n $dealerId = get_option(\"at_dealer_id\");\n $dealers = explode(',', $dealerId);\n \n if(isset($_POST['brand_id'])){\n $brandId = $_POST['brand_id'];\n\n var_dump($brandId);\n \n $json = file_get_contents(\"http://auto.best4u.nl/\" . $dealers[0] . \"/brand/\".$brandId.\"/models/?dealers=\".$dealerId.\"\");\n\n var_dump($json);\n\n var_dump(\"http://auto.best4u.nl/\" . $dealers[0] . \"/brand/\".$brandId.\"/models/?dealers=\".$dealerId.\"\");\n\n $all_models = '';\n foreach (json_decode($json)->data as $key => $model) {\n $all_models .= \"<option value='\".$model->id.\"' class='modelOption'>\".$model->title.\"</option>\";\n }\n \n echo $all_models;\n\n }\n}", "function printNewRequests() {\r\n $criteria = array('status' => Appeal::$STATUS_NEW);\r\n return printAppealList($criteria);\r\n}", "public function index()\n {\n $user=Auth::guard('api')->user();\n \n if($user->type!=\"client\"){\n return redirect('/login'); \n }\n return $user->bids;\n }", "public function getMerchantAccountStatus($requestParameters = array());", "public function indexoffAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n $countryto = $user->getAgency()->getCity()->getstate()->getCountry();\n $maincompany = $user->getMaincompany();\n \n \n $shareagencies = $em->getRepository('NvCargaBundle:Agency')->findBy(['maincompany'=>$maincompany, 'sharecustomer'=>true]);\n if ($user->getAgency()->getType() != 'MASTER') {\n $entities = $em->getRepository('NvCargaBundle:Customer')->findBy(['agency'=>$shareagencies,'active'=>false]);\n $agencies = $shareagencies;\n } else {\n $entities= $em->getRepository('NvCargaBundle:Customer')->findBy(['maincompany'=>$maincompany,'active'=>false]);\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n }\n\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function index_approved()\n {\n $reservations = auth('user')->user()->approved_reservations()->paginate(20);\n $response['status'] = 'success';\n $response['reservations'] = $reservations;\n return response()->json($response, Response::HTTP_OK);\n }", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/list/\" . $this->listId . \"/leads.json?access_token=\" . $this->getToken();\n\t\tif (isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->fields;\n\t\t}\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function GetVendor($id=null){\n\t\theader('Access-Control-Allow-Origin:*');\n\t\t$this->load->model('BookingModel');\n\t\t$data['booking_id']=$this->input->post('booking_id');\n\t\t$data['vendor_id']=$this->input->post('vendor_id');\n\t\t$data['vendors']=$this->BookingModel->GetVendorOS($this->input->post('city'),$this->input->post('cab'),$this->input->post('type'));\n\n\t\t $data['companies']=$this->BookingModel->GetCompanyOS($this->input->post('booking_id'),$this->input->post('type'));\n\t\t\n\t\tif($this->input->post('type')==\"outstation\"){\n\t\t\techo $this->load->view('booking/vendor_assign/VendorLists',$data,true);\n\t\t} else if($this->input->post('type')==\"local\"){\n\t\t\techo $this->load->view('booking/vendor_assign/VendorLocal',$data,true);\n\t\t} else if($this->input->post('type')==\"transfer\"){\n\t\t\techo $this->load->view('booking/vendor_assign/VendorTransfer',$data,true);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function getDownloadInfoAction() {\n list($gameId, $from) = $this->parseGameIdInput();\n\n if (self::GAME_SOURCE_BAIDU == $from) {\n $this->localOutput(-1, 'baidu game not supported by this api');\n }\n\n $version = Resource_Service_Games::getGameVersionInfo($gameId);\n if (!$version) {\n $message = 'there is no this game: ' . $gameId;\n $this->localOutput(-1, $message);\n }\n\n $downloadInfo[Util_JsonKey::GAME_ID] = '' . $gameId;\n $downloadInfo[Util_JsonKey::VERSION_CODE] = $version['version_code'];\n $downloadInfo[Util_JsonKey::VERSION_NAME] = $version['version'];\n\n if (strnatcmp($this->getInput('type'), 'split') == 0) {\n \t$game = $this->getPackageGameInfo($gameId);\n \tif ($game) {\n\t \t$downloadInfo[Util_JsonKey::DOWN_URL] = $this->getDiffPackageUrl($game, $this->getInput('md5'));\n \t} else {\n \t\t$downloadInfo[Util_JsonKey::DOWN_URL] = '';\n \t}\n } else {\n \t$downloadInfo[Util_JsonKey::DOWN_URL] = $version['link'];\n }\n\n $this->localOutput(0, '', $downloadInfo);\n }", "public function fetchCampaign() {\n return $this->QueryAPI(\"current_user/campaigns?include=rewards,creator,goals\");\n }", "public function wlistAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NOT NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NOT NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n $countryto = $user->getAgency()->getCity()->getstate()->getCountry();\n $maincompany = $user->getMaincompany();\n \n \n $shareagencies = $em->getRepository('NvCargaBundle:Agency')->findBy(['maincompany'=>$maincompany, 'sharecustomer'=>true]);\n if ($user->getAgency()->getType() != 'MASTER') {\n $entities = $em->getRepository('NvCargaBundle:Customer')->findBy(['agency'=>$shareagencies,'active'=>true]);\n $agencies = $shareagencies;\n } else {\n $entities= $em->getRepository('NvCargaBundle:Customer')->findBy(['maincompany'=>$maincompany,'active'=>true]);\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n }\n\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function getReferralConversions($referrer_token)\n {\n $yesterday = new DateTime();\n $yesterday->add(DateInterval::createFromDateString('yesterday'));\n \n $xml = \"<?xml version='1.0'?><root>\"; \n $xml .= \"<date>\" . $yesterday->format('Y-m-d') . \"</date>\";\n $xml .= \"<token>\" . $referrer_token . \"</token>\";\n $xml .= \"</root>\";\n\n $ch = curl_init(\"https://bamleadtracker.com/referrals/get-conversions/\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, ['xml' => $xml]);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n curl_close($ch);\n \n $xml = simplexml_load_string($output);\n if ($xml !== false) {\n \n if ($xml->response->code == 1) {\n $appointments = (array) $xml->response->appointments;\n $transactions = (array) $xml->response->transactions;\n \n if (is_array($appointments['lead'])) {\n $appointments = $appointments['lead'];\n }\n \n if (is_array($transactions['lead'])) {\n $transactions = $transactions['lead'];\n }\n \n return [\n 'appointments' => $appointments,\n 'transactions' => $transactions,\n ];\n }\n }\n return false;\n }", "public function retrieveInactiveApplications()\n {\n return $this->start()->uri(\"/api/application\")\n ->urlParameter(\"inactive\", true)\n ->get()\n ->go();\n }", "public function getApplicantCurrentSelection(){\n\n\t\t$user = $this->session->userdata($this->SessionName);\n\t\t$user_id=$user['USER_ID'];\n\t\t$application_id=0;\n\t\t$selection_list_id=0;\n\t\tif ($user_id<0){\n\t\t\thttp_response_code(201);\n\t\t\techo \"Sorry Applicant not found\";\n\t\t\texit();\n\t\t}\n\t\t$data = $this->Application_model->getApplicantCurrentAdmission($user_id,$application_id,$selection_list_id);\n\t\tif (count($data) ==0){\n\t\t\thttp_response_code(201);\n\t\t\techo \"Sorry data not found\";\n\t\t\texit();\n\t\t}else{\n\t\t\t$new_array = array();\n\t\t\tforeach ($data as $std){\n\t\t\t\t$ap_id = $std['APPLICATION_ID'];\n\t\t\t\t$SELECTION_LIST_ID = $std['SELECTION_LIST_ID'];\n\t\t\t\t$roll_no = $this->Application_model->getCandidateRollNo($SELECTION_LIST_ID);\n\t\t\t\t$SELECTION_LIST_ID = base64url_encode(base64_encode(urlencode($SELECTION_LIST_ID)));\n\t\t\t\tif ($ap_id>0){\n\t\t\t\t\t$form_status = \"Submitted\";\n\t\t\t\t}else{\n\t\t\t\t\t$form_status = \"Not Submitted Yet\";\n\t\t\t\t}\n\t\t\t\t$std['SELECTION_LIST_ID']=$SELECTION_LIST_ID;\n\t\t\t\t$std['FORM_STATUS']=$form_status;\n\t\t\t\t$std['ROLL_NO']=$roll_no['ROLL_NO'];\n\t\t\t\tarray_push($new_array,$std);\n\t\t\t}\n\t\t\thttp_response_code(200);\n\t\t\t$this->output->set_content_type('application/json')->set_output(json_encode($new_array));\n\t\t}\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n // $all = $em->getRepository('NvCargaBundle:Bill')->findBy(['canceled'=>FALSE, 'maincompany'=> $maincompany])\n $all = $em->getRepository('NvCargaBundle:Bill')->createQueryBuilder('b')\n ->where('b.status != :status')\n ->andwhere('b.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany, 'status' => 'ANULADA'))\n ->orderBy('b.number', 'DESC')\n ->setMaxResults(500)\n ->getQuery()\n ->getResult();\n if ($type == \"MASTER\") {\n $entities = $all;\n } else {\n $entities = [];\n foreach ($all as $entity) {\n $guide = $entity->getGuides()->last();\n if ($guide->getAgency() === $agency()) {\n $entities[] = $entity;\n }\n }\n }\n return array(\n 'entities' => $entities,\n );\n\n }", "public function index()\n {\n $user = \\Auth::guard('api')->user();\n\n $lists = \\Acelle\\Model\\Campaign::getAll()\n ->select('uid', 'name', 'type', 'subject', 'html', 'plain', 'from_email', 'from_name', 'reply_to', 'status', 'delivery_at', 'created_at', 'updated_at')\n ->where('customer_id', '=', $user->customer->id)\n ->get();\n\n return \\Response::json($lists, 200);\n }", "public function extractThisRecord($status, $id)\n\t{\n\t\treturn $this->with('applicant.department.college.branch')\n ->where('char_copyright_status', $status)\n ->where('int_id', $id)\n ->get();\n\t}", "public function getUpdateInfo($mbooth_xml, $status = 1){\n\t\t$result = array();\n\n\t\t$current_version = $this->getVersion($mbooth_xml);\n\t\t$customer_url = HTTP_SERVER;\n\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"language` WHERE language_id = \" . (int)$this->config->get('config_language_id') ); \n\t\t$language_code = $query->row['code'];\n\t\t$ip = $this->request->server['REMOTE_ADDR'];\n\n\t\t$request = 'http://opencart.dreamvention.com/api/1/index.php?route=extension/check&mbooth=' . $mbooth_xml . '&store_url=' . $customer_url . '&module_version=' . $current_version . '&language_code=' . $language_code . '&opencart_version=' . VERSION . '&ip='.$ip . '&status=' .$status;\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $request);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$result['data'] = curl_exec($curl);\n\t\t$result['code'] = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\tcurl_close($curl);\n\n\t\treturn $result;\n\t}", "function retrieveToPayApplicants()\r\n\t{\r\n\t\t$connect = new dbconnection();\r\n\t\t$con = $connect->connectdb();\r\n\t\t\r\n\t\t$query = \"\r\n\t\t\tSELECT \r\n\t\t\t\t*,\r\n\t\t\t\tv.status AS vstatus\r\n\t\t\tFROM\r\n\t\t\t\ttable_vehicle v\r\n\t\t\tINNER JOIN\r\n\t\t\t\ttable_profile p ON p.profileID = v.owner\r\n\t\t\tWHERE \r\n\t\t\t\tp.profileType != 'ADMIN' AND\r\n\t\t\t\tp.profileType != 'OVCCA' AND\r\n\t\t\t\tp.profileType != 'CASHIER'\r\n\t\t\";\r\n\t\t\r\n\t\t// SEARCHING\r\n\t\t$combine = isset($_POST['searchCombine']) ? $_POST['searchCombine'] : \"\";\r\n\t\t$keyword = isset($_POST['searchKeyword']) ? $_POST['searchKeyword'] : \"\";\r\n\t\t$filters = isset($_POST['searchFilters']) ? $_POST['searchFilters'] : \"\";\r\n\t\t\r\n\t\tif($filters != \"\"){\r\n\t\t\t$combine = explode(';', $combine);\r\n\t\t\t$keyword = explode(';', $keyword);\r\n\t\t\t$filters = explode(';', $filters);\r\n\t\t\t\r\n\t\t\t$search = \"\";\r\n\t\t\tfor($i=0; $i<count($filters); $i++)\r\n\t\t\t{\r\n\t\t\t\t$keyword[$i] = isset($keyword[$i]) ? $keyword[$i] : \"\";\r\n\t\t\t\t$search .= $combine[$i] . \" \" . $filters[$i] . \" LIKE '%\" . $keyword[$i] . \"%' \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($search != \"\")\r\n\t\t\t\t$query .= \" AND (\" . $search . \")\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// SORTING\r\n\t\t$sortCol = (isset($_POST['sortColumn']) && $_POST['sortColumn'] != \"\") != \"\" ? $_POST['sortColumn'] : \"plateNumber\";\r\n\t\t$query .= \"ORDER BY \".$sortCol;\r\n\t\t\r\n\t\t$result = mysql_query($query);\r\n\t\t$connect->closeconnection($con);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "function get_consumer_details() {\n\t\t$consumer_no = $_REQUEST['consumer_no'];\n\t\t$biller_id = $_REQUEST['biller_id'];\n\t\tif (!empty($consumer_no) && !empty($biller_id)) {\n\t\t\t$biller_in_id = 'biller_user.biller_customer_id_no';\n\t\t\t$records_consumer = $this -> conn -> join_two_table_where_two_field('biller_user', 'biller_details', 'biller_id', 'biller_id', $biller_in_id, $consumer_no, 'biller_user.biller_id', $biller_id);\n\n\t\t\tif (!empty($records_consumer)) {\n\t\t\t\t$biller_id = $records_consumer[0]['biller_id'];\n\t\t\t\t$biller_company = $records_consumer[0]['biller_company_name'];\n\t\t\t\t$biller_company_logo = biller_company_logo . $records_consumer[0]['biller_company_logo'];\n\t\t\t\t$biller_user_name = $records_consumer[0]['biller_user_name'];\n\t\t\t\t$biller_customer_id = $records_consumer[0]['biller_customer_id_no'];\n\t\t\t\t$bill_amount = $records_consumer[0]['bill_amount'];\n\t\t\t\t$bill_due_date = $records_consumer[0]['bill_due_date'];\n\t\t\t\t$biller_user_email = $records_consumer[0]['biller_user_email'];\n\t\t\t\t$biller_user_contact_no = $records_consumer[0]['biller_user_contact_no'];\n\t\t\t\t$bill_pay_status = $records_consumer[0]['bill_pay_status'];\n\t\t\t\t$bill_invoice_no = $records_consumer[0]['bill_invoice_no'];\n\t\t\t\t$current_date = date(\"Y-m-d\");\n\t\t\t\tif ($bill_due_date >= $current_date) {\n\t\t\t\t\tif ($bill_pay_status == '1') {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill already paid\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => 'true', \"biller_id\" => $biller_id, 'biller_company' => $biller_company, 'biller_logo' => $biller_company_logo, 'consumer_name' => $biller_user_name, 'consumer_id' => $biller_customer_id, 'bill_amount' => $bill_amount, 'due_date' => $bill_due_date, 'consumer_email' => $biller_user_email, 'consumer_contact_no' => $biller_user_contact_no, 'bill_pay_status' => $bill_pay_status, 'bill_invoice_no' => $bill_invoice_no);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill Paid date is expired\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"No Bill Found from this consumer no\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing Parameter\", 'consumer_no' => $consumer_no, 'biller_id' => $biller_id);\n\t\t}\n\t\techo $this -> json($post);\n\n\t}", "public function getDetails($id)\n {\n $appid = explode('00', $id);\n $hasApproved = ApprovedApplication::where('applicant_id', $appid)->where('admin_id', Auth::guard('admin')->user()->id)->first();\n\n if ($appid != null) {\n $applicant = Applicant::find($appid[1]);\n \n return view('admin.applicantdetails', compact('applicant', 'hasApproved'));\n } else {\n return back();\n }\n }", "public function relatAuditoria($status)\n\t{\n\n\t\t$data = $this->relatorio_model->listaAuditorias($status);\n\n\t\techo json_encode($data);\n\t\treturn;\n\t}", "public function relatAC($status)\n\t{\n\t\t$data = $this->relatorio_model->listaACs($status);\n\n\t\techo json_encode($data);\n\t\treturn;\t\n\t}", "function getBOCAccount($accountid = 'a746637b91b19a261a67d8bd') {\n\t//bankid bda8eb884efcef7082792d45\n\t//accountid a746637b91b19a261a67d8bd\n\t//viewid 5710bba5d42604e4072d1e92\n\t//\n\t// Get cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\t\t\t 'Auth-Provider-Name: 01460900080600',\n\t\t\t\t\t\t\t 'Auth-ID: 123456789',\n\t\t\t\t\t\t\t 'Ocp-Apim-Subscription-Key: f1817e51b3fb4d2ca3fc279d0df3a061'\n\t\t\t\t\t\t\t ),\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_URL => \"http://api.bocapi.net/v1/api/banks/bda8eb884efcef7082792d45/accounts/$accountid/5710bba5d42604e4072d1e92/account\",\n\t // CURLOPT_URL => \"192.168.88.202:8080/customer/$custId/goals\",\n\t CURLOPT_USERAGENT => 'BankBase BOC Hackathon Request'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = curl_exec($curl);\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\n\t$resp_decode = json_decode($resp);\n\treturn $resp_decode;\n}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.number', 'ASC')\n ->setMaxResults(1000)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function applicantlist()\n {\n $user_data = $this->_get_user_session();\n $user_id = $this->_get_user_id();\n\n $this->load->model('Service_agent');\n $client_list = $this->Service_agent->get_client_list($user_id);\n if(empty($client_list )){\n $client_exist = false;\n }else{\n $client_exist = true;\n }\n $this->smarty->assign('client_exist' , $client_exist);\n $bc_param = array('mypage', 'applicantlist_current');\n $this->_bread_crumb['base_url'] = base_url();\n $this->_bread_crumb['content'] = get_static_breadcrumb($bc_param);\n\n $this->smarty->assign('breadcrumb' , $this->_bread_crumb);\n $this->smarty->assign('image_type', $this->config->item('client', 'image_config'));\n $this->smarty->assign('client_list', $client_list);\n\n //tdk\n $tdk_array['title'] = '求人を紹介してもらう|保育士の求人・転職・募集ならFINE!';\n $tdk_array['description'] = '紹介会社に求人を紹介してもらうページです。全国の保育士求人/転職/募集情報を掲載するポータルサイトFINE!。あなたにぴったりの保育士・幼稚園の求人や募集情報を探せます。';\n $this->smarty->assign('tdk_array',$tdk_array);\n\n $this->smarty->display($this->template_path().\"/user/agent/applicant_list.html\");\n }", "public function get_consent($consent_id){\n if( Auth::user()->hasRole('admin') ){\n $consent = Consent::with('guardians')\n ->select(\n 'consent.consent_id',\n 'consent.title',\n 'consent.content',\n 'consent.created_at'\n )\n ->where('consent.franchise_id', $this->franchise_id)\n ->where('consent.club_id', $this->club_id)\n ->where('consent.consent_id', $consent_id)\n ->first();\n } else {\n $consent = Consent::select(\n 'consent.consent_id',\n 'consent.title',\n 'consent.content',\n 'consent.created_at',\n 'rel_consent_user.agreed_at'\n )\n ->leftJoin('rel_consent_user', 'rel_consent_user.consent_id', '=', 'consent.consent_id')\n ->where('rel_consent_user.user_id', $this->user_id)\n ->where('consent.franchise_id', $this->franchise_id)\n ->where('consent.club_id', $this->club_id)\n ->where('consent.consent_id', $consent_id)\n ->first();\n }\n return response()->json($consent, 200);\n }", "public function findByMerchantAndStatus($UserId, $StatusId) {\n //\n $GiftVouchers = DB::select('select '\n . 'gv.* '\n . 'from '\n . 'giftvoucher AS gv, gift_vouchers_parameters AS gvp, merchants AS m, users AS u '\n . 'where '\n . 'u.id = ? '\n . 'AND gv.status = ? '\n . 'AND gv.gift_vouchers_parameters_id = gvp.id '\n . 'AND gvp.MerchantID = m.id '\n . 'AND m.user_id = u.id '\n , array($UserId, $StatusId));\n //\n $GiftVouchers = json_decode(json_encode($GiftVouchers), true);\n // if not found\n if (!$GiftVouchers || count($GiftVouchers) == 0) {\n // 'GiftVoucher does not exist'\n return $this->respondNotFound('Gift Voucher does not exist');\n }\n //\n return $this->respond([\n 'data' => $this->GiftVoucherTransformer->transformCollection($GiftVouchers), // $GiftVouchers->all() equals to $GiftVouchers->toArray()\n ]);\n }", "private function get_admins_info() {\n $stm=$this->uSup->get_com_admins_to_notify_about_requests(\"user_id\",$this->company_id);\n\n $q_user_id=\"(1=0 \";\n /** @noinspection PhpUndefinedMethodInspection */\n while($admin=$stm->fetch(PDO::FETCH_OBJ)) {\n $q_user_id.=\" OR u235_users.user_id='\".$admin->user_id.\"' \";\n }\n $q_user_id.=\")\";\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT DISTINCT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n \" .$q_user_id. \" AND \n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "public function show(Request $request)\n {\n if ($request->bulk_action_btn){\n if(config('app.is_demo')) return back()->with('error', __a('demo_restriction'));\n }\n \n\n // if ($request->bulk_action_btn === 'update_status' && $request->update_status){\n // if($request->bulk_ids==''){\n // return back();\n // }\n // Leads::whereIn('id', $request->bulk_ids)->update(['l_status' => $request->update_status,'manager' => Auth::user()->name]);\n // return back();\n // }\n if ($request->bulk_action_btn === 'delete'){\n if($request->bulk_ids==''){\n return back();\n }\n Leads::whereIn('id', $request->bulk_ids)->delete();\n return back();\n }\n\n \n \n $title = \"Leads\";\n\n $user = Auth::user();\n if ( $user->isAdmin()){\n $leads = Leads::with('course_details')->get();\n }\n\n if ($request->status){\n if ($request->status !== 'all'){\n $leads = Leads::with('course_details')->where('l_status', $request->status)->paginate(25);\n \n }else{\n $leads = Leads::with('course_details')->orderBy('created_at', 'desc')->paginate(25);\n }\n }else{\n $leads = Leads::with('course_details')->paginate(25);\n \n }\n\n $courses = Course::orderBy('awarding_body', 'ASC')->get();\n\n \n //$lead_status = LeadStatus::find(1);\n\n return view('admin.leads', compact('title', 'leads','courses'));\n }", "function get_process_applicants($internshipID)\r\n\t{\r\n\t\t\r\n\t\tinclude(\"mysql_connect.inc.php\");\r\n\t\t$sql = \"SELECT * FROM `application` WHERE `InternshipID`= '$internshipID' ORDER BY `match` DESC \";\r\n $result = mysqli_query($link, $sql);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function getInfoMerchant()\n {\n\n $response = $this->client->request($this->methods['post'], 'payment_gateway_api/get_vendor', [\n 'json' => [\n 'VENDOR_ID' => $this->vendor_id,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->vendor_id. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "public function getPromotionalbanners(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$user = Auth::user('user');\n\t\t$status = $user?2:1;\n\t\t$promotionalbanners = PromotionalBanners::where('status', '!=', $status)->orderBy('displayorder', 'asc')->get();\n\t\t\n\t\treturn response($promotionalbanners);\n\t}", "public function getStatus()\n\t\t{\n\t\t\t$status_id = $this->getStatusId();\n\t\t\t$asf = ECash::getFactory()->getReferenceList('ApplicationStatusFlat');\n\t\t\treturn $asf[$status_id];\n\t\t}", "public function consentManagerAction()\n {\n $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);\n $settings = $configurationManager->getConfiguration(\n ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,\n 'piwik_consent_manager'\n );\n\n $currentPage = $GLOBALS['TSFE']->id;\n $hideOnPages = explode(',', $settings['hideOnPages']);\n\n /** @var ServerRequest $request */\n $request = $GLOBALS['TYPO3_REQUEST'];\n $params = $request->getQueryParams();\n\n if ((array_key_exists('hide_on_page', $params) && (int) $params['hide_on_page'] === 0)) {\n $this->view->assign('hideOnPage', 0);\n } elseif (in_array($currentPage, $hideOnPages, false)) {\n $this->view->assign('hideOnPage', 1);\n }\n\n $this->view->assign(self::$CM_KEY, $settings[self::$CM_KEY]);\n $this->view->assign(self::$CM_URL, $settings[self::$CM_URL]);\n }", "public function SideBarLoyaltyList(Request $request) {\n \n $input = $request->all();\n\n $mobileNumber = $input['mobile_number'];\n \n if( isset( $mobileNumber ) && !empty( $mobileNumber ) ) {\n \n $mobileNoExists = CustomHelper::isCheckMobileNoExists( $mobileNumber );\n \n if( isset( $mobileNoExists ) && !empty( $mobileNoExists ) ) {\n\n $MerchantDetailSave = new MerchantDetail();\n $sideBarLists = $MerchantDetailSave->getSidebarProfileDetails( $input );\n\n $response = array(); \n foreach( $sideBarLists as $i => $sideBarList ) { \n \n $response['vendor_id'] = $sideBarLists->vendor_id;\n $response['company_name'] = CustomHelper::getCamelCase($sideBarLists->company_name);\n $response['first_letter'] = CustomHelper::getFirstLetterReturn($sideBarLists->company_name);\n $response['business_type'] = $sideBarLists->business_type;\n $response['user_type'] = Config::get('constant.MERCHANT');\n $response['key1'] = ( ( $sideBarLists->is_admin_approved != Config::get('constant.NUMBER.THREE') ) ? CustomHelper::isCheckMerchantStatus( $sideBarLists->is_admin_approved ) : '');\n $response['key2'] = ( ( $sideBarLists->is_admin_approved == Config::get('constant.NUMBER.THREE') ) ? CustomHelper::isCheckMerchantStatus( $sideBarLists->is_admin_approved ) : '');\n \n } \n\n if( isset( $response ) && !empty( $response ) ) { \n \n return response()->json(['success' => $this->successStatus, 'message' => $response], $this->successStatusCode );\n \n } else {\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printProfileNotCreated() ], $this->failureStatusCode );\n }\n \n } else { \n\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printCorrectMobileNumber() ], $this->failureStatusCode );\n } \n\n } else {\n \n return response()->json(['success' => $this->failureStatus, 'message' => $this->printMobileNoMissing() ], $this->failureStatusCode );\n } \n\n }", "public function getSpecificApplicantInfoDetails($id)\n\t{\n\t\t$sql=$this->db->prepare(\"SELECT * FROM `candidates_info` WHERE `id`='\".$id.\"' \");\t\t\n\t\t$sql->execute();\n\t\treturn $sql->fetch(PDO::FETCH_ASSOC);\n\t}", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "public function advertizeAction() {\n\t\t// Init variables\n\t\t$result = '';\n\t\t$yaml = new sfYamlParser();\n\n\t\t// Get settings\n\t\t$settings = $this->configurationManager->getConfiguration('Settings');\n\n\t\t$listOfUids = explode(',', $settings['listOfUid']);\n\t\tforeach ($listOfUids as $uid) {\n\t\t\t$feed = $this->feedRepository->findByUid($uid);\n\n\t\t\t$configuration = $yaml->parse($feed['configuration']);\n\t\t\t$this->checkConfiguration($configuration);\n\n\t\t\t$feedUrl = $configuration['baseURL'];\n\n\t\t\t/** @var $contentObject tslib_cObj */\n\t\t\t$config['returnLast'] = 'url';\n\t\t\t$config['parameter.']['data'] = 'leveluid:0';\n\t\t\t$config['additionalParams'] = '&type=9090&uid=' . $uid;\n\t\t\t$contentObject = $this->configurationManager->getcontentObject();\n\t\t\t$feedUrl =\n\n\t\t\t$result .= '<link rel=\"alternate\"\n\t\t\t\ttype=\"application/atom+xml\"\n\t\t\t\ttitle=\"' . $feed['title'] . '\"\n\t\t\t\thref=\"' . $contentObject->typolink('', $config) . '\" />' . chr(10);\n\t\t}\n\n\t\treturn $result;\n\t}", "function request_banking(){\n $AffGroups = array(AffiliateUser);\n //$StoreGroups = array(AffiliateStoreUser);\n $OtherGroups = array(Developer2User,Developer1User,Partner2User, Partner1User, CoreMemberUser, CoreAdminUser);\n $this->requestBanking(MinAmountAff, $AffGroups);\n //$this->requestBanking(MinAmountStore, $StoreGroups);\n $this->requestBanking(MinAmountOther, $OtherGroups);\n echo \"Complete!\";\n exit();\n }", "public function getDetailedStatus() {}", "public function getActivityInfo()\n {\n return QcBonusDepartment::where('applyStatus', 1)->where('action', 1)->get();\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public function corporateMyBookingsAction() {\n $commonCode = $this->commonCode();\n $countItem = $commonCode['countItem'];\n $pg_start_page = 0;\n $page = 1;\n $pg_limit_records = $commonCode['pg_limit_records'];\n $count = $commonCode['count'];\n $class=$commonCode['class'];\n $pagination= '';\n $modules = $commonCode['modules'];\n $accountId = $commonCode['accountId'];\n $userId = $commonCode['userId'];\n $parameters['accountId'] = $accountId;\n $parameters['userId'] = $userId;\n $status = $commonCode['status'];\n $this->data['preferredAccountCurrency'] = $commonCode['preferredAccountCurrency'];\n $this->data['hotelModuleId'] = $commonCode['hotelModuleId'];\n $this->data['flightModuleId'] = $commonCode['flightModuleId'];\n $this->data['dealModuleId'] = $commonCode['dealModuleId'];\n $this->data['approvedStatus'] = $commonCode['approvedStatus'];\n $this->data['accountId'] = $commonCode['accountId'];\n $this->data['modules'] = $modules;\n $params = array(\n 'accountId' => $accountId,\n 'userId' => $userId,\n 'status' => $status,\n 'start' => $pg_start_page,\n 'limit' => $pg_limit_records\n );\n $userObj = $this->get('UserServices')->getUserDetails(array('id' => $userId));\n if($userObj[0]['cu_cmsUserGroupId'] == $this->container->getParameter('ROLE_SYSTEM')){\n $this->data['role'] = $this->container->getParameter('ROLE_SYSTEM');\n }\n $allApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n\n $params['count']= 1;\n $countApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n if($countApprovalFlowList){\n $countItem = $countApprovalFlowList;\n $pagination = $this->getRelatedDiscoverPagination($countItem, $pg_limit_records, $page,$count ,$class );\n } \n $this->data['pagination'] = $pagination;\n $this->data['allApprovalFlowList'] = $allApprovalFlowList;\n \n return $this->render('@Corporate/corporate/corporate-my-bookings.twig', $this->data);\n }", "public function getbrandlist() {\t\t\t\n \n\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"Success\"),'brandlist'=>array(array('id'=>1,'img'=>'http://159.203.151.92/fitness_logo4.jpg'),array('id'=>2,'img'=>'http://159.203.151.92/fitness_logo5.jpg')));\n\t\t\n\t\t\n\t\treturn $result; \n\t\t \n \n\t }", "public function getbooking_detail($status=''){\n \t\t $this->db->select('*');\n\t\t\t$this->db->from(PAYMENT);\n\t\t\tif($status!='') {\n\t\t\t$this->db->where(PAYMENT.'.payment_type',$status);\n\t\t\t}\n\t\t\t$query = $this->db->get();\t\t\t\n\t\t\t$resultContent = $query->result_array();\n\t\t\treturn $resultContent;\t\n }", "public function download_app_update() {\n \n // Download Update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->download_update();\n \n }", "public function GetUserAgreementInfo() {\r\n\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/GetUserAgreementInfo/v1/?\" . $CURLParameters);\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n //curl_setopt($ch, CURLOPT_POST, 1);\r\n //curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Steam ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n\r\n return $CURLResponse->response->params->agreements;\r\n }", "public function getWarehouseDetails($manifest, $partial_status) { //Call From Noraml And Trans\n $manifest_id = null;\n $receive_date = null;\n $delivery_date = null;\n $self_flag = null;\n $warehouse_rent_day = null;\n\n $port_id = Session::get('PORT_ID');\n\n $year = date('Y');\n $assessment_created_year = $this->globalFunctionController->getAassessmentCreatedYear($manifest);\n if(isset($assessment_created_year)) {\n $year = $assessment_created_year;\n }\n\n $manifest_data = DB::select('SELECT t.* FROM (SELECT m.id AS manifest_id, m.self_flag, \n dr.approximate_delivery_date AS delivery_date,\n (CASE WHEN MAX(dr.partial_status) = 1\n THEN (SELECT syws.unload_receive_datetime FROM shed_yard_weights AS syws \n JOIN truck_entry_regs AS trs ON trs.id=syws.truck_id \n JOIN manifests AS ms ON ms.id=trs.manf_id\n WHERE ms.manifest=? AND ms.port_id=?\n ORDER BY syws.unload_receive_datetime ASC LIMIT 1) \n ELSE (SELECT DATE_ADD(dre.approximate_delivery_date, INTERVAL 1 DAY) \n FROM delivery_requisitions dre \n JOIN manifests ma ON ma.id = dre.manifest_id \n WHERE ma.manifest=? AND dre.partial_status=?-1 AND ma.port_id=?)\n END ) AS receive_date\n FROM manifests m \n JOIN delivery_requisitions dr ON dr.manifest_id = m.id\n WHERE m.manifest=? AND m.port_id=? AND dr.port_id=? AND dr.partial_status=?) t WHERE t.manifest_id IS NOT NULL',[$manifest, $port_id, $manifest, $partial_status, $port_id, $manifest, $port_id, $port_id, $partial_status]);\n if(count($manifest_data) > 0) {\n $manifest_id = $manifest_data[0]->manifest_id;\n $receive_date = $manifest_data[0]->receive_date;\n $delivery_date = $manifest_data[0]->delivery_date;\n $self_flag = $manifest_data[0]->self_flag;\n $warehouse_rent_day = $this->globalFunctionController->number_of_working_days($receive_date, $delivery_date);\n $partialList = 0; //intialtization\n for($i = 1 ; $i < $partial_status ; $i++) {\n $partialList .= ','.$i;\n }\n \n\n $check_the_port_has_tariff = DB::select('SELECT COUNT(tg.id) AS found_tariff FROM tariff_goods AS tg \n JOIN tariff_schedules_and_charges AS tsac ON tsac.tariff_good_id = tg.id\n WHERE tg.port_id=?', [$port_id]);\n $check_the_port_has_year_tariff = DB::select('SELECT COUNT(tg.id) AS found_tariff_year FROM tariff_goods AS tg \n JOIN tariff_schedules_and_charges AS tsac ON tsac.tariff_good_id = tg.id\n WHERE tg.year=?', [$year]);\n if($self_flag == 1 || $self_flag == 2) {\n $query_start = \"SELECT\n t.*,\n (\n CASE t.partial_status WHEN 1 THEN t.iq ELSE (\n t.iq - (\n SELECT\n COUNT(ch.id)\n FROM\n chassis_deliverys ch\n WHERE\n ch.manifest_id = t.manifest_id\n AND ch.partial_status IN(\".$partialList.\")\n )\n ) END\n ) AS item_quantity\n FROM\n (\";\n } else {\n $query_start = \"SELECT\n t.*,\n (\n CASE t.item_type WHEN 4 THEN (\n CASE t.partial_status WHEN 1 THEN CEIL(t.iq / 1000) ELSE (\n CEIL (\n (\n t.iq - (\n SELECT\n IFNULL(SUM(IFNULL(ide.loadable_weight, 0)), 0)\n FROM\n item_deliverys ide\n WHERE\n ide.item_detail_id = t.item_id\n AND ide.partial_status IN (\".$partialList.\") AND ide.manifest_id = t.manifest_id\n )\n ) / 1000\n )\n ) END\n ) ELSE (\n CASE t.partial_status WHEN 1 THEN CEIL(t.iq) ELSE (\n t.iq - (\n SELECT\n IFNULL(SUM(IFNULL(ide.loadable_weight, 0)), 0)\n FROM\n item_deliverys ide\n WHERE\n ide.item_detail_id = t.item_id\n AND ide.partial_status IN (\".$partialList.\") AND ide.manifest_id = t.manifest_id\n )\n ) END\n ) END\n ) AS item_quantity\n FROM\n (\";\n }\n $shed_selection_query = \" SELECT tsac.shed_charge,\";\n $yard_selection_query = \" SELECT tsac.yard_charge,\";\n $base_query = \" id.manf_id AS manifest_id, tg.id AS goods_id, tg.particulars AS goods, tgf.flag AS free_time_flag, tgf.duration AS free_time_duration,\n tsac.slab, tsac.from, tsac.to,\n id.id AS item_id, ic.Description, id.item_type, id.dangerous, id.item_quantity AS iq, id.tariff_good_id,\n \".$partial_status.\" AS partial_status\n FROM item_details AS id\n JOIN item_codes AS ic ON ic.id = id.item_Code_id\n JOIN tariff_goods AS tg ON tg.id = id.tariff_good_id\n JOIN tariff_goods_freetimes AS tgf ON tgf.tariff_good_id = tg.id\n JOIN tariff_schedules_and_charges AS tsac ON tsac.tariff_good_id = tg.id WHERE\";\n $base_query .= \" id.manf_id=\".$manifest_id;\n $base_query .= \" AND id.port_id=\".$port_id;\n if($check_the_port_has_tariff[0]->found_tariff > 0 && $check_the_port_has_year_tariff[0]->found_tariff_year > 0) {\n $base_query .=\" AND tg.port_id=\".$port_id;\n $base_query .=\" AND tgf.port_id=\".$port_id;\n $base_query .=\" AND tsac.port_id=\".$port_id;\n $base_query .= \" AND tg.year=\".$year;\n } else if($check_the_port_has_tariff[0]->found_tariff == 0 && $check_the_port_has_year_tariff[0]->found_tariff_year > 0){\n $base_query .=\" AND tg.port_id=-1\";\n $base_query .=\" AND tgf.port_id=-1\";\n $base_query .=\" AND tsac.port_id=-1\";\n $base_query .= \" AND tg.year=\".$year;\n } else {\n return json_encode(array());\n }\n $query_end = \" ) AS t\";\n $shed_query = $query_start.$shed_selection_query.$base_query.\" AND id.yard_shed=1\".$query_end;\n $yard_query = $query_start.$yard_selection_query.$base_query.\" AND id.yard_shed=0\".$query_end;\n\n $item_wise_shed_details_charge = DB::select($shed_query);\n $item_wise_yard_details_charge = DB::select($yard_query);\n\n $free_items = array();\n $items_rent_day = array();\n //$warehouse_rent_day=30;\n $shed_item_details = array();\n $yard_item_details = array();\n $temp = $warehouse_rent_day;\n $item_flag = -1;\n $start_day = new DateTime($receive_date);\n //return $warehouse_rent_day;\n //return $item_wise_shed_details_charge;\n //$values = array();\n foreach ($item_wise_shed_details_charge as $k => $shed_item) {\n if($item_flag != $shed_item->item_id) {\n $temp = $warehouse_rent_day;\n if($shed_item->free_time_flag && $partial_status == 1 && $warehouse_rent_day >= $shed_item->free_time_duration) {\n $temp = $warehouse_rent_day - $shed_item->free_time_duration;\n $start_day = new DateTime($receive_date);\n $start_day->modify('+'.$shed_item->free_time_duration.' day');\n $free_day_end = (new DateTime($receive_date))\n ->modify('+'.($shed_item->free_time_duration-1).' day')->format('d-m-Y');\n $free_items[] = $this->getWarehouseFreeGoodArray($shed_item, $free_day_end);\n if($temp > 0) {\n $items_rent_day[] = $this->getWarehouseRentDayForItemArray($shed_item, $temp,\n $start_day->format('d-m-Y'));\n }\n } else if($shed_item->free_time_flag && $partial_status == 1 && $warehouse_rent_day < $shed_item->free_time_duration ) {\n $free_duration = $temp - $shed_item->free_time_duration;\n $temp = $free_duration;\n $free_day_end = (new DateTime($receive_date))\n ->modify('+'.($shed_item->free_time_duration-1).' day')->format('d-m-Y');\n $free_items[] = $this->getWarehouseFreeGoodArray($shed_item, $free_day_end);\n } else{\n if($temp > 0) {\n $start_day = new DateTime($receive_date);\n $items_rent_day[] = $this->getWarehouseRentDayForItemArray($shed_item, $temp,\n $start_day->format('d-m-Y'));\n }\n }\n $item_flag = $shed_item->item_id;\n }\n// $values[] = [\n// 'item_flag' => $item_flag,\n// 'temp' => $temp,\n// 'free_duration' => $free_duration\n// ];\n if($temp>0){\n $slab_duration = ($shed_item->to - $shed_item->from) + 1;\n $previous_temp = $temp;\n $temp=($temp - $slab_duration);\n $item_flag = $shed_item->item_id;\n\n if($temp > 0) {\n $final_slab_duration = $slab_duration;\n } else {\n $final_slab_duration = $warehouse_rent_day;\n }\n\n if($shed_item->to == -1 || $temp <= 0) {\n $final_slab_duration = $previous_temp;\n }\n $temp_start_day = $start_day;\n $temp_start_day_format = new DateTime($start_day->format('d-m-Y'));\n $end_day = $temp_start_day_format->modify('+'.($final_slab_duration).' day');\n $temp_end_day = (new DateTime($end_day->format('d-m-Y')))->modify('-1 day');\n $start_day = $temp_start_day_format;\n $shed_item_details[] = $this->getWareHouseItemArray($shed_item, $final_slab_duration,\n $temp_start_day->format('d-m-Y'), $temp_end_day->format('d-m-Y'));\n\n if($shed_item->to == -1) {\n $temp = $warehouse_rent_day;\n }\n } else {\n if($item_flag == $shed_item->item_id) {\n continue;\n } else {\n $temp = $warehouse_rent_day;\n $slab_duration = ($shed_item->to - $shed_item->from) + 1;\n $temp = ($temp - $slab_duration);\n $item_flag = $shed_item->item_id;\n\n if($temp > 0) {\n $final_slab_duration = $slab_duration;\n } else {\n $final_slab_duration = $warehouse_rent_day;\n }\n $temp_start_day = $start_day;\n $temp_start_day_format = new DateTime($start_day->format('d-m-Y'));\n $end_day = $temp_start_day_format->modify('+'.($final_slab_duration).' day');\n $temp_end_day = (new DateTime($end_day->format('d-m-Y')))->modify('-1 day');\n $start_day = $temp_start_day_format;\n $shed_item_details[] = $this->getWareHouseItemArray($shed_item, $final_slab_duration,\n $temp_start_day->format('d-m-Y'), $temp_end_day->format('d-m-Y'));\n }\n }\n }\n //return $values;\n //////////////////----------------------YARD ITEM----------------------------------------\n $temp = $warehouse_rent_day;\n //return $warehouse_rent_day;\n $item_flag = -1;\n $start_day = new DateTime($receive_date);\n foreach ($item_wise_yard_details_charge as $k => $yard_item) {\n if($item_flag != $yard_item->item_id) {\n $temp = $warehouse_rent_day;\n if($yard_item->free_time_flag && $partial_status == 1 && $warehouse_rent_day >= $yard_item->free_time_duration) {\n $temp = $warehouse_rent_day - $yard_item->free_time_duration;\n $start_day = new DateTime($receive_date);\n $start_day->modify('+'.$yard_item->free_time_duration.' day');\n $free_day_end = (new DateTime($receive_date))\n ->modify('+'.($yard_item->free_time_duration-1).' day')->format('d-m-Y');\n $free_items[] = $this->getWarehouseFreeGoodArray($yard_item, $free_day_end);\n if($temp > 0) {\n $items_rent_day[] = $this->getWarehouseRentDayForItemArray($yard_item, $temp,\n $start_day->format('d-m-Y'));\n }\n } else if($yard_item->free_time_flag && $partial_status == 1 && $warehouse_rent_day < $yard_item->free_time_duration ) {\n $free_duration = $temp - $yard_item->free_time_duration;\n $temp = $free_duration;\n $free_day_end = (new DateTime($receive_date))\n ->modify('+'.($yard_item->free_time_duration-1).' day')->format('d-m-Y');\n $free_items[] = $this->getWarehouseFreeGoodArray($yard_item, $free_day_end);\n } else {\n if($temp > 0) {\n $start_day = new DateTime($receive_date);\n $items_rent_day[] = $this->getWarehouseRentDayForItemArray($yard_item, $temp,\n $start_day->format('d-m-Y'));\n }\n }\n $item_flag = $yard_item->item_id;\n }\n\n if($temp>0){\n $slab_duration = ($yard_item->to - $yard_item->from) + 1;\n $previous_temp = $temp;\n $temp=($temp - $slab_duration);\n $item_flag = $yard_item->item_id;\n\n if($temp > 0) {\n $final_slab_duration = $slab_duration;\n } else {\n $final_slab_duration = $warehouse_rent_day;\n }\n\n if($yard_item->to == -1 || $temp <= 0) {\n $final_slab_duration = $previous_temp;\n }\n $temp_start_day = $start_day;\n $temp_start_day_format = new DateTime($start_day->format('d-m-Y'));\n $end_day = $temp_start_day_format->modify('+'.($final_slab_duration).' day');\n $temp_end_day = (new DateTime($end_day->format('d-m-Y')))->modify('-1 day');\n $start_day = $temp_start_day_format;\n $yard_item_details[] = $this->getWareHouseItemArray($yard_item, $final_slab_duration,\n $temp_start_day->format('d-m-Y'), $temp_end_day->format('d-m-Y'));\n\n if($yard_item->to == -1) {\n $temp = $warehouse_rent_day;\n }\n } else {\n if($item_flag == $yard_item->item_id) {\n continue;\n } else {\n $temp = $warehouse_rent_day;\n $slab_duration = ($yard_item->to - $yard_item->from) + 1;\n $temp = ($temp - $slab_duration);\n $item_flag = $yard_item->item_id;\n\n if($temp > 0) {\n $final_slab_duration = $slab_duration;\n } else {\n $final_slab_duration = $warehouse_rent_day;\n }\n $temp_start_day = $start_day;\n $temp_start_day_format = new DateTime($start_day->format('d-m-Y'));\n $end_day = $temp_start_day_format->modify('+'.($final_slab_duration).' day');\n $temp_end_day = (new DateTime($end_day->format('d-m-Y')))->modify('-1 day');\n $start_day = $temp_start_day_format;\n $yard_item_details[] = $this->getWareHouseItemArray($yard_item, $final_slab_duration,\n $temp_start_day->format('d-m-Y'), $temp_end_day->format('d-m-Y'));\n }\n }\n }\n\n $warehouse_details = array(\n 'manifest_id' => $manifest_id,\n 'receive_date' => $receive_date,\n 'delivery_date' => $delivery_date,\n 'free_items' => $free_items,\n 'warehouse_rent_for_items' => $items_rent_day,\n 'item_wise_shed_details' => $shed_item_details,\n 'item_wise_yard_details' => $yard_item_details\n );\n return json_encode($warehouse_details);\n } else {\n return json_encode(array());\n }\n }", "public function getBookings($username, $password, $start_date, $end_date, $groups=false, $buildings=false, $statuses=false, $event_types=false, $group_types=false, $group_id=false) {\nglobal $_LW;\nif (!isset($this->client)) { // require the client\n\treturn false;\n};\nif (empty($statuses)) { // use default statuses if none specified\n\t$statuses=$_LW->REGISTERED_APPS['ems']['custom']['default_statuses'];\n};\nif (empty($group_types)) { // use default group types if none specified\n\t$group_types=$_LW->REGISTERED_APPS['ems']['custom']['default_group_types'];\n};\nif (empty($event_types)) { // use default event types if none specified\n\t$event_types=$_LW->REGISTERED_APPS['ems']['custom']['default_event_types'];\n};\nreturn $this->client->getBookings($username, $password, $start_date, $end_date, $groups, $buildings, $statuses, $event_types, $group_types, $group_id); // perform the API call\n}", "public function index()\n {\n $attstatuses = AttStatus::getAllAttStatus();\n return AttStatusResource::collection($attstatuses);\n }", "public function process_adv($adv_id, $st_id, $status,$user_id){ \n\t\t$data = array('modified_date' => $this->Functions->get_current_date(), 'modified_by' => $this->Session->read('USER.Login.id'), 'remarks' => $this->request->query['remark'], 'status' => $status);\n\t\t$this->FinAdvApprove->FinAdvStatus->id = $st_id;\n\t\t$st_msg = $status == 'A' ? 'approved' : 'rejected';\n\t\t// make sure not duplicate status exists\n\t\t$this->check_duplicate_status($adv_id, $this->Session->read('USER.Login.id'), 1);\n\t\t// save the finance adv. status\n\t\tif($this->FinAdvApprove->FinAdvStatus->save($data, true, $fieldList = array('modified_by','modified_date','remarks','status'))){\n\t\t\t// get user data\n\t\t\t$user_data = $this->FinAdvApprove->Home->find('first', array('conditions' => array('Home.id' => $user_id),'fields' => array('email_address','first_name', 'last_name')));\n\t\t\t// get advance details\n\t\t\t$req_data = $this->FinAdvApprove->findById($adv_id, array('fields' => 'amount','purpose', 'req_date', 'description','TskCustomer.company_name'));\n\t\t\t$vars = array('name' => $user_data['Home']['first_name'].' '.$user_data['Home']['last_name'], 'purpose' => $req_data['FinAdvApprove']['purpose'], 'desc' => $req_data['FinAdvApprove']['description'], 'amt' => $req_data['FinAdvApprove']['amount'], 'remarks' => $this->request->query['remark'], 'status' => $st_msg, 'req_date' => $req_data['FinAdvApprove']['req_date'],'employee' => $user_data['Home']['first_name'].' '.$user_data['Home']['last_name'],'client' => $req_data['TskCustomer']['company_name']);\n\t\t\t// notify employee\t\t\t\t\t\t\n\t\t\tif(!$this->send_email('My PDCA - Your advance request is '.$st_msg.' by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name')), 'notify_advance', '[email protected]', $user_data['Home']['email_address'],$vars)){\t\t\n\t\t\t\t// show the msg.\t\t\t\t\t\t\t\t\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in sending the mail to user...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\n\t\t\t}else{\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t// get the superiors\n\t\t\t$this->loadModel('Approval');\n\t\t\t// if record approved\n\t\t\tif($status == 'A'){\t\t\t\t\t\n\t\t\t\t$approval_data = $this->Approval->find('first', array('fields' => array('level2','auth_amount_l2'), 'conditions'=> array('Approval.app_users_id' => $user_id, 'type' => 'A')));\n\t\t\t\t// make sure level 2 is not empty\n\t\t\t\tif(!empty($approval_data['Approval']['level2'])){\n\t\t\t\t\t// check level 2 is not empty and its not the same user\n\t\t\t\t\tif($approval_data['Approval']['level2'] != $this->Session->read('USER.Login.id')){ \t\n\t\t\t\t\t\t// get superior level 2 details\t\t\t\t\n\t\t\t\t\t\t$superior_data = $this->FinAdvApprove->Home->find('first', array('conditions' => array('Home.id' => $approval_data['Approval']['level2']),'fields' => array('email_address','first_name', 'last_name')));\n\t\t\t\t\t\t$data = array('fin_advance_id' => $adv_id, 'created_date' => $this->Functions->get_current_date(), 'app_users_id' => $approval_data['Approval']['level2']);\n\t\t\t\t\t\t// save leve 2 if found\n\t\t\t\t\t\t$this->FinAdvApprove->FinAdvStatus->id = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// make sure not duplicate status exists\n\t\t\t\t\t\t$this->check_duplicate_status($adv_id, $approval_data['Approval']['level2'], 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($this->FinAdvApprove->FinAdvStatus->save($data, true, $fieldList = array('fin_advance_id','created_date','app_users_id'))){\t\n\t\t\t\t\t\t\t$this->check_duplicate_user($adv_id, $approval_data['Approval']['level2']);\n\t\t\t\t\t\t\t// save adv. users\n\t\t\t\t\t\t\t$adv_user_data = array('fin_advance_id' => $adv_id, 'app_users_id' => $approval_data['Approval']['level2']);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->FinAdvApprove->FinAdvUser->id = '';\n\t\t\t\t\t\t\t$this->FinAdvApprove->FinAdvUser->save($adv_user_data, true, $fieldList = array('fin_advance_id','app_users_id'));\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in saving superior status...', 'default', array('class' => 'alert alert-error'));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// update advance status when l2 approves\n\t\t\t\t\t\t$this->FinAdvApprove->id = $adv_id;\n\t\t\t\t\t\t$this->FinAdvApprove->saveField('is_approve', 'Y');\n\t\t\t\t\t\t// send mail to finance manager\n\t\t\t\t\t\t$this->notify_finance($user_data, $req_data);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// update advance status\n\t\t\t\t\t$this->FinAdvApprove->id = $adv_id;\n\t\t\t\t\t$this->FinAdvApprove->saveField('is_approve', 'Y');\n\t\t\t\t\t// send mail to finance manager\n\t\t\t\t\t$this->notify_finance($user_data, $req_data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t\t// update advance status\n\t\t\t\t$this->FinAdvApprove->id = $adv_id;\n\t\t\t\t$this->FinAdvApprove->saveField('is_approve', 'R');\n\t\t\t\t\t\n\t\t\t\t$approval_data = $this->Approval->find('first', array('fields' => array('level1','level2'), 'conditions'=> array('Approval.app_users_id' => $user_id, 'type' => 'A')));\n\t\t\t\tif($approval_data['Approval']['level1'] == $this->Session->read('USER.Login.id')){\n\t\t\t\t\t$mail_user = $approval_data['Approval']['level2'];\n\t\t\t\t}else{\n\t\t\t\t\t$mail_user = $approval_data['Approval']['level1'];\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t// get superior data\n\t\t\t\t$superior_data = $this->FinAdvApprove->Home->find('first', array('conditions' => array('Home.id' => $mail_user),'fields' => array('email_address','first_name', 'last_name')));\n\t\t\t\t// make sure superior available\n\t\t\t\tif(!empty($superior_data)){\t\t\t\t\n\t\t\t\t\t$vars = array('name' => $superior_data['Home']['first_name'].' '.$superior_data['Home']['last_name'], 'purpose' => $req_data['FinAdvApprove']['purpose'], 'desc' => $req_data['FinAdvApprove']['description'], 'amt' => $req_data['FinAdvApprove']['amount'], 'remarks' => $this->request->query['remark'], 'status' => $st_msg, 'req_date' => $req_data['FinAdvApprove']['req_date'],'employee' => $user_data['Home']['first_name'].' '.$user_data['Home']['last_name'],'client' => $req_data['TskCustomer']['company_name']);\n\t\t\t\t\t// notify employee\t\t\t\t\t\t\n\t\t\t\t\tif(!$this->send_email('My PDCA - Advance request is rejected by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name')), 'notify_advance', '[email protected]', $superior_data['Home']['email_address'],$vars)){\t\t\n\t\t\t\t\t\t// show the msg.\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in sending the mail to user...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\n\t\t\t\t\t}else{\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// forward to finance team\t\t\t\t\n\t\t\t\t$this->notify_finance($user_data, $req_data, 1);\t\t\t\t\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Advance request is '.$st_msg.' successfully', 'default', array('class' => 'alert alert-success'));\n\t\t}else{\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert-error\">&times;</button>Problem in updating the status', 'default', array('class' => 'alert alert-error'));\t\t\n\t\t}\n\t\t$this->redirect('/finadvapprove/');\t\n\t}" ]
[ "0.53869826", "0.5303477", "0.5282215", "0.52747905", "0.5157121", "0.507684", "0.5073884", "0.50166917", "0.5013608", "0.48790282", "0.4876594", "0.48608246", "0.48524415", "0.48471943", "0.48466998", "0.48274335", "0.48246792", "0.48224527", "0.48127168", "0.4798077", "0.47903225", "0.47734806", "0.47711253", "0.47652185", "0.47544575", "0.4729348", "0.47274315", "0.47014502", "0.46910354", "0.46855205", "0.4681462", "0.46766618", "0.4676113", "0.46732092", "0.4665751", "0.46533105", "0.4653253", "0.46473306", "0.46456534", "0.46352535", "0.46341157", "0.4625387", "0.46179566", "0.46148422", "0.4611193", "0.46008867", "0.46008018", "0.4598395", "0.45941854", "0.45914578", "0.4582974", "0.45735383", "0.45621383", "0.45586148", "0.45536637", "0.45443282", "0.45439658", "0.45412624", "0.45379892", "0.4530011", "0.4525691", "0.45251778", "0.45135438", "0.4509924", "0.45082256", "0.45080486", "0.45012003", "0.45005774", "0.4493113", "0.4491206", "0.44910297", "0.44864854", "0.4483539", "0.44774464", "0.44767845", "0.44759044", "0.44723478", "0.44703114", "0.44685438", "0.44652534", "0.4464665", "0.44639683", "0.44632944", "0.4462207", "0.44577643", "0.44549078", "0.44531626", "0.44504523", "0.44503152", "0.44455218", "0.44394654", "0.443809", "0.4437997", "0.44347936", "0.44334266", "0.44326553", "0.44316873", "0.44307432", "0.44280884", "0.4427232" ]
0.61909103
0
Allows you to download advertiser information by specifying the advertiser category. These are the same categories that you see when looking for advertisers in the Programs section of the Publisher Dashboard.
public function merchantByCategory($categoryId) { $this->setHeader(self::HEADER_TYPE_BEARER); $this->setLink(self::MERCHANT_BY_CATEGORY.'/'.$categoryId); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); //@todo Implementation here return $categoryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(CampaignCategory $campaignCategory)\n {\n //\n }", "public function advertizeAction() {\n\t\t// Init variables\n\t\t$result = '';\n\t\t$yaml = new sfYamlParser();\n\n\t\t// Get settings\n\t\t$settings = $this->configurationManager->getConfiguration('Settings');\n\n\t\t$listOfUids = explode(',', $settings['listOfUid']);\n\t\tforeach ($listOfUids as $uid) {\n\t\t\t$feed = $this->feedRepository->findByUid($uid);\n\n\t\t\t$configuration = $yaml->parse($feed['configuration']);\n\t\t\t$this->checkConfiguration($configuration);\n\n\t\t\t$feedUrl = $configuration['baseURL'];\n\n\t\t\t/** @var $contentObject tslib_cObj */\n\t\t\t$config['returnLast'] = 'url';\n\t\t\t$config['parameter.']['data'] = 'leveluid:0';\n\t\t\t$config['additionalParams'] = '&type=9090&uid=' . $uid;\n\t\t\t$contentObject = $this->configurationManager->getcontentObject();\n\t\t\t$feedUrl =\n\n\t\t\t$result .= '<link rel=\"alternate\"\n\t\t\t\ttype=\"application/atom+xml\"\n\t\t\t\ttitle=\"' . $feed['title'] . '\"\n\t\t\t\thref=\"' . $contentObject->typolink('', $config) . '\" />' . chr(10);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function show(AwardCategory $awardCategory)\n {\n //\n }", "public function invokeAdvertisements()\r\n {\r\n if (!isset($_GET['adverisements'])) {\r\n\r\n $advertisements = $this->model->getAdvertisements();\r\n include 'view/advertisements.php';\r\n }\r\n }", "public function show($category)\n {\n }", "public function show(booksCategory $booksCategory)\n {\n //\n }", "function wc_marketplace_category() {\n global $wmp;\n $wmp->output_report_category();\n }", "public static function cmac_get_selected_banner_info($campaign)\n {\n if( $campaign['banner_display_method'] == 'selected' )\n {\n $bannerInfo = self::cmac_get_banner_info($campaign, $campaign['selected_banner_id']);\n return $bannerInfo;\n }\n\n if( $campaign['banner_display_method'] == 'random' )\n {\n $random_banner_index = self::cmac_get_random_banner_index($campaign);\n $bannerInfo = self::cmac_get_banner_info($campaign, $random_banner_index);\n return $bannerInfo;\n }\n\n $bannerInfo = apply_filters('cmac_additional_display_method', $campaign);\n return $bannerInfo;\n }", "function ciniki_artcatalog_categoryDetails($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'type'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Type'),\n 'category'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Category'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.categoryDetails'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Get the settings for the artcatalog\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash'); \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_artcatalog_settings', \n 'tnid', $args['tnid'], 'ciniki.artcatalog', 'settings', 'category');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['settings']) ) {\n $settings = $rc['settings'];\n } else {\n $settings = array();\n }\n \n $fields = array('synopsis', 'description');\n $details = array();\n foreach($fields as $f) {\n $details[$f] = '';\n if( isset($args['type']) && $args['type'] > 0\n && isset($settings['category-' . $f . '-' . $args['type'] . '-' . $args['category']]) ) {\n $details[$f] = $settings['category-' . $f . '-' . $args['type'] . '-' . $args['category']];\n } elseif( isset($settings['category-' . $f . '-' . $args['category']]) ) {\n $details[$f] = $settings['category-' . $f . '-' . $args['category']];\n }\n }\n\n return array('stat'=>'ok', 'details'=>$details);\n}", "public function exportCategoryAction($category) {\n\t\t$configKey = 'category-' . $category;\n\t\t$exportMapping = $this->exportMapping[$configKey];\n\t\t$exportConfiguration = $this->exportConfiguration[$configKey];\n\n $year = 2016;\n $begin = $this->getQuarterStart($year, 1);\n $end = $this->getQuarterEnd($year, 4);\n\n\t\tif (preg_match('/[^0-9]/', $category)) {\n\t\t\tthrow new \\Exception('Invalid characters in category!');\n\t\t}\n\n\t\t$this->controllerContext->getResponse()->setHeader('Content-Type', 'text/csv');\n\t\t$this->controllerContext->getResponse()->setHeader('Content-Type', 'text/plain');\n\n\t\t$tags = $this->accountTagRepository->findByTagLike('BMD:' . $category . '%');\n $taggedAccounts = $this->accountRepository->findByTags($tags);\n\n $splits = $this->splitRepository->findByPostDateRangeAndAccount($begin, $end, $taggedAccounts);\n\n\t\t$exportSplits = $this->processSplits($splits, $exportConfiguration, $exportMapping);\n\n $result = '';\n $result .= $this->bmdExportHead($exportMapping);\n $result .= $this->bmdExport($exportSplits, $exportMapping, $exportConfiguration);\n return $result;\n\t}", "public function fetchCategory(){\n \t$ch = curl_init();\n //getting specific orders after $time\n $encode = $this->urlPath.\"/rest/V1/categories\";\n\t\t\n curl_setopt($ch, CURLOPT_URL, $encode);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $headers = array();\n $headers[] = 'Authorization: Bearer '.$this->apiKey;\n $headers[] = 'Content-Type: application/json';\n //$headers[] = 'Accept: application/json';\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $result = curl_exec($ch);\n\n curl_close ($ch);\n\n\n\n\n return $result;\n\t\t\t \n }", "public function getAdvertiser(Request $request){\n return $this->repository->find((int) $request->route()->parameter('id'));\n }", "function showCategory($category){\n \n //echo 'gathering datas about ' . $category;\n \n $exercices = getExerciceNames($category);\n\n require './views/category.php';\n\n }", "function select_fitness_apk_data() {\n\n global $connection;\n\n $sql = \"SELECT app.description, app.app_name, app.developer, category.name, apk.version, apk.link, apk.size, app_image.link_img, app_image.alt\n FROM app INNER JOIN apk ON app.app_id=apk.app_id INNER JOIN app_image on app_image.app_id=apk.app_id INNER JOIN category on category.cat_id=app.cat_id \n WHERE category.cat_id=2\";\n\n return $connection->query($sql);\n }", "public function infoCategory($category_id){\n\n \t$ch = curl_init();\n //getting specific orders after $time\n $encode = $this->urlPath.\"/rest/V1/categories/\" . $category_id;\n\t\t\n curl_setopt($ch, CURLOPT_URL, $encode);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $headers = array();\n $headers[] = 'Authorization: Bearer '.$this->apiKey;\n $headers[] = 'Content-Type: application/json';\n //$headers[] = 'Accept: application/json';\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $result = curl_exec($ch);\n\n curl_close ($ch);\n\n\n\n\n return $result;\n\t\t\t \n }", "public function getCategory() {}", "function comic_archive($filter = 'default') { echo get_comic_url('archive', null, $filter); }", "public function show(Category $category){\n \n }", "function catagoryStatistics($catId, $clientKey){\n\t\n\t$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, \"https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&id=\".$catId.\"&key=\".$clientKey.\"\");\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n$output = curl_exec($ch);\necho curl_error($ch);\ncurl_close($ch);\n \n$searchResponse = json_decode($output,true);\n\t\n\tforeach ($searchResponse['items'] as $searchResult) {\n\t//$videoId = $searchResult['id'];\n\t$catChannelId=$searchResult['snippet']['channelId'];\n\t$title=$searchResult['snippet']['title'];\n\treturn array ('catTitle'=>$title, 'catChannelId'=>$catChannelId);\n\t\n\t}\n\n}", "public function show(Advertisement $advertisement)\n {\n //\n }", "public function show(Advertisement $advertisement)\n {\n //\n }", "public function show(Advertisement $advertisement)\n {\n //\n }", "public function show(Category $category)\n {\n }", "public function show(Ads $ads)\n {\n //\n }", "public function show(Category $categrory)\n {\n //\n }", "function get_category_feed_link($cat, $feed = '')\n {\n }", "public function show(category $category)\n {\n //\n }", "public function downloadtxtAction()\n {\n $googleCategoriesCount = Mage::getModel('googlemerchants/googlecategory')->getCollection()->count();\n if ($googleCategoriesCount != 0) {\n $this->_redirect('adminhtml/googlemerchants/index');\n }\n $this->_initAction();\n $this->renderLayout();\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "public function show(Category $category)\n {\n //\n }", "function showCategory()\r\n {\r\n }", "public function show(CourseCategory $courseCategory)\n {\n //\n }", "public function show(Category $Category)\n {\n //\n }", "public function getAdvertWithCat(array $categoryNames){\n $qb = $this->createQueryBuilder('a'); // --> Select * les annonces de la table 'Advert'\n // $qb->leftJoin('a.applications', 'app')->addSelect('app');\n $qb->innerJoin('a.categories', 'c')->addSelect('c');\n\n // je decide de filtrer sur le nom des mes categories\n $qb->where($qb->expr()->in('c.name', $categoryNames));\n\n return $qb->getQuery()->getResult();\n }", "function ciniki_artcatalog_categoryList($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.categoryList'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Load the status maps for the text description of each status\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'maps');\n $rc = ciniki_artcatalog_maps($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $maps = $rc['maps'];\n\n //\n // Get the settings for the artcatalog\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash'); \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_web_settings', \n 'tnid', $args['tnid'], 'ciniki.web', 'settings', 'page-gallery-artcatalog');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['settings']) ) {\n $settings = $rc['settings'];\n } else {\n $settings = array();\n }\n\n if( isset($settings['page-gallery-artcatalog-split']) \n && $settings['page-gallery-artcatalog-split'] == 'yes' \n ) {\n $strsql = \"SELECT DISTINCT type, type AS name, category \"\n . \"FROM ciniki_artcatalog \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY type, category COLLATE latin1_general_cs, category \"\n . \"\";\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.artcatalog', array(\n array('container'=>'types', 'fname'=>'type', 'name'=>'type',\n 'fields'=>array('number'=>'type', 'name'),\n 'maps'=>array('name'=>$maps['item']['type'])),\n// 'maps'=>array('name'=>array('1'=>'Paintings', '2'=>'Photographs', '3'=>'Jewelry', '4'=>'Sculptures', '5'=>'Fibre Arts', '6'=>'Crafts', '8'=>'Pottery'))),\n array('container'=>'categories', 'fname'=>'category', 'name'=>'category',\n 'fields'=>array('type', 'name'=>'category')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['types']) ) {\n return array('stat'=>'ok', 'types'=>array());\n }\n return array('stat'=>'ok', 'types'=>$rc['types']);\n } else {\n $strsql = \"SELECT DISTINCT '0' AS type, category \"\n . \"FROM ciniki_artcatalog \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY category COLLATE latin1_general_cs, category \"\n . \"\";\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.artcatalog', array(\n array('container'=>'categories', 'fname'=>'category', 'name'=>'category',\n 'fields'=>array('type', 'name'=>'category')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['categories']) ) {\n return array('stat'=>'ok', 'categories'=>array());\n }\n return array('stat'=>'ok', 'categories'=>$rc['categories']);\n }\n}", "public function show(\\App\\Category $category)\n {\n //\n }", "function category($categoryName, $categoryId, $page)\n {\n $sort = Input::get('sortOrder') == null ? \"BestMatch\" : Input::get('sortOrder');\n $checkedInput = $this->checkedChecked(Input::get());\n $breadCramb = $this->model->getBreadCramb($categoryId);\n\n $filterUrl = $this->generateFilterUrl(Input::get());\n $ebayData = $this->model->getProductsByCategory(\n $categoryId, 42, $page, Input::get(), $sort\n );\n $similarCategories = $this->model->getSimilarCategory($categoryId);\n $filterData = $this->model->getFiltersForCategory($categoryId);\n\n $resultsAmount = $ebayData->totalEntries;\n if ($ebayData->totalPages > 100) {\n $totalPages = 100;\n } else {\n $totalPages = $ebayData->totalPages;\n }\n $pagesAvailable = Util::getPaginationList($page, $totalPages);\n $paginationResult = Util::getLinksForPagination($pagesAvailable, \"category\", $categoryName, $page, $this->siteslug, $filterUrl, $categoryId);\n $filtersForTitle = $this->model->getFiltersForTitle($checkedInput);\n $pages = $paginationResult['pages'];\n $pageNext = $paginationResult['pageNext'];\n\n $categoryData['page'] = $page;\n $categoryData['id'] = $categoryId;\n $categoryData['title'] = $categoryName;\n $categoryData['totalResults'] = $resultsAmount;\n\n if ($page == 1) {\n $pageForTitle = '';\n } else {\n $pageForTitle = ' ' . 'עמוד' . ' ' . $page;\n }\n// $this->title = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . 'צי\\'פי קניות ברשת';\n /*if (is_null($sort)) {\n $sortForTitle = '';\n } else {\n $sortForTitle = '-' . $sort;\n }*/\n if (Lang::getLocale() == 'he') {\n $this->shopName = Lang::get('general.amazon');\n } elseif (Lang::getLocale() == 'en') {\n $this->shopName = 'amazon';\n };\n //dd($filtersForTitle);\n $this->title = $categoryData['title'] . ' - ' . $breadCramb['category'] . $filtersForTitle . ' - ' . $categoryData['page'] . ' - ' . $this->shopName;\n $this->description = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . \"שירות לקוחות בעברית,תשלום ללא כ.א בינלאומי,למעלה ממיליארד מוצרים בעברית\";\n //dd($categoryData);\n $productBaseRoute = \"/{$this->siteslug}/product\";\n return view(\"ebay.category\", [\n 'pagination' => $pages,\n 'pageNext' => $pageNext,\n 'categoryData' => $categoryData,\n 'categories' => $this->categories,\n 'productBase' => $productBaseRoute,\n 'siteslug' => $this->siteslug,\n 'ebayData' => $ebayData->products,\n 'filterData' => $filterData,\n 'checkedInput' => $checkedInput,\n 'breadCramb' => $breadCramb,\n 'title' => $this->title,\n 'description' => $this->description,\n 'page' => $page,\n 'similarCategories' => $similarCategories,\n ]);\n }", "public function show(PageCategory $pageCategory)\n {\n \n\n\n }", "function advert($type){\n\t//storieshead\n\t//storiesmid\n\t//searchhead\n\t//searchmid\n\t//searchend\n\t//storyhead\n\t//storymid (between comments)\n\t\t//subtypes\n\t\t\t//widesky\n\t\t\t//leader\n\t\t\t//mrec\n\t\t\t//lrec\n\t$client=googleadclient();\n\tif($type=='storieshead' || $type=='searchhead'){\n\t\treturn <<<END\n<div class=\"vertban\">\n<script type=\"text/javascript\"><!--\ngoogle_ad_client = \"$client\";\n/* widesky */\ngoogle_ad_slot = \"0722690803\";\ngoogle_ad_width = 160;\ngoogle_ad_height = 600;\n//-->\n</script>\n<script type=\"text/javascript\"\nsrc=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n</script>\n</div>\nEND;\n\t}\n\telseif($type=='false' || $type=='FALSE' || $type=='none')return '';\n\telse return <<<END\n<div class=\"horban\">\n\t<script type=\"text/javascript\"><!--\n\t\tgoogle_ad_client = \"ca-pub-3925489771614158\";\n\t\t/* leader */\n\t\tgoogle_ad_slot = \"3707635821\";\n\t\tgoogle_ad_width = 728;\n\t\tgoogle_ad_height = 90;\n\t\t//-->\n\t</script>\n\t<script type=\"text/javascript\"\n\t\tsrc=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n\t</script>\n</div>\nEND;\n}", "function get_category_rss_link($display = \\false, $cat_id = 1)\n {\n }", "public function getCategory($account_id, $export = '') {\n if ($export != '') {\n $this->db->select('name,support_emails,supplier_user');\n } else {\n $this->db->select('*');\n }\n $this->db->where('account_id', $account_id);\n $this->db->where('archive', 1);\n $res = $this->db->get('categories');\n $result = $res->result_array();\n\n // csv and pdf code\n if ($export == 'CSV') {\n\n $this->load->dbutil();\n $this->load->helper('download');\n force_download(date('d/m/Y Gis') . '.csv', $this->dbutil->csv_from_result($res));\n } elseif ($export == 'PDF') {\n $arrFields = array(\n array('strName' => 'Category Name', 'strFieldReference' => 'name', 'arrFooter' => array('booTotal' => false, 'booTotalLabel' => false, 'intColSpan' => 0)),\n array('strName' => 'Alert/Reminder Email Address', 'strFieldReference' => 'support_emails', 'arrFooter' => array('booTotal' => false, 'booTotalLabel' => false, 'intColSpan' => 0))\n );\n\n $this->outputPdfFile(date('d/m/Y Gis') . '.pdf', $arrFields, $res->result_array());\n }\n\n if ($result) {\n foreach ($result as $key => $value) {\n $arrCustomFields = json_decode($value['custom_fields']);\n if ($arrCustomFields) {\n\n $this->db->where_in('id', $arrCustomFields);\n $query = $this->db->get('custom_fields');\n $my_arr = $query->result();\n } else {\n $my_arr = array();\n }\n\n foreach ($my_arr as $record) {\n $result[$key][$record->field_name] = 'YES';\n }\n }\n\n return $result;\n } else {\n return FALSE;\n }\n }", "public function getAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Game_Service_Category::getCategory(intval($id));\r\n\t\tif(!$info) $this->output(-1, '操作失败.');\r\n\t\t$this->output(0, '', $info);\r\n\t}", "public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/category/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the answer into a php object\n\t\t$categories = json_decode($output, true);\n\n\t\treturn $categories;\n\t}", "public function show(Campaign $campaign)\n\t\t{\n\t\t\t \n\t\t}", "public function getAliasByID($categoryID){\n\n\t}", "function getSocialNetworksByCategory($thisCategoryId) {\n\t\t$url = $this->apiURL . \"sites/\" . $this->yourID . \"/\" . $this->yourAPIKey . \"/\" . $thisCategoryId;\n\t\treturn $this->_curl_get($url);\n\t}", "public function show(Category $category)\n\t{\n\t\t//\n\t}", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "private function getShopDetail($url, $category)\n {\n $html = new simple_html_dom();\n @$html->load_file($url);\n\n $contentDiv = $html->find('div[id=content]', 0);\n\n $shopProperties = array();\n $shopProperties['category'] = \"$category \";\n $shopProperties['name'] = $this->getInnerText($contentDiv->find('div[class=shop-detail] h1', 0));\n $shopProperties['score'] =\n str_replace('</strong>', '',\n str_replace('<strong>', '',\n str_replace('<span>', ' ',\n str_replace('</span>', '', $this->getInnerText($contentDiv->find('div[class=score]', 0)))\n )\n )\n );\n\n $badges = array();\n foreach ($contentDiv->find('h6') as $badge) {\n $badges[] = $this->getInnerText($badge);\n }\n $shopProperties['badges'] = $badges;\n $deliveryDetail = $contentDiv->find('ul[class=\"delivery-detail\"]', 0);\n if ($deliveryDetail != null) {\n $shopProperties['deliveryOk'] = $this->getInnerText($deliveryDetail->find('span', 0));\n $shopProperties['deliveryTenDays'] = $this->getInnerText($deliveryDetail->find('span', 1));\n $shopProperties['deliveryDeliveryTime'] =\n str_replace('<small>', ' ',\n str_replace('</small>', '', $this->getInnerText($deliveryDetail->find('span', 2)))\n );\n }\n\n $reviews = $this->getInnerText($contentDiv->find('ul[id=menu] li[class=active] a', 0));\n preg_match_all('/\\((.*)\\)/U', $reviews, $reviewsCount);\n\n if (!empty($reviewsCount[1])) {\n $shopProperties['reviews'] = $reviewsCount[1][0];\n }\n\n\n $html->clear();\n $html->load_file(substr($url, 0, -8) . 'informace/');\n\n $element = $html->find('div[class=shopInfo] td[class=full] p', 0);\n $shopProperties['description'] = $this->getInnerText($element);\n\n $tables = $html->find('div[class=shopInfo] table td p');\n for ($i = 0; $i < count($tables); $i++) {\n switch ($tables[$i]->innertext) {\n case 'Provozovatel obchodu:':\n case 'Prevádzkovateľ obchodu:':\n $shopProperties['owner'] = $this->getInnerText($tables[$i + 1]);\n break;\n case 'Telefon:':\n case 'Telefón:':\n $shopProperties['phone'] = $this->getInnerText($tables[$i + 1]);\n break;\n case 'Telefon pro objednávky:':\n case 'Telefón pre objednávky:':\n $shopProperties['phoneOrders'] = $this->getInnerText($tables[$i + 1]);\n break;\n case 'Email:':\n $shopProperties['email'] = $this->getInnerText($tables[$i + 1]->find('a', 0));\n break;\n case 'Email pro objednávky:':\n case 'Email na objednávky:':\n $shopProperties['emailOrders'] = $this->getInnerText($tables[$i + 1]->find('a', 0));\n break;\n case 'Státy, kam zasíláme:':\n case 'Štáty, kam zasielame:':\n $shopProperties['shippingTo'] = $this->getInnerText($tables[$i + 1]);\n break;\n }\n }\n\n return $shopProperties;\n }", "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t//游戏库分类列表\n\t\tlist(, $categorys) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>1,'status'=>1));\n\t\t$categorys_id = Common::resetKey($categorys, 'id');\n\t\t$this->assign('categorys', $categorys);\n\t\t\n\t\t$name = $this->getInput('name');\n\t\t$category_id = intval($this->getInput('category_id'));\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($name) {\n\t\t\t$search['name'] = $name;\n\t\t\t$params['name'] = array('LIKE', $name);\n\t\t}\n\t\tif($category_id) {\n\t\t\t$search['category_id'] = $category_id;\n\t\t}\t\t\n\t\t//所有首页推荐广告游戏id\n\t\tlist(, $idx_games) = Client_Service_Ad::getAdGames(array('ad_type'=>$this->ad_type));\n\t\t$idx_games = Common::resetKey($idx_games, 'link');\n\t\t$this->assign('ad_games', $idx_games);\n\t\t$idx_games = array_keys($idx_games);\n\t\t\n\t\t//获取广告游戏的分类信息\n\t\tif($idx_games){\n\t\t\t$tmp = $category_games = $client_games = array();\n\t\t\t$adgame_categorys = Resource_Service_Games::getIdxGameResourceCategoryBy(array('game_id'=>array('IN', $idx_games)));//getIdxGameResourceCategorys();\n\t\t\t\n\t\t\tforeach($adgame_categorys as $key=>$value){\n\t\t\t\t$tmp[$value['game_id']][] = $value['category_id'];\n\t\t\t}\n\t\t\t$category_title = array();\n\t\t\tforeach($tmp as $key=>$val){\n\t\t\t\tforeach($val as $key1=>$val1){\n\t\t\t\t\t$category_title[$key][] = $categorys_id[$val1]['title'];\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//获取本地所有游戏\n\t\t\tif ($category_id) {\n\t\t\t\t$game_ids = Resource_Service_Games::getIdxGameResourceCategoryBy(array('game_id'=>array('IN', $idx_games), 'status'=>1, 'category_id'=>$category_id,'game_status'=>1));\n\t\t\t\t$tmp = Common::resetKey($game_ids, 'game_id');\n\t\t\t\t$tmp = array_keys($tmp);\n\t\t\t\tif($game_ids){\n\t\t\t\t\t$params['id'] = array('IN',$tmp);\n\t\t\t\t} else {\n\t\t\t\t\t$params['create_time'] = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t$params['id'] = array('IN',$idx_games);\n\t\t\t}\n\t\t\t\n\t\t\tlist($total, $games) = Resource_Service_Games::search($page, $this->perpage, $params);\n\t\t\tforeach($games as $key=>$value){\n\t\t\t\t$info[] = Resource_Service_Games::getGameAllInfo(array('id'=>$value['id']));\n\t\t\t}\n\t\t\t$oline_versions = common::resetkey($info, 'id');\n\t\t}\n\t\t\n\n\t $this->assign('subjects', $subjects);\n\t\t$this->assign('ad_type', $this->ad_type);\n\t\t$this->assign('category_title', $category_title);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('games', $games);\n\t\t$this->assign('oline_versions', $oline_versions);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t}", "public function index(Category $category)\n {\n $buyers = $this->buyerService->getCategoryBuyers($category);\n\n return $this->showAll($buyers);\n }", "public function getCategory(): string;", "function getDailyDeals(){\n\n global $flipkart_deals_page_transient_lifetime;\n $api_url = 'https://affiliate-api.flipkart.net/affiliate/offers/v1/dotd/json';\n\n function callFlipkartFeedsAPI($api_url){\n\n static $api_call_counter = 1;\n\n $api_response = wp_remote_get( $api_url ,\n array( 'timeout' => 10,\n 'headers' => array( 'Fk-Affiliate-Id' => 'couponmac',\n 'Fk-Affiliate-Token'=> '6eb39690116842ad937da289fa4e6e74' )\n ));\n\n if( is_array($api_response) ) {\n\n $api_response = $api_response['body'];\n $api_response = json_decode($api_response, true);\n\n set_transient( 'flipkart_daily_deals', $api_response, $flipkart_deals_page_transient_lifetime );\n\n return $api_response;\n }else{\n $api_call_counter++;\n if($api_call_counter>5){\n return '';\n }\n $api_response = callFlipkartFeedsAPI($api_url);\n return $api_response;\n }\n }\n\n return callFlipkartFeedsAPI($api_url);\n }", "public function getCategory();", "public function getCategory();", "protected function _getCategoryDataContent() {\n\n $categoryName = Mage::registry('current_category')->getName();\n $_cat = new Mage_Catalog_Block_Navigation();\n $curent_cat = $_cat->getCurrentCategory();\n $curent_cat_id = $curent_cat->getId();\n $parentId = Mage::getModel('catalog/category')->load($curent_cat_id)->getParentId();\n $parent = Mage::getModel('catalog/category')->load($parentId);\n $categorydaddy = $parent->getName();\n\n $category_id = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();\n $category = Mage::getModel('catalog/category')->load($category_id);\n $products = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSelect('*')\n ->addCategoryFilter($category)\n ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)\n ->load();\n\n $cartsku = array();\n $data = array();\n $impression = [];\n $impressions = [];\n $count = 0;\n $end = 32;\n foreach ($products as $item) {\n $count++;\n $cartsku[] = $item->getSku();\n $impression['id'] = $item->getSku();\n $impression['name'] = $item->getName();\n $impression['brand'] = $item->getBrand();\n $impression['category'] = $categoryName;\n $impression['list'] = $categoryName;\n $impression['position'] = $count;\n $impressions[] = $impression;\n if ($count == $end) break;\n }\n\n $data['event'] = 'category';\n\n $google_tag_params = array();\n $google_tag_params['ecomm_pagetype'] = 'category';\n $google_tag_params['ecomm_category'] = $categoryName;\n $google_tag_params['ecomm_daddy'] = $categorydaddy;\n $google_tag_params['ecomm_prodid'] = $cartsku;\n $google_tag_params['impressions'] = $impressions;\n\n if($this->IsReturnedCustomer()){\n $google_tag_params['returnCustomer'] = 'true';\n }\n else {\n $google_tag_params['returnCustomer'] = 'false';\n }\n $data['google_tag_params'] = $google_tag_params;\n\n $data = array(\n 'event' => 'category',\n 'google_tag_params' => $google_tag_params\n );\n\n /* Facebook Conversion API Code */\n $custom_data = array(\n \"content_ids\" => $cartsku,\n \"content_type\" => \"product\",\n \"content_category\" => $categoryName,\n );\n $this->createFacebookRequest(\"ViewCategory\", [], [], $custom_data);\n /* End Facebook Conversion API Code */\n \n return $data;\n }", "public function show(CustomerCategory $customerCategory)\n {\n //\n }", "public function get($category_id);", "public function bikecateraseAction(){\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeCat.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_cntBikeCat.php');\n\t\t\n\t\t$p = $this -> getRequest() -> getParams();\n\t\t$lang = $this -> lang;\n\t\t\n\t\t$bikeCatID = null;\n\t\tif (isset($p['bcid'])){\n\t\t\t$bikeCatID = $p['bcid'];\n\t\t}\n\t\t\n\t\tif ($bikeCatID != null){\n\t\t\t\t\n\t\t\t//erase bike cat completely\n\t\t\tif (isset($p['bikeCatErase2'])){\n\t\t\t\t$p['bikeCatID'] = $bikeCatID;\n\t\t\t\t$this -> erasebikecatAction($p);\n\t\t\t}\n\t\t\t\t\n\t\t\t$bikeCat = db_selBikeCat(array('bikeCatID'=>$bikeCatID));\n\t\t\tif (($bikeCat != false) && is_array($bikeCat) && (count($bikeCat) > 0)){\n\t\t\t\t$bikeCat = $bikeCat[0];\n\t\t\t\t\n\t\t\t\t//select all bike advertisment which reference to this bike cat\n\t\t\t\t$cntBikeCat = db_cntBikeCat(array('bikeCat'=>$bikeCat['bikeCatID']\n\t\t\t\t\t\t\t\t\t\t\t\t//, 'p' => true\n\t\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\n\t\t\t\tif ($cntBikeCat != false){\n\t\t\t\t\t$cntBikeCat = $cntBikeCat[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this -> view -> bikeCat = $bikeCat;\n\t\t\t\t$this -> view -> cntBikeCat = $cntBikeCat;\n\t\t\t}else{\n\t\t\t\t$this -> view -> error = $lang['AERR_36'];\n\t\t\t\t$this -> _forward('bikecat');\n\t\t\t}\n\t\t}else{\t\t\t\n\t\t\t$this -> view -> error = $lang['AERR_36'];\n\t\t\t$this -> _forward('bikecat');\n\t\t}\n\t}", "public function show(Campaign $campaign)\n {\n //\n }", "public function show($categoria)\n {\n\n }", "public function getAdvertisers(Request $request){\n return $this->repository->getAdvertisers($request->input('limit', env('PAGINATION_LIMIT', 10)));\n }", "public function getCatalog() {}", "function getAds($per_page){\n // this function for get ads by category\n if(isset($_GET['cat_id'])){\n global $con;\n if(isset($_GET['page'])){\n $page = $_GET['page'];\n }\n else{\n $page = 1;\n }\n $start = ($page - 1) * $per_page;\n $cat_id = $_GET['cat_id'];\n // if p_cat != all then show ads in database by his p_cat number\n if($cat_id != 'all'){\n $query = $con->prepare(\"SELECT * FROM products where p_cat_id = '$cat_id' ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n // if p_cat = all then show all ads in database\n else{\n $query = $con->prepare(\"SELECT * FROM products ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n if($query->rowCount() > 0){\n while($result = $query->fetch(PDO::FETCH_ASSOC)){\n $product_id = $result['product_id'];\n $user_id = $result['user_id'];\n $product_title = $result['product_title'];\n $product_images = explode(\",\",$result['product_images']);\n $product_watch = $result['product_watch'];\n $product_status = $result['product_status'];\n $status_color = \"\";\n if($product_status == \"جديد\"){\n $status_color = \"orange\";\n }\n else if($product_status == \"إعلان\"){\n $status_color = \"blue\";\n }\n else{\n $status_color = \"violet\";\n }\n // get user name by user user_id\n $second_query = $con->prepare(\"SELECT * FROM users where user_id = '$user_id'\");\n $second_query->execute();\n $result2 = $second_query->fetch(PDO::FETCH_ASSOC);\n $user_name = $result2['username']; \n $user_image = $result2['user_image'];\n $last_login = $result2['last_login'];\n $class = 'offline';\n // for check if user is connect now\n if($last_login > time())\n $class = 'online';\n echo \"\n <div class='col-sm-6 col-lg-4'>\n <a href='show-ads.php?p_id=$product_id'>\n <div class='item'>\n <div class='ads-title row'>\n <div class='col-1 col-sm-2 col-md-2 col-lg-2 user-img'>\n <div class='img-box'\"; if($user_image != \"\") echo 'style=background-color:transparent'; echo \">\";\n if($user_image != \"\"){\n echo \"<img src='Profile/Layout/Images/users-images/$user_image' class='img-responsive' alt='$user_image'>\";\n }\n else{\n preg_match(\"/./u\",$user_name,$first_char);\n $first_char = strtoupper($first_char[0]);\n echo \"<span>$first_char</span>\";\n }\n echo \"<div class='user-connection $class'></div>\";\n echo \"</div>\n </div>\n <div class='col-9 col-sm-8 col-md-9 col-lg-8 user-info'>\n <div class='username'>\n <h6>\n $user_name\n </h6>\n <p>$product_title</p>\n </div>\n </div> \n <div class='col-2 col-sm-2 col-md-1 col-lg-2 watches'>\n <div class='watch'>\n $product_watch <i class='fa fa-eye'></i> \n </div>\n </div>\n\n </div>\n <div class='ads-image'>\n <img src='Layout/Images/products/$product_images[0]' class='img-responsive' alt='$product_images[0]'>\n <div class='product-type $status_color'>$product_status</div>\n </div>\n </div>\n </a>\n </div>\n \";\n }\n }\n else{\n echo \"\n <div class='no-ads'>\n <p>لايوجد اي إعلانات مضافة</p>\n </div>\n \";\n }\n }\n}", "public function show(categorie $categorie)\n {\n //\n }", "public function getAdvertsOfCategory($idCategory, $idSubategories = array()) {\n $predicates = 'b.id = '.$idCategory; \n if ($idSubategories != array()) {\n foreach($idSubategories as $id) {\n $predicates = $predicates.' OR b.id = '.$id;\n }\n }\n $query = $this->createQueryBuilder('a')\n ->select('a.id, a.name, a.short_desc, a.price, a.date_added, a.negotiation')\n ->join('a.category', 'b')\n ->where($predicates)\n ->getQuery();\n return $query->getResult();\n }", "public function actionIndex()\n {\n $searchModel = new AdvertiserApiSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getCategoryImage($categoryId)\n {\n //$AccentOpaque = array(\"15\",\"50\",\"51\",\"52\",\"57\");\n //$Williamsburg = array(\"26\",\"86\",\"87\",\"88\",\"93\"); \n //$Carolina = array(\"23\",\"59\",\"66\",\"274\"); \n //$Springhill = array(\"25\",\"77\",\"78\",\"79\",\"84\");\n\t $AccentOpaque = array(\"57\");\n\t\t$Hammermill = array(\"246\");\n\t\t$Williamsburg = array(\"93\"); \n\t\t$Carolina = array(\"66\"); \n\t\t$Springhill = array(\"84\");\n\t\t//$PPAllBrands = array(\"209\");\n\t\t$Envelope = array(\"131\");\n\t\t$Forms = array(\"262\", \"263\", \"264\", \"265\", \"266\", \"267\", \"269\", \"270\", \"271\");\n\t\t$Bristols = array(\"233\", \"234\", \"235\", \"236\", \"237\", \"238\", \"239\", \"240\", \"241\");\n\t\t$Specialty = array(\"152\");\n\t\t$HotCupsLids = array(\"182\", \"178\", \"179\", \"183\", \"181\", \"220\", \"228\", \"229\", \"230\");\n\t\t$ColdCupsLids = array(\"158\", \"154\", \"275\", \"276\", \"277\");\n\t\t$FoodPackaging = array(\"213\", \"172\", \"212\", \"221\", \"222\", \"223\", \"214\", \"278\");\n \n //For category logo\n if(in_array($categoryId, $AccentOpaque)){\n //$catImgLogo = \"logo-accentopaque.jpg\";\n $catImgLogo = \"Accent Opaque\";\n }\n\t\t else if(in_array($categoryId, $Hammermill)){\n $catImgLogo = \"Hammermill\";\n }\n else if(in_array($categoryId, $Williamsburg)){\n $catImgLogo = \"Williamsburg\";\n }\n else if(in_array($categoryId, $Carolina)){\n $catImgLogo = \"Carolina\";\n }\n else if(in_array($categoryId, $Springhill)){\n $catImgLogo = \"Springhill\";\n }\n\t\t else if(in_array($categoryId, $Envelope)){\n $catImgLogo = \"Envelope\";\n }\n\t\t else if(in_array($categoryId, $Forms)){\n $catImgLogo = \"Forms\";\n }\n\t\t else if(in_array($categoryId, $Bristols)){\n $catImgLogo = \"Bristols\";\n }\n\t\t else if(in_array($categoryId, $Specialty)){\n $catImgLogo = \"Specialty\";\n }\n\t\t else if(in_array($categoryId, $HotCupsLids)){\n $catImgLogo = \"Hot Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $ColdCupsLids)){\n $catImgLogo = \"Cold Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $FoodPackaging)){\n $catImgLogo = \"Food Packaging\";\n }\n return $catImgLogo;\n }", "public function getCategory()\n {\n }", "function descargar_lista($cat_id)\n{\n\tif ($cat_id==1){$categoria_s=\"Categoria 1\"; $dir_cat=\"dir1\";}\n\tif ($cat_id==2){$categoria_s=\"Categoria 2\"; $dir_cat=\"dir2\";}\n\tif ($cat_id==3){$categoria_s=\"Categoria 3\"; $dir_cat=\"dir3\";}\n\n\techo \"\\n<p align=\\\"center\\\"><a href=\";\n\techo \"\\\"listado_\".$dir_cat.\".php\\\"\";\n echo \"><em><strong>DESCARGAR LISTAS <img border=0 src=$doc_root/pdf-logo.gif\\\" width=\\\"20\\\" height=\\\"20\\\" /> </strong></em></a></p>\";\n}" ]
[ "0.55863905", "0.52791435", "0.52148086", "0.5134982", "0.50938255", "0.5067629", "0.50020754", "0.48730886", "0.48519862", "0.4844543", "0.48402268", "0.48386878", "0.48365232", "0.48272622", "0.48049596", "0.4801484", "0.47933578", "0.4792345", "0.4755609", "0.47497275", "0.47497275", "0.47497275", "0.4740965", "0.47166213", "0.47087604", "0.47065207", "0.47014305", "0.46981782", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.4696037", "0.46942002", "0.46813455", "0.46721658", "0.46562356", "0.4653732", "0.46425313", "0.46200886", "0.46181256", "0.46147418", "0.4602243", "0.459597", "0.45954016", "0.4563945", "0.45587572", "0.45481586", "0.45451275", "0.45373967", "0.45303145", "0.45241365", "0.45215634", "0.4504168", "0.45020822", "0.44946265", "0.44938788", "0.44938788", "0.4485249", "0.44833928", "0.44806188", "0.44794688", "0.4477524", "0.4477112", "0.44698453", "0.44679004", "0.4454888", "0.44545367", "0.44505253", "0.4447728", "0.4441679", "0.44377157", "0.4426434" ]
0.46020567
70
Provides you the available banner links. To obtain specific banner links, you can filter this request using these parameters: MID, Category, Size, Start Date, and End Date.
public function bannerLinks( $merchantId = -1, $categoryId = -1, $startDate = null, $endDate = null, $size = -1, $campaignId = -1, $page = 1 ) { $startD = (isset($startDate)) ? str_replace('-', '', $startDate) : null; $endD = (isset($endDate)) ? str_replace('-', '', $endDate) : null; $this->setParameter(0, $merchantId); $this->setParameter(1, $categoryId); $this->setParameter(2, $startD); $this->setParameter(3, $endD); $this->setParameter(4, $size); $this->setParameter(5, $campaignId); $this->setParameter(6, $page); $this->setHeader(self::HEADER_TYPE_BEARER); $this->setLink(self::BANNER_LINKS.'/'.$this->getParameter()); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLinksList()\n {\n $sql = 'SELECT bwl.*, bwll.`title`, bwll.`url`\n FROM `'._DB_PREFIX_.'bwcatbanner_link` bwl\n LEFT JOIN `'._DB_PREFIX_.'bwcatbanner_link_lang` bwll\n ON (bwl.`id_item` = bwll.`id_item`)\n WHERE bwl.`id_shop` = '.(int)Context::getContext()->shop->id.'\n AND bwll.`id_lang` = '.(int)Context::getContext()->language->id;\n\n return Db::getInstance()->executeS($sql);\n }", "function getbanners()\n\t\t{\n\t\t\t$banners = $this->manage_content->getValue('banner_info','*');\n\t\t\techo '<div id=\"add_space\">';\n\t\t\tforeach($banners as $banner)\n\t\t\t{\n\t\t\t\tif($banner['banner_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$banner['banner_link'].'\">';\n\t\t\t\t\techo '<div class=\"add_section\"><img src=\"images/'.$banner['banner_image'].'\" style=\"height:'.$banner['banner_height'].'px;width:'.$banner['banner_width'].'px;float:left;\"/></div></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}", "public static function GetBanners()\n\t{\n\t\t$output = '';\n\t\t\n\t\t$sql = 'SELECT\n\t\t\t\t\tb.id, b.image_file, b.link_url, b.priority_order,\n\t\t\t\t\tbd.image_text\n\t\t\t\tFROM '.TABLE_BANNERS.' b\n\t\t\t\t\tLEFT OUTER JOIN '.TABLE_BANNERS_DESCRIPTION.' bd ON b.id = bd.banner_id\n\t\t\t\tWHERE b.is_active = 1 AND b.image_file != \\'\\' AND bd.language_id = \\''.encode_text(Application::Get('lang')).'\\' \n\t\t\t\tORDER BY RAND() ASC';\n\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\n\t\tif($result[1] > 0){\n\t\t\t$image = '<img src=\"'.APPHP_BASE.'images/banners/'.$result[0]['image_file'].'\" width=\"723px\" height=\"140px\" alt=\"banner\" />';\t\n\t\t\tif($result[0]['link_url'] != '' && $result[0]['link_url'] != 'http://'){\n\t\t\t\t$output .= '<a href=\"'.$result[0]['link_url'].'\" title=\"'.$result[0]['image_text'].'\">'.$image.'</a>';\n\t\t\t}else{\n\t\t\t\t$output .= $image;\n\t\t\t}\t\t\t\n\t\t}\n\t return $output;\n\t}", "public function get_links()\n {\n }", "public function listing($stat='',$start=0)\n\t{\n\t\t\n\t\t\n\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\t\t\n\t\t$link = breadcrumb();\t\t\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = 0;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t \n\t\t$limit = $this->page_limit;\t\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status); \n}\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n\t\t\t\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n \n \n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t//echo $this->db->last_query();exit;\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\t\n\t\t/*$data['tot_list'] = $list_data;\n\t\t\t\t\n\t\t$config['per_page'] \t= $limit;\n\t\t$config['base_url'] \t= site_url(\"admin/inventory_banners/listing/\".$stat);\n $config['uri_segment'] \t= 5; \n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\t\t\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\t\t\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);*/\t\t\n\t\t$page_data = $this->mod_banner->get_banners($where_arr);\n\t\t$data['banner_list']\t=\t$page_data;\n\t\t\t\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\t\t\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/ \n\t\t \n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n\t\t$where_inact = array('ox_banners.status'=>1);\n\t\t\n\t\t\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\t\t\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t\n\t}", "public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }", "public function getLinksList(){\n return $this->_get(9);\n }", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = \\true, $orderby = 'name', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 1, $display = \\true)\n {\n }", "public function get_allBanners($where_banner)\t\n\t{\n\t\t$query = $this->db->get_where('announcement',$where_banner);\n\n\t\t$result = $query->result_array();\n\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "public function index()\n {\n return $this->bannerService->index();\n }", "public function get_banners($offset = 0, $limit = LIST_LIMIT) {\n $this->db->limit($limit, $offset);\n $query = $this->db->get('banners');\n return $query->result_array();\n }", "public function getListBanner()\n {\n\n $BannerModel = new Banner();\n $Banners = $BannerModel->getListBanner();\n $this->data['newss'] = $Banners;\n\n return view('admin.banner_list', $this->data);\n }", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "public function getBanners($perPage = 20, array $filter = array(), array $sort = array(), $paginate = true);", "protected function getBannerItems()\n {\n $self = $this;\n\n return Cache::remember(\n 'home_banner_items',\n config('kosher.cache_expiration_time'),\n function () use ($self) {\n $recipes = Recipe::banner()->with('categories')->get();\n $articles = Article::banner()->published()->with('category')->get();\n $shows = Show::banner()->get();\n\n $banner = $recipes->merge($articles)\n ->merge($shows)\n ->shuffle()\n ->take(config('kosher.pagination.home_banner_items'));\n\n if (0 == $banner->count()) {\n $recipes = Recipe::featured()->with('categories')->get();\n $articles = Article::featured()->published()->with('category')->get();\n $shows = Show::featured()->get();\n\n $banner = $recipes->merge($articles)\n ->merge($shows)\n ->shuffle()\n ->take(config('kosher.pagination.home_banner_items'));\n }\n\n if (0 == $banner->count()) {\n $banner = Recipe::published()\n ->with('categories')\n ->take(config('kosher.pagination.home_banner_items'))\n ->get();\n $self->mergeReceivedRecipes($banner);\n } else {\n $recipes = collect();\n foreach ($banner as $item) {\n if ($item->isRecipe()) {\n $recipes->push($item);\n }\n }\n $self->mergeReceivedRecipes($recipes);\n }\n\n return $banner;\n }\n );\n }", "public function index()\n {\n \n if(isset( $_GET['search']) && $_GET['search']!='' ){\n $searched= $_GET['search'];\n $banners=Banner::where('content', 'like',\"%{$searched}%\")\n ->latest()->paginate(2);\n \n }else{\n $banners=Banner::latest()->paginate(2);\n\n }\n return BannerResource::collection($banners);\n }", "public function getBannersArhived($searchText = NULL) {\n return $this->where('archive', 1)\n ->orderBy('id', 'DESC')\n ->paginate(10);\n }", "public function gp_qry_all_banner($website_id)\n {\n $sql = \"Select \n B.PK_BANNER\n ,B.C_DEFAULT\n ,B.C_FILE_NAME\n ,BC.FK_CATEGORY\n From t_ps_banner B\n Right Join t_ps_banner_category BC \n On BC.FK_BANNER=B.PK_BANNER\n Where B.FK_WEBSITE=$website_id\n And B.C_STATUS=1\n Order By C_DEFAULT Desc, BC.FK_CATEGORY Asc\";\n \n return $this->db->GetAll($sql);\n }", "public function index()\n {\n $imageNameDB = DB::table('banners')->where('banner_id', 17)->select('link')->get()[0]->link;\n return response()->json($imageNameDB);\n }", "public function banners()\n {\n $banners = DB::table('banners')->latest('created_at')->limit(5)->get();\n\n return response()->json($banners);\n }", "function getDynamicAds()\n\t\t{\n\t\t\t$dynamicBanner_1 = $this->manage_content->getValue_where('banner_info','banner_image','id',5);\n\t\t\t$dynamicBanner_2 = $this->manage_content->getValue_where('banner_info','banner_image','id',6);\n\t\t\t//print_r($dynamicBanner[0]['banner_image']);\n\t\t\t//get dynamic banner 1\n\t\t\tif($dynamicBanner_1[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_1[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t\t//get the dynamic banner 2\n\t\t\tif($dynamicBanner_2[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_2[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t}", "public function index()\n {\n // Varibales\n $title = '';\n $created_at = '';\n $last_update = '';\n $orderby = '';\n $sort = '';\n\n $list_banners = Banners::leftJoin('banners_trans as trans', 'banners.id', '=', 'trans.tid')\n ->select('banners.*', 'trans.lang', 'trans.title', 'trans.link', 'trans.created_at', 'trans.updated_at')->where('trans.lang', '=', Lang::getlocale());\n\n if(!empty($_GET['title'])){\n $title = $_GET['title'];\n $list_banners->where('trans.title', 'like', '%'.$title.'%'); \n }\n if(!empty($_GET['created_at'])){\n $created_at = $_GET['created_at'];\n $list_banners->where('trans.created_at', '>=', ''.$created_at.' 00:00:00')->where('trans.created_at', '<=', ''.$created_at.' 23:59:59'); \n }\n if(!empty($_GET['last_update'])){\n $last_update = $_GET['last_update'];\n $list_banners->where('trans.updated_at', '>=', ''.$last_update.' 00:00:00')->where('trans.updated_at', '<=', ''.$last_update.' 23:59:59'); \n }\n if(!empty($_GET['orderby']) && !empty($_GET['sort'])){\n $orderby = $_GET['orderby'];\n $sort = $_GET['sort'];\n $list_banners->orderBy($orderby, $sort); \n }\n \n $banners = $list_banners->paginate(10);\n // add to pagination other fields\n $banners->appends(['title' => $title, 'created_at' => $created_at,\n 'last_update' => $last_update, 'orderby' => $orderby, 'sort' => $sort]);\n\n return view('backend.banners.index', compact('banners'));\n }", "public function homepagebanner()\n\t {\n\t\t\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t$connection = $resource->getConnection();\n\t\t$sql = \"Select * FROM custom_productbanner where status=1 order by productbanner_id asc\";\n\t\t$result1 = $connection->fetchAll($sql);\t\n\n if(!empty($result1))\n\t\t{\t\t\t\n\t\t\t\n\t\tforeach ($result1 as $data) {\n\t\t$banner_id=$data['productbanner_id'];\n $image_name=$data['name'];\n\t\t$image_background=$data['background'];\n\t\t$image_caption=$data['imagecaption'];\n\t\t$result[]=array('homepagebanner'=>array(array('Id'=>$banner_id,'Image Name'=>$image_name,'img'=>'http://localhost/markateplace/pub/media/Gridpart4/background/image'.$image_background.'','Image Caption'=>$image_caption)));\t\n\t\t\t\n\t\t}\t\t\t\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"error\"));\n\t\t\t\n\t\t}\n\n\t\t\t\t\n\t return $result; \n\t\n\t }", "function links() {\n return array(\n\n );\n }", "private function getLinks($limit) {\r\n \r\n /*\r\n * Base links are always returned\r\n */\r\n $links = $this->getBaseLinks();\r\n \r\n /*\r\n * Start page cannot be lower than 1\r\n */\r\n if ($this->paging['startPage'] > 1) {\r\n \r\n /*\r\n * Previous URL is the previous URL from the self URL\r\n * \r\n */\r\n $links[] = $this->getLink('previous', '_previousCollectionLink', array(\r\n 'startPage' => max($this->paging['startPage'] - 1, 1),\r\n 'count' => $limit));\r\n \r\n /*\r\n * First URL is the first search URL i.e. with startPage = 1\r\n */\r\n $links[] = $this->getLink('first', '_firstCollectionLink', array(\r\n 'startPage' => 1,\r\n 'count' => $limit)\r\n );\r\n }\r\n\r\n /*\r\n * Theorically, startPage cannot be greater than the one from lastURL\r\n * ...but since we use a count estimate it is not possible to know the \r\n * real last page. So always set a nextPage !\r\n */\r\n if (count($this->restoFeatures) >= $limit) {\r\n \r\n /*\r\n * Next URL is the next search URL from the self URL\r\n */\r\n $links[] = $this->getLink('next', '_nextCollectionLink', array(\r\n 'startPage' => $this->paging['nextPage'],\r\n 'count' => $limit)\r\n );\r\n\r\n /*\r\n * Last URL has the highest startIndex\r\n */\r\n $links[] = $this->getLink('last', '_lastCollectionLink', array(\r\n 'startPage' => max($this->paging['totalPage'], 1),\r\n 'count' => $limit)\r\n );\r\n }\r\n \r\n return $links;\r\n \r\n }", "public function getBanner($seriesId);", "public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}", "function _nbabanner_get_banners($randomise = false)\n{\n $banners = nbacontent_get_vocabulary('nbabanner', true);\n \n $filteredBanners = array_filter($banners, function($ele) {\n return $ele->nbabanner_link_live['und'][0]['value'] == 1;\n });\n \n if ($randomise === true) {\n shuffle($filteredBanners);\n }\n \n return $filteredBanners;\n}", "public function listing_camp($stat='',$campid='',$adv='',$start=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = $campid;\n\t\t\t\t$data['sel_adv'] = $adv;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t$limit = $this->page_limit;\n\t\tif($campid!='')\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array('ox_banners.campaignid'=>$campid);\n }\n }\n else\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n }\n //print_r($where_arr);exit;\n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\n\t\t$data['tot_list'] = $list_data;\n\n\t\t$config['per_page'] \t= $limit;\n\t\tif($campid!='')\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat.\"/\".$campid);\n $config['uri_segment'] \t= 6;\n }\n else\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat);\n $config['uri_segment'] \t= 5;\n }\n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);\n\t\t$page_data = $this->mod_banner->get_banners($where_arr,$start,$limit);\n\t\t$data['banner_list']\t=\t$page_data;\n\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\n\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/\n if($campid!='')\n {\n $where_tot = array('ox_banners.campaignid'=>$campid);\n $where_act = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>0);\n $where_inact = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>1);\n }\n else\n {\n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n $where_inact = array('ox_banners.status'=>1);\n }\n\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\n\t}", "public function getLinks(\n $countAllElements,//count all elements in this category\n $countElementsInThisPage,//count all elements in this page\n $startElements,//beginning number of output elements\n $linkLimit = 5,//count pages in chunk (chunk = array with pages)\n $controllerName,//controller name\n $varName = 'start'//get name of parameter, which is the count of output elements\n ) {\n if ($countElementsInThisPage >= $countAllElements || $countElementsInThisPage == 0) {\n return NULL;\n }\n\n $pages = 0;//count pages in pagination\n $needChunk = 0;//index need chunk in this moment\n $page = array();//array with value and text value page\n $queryVars = array();//GET array\n $pagesArr = array();//array with $startElements\n $link = Url::getUrl().$controllerName;//url address for page\n\n //in $queryVars GET parameters\n parse_str($_SERVER['QUERY_STRING'], $queryVars ); //&$queryVars\n\n if(isset($queryVars[$varName])) {\n\n unset($queryVars[$varName]);//delete GET with parameter $startElements\n }\n unset($queryVars['route']);//delete GET['route'], because route is controllerName\n\n $link = $link.'?'.http_build_query( $queryVars );//site url with router parameters and GET params\n\n $pages = ceil( $countAllElements / $countElementsInThisPage );//count pages\n\n for( $i = 0; $i < $pages; $i++) {\n $pagesArr[$i+1] = $i * $countElementsInThisPage;\n }\n\n $allPages = array_chunk($pagesArr, $linkLimit, true);//divide the array into several arrays by $linkLimit elements\n\n $needChunk = $this->searchPage($allPages, $startElements);//search active chunk\n\n\n /** pages first and previous */\n if ($startElements > 1) {\n\n $page['value']['start'] = $link.'&'.$varName.'=0';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = $link.'&'.$varName.'='.($startElements - $countElementsInThisPage);\n $page['text']['previous'] = $this->prevChar;\n } else {\n\n $page['value']['start'] = '';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = '';\n $page['text']['previous'] = $this->prevChar;\n }\n\n /** 5 pages or less */\n foreach($allPages[$needChunk] AS $pageNum => $start) {\n\n if( $start == $startElements ) {//current page without url\n $page['value']['pages'][] = '';\n $page['text']['pages'][] = $pageNum;\n continue;\n }\n $page['value']['pages'][] = $link.'&'.$varName.'='. $start;\n $page['text']['pages'][] = $pageNum;\n }\n\n /** pages next and last */\n if (($countAllElements - $countElementsInThisPage) > $startElements) {\n\n $page['value']['next'] = $link.'&'.$varName.'='.($startElements + $countElementsInThisPage);\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = $link.'&'.$varName.'='.array_pop(array_pop($allPages));\n $page['text']['last'] = $this->lastChar;\n } else {\n\n $page['value']['next'] = '';\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = '';\n $page['text']['last'] = $this->lastChar;\n }\n\n return $page;//array with pagination parameters\n }", "public function getBannersByDimensions() {\n\n try {\n $result = Banner::getBannersByDimensions($_GET);\n return $result;\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "public function index()\n {\n $banners = Banner::all();\n return view('admin.banners.list_banner')->withBanners($banners);\n }", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "public function info()\n {\n if (!addon_installed('banners')) {\n return array();\n }\n\n if (get_option('is_on_banner_buy') == '1') {\n $banner_url = build_url(array('page' => '_SELF', 'type' => 'bannerinfo', 'id' => 'banners'), get_module_zone('banners'));\n\n return array(do_template('POINTSTORE_BANNERS_2', array('_GUID' => '0b34fc7675b4a71fd6e530ad43213e70', 'BANNER_URL' => $banner_url)));\n }\n return array();\n }", "public function index(Request $request)\n {\n $banners = Banner::latest()->filter($request->all())->paginate($request->get('per_page', 20));\n\n return BannerResource::collection($banners);\n }", "public function getItems()\n {\n $arrLinks = array();\n\n $intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n $intFirstOffset = ($this->intPage - $intNumberOfLinks - 1);\n\n if ($intFirstOffset > 0) {\n $intFirstOffset = 0;\n }\n\n $intLastOffset = ($this->intPage + $intNumberOfLinks - $this->intTotalPages);\n\n if ($intLastOffset < 0) {\n $intLastOffset = 0;\n }\n\n $intFirstLink = ($this->intPage - $intNumberOfLinks - $intLastOffset);\n\n if ($intFirstLink < 1) {\n $intFirstLink = 1;\n }\n\n $intLastLink = ($this->intPage + $intNumberOfLinks - $intFirstOffset);\n\n if ($intLastLink > $this->intTotalPages) {\n $intLastLink = $this->intTotalPages;\n }\n\n for ($i = $intFirstLink; $i <= $intLastLink; $i++) {\n $arrLinks[] = (object) array(\n 'page' => $i,\n 'current' => $i == $this->intPage,\n 'href' => $this->getItemLink($i)\n );\n }\n\n return $arrLinks;\n }", "public function linksProvider()\n {\n return [[new \\Urbania\\AppleNews\\Api\\Objects\\ArticleLinks()]];\n }", "function get_linksbyname($cat_name = \"noname\", $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 0)\n {\n }", "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$param = $this->getInput(array('start_time','channel_id', 'ad_type', 'title'));\r\n\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif($param['ad_type']) $search['ad_type'] = $param['ad_type'];\r\n\t\t$search['channel_id'] = $param['channel_id'];\r\n if(!empty($param['start_time']))$search['search_time'] = array(\r\n array('>=',strtotime($param['start_time'])),\r\n array('<',strtotime($param['start_time'])+3600*24),\r\n );\r\n if($param['title']) $search['title'] = array('LIKE', trim($param['title']));\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types[$param['channel_id']]);\r\n\t\t$this->assign('search', $param);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "public static function getLiveBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn(\n 'SELECT website.banner_campaign.banner_campaign_id FROM website.banner_campaign, website.banner_timeslot\n WHERE website.banner_campaign.banner_campaign_id = website.banner_timeslot.banner_campaign_id\n AND effective_from < now()\n AND (effective_to IS NULL\n OR effective_to > now())\n AND day = EXTRACT(ISODOW FROM now())\n AND start_time < localtime\n AND end_time > localtime\n ORDER BY \"order\" ASC'\n )\n );\n }", "public function getBanner(Request $request)\n {\n $data = [];\n\n $position = $request->get('position', 'top');\n\n if ($request->get('page_id')) {\n $page_id = $request->get('page_id');\n $page_type = $request->get('type', 'page');\n $data = Banner::getByPageId($page_id, $page_type, $position)->betweenDate()->get();\n }\n\n $settingsName = $position . '_sizes';\n $settings = Cache::remember(\n $settingsName,\n now()->addDay(),\n function () use ($settingsName) {\n return BannerSettings::where('name', $settingsName)->first();\n }\n );\n $additional = [];\n if ($settings) {\n $additional = [\n 'carousel_settings' => [\n 'interval' => $settings->data['interval'] ?? 3000,\n 'indicators' => $settings->data['indicators'] ?? true,\n 'nav' => $settings->data['nav'] ?? true,\n ]\n ];\n }\n return BannerResource::collection($data)->additional($additional);\n }", "public function index()\n {\n return Links::all();\n }", "private function get_fiters_links() {\n $showallurl = $this->page->url;\n $showallurl->param('filter', 'showall');\n\n $onlyactivitiesurl = $this->page->url;\n $onlyactivitiesurl->param('filter', 'onlyactivities');\n\n $onlypostsurl = $this->page->url;\n $onlypostsurl->param('filter', 'onlyposts');\n\n if (isset($this->viewoptions['order'])) {\n $showallurl->param('order', $this->viewoptions['order']);\n $onlyactivitiesurl->param('order', $this->viewoptions['order']);\n $onlypostsurl->param('order', $this->viewoptions['order']);\n }\n\n return [\n 'showall' => $showallurl,\n 'onlyactivities' => $onlyactivitiesurl,\n 'onlyposts' => $onlypostsurl\n ];\n }", "public function get_all_links()\r\n {\r\n \tif (empty($this->course_code))\r\n \t\tdie('Error in get_not_created_links() : course code not set');\r\n \t\r\n \t$course_info = api_get_course_info($this->course_code);\r\n \t$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK,$course_info['dbName']);\r\n\r\n\t\t$sql = 'SELECT id,title from '.$this->get_exercise_table();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t$cats=array();\r\n\t\twhile ($data=mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\t$cats[] = array ($data['id'], $data['title']);\r\n\t\t}\r\n\t\treturn $cats;\r\n }", "public function index()\n {\n return new BannerCollection(Banner::orderBy('created_at', 'desc')->get());\n }", "public function getLinkList($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n // Get the configuration object.\n $db = \\OMV\\Config\\Database::getInstance();\n $objects = $db->get(\"conf.service.webdesk.link\");\n // Add additional link informations.\n $objectsAssoc = [];\n foreach ($objects as $objectk => &$objectv) {\n // Add the new property 'sharedfoldername'.\n /*$objectv->add(\"sharedfoldername\", \"string\", gettext(\"n/a\"));\n // Get the shared folder configuration object.\n $sfObject = $db->get(\"conf.system.sharedfolder\",\n $objectv->get(\"sharedfolderref\"));\n // Update the 'sharedfoldername' property.\n $objectv->set(\"sharedfoldername\", $sfObject->get(\"name\"));*/\n $objectsAssoc[] = $objectv->getAssoc();\n }\n // Filter the result.\n return $this->applyFilter($objectsAssoc, $params['start'], $params['limit'],\n $params['sortfield'], $params['sortdir']);\n }", "function getBanners($page,$position,$image_banner,$BannerDisplayed){\r\n\r\n\t\t\t$sql = \"select * from banner where Status='1' \";\r\n\r\n\t\t\t$sql.= (!empty($page))?(\" and ShowOn like '%\".$page.\"%'\"):(\"\");\r\n\r\n\t\t\t$sql.= (!empty($position))?(\" and position = '\".$position.\"'\"):(\"\");\r\n\r\n\t\t\t$sql.= ($image_banner==1)?(\" and ( Image like '%jpg%' or Image like '%gif%')\"):(\"\");\r\n\r\n\t\t\t$sql.= (!empty($BannerDisplayed))?(\" and BannerID != '\".$BannerDisplayed.\"'\"):(\"\");\r\n\r\n\t\t\t$sql.= \" order by rand() \";\r\n\r\n\t\t\t $sql.= \" limit 0,1 \"; \r\n\t\t\t//$sql.= (!empty($BannerLimit))?(\" limit 0,\".$BannerLimit.\"\"):(\"\");\r\n\r\n\t\t\t//echo $sql;\r\n\t\t\treturn $this->query($sql, 1);\r\n\t\t}", "public function getLinks() {\n return $this->links;\n }", "public function getHeadingLinks(): array;", "public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }", "public function index(Request $request)\n {\n $aResult = Util::getDefaultArrayResult();\n \n if ($this->user->hasAccess($this->resource . '.view')) {\n \n $modelName = $this->modelName;\n \n $pageSize = $request->input('iDisplayLength', 10);\n $offset = $request->input('iDisplayStart');\n $currentPage = ($offset / $pageSize) + 1;\n\n if (!$sortCol = $request->input('mDataProp_'.$request->input('iSortCol_0'))) {\n $sortCol = 'id';\n $sortDir = 'desc';\n } else {\n \n $sortDir = $request->input('sSortDir_0');\n }\n\n //Search filter\n $search = \\trim($request->input('sSearch'));\n \n\n Paginator::currentPageResolver(function() use ($currentPage) {\n return $currentPage;\n });\n\n $items = \n $modelName::select(\n 'banners_banners.id',\n 'banners_tipos.nombre as tipo',\n \\DB::raw('CONCAT(banners_clientes.apellido, \", \", banners_clientes.nombre) as cliente'),\n 'banners_posiciones.nombre as posicion',\n 'banners_banners.nombre',\n 'banners_banners.inicio',\n 'banners_banners.fin',\n 'banners_banners.impresiones',\n 'banners_banners.clicks',\n 'banners_banners.habilitado'\n )\n ->join('banners_tipos','banners_tipos.id','=','banners_banners.id_tipo')\n ->join('banners_clientes','banners_clientes.id','=','banners_banners.id_cliente')\n ->join('banners_posiciones','banners_posiciones.id','=','banners_banners.id_posicion')\n ->orderBy($sortCol, $sortDir)\n ;\n\n if ($search) {\n $items->where(function($query) use ($search){\n $query\n ->where('banners_banners.nombre','like',\"%{$search}%\")\n ->orWhere('banners_tipos.nombre','like',\"%{$search}%\")\n ->orWhere('banners_clientes.nombre','like',\"%{$search}%\")\n ->orWhere('banners_clientes.apellido','like',\"%{$search}%\")\n ->orWhere('banners_posiciones.nombre','like',\"%{$search}%\")\n ;\n });\n }\n \n $items = $items\n ->paginate($pageSize)\n ;\n\n $aItems = $items->toArray(); \n \n $total = $aItems['total'];\n $aItems = $aItems['data']; \n \n $aResult['data'] = $aItems;\n $aResult['recordsTotal'] = $total;\n $aResult['recordsFiltered'] = $total;\n \n } else {\n $aResult['status'] = 1;\n $aResult['msg'] = \\config('appCustom.messages.unauthorized');\n }\n\n return response()->json($aResult);\n }", "public function get_banner_item( $id, $aid = '', $force_size = '' )\n\t{\t\n\t\t$banner_type = get_post_meta( $id, 'banner_type', true );\n\t\t$banner_url = get_post_meta( $id, 'banner_url', true );\n\t\t$banner_link = get_post_meta( $id, 'banner_link', true );\n\t\t$banner_target = get_post_meta( $id, 'banner_target', true );\n\t\t$banner_size = get_post_meta( $id, 'banner_size', true );\n\t\t$banner_no_follow = get_post_meta( $id, 'banner_no_follow', true );\n\t\t$banner_start_date = get_post_meta( $id, 'banner_start_date', true );\n\t\t$rel = $banner_no_follow ? 'rel=\"nofollow\"' : '';\n\t\t$banner_is_image = $this->check_if_banner_is_image($banner_type);\n\t\t$click_tag = '';\n\t\t\n\t\t$size = !empty($banner_size) ? explode('x', $banner_size ) : '';\n\t\t$size = !empty($force_size) ? explode('x', $force_size ) : $size;\n\t\t$size_str = !empty($force_size) ? 'width=\"'.$size[0].'\" ' : '';\n\t\t$today = mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\t\n\t\t$html = '';\n\t\t\n\t\tif( $banner_is_image )\n\t\t{\n\t\t\t$img = !empty($banner_url) ? $banner_url : WP_ADS_URL.'images/placeholder.png';\n\t\t\t$html.= '<img src=\"'.$img.'\" alt=\"'.get_the_title($id).'\" border=\"0\" '.$size_str.' />';\n\t\t}\n\t\telseif( $banner_type == 'swf')\n\t\t{\n\t\t\t$html.= '<object width=\"'.$size[0].'\" height=\"'.$size[1].'\" style=\"cursor:pointer;\">';\n\t\t\t\t$html.= $fallback_and_link;\n\t\t\t\t$html.= '<param name=\"movie\" value=\"'.$banner_url.$click_tag.'\"></param>';\n\t\t\t\t$html.= '<param name=\"allowFullScreen\" value=\"true\"></param>';\n\t\t\t\t$html.= '<param name=\"allowscriptaccess\" value=\"always\"></param>';\n\t\t\t\t$html.= '<param name=\"wmode\" value=\"transparent\"></param>';\n\t\t\t\t$html.= '<embed src=\"'.$banner_url.$click_tag.'\" type=\"application/x-shockwave-flash\" width=\"'.$size[0].'\" height=\"'.$size[1].'\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>';\n\t\t\t$html.= '</object>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$banner_html = get_post_meta( $id, 'banner_html', true );\n\t\t\t$html.= $banner_html;\n\t\t}\n\t\t\n\t\t// Create link\n\t\t$adzone_str = !empty( $aid ) ? '&pasZONE='.base64_encode($aid) : '';\n\t\t$html = !empty( $banner_link ) ? '<a href=\"'.get_bloginfo('url').'?pasID='.base64_encode($id).$adzone_str.'\" target=\"'.$banner_target.'\" '.$rel.'>'.$html.'</a>' : $html;\n\t\t\n\t\treturn $html;\n\t}", "private function getBaseLinks() {\r\n return array(\r\n array(\r\n 'rel' => 'self',\r\n 'type' => RestoUtil::$contentTypes['json'],\r\n 'title' => $this->context->dictionary->translate('_selfCollectionLink'),\r\n 'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->context->query))\r\n ),\r\n array(\r\n 'rel' => 'search',\r\n 'type' => 'application/opensearchdescription+xml',\r\n 'title' => $this->context->dictionary->translate('_osddLink'),\r\n 'href' => $this->context->baseUrl . '/api/collections/' . (isset($this->defaultCollection) ? $this->defaultCollection->name . '/' : '') . 'describe.xml'\r\n )\r\n );\r\n }", "public function getAllRecordLinks()\n {\n // Load configurations:\n $fieldsNames = isset($this->mainConfig->Record->marc_links)\n ? explode(',', $this->mainConfig->Record->marc_links) : [];\n $useVisibilityIndicator\n = isset($this->mainConfig->Record->marc_links_use_visibility_indicator)\n ? $this->mainConfig->Record->marc_links_use_visibility_indicator : true;\n\n $retVal = [];\n foreach ($fieldsNames as $value) {\n $value = trim($value);\n $fields = $this->marcRecord->getFields($value);\n if (!empty($fields)) {\n foreach ($fields as $field) {\n // Check to see if we should display at all\n if ($useVisibilityIndicator) {\n $visibilityIndicator = $field->getIndicator('1');\n if ($visibilityIndicator == '1') {\n continue;\n }\n }\n\n // Get data for field\n $tmp = $this->getFieldData($field);\n if (is_array($tmp)) {\n $retVal[] = $tmp;\n }\n }\n }\n }\n return empty($retVal) ? null : $retVal;\n }", "protected abstract function loadAvailableAds();", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function index()\n {\n $links = Link::query();\n\n return response()->json($links->paginate());\n }", "public function index()\n {\n $items = Banners::paginate('50');\n\n return view('banners.index', compact('items'));\n }", "public function getPageUris();", "public function getBanners()\n {\n $rows = $this->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, \"`status` = 'active'\", null, null, self::getTable());\n\n if (is_array($rows) && $rows) {\n $banners = [];\n foreach ($rows as $entry) {\n $banners[$entry['position']][] = $entry;\n }\n\n return $banners;\n }\n\n return false;\n }", "private function get_filters_links() {\n $links = $this->get_fiters_links();\n $links['orderlink'] = $this->get_link_order();\n\n return $links;\n }", "public function getLinks()\n {\n $controller = \\Yii::app()->getController();\n if (($pagination = $this->getPagination()) !== false) {\n $totalPages = $pagination->getPageCount();\n $currentPage = $pagination->getCurrentPage();\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $pagination->createPageUrl($controller, 0),\n ),\n 'page' => array(\n 'title' => \\Yii::t('resource', 'Page'),\n 'href' => str_replace('999', '{page}', $pagination->createPageUrl($controller, 998)),\n 'templated' => true,\n ),\n\n );\n if ($currentPage > 0) {\n $links['firstPage'] = array(\n 'title' => \\Yii::t('resource', 'First Page'),\n 'href' => $pagination->createPageUrl($controller, 0),\n );\n }\n if ($currentPage > 0) {\n $links['prevPage'] = array(\n 'title' => \\Yii::t('resource', 'Previous Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage - 1),\n );\n }\n if ($totalPages > $currentPage + 1) {\n $links['nextPage'] = array(\n 'title' => \\Yii::t('resource', 'Next Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage + 1),\n );\n }\n if ($totalPages > 1) {\n $links['lastPage'] = array(\n 'title' => \\Yii::t('resource', 'Last Page'),\n 'href' => $pagination->createPageUrl($controller, $totalPages - 1),\n );\n }\n }\n else {\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $controller->createUrl($controller->getRoute(), $this->getParams()),\n ),\n );\n }\n return $links;\n }", "public function index()\n\t{\n\t\t$data = [];\n\t\t$input = Input::except('page');\n\t\t$input = CommonAdmin::processDataFilter($input);\n\t\t$listData = Banners::where($input)->orderBy('id', 'desc')->paginate(PAGINATE);\n\t\tforeach ($listData as $key => $value) {\n\t\t\t// $data[$value['model_name']][$value['model_id']][$key] = new stdClass();\n\t\t\t// $data[$value['model_name']][$value['model_id']][$key] = $value;\n\t\t\t$data[$value->model_name][$value->model_id][$key] = new stdClass();\n\t\t\t$data[$value->model_name][$value->model_id][$key] = $value;\n\t\t}\n\t\t// dd($data);\n\t\t// $data = Banners::groupBy('model_name')->orderBy('id', 'desc')->paginate(PAGINATE);\n\t\treturn View::make('admin.banner.index')->with(compact('data'));\n\t}", "public function getLinks()\r\n {\r\n return $this->_links;\r\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 getBannersByPeriod($dateStart, $dateEnd)\n {\n $parameters = [\n 'dateBegin' => date('Y-m-d H:i:s', (int) $dateStart),\n 'dateEnd' => date('Y-m-d H:i:s', (int) $dateEnd)\n ];\n\n return (array) $this->apiClient->doCall('getBannersByPeriod', $parameters);\n }", "public function index()\n {\n return view('backend.tables.banner', ['banners' => Banner::paginate('5')]);\n }", "public function index()\n {\n $banners = Banner::all();\n if( request()->expectsJson() ){\n return BannerResource::collection( $banners );\n }\n return view('admin.banners.index', ['banners'=>$banners]);\n }", "public function getUriList();", "public function linksProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\LinkedArticle()]]];\n }", "abstract public function links(): JsonApiParser\\Collections\\Links;", "public function getBannerBaseUrl()\n {\n return $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) . 'mage2/banners/';\n }", "public function getLinkInfomation() {\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Credentials: true\");\n header('Content-Type: application/json; charset=utf-8');\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS\");\n header('Access-Control-Allow-Headers \"Origin, X-Requested-With, Content-Type, Accept');\n\n $sLink = $this->input->post('link');\n\n if (!filter_var($sLink, FILTER_VALIDATE_URL)) {\n $sLink = 'http://'.$sLink;\n }\n\n $urlData = parse_url($sLink);\n \n $aMeta = getUrlMeta($sLink);\n \n $aMeta['host'] = str_replace('www.', '', $urlData['host']);\n \n echo json_encode($aMeta);\n die();\n }", "function displayCategoryLinks() {\n\n\t$catquery = \"select distinct ngroup from nassets where type like '0tdn%'\";\n\t$cresults = mysql_query($catquery);\n\t$has_null = false;\n\t$categories = array();\n\twhile ($acRow = mysql_fetch_array($cresults)) {\n\t\t$thisgroup = $acRow['ngroup'];\n\t\t$categories[] = $thisgroup;\n\t}\n\t\n\n\techo \"<ul>View by Category<br>\";\n\t$size = count($categories);\n \tforeach ($categories as $category) {\n \t\techo \"<li><a href=\\\"menu2.php?category=$category\\\" target=\\\"menu2\\\">$category</a><br/></li>\";\n \t}\n\n\techo \"</ul>\";\n}", "public function getLinks($entity)\n {\n }", "public function actionIndex()\n {\n $searchModel = new BannerSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getHeaderLinks()\r\n {\r\n return $this->_headerLinks;\r\n }", "public function getLinks() {\n\t\treturn $this->links;\n\t}", "function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $limit = -1, $show_updated = 0)\n {\n }", "function fossee_site_banner_banners(){\n\n //$dir = \"public://site_banners\"; // The directory in which banner files are kept\n $output = NULL;\n\n setFrontend(); // this function renders the fromtend like rendering javascript and css style\n $recent_time = 1*24*60*60; // D * H * MIN * SEC\n\n $result_recent = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n //->condition(db_or()->condition('n.created_timestamp',time()-$recent_time,'>')->condition('n.last_updated',time()-$recent_time))\n ->condition('n.last_updated',time()-$recent_time,\">\")\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $result_active = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n ->condition('n.status_bool',1,'=')\n //->condition('n.created_timestamp',time()-$recent_time,'<=')\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $result_inactive = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n ->condition('n.status_bool',1,'!=')\n //->condition('n.created_timestamp',time()-$recent_time,'<=')\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $output .= \"<a href='new-banner'>Create New Banner</a><br><br>\";\n $output .= generateTable($result_recent,\"Recent\");\n $output .= generateTable($result_active,\"Active\");\n $output .= generateTable($result_inactive,\"Inactive\");\n\n return $output;\n\n}", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function index()\n {\n $links = Link::get();\n return new LinksCollection($links);\n }", "public function index()\n {\n \n try {\n $banners = Banner::orderBy('created_at', 'desc');\n $banners = $banners->Paginate(Config::get('app.banner_per_page'));\n return Response::json(array('status' => 'success', 'data' => $banners->toArray(),'page' => $banners->paginateObject()), 200);\n } Catch (Exception $ex) {\n return Response::json(array('status' => 'error', 'error' => $ex->getMessage(), 'line' => $ex->getLine()), 500);\n }\n }", "public function getLink();", "public function getLink();", "public static function getAllBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn('SELECT banner_campaign_id FROM website.banner_campaign')\n );\n }", "public function index()\n {\n $banners = Banner::orderBy('id', 'DESC')->paginate(10);\n\n return view('backend.banner.index', compact('banners'));\n }", "function getlistlink(){\t\t\t\n\t\tif($this->type=='news'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'news` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'newslink` as `b` ON `a`.`id`=`b`.`linkid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl;\n\t\t}elseif($this->type=='product'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'product` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'productnewslink` as `b` ON `a`.`id`=`b`.`productid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl.' AND `b`.`from`='.$this->from;\t\t\n\t\t}\n\t\t_trace($sql);\n\t\t$rs = mysql_query($sql);\n\t\t$this->a_link = array();\n\t\twhile($this->a_link[] = mysql_fetch_assoc($rs));\n\t\tarray_pop($this->a_link);\t\t\t\n\t\tmysql_free_result($rs);\t\n\t}", "public function getQueryUrls($limit=NULL) {\n $a = self::getQueryUrl();\n $b = self::getHashes();\n\t$QueryUrls = array();\n\t$limit = (NULL!==$limit && is_numeric($limit)) ? (int)$limit : 0; \n\t$c = 0;\n\t//Foreach hash key value...\n\tforeach ( $b as $k => $v ) { \n\t //...that is a string with length > 0...\n\t\tif ( is_string($v) AND strlen($v) > 0 ) {\n\t\t\t//...format a query string. \n\t\t\t$rs = sprintf(tbr::QUERY_STRING, $v, $a);\n\t\t\t//Then, foreach available toolbar hostname...\n\t\t\tforeach ( $this->GTB_SERVER['host'] as $host ) {\n\t\t\t\t//...append any available top level domain... \n\t\t\t\tforeach ($this->GTB_SERVER['tld'] as $tld) {\n\t\t\t\t\t$tbUri = 'http://'. $host . $tld . tbr::SERVER_PATH . $rs;\n\t\t\t\t\tif ( $c < $limit || $limit == 0 ) {\n\t\t\t\t\t\t$QueryUrls[] = $tbUri;\n\t\t\t\t\t}\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} \n\treturn (sizeof($QueryUrls)>0) ? $QueryUrls : FALSE;\n }", "public function index()\n {\n abort_if(Gate::denies('banner_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $banners = Banner::get();\n return view('admin.banner.banner',compact('banners'));\n }", "public function getlinks()\r\n {\r\n $links = array();\r\n\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'main'),\r\n 'text' => $this->__('View comments'),\r\n 'class' => 'z-icon-es-view');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'stats'),\r\n 'text' => $this->__('Comment statistics'),\r\n 'class' => 'z-icon-es-cubes');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings'),\r\n 'class' => 'z-icon-es-config',\r\n 'links' => array(\r\n array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'cleanup'),\r\n 'text' => $this->__('Delete orphaned comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'migrate'),\r\n 'text' => $this->__('Migrate comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'purge'),\r\n 'text' => $this->__('Purge comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'applyrules'),\r\n 'text' => $this->__('Re-apply moderation rules'))\r\n ));\r\n }\r\n return $links;\r\n }", "public function index()\n {\n $projects = Banner::first()\n ->where('is_active', 1)\n ->get();\n\n return BannerResource::collection($projects);\n }", "public function getSandHLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'), 'text' => $this->__('Media handling'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_sources'), 'text' => $this->__('Media sources'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_handlers'), 'text' => $this->__('Media handlers'), 'class' => 'z-icon-es-displa');\n }\n \n\t\t\t\n return $links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }" ]
[ "0.64956653", "0.60217077", "0.5885171", "0.585809", "0.57196116", "0.56638443", "0.56369996", "0.5607769", "0.5594403", "0.5577562", "0.5576287", "0.55581164", "0.5554815", "0.5552081", "0.55503386", "0.5505732", "0.54941005", "0.54884547", "0.5484968", "0.5431221", "0.54280394", "0.54130614", "0.5394517", "0.53802794", "0.535659", "0.5342417", "0.532128", "0.5292062", "0.52868694", "0.52829075", "0.52827656", "0.5273991", "0.5272516", "0.52535963", "0.5253193", "0.5248614", "0.52461517", "0.5246064", "0.5245714", "0.52456015", "0.5220217", "0.52174187", "0.5216148", "0.5204102", "0.51915973", "0.5189697", "0.5186648", "0.516352", "0.5161616", "0.51594627", "0.51582533", "0.5130786", "0.5125728", "0.50993216", "0.5095246", "0.5093541", "0.5078333", "0.506679", "0.50341475", "0.50341475", "0.50341475", "0.5029117", "0.5022026", "0.5014567", "0.50144964", "0.5002593", "0.49920034", "0.4986039", "0.4977961", "0.4975011", "0.49720827", "0.49716797", "0.49502975", "0.49500585", "0.4948322", "0.49358776", "0.49323517", "0.49261537", "0.49207875", "0.4920263", "0.49188787", "0.4916485", "0.49027514", "0.4897154", "0.4892757", "0.48910806", "0.4890221", "0.48869422", "0.4885725", "0.4885725", "0.48850685", "0.48848724", "0.4880671", "0.48772702", "0.48697454", "0.48635456", "0.48620516", "0.48598078", "0.48572758", "0.48572758" ]
0.70739037
0
Provides you the available advanced reports. To obtain specific reports, you can filter this by add $nid & $mid.
public function advancedReports( $reportId, $startDate, $endDate, $nid = null, $mid = null ) { $startD = (isset($startDate)) ? str_replace('-', '', $startDate) : null; $endD = (isset($endDate)) ? str_replace('-', '', $endDate) : null; $this->setHeader(self::HEADER_TYPE_BEARER); $this->setParameter(0, 'token='.self::SECURITY_TOKEN); $this->setParameter(1, 'reportid='.$reportId); $this->setParameter(2, 'bdate='.$startD); $this->setParameter(3, 'edate='.$endD); $params = implode('&', $this->params); $this->setLink('?'.$params, self::API_NAME_ADVANCED_REPORT); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function get_reports( $args = array() );", "function getReport() ;", "public function getReport() {}", "public function getReport() {}", "public function reportListing()\n {\n\t$strsql = \"SELECT r.*,rs.* FROM \" . TBL_REPORTS . \" r inner join \" . TBL_REPORTS_SUBMISSION . \" rs on r.report_id=rs.report_id where r.site_id='\" . $_SESSION['site_id'] . \"' and r.report_id='\".$_GET['rid'].\"'\";\n\t$objRs = $this->objDatabase->dbQuery($strsql);\n\tparent:: reportListing($objRs);\n }", "public function get_reports() {\n $data['results'] = $this->Report_Model->get_membership_payments();\n // print_r($data['results']);\n $this->render('list', $data);\n }", "public function getReports()\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)->get();\n }", "public function offer_reports_get()\n {\n $this->verify_request(); \n $data = $this->Offer_model->offer_reports();\n $status = parent::HTTP_OK;\n $response = ['status' => $status, 'data' => $data];\n $this->response($response, $status);\n }", "public function analyticreport() {\n\n global $base_url;\n $results = \\Drupal::database()->select('short_links', 's')\n ->fields('s', ['id', 'long_url', 'identifier', 'short_url'])\n ->orderBy('s.id', 'DESC')\n ->execute();\n $header = [\n t('Sr.no'), t('Web URL'), t('Identifier'), t('Short URL'), t('Show Details'),\n ];\n $rows = [];\n $sr_no = 0;\n foreach ($results as $result) {\n $sr_no += 1;\n $id = $result->id;\n $long_url = $result->long_url;\n $identifier = $result->identifier;\n $short_url = $result->short_url;\n $rows[] = [\n $sr_no,\n $long_url,\n $identifier,\n $short_url,\n [\n 'data' => new FormattableMarkup('<a href=\":link\">@name</a>', [':link' => $base_url . '/show-detail/' . $identifier, '@name' => 'Details']),\n ],\n ];\n }\n return [\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n ];\n }", "abstract public function extractReportDatas();", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public function getReports()\n {\n return $this->_getChildrenByName('report');\n }", "public function actionIndex()\n {\n\t\t\t\t\t\tif(!PermissionUtils::checkModuleActionPermission(\"Reports\",PermissionUtils::VIEW_ALL)){\n\t\t\t\tthrow new ForbiddenHttpException('You are not allowed to perform this action.');\n }\n $dataProvider = new ActiveDataProvider([\n 'query' => Reports::find(),\n ]);\n $model = new Reports();\n\n //we do pagination her \n\n\t\t if (isset($_REQUEST['Reports']) && !isset($_REQUEST['generateReport'])) {\n\t\t\t\t\t $model->reportID = $_REQUEST['Reports']['reportID'];\n return $this->render('index', [\n 'model' => $model, 'selectedReportID' => $_REQUEST['Reports']['reportID'],\n ]);\n exit;\n }\n\n\n\t\t\t\n\t\t\t\n\n if (isset($_REQUEST['Reports']) && isset($_REQUEST['generateReport'])) {\n //get values\n $reportID = $_REQUEST['Reports']['reportID'];\n if (strcmp($reportID, '') == 0 || $reportID == null) {\n // $response['REASON'] = 'Please select a report.';\n Yii::$app->session->addFlash('error', 'Please select a report.');\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n\t\t\t'model'=>$model\n ]); exit();\n }\t\t\n\t\t\t \n /*\n\t\t Set correct reporttype Filter\n\t\t $admin =1 \n\t\t client = 2\n\t\t \n\t\t */\n\t\t$cond= ['reportID' => (int) $reportID, 'reportTypeID' => 1];\n\t\tif(yii::$app->user->identity->clientID != Yii::$app->params['ADMIN_CLIENT_ID'])\n\t\t\t$cond['reportTypeID']= 2 ;\n\t\t\n\t\t \t$model =Reports::findOne($cond);\n\t\t\t\n\t\t\tif(!$model or $model==null)\n\t\t\t{\n\t\t\t\t $model = new Reports();\n\n\t\t\t\t\n\t Yii::$app->session->addFlash('error', 'Please select a report.');\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n\t\t\t'model'=>$model\n ]); exit();\n }\t\n\t\t\t\n $reportQuery = $model->reportQuery;\n \n $postData = $_REQUEST;\n unset($postData['Reports']);\n\t\t\tunset($postData['_csrf-backend']);\n unset($postData['generateReport']);\n\t\t\t/*IF not Admin, set the clientID to always be defined\n\t\t\t*/\n\t\tif(yii::$app->user->identity->clientID != Yii::$app->params['ADMIN_CLIENT_ID'])\n\t\t\t$postData['clientID'] = yii::$app->user->identity->clientID ;\n\t\t\n $queryStuff = $this->formulateFinalQuery($reportQuery, $postData);\n $formattedQuery = $queryStuff['finalQuery'];\n $params = $queryStuff['finalQueryParams'];\n// $formattedQuery = $this->formulateFinalQuery($reportQuery, $postData);\n // $rows = $this->getRowCount($formattedQuery, $params);\n $reportName = $model->reportName;\n $reportTitle = $model->reportName;\n if (isset($_REQUEST['dateFrom'])) {\n $reportName.=\": From date: \" . $_REQUEST['dateFrom'] . \"\";\n $reportTitle.= \" From date <span class='emTitle'>\" . $_REQUEST['dateFrom'] . \"</span>\";\n }\n\n if (isset($_REQUEST['dateTo'])) {\n $reportName.=\": to date: \" . $_REQUEST['dateTo'] . \"\";\n $reportTitle.= \": to date <span class='emTitle'>\" . $_REQUEST['dateTo'] . \"</span>\";\n }\n\t\t\t\n\t\t\t$connection = \\Yii::$app->db;\n$count = $connection->createCommand( \"select count(*)as x from ($formattedQuery) as n\")\n ->bindValues($params)->queryScalar();\n\n\n\t\t\t\t\n\t\t\t\t$dataProvider = new SqlDataProvider([\n\t\t\t\t'key' => 'id',\n 'sql' =>$formattedQuery,\n 'params' => $params,\n 'totalCount' => $count,\n 'pagination' => [\n 'pageSize' => 100,\n ],\n]);\n \t\t\treturn $this->render('index', [\n \t'model'=>$model,\n\t\t\t 'sql' =>$formattedQuery,\n 'params' => json_encode($params),\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'header' => $reportName,\n 'title' => $reportTitle,\n\t\t\t'id' => 'transactionReport' . $model->reportID,\n\t\t\t'columns'=>explode(\",\", $model->reportOutputColumns)\n ]);\n\t\t\n exit();\n\n\t\t\t\n\t\t\t\n\t\t }\n\n return $this->render('index', [\n \t'model'=>$model\n ]);\n }", "public static function getReports ($m, \n\t\t\t$n, \n\t\t\tShortDate $startDate, \n\t\t\tShortDate $endDate) {\n\t\t$GLOBALS[\"logger\"]->debug('getReports');\n\t\t// Basic where clause; get the head of each chain, signified by a null MASTER_ID\n\t\t$whereClause = \"master_id IS NULL\";\n\t\tif ($startDate) {\n\t\t\t$whereClause .= \" AND date >= timestamp '\" . $startDate->toDateTime('start') . \"'\";\n\t\t}\n\t\tif ($endDate) {\n\t\t\t$whereClause .= \" AND date <= timestamp '\" . $endDate->toDateTime('end') . \"'\";\n\t\t}\n\t\t$selstmt = \"SELECT * \" .\n\t\t\t\"FROM \" .\n\t\t\tself::REPORT_TABLE .\n\t\t\t\" WHERE \" .\n\t\t\t$whereClause .\n\t\t\t\" ORDER BY date DESC\";\n\t\tif ($m >= 0 && $n >= 0)\n\t\t\t$selstmt .= \" LIMIT $m, $n \";\n\t\t$GLOBALS[\"logger\"]->debug('selstmt = ' . $selstmt);\n\t\t$resultSet = ORM::for_table(self::REPORT_TABLE)->\n\t\t\traw_query($selstmt)->\n\t\t\tfind_many();\n\t\treturn self::getReports1 ($resultSet, $m, $n);\n\t}", "public function showHodReport()\n {\n $data = [];\n $query = \"\";\n\n if (!empty($_POST['academic_year'])) {\n $query .= \" academic_id = ? \";\n $this->acd_year = $this->verifyInput($_POST['academic_year']);\n $data[] = $this->acd_year;\n }\n if (!empty($_POST['year'])) {\n $query .= \" AND c.s_class_id = ? \";\n $this->year = $this->verifyInput($_POST['year']);\n $data[] = $this->year;\n }\n if (!empty($_POST['div'])) {\n $query .= \" AND c.div_id = ? \";\n $this->s_div = $this->verifyInput($_POST['div']);\n $data[] = $this->s_div;\n }\n if (!empty($_POST['sem_id']) || !empty($_POST['sem'])) {\n $query .= \" AND c.sem_id = ?\";\n $this->sem = isset($_POST['sem_id']) ? $this->verifyInput($_POST['sem_id']) : $this->verifyInput($_POST['sem']);\n $data[] = $this->sem;\n }\n if (!empty($_POST['class'])) {\n $query .= \" AND c.class_id = ? \";\n $this->class = $this->verifyInput($_POST['class']);\n $data[] = $this->class;\n }\n if ($_SESSION['role_id'] == 0) {\n if (isset($_POST['dept']) && !empty($_POST['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_POST['dept']);\n $data[] = $this->dept;\n }\n } else if ($_SESSION['role_id'] == 1) {\n if (isset($_SESSION['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n } else {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n\n $result = $this->getStudentByDeptDivisionAndYear([$this->dept, $this->year, $this->s_div]);\n if (!$result) return json_encode(array(\"error\" => \"nostudent\"));\n\n if ((!empty($_POST['from-date']) && !empty($_POST['till-date'])) || ($_POST['from-date'] != \"\" && $_POST['till-date'] != \"\")) {\n $query .= \" AND DATE(date_time) >= DATE(?) AND DATE(date_time) <= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $result = $this->getAttendanceByDate(\"date_time >= DATE(?) AND date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date)), date('Y-m-d', strtotime($this->till_date))]);\n\n if (!$result) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['from-date']) || $_POST['from-date'] != \"\") {\n $query .= \" AND DATE(date_time) >= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $from_data = $this->getAttendanceByDate(\"DATE(date_time) >= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date))]);\n if (!$from_data) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['till-date']) || $_POST['till-date'] != \"\") {\n $query .= \" AND DATE(date_time) <= DATE(?) \";\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $till_data = $this->getAttendanceByDate(\"date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, $this->sem_id, date('Y-m-d', strtotime($this->till_date))]);\n if (!$till_data) return (array(\"error\" => \"noattend\"));\n }\n\n $result = $this->getClassByYearDivisionAcademicAndDept([$_POST['academic_year'], $this->class, $this->s_div, $this->dept]);\n if (!$result) json_encode(array(\"error\" => \"noclass\"));\n else {\n //var_dump($_POST);\n //var_dump($query);\n $result = $this->getHodReportYearWise($query, $data);\n // if(empty($_POST['class_id'])){\n // $result = $this->getHodReportYearWise($query,$data);\n // }else{\n // $result[\"each_total\"], \"total\" => $result['total'], \"lectures\" =>$result['total_lectures']\n // } \n if (isset($result['e'])) return json_encode(array(\"error\" => \"notfound\"));\n return json_encode(array(\"error\" => \"none\", \"data\" => $result['report'], \"lectures\" => $result['lectures']));\n // if($from == 1 && $till == 1){\n // $query .= \" AND date_time >= DATE(?) AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'],$_POST['till-date']]);\n // }else if($from == 1 && $till == 0){\n // $query .= \" AND date_time >= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'], '9999-12-31']);\n // }else if($from = 0 && $till == 1){\n // $query .= \" AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,'0000-00-00',$_POST['till-date']]);\n // }else{\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class]);\n // }\n\n //return json_encode(array(\"error\" => \"none\",\"data\" => $result,\"total\" => $getTotal));\n }\n }", "public function getReports()\n {\n return $this->reports;\n }", "public function processReports();", "abstract public function buildReport();", "static function get_all_reports($includeDeleted=false)\n {\n global $DB;\n\n static $r;\n\n if(isset($r))\n return $r;\n\n $r = array();\n\n foreach($DB->get_fieldset_select('block_ilp_report','id','1 = 1 ') as $rid)\n {\n $report=static::from_id($rid);\n if(!$report->deleted or $includeDeleted)\n $r[$rid]=$report;\n }\n\n return $r;\n }", "public function show(Reports $reports)\n {\n //\n }", "public function APIreports()\n {\n $processed_fields= Processed_field::with('field','tractor')->paginate(15);\n\n return Processed_fieldResource::collection($processed_fields);\n }", "public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }", "function getReportsMenu(){\r\n $level=2;\r\n $hr=new HabilitationReport();\r\n $user=getSessionUser();\r\n //$allowedReport=array();\r\n $allowedCategory=array();\r\n $lst=$hr->getSqlElementsFromCriteria(array('idProfile'=>$user->idProfile, 'allowAccess'=>'1'), false);\r\n $res=array();\r\n $listCateg=SqlList::getList('ReportCategory');\r\n $idMenuReport=SqlElement::getSingleSqlElementFromCriteria('Navigation', array('name'=>'navReports'));\r\n $menuReport=SqlElement::getSingleSqlElementFromCriteria('Menu', array('name'=>'menuReports'));\r\n foreach ($lst as $h) {\r\n $report=$h->idReport;\r\n $nameReport=SqlList::getNameFromId('Report', $report, false);\r\n if (! Module::isReportActive($nameReport)) continue;\r\n //$allowedReport[$report]=$report;\r\n $category=SqlList::getFieldFromId('Report', $report, 'idReportCategory',false);\r\n $allowedCategory[$category]=$category;\r\n }\r\n $c=1;\r\n $lstIdCate=array();\r\n $idReportMenu=$idMenuReport->id.$level.$menuReport->id;\r\n $menuReportKey=$level.'-'.numericFixLengthFormatter($idMenuReport->id,5).'-'.numericFixLengthFormatter($c,5);\r\n $object= array('id'=>$idReportMenu,'name'=>$menuReport->name,'idParent'=>$idMenuReport->id,'idMenu'=>$menuReport->id);\r\n $res[$menuReportKey]=array('level'=>$level,'objectType'=>'reportDirect','object'=>$object);\r\n foreach ($listCateg as $id=>$name) {\r\n if (isset($allowedCategory[$id])) {\r\n $c++;\r\n $cat=new ReportCategory($id);\r\n $lstIdCate[]=$id;\r\n $idReport=$idMenuReport->id.$level.$id;\r\n $key=$level.'-'.numericFixLengthFormatter($idMenuReport->id,5).'-'.numericFixLengthFormatter($c,5);\r\n $obj= array('id'=>$idReport,'name'=>$cat->name,'idParent'=>$idMenuReport->id);\r\n $res[$key]=array('level'=>$level,'objectType'=>'report','object'=>$obj);\r\n }\r\n }\r\n //===================\r\n //=================== lis of all report dependant of this categoryies\r\n\r\n $level++;\r\n $reportDirect= new Report();\r\n $lstCatId=(empty($lstIdCate))?\"0\":\"0\".implode(\",\", $lstIdCate);\r\n $where=\" idReportCategory in (\".$lstCatId.\")\";\r\n $reportList= $reportDirect->getSqlElementsFromCriteria(null,false,$where,\"file\");\r\n $nameFile=SqlList::getList('Report','file');\r\n $lstReportName=array();\r\n $lstNewNavMenu=array();\r\n foreach ($nameFile as $idN=>$nameFile){\r\n $lstReportName[]=substr($nameFile, 0,strpos($nameFile, '.php'));\r\n }\r\n $countNameFil=array_count_values($lstReportName);\r\n foreach ($countNameFil as $name=>$val){\r\n if($val==1)unset($countNameFil[$name]);\r\n else $lstNewNavMenu[]=$name;\r\n }\r\n storReports($reportList,$res, $lstNewNavMenu,$idMenuReport, $level);\r\n return $res;\r\n \r\n}", "public function reportListing_default()\n {\n\t$defaultreportnames = $this->reportNames(); $rid = $defaultreportnames->fetch_object();\n\t$strsql = \"SELECT r.*,rs.* FROM \" . TBL_REPORTS . \" r inner join \" . TBL_REPORTS_SUBMISSION . \" rs on r.report_id=rs.report_id where r.site_id='\" . $_SESSION['site_id'] . \"' and r.report_id='\".$rid->report_id.\"'\";\n\t$objRs = $this->objDatabase->dbQuery($strsql);\n\treturn $objRs;\n }", "public function reports(){\n $reports = DB::table('reports')->paginate(25);\n $suggestions = DB::table('category_suggestion')->paginate(25);\n $categories = DB::table('categories')->paginate(25);\n return view('admin.reports')->with('reports', $reports)\n ->with('suggestions', $suggestions)\n ->with('categories', $categories);\n }", "abstract public function getDetailedReportName();", "public function getWorkReports()\n {\n return $this->postRequest('GetWorkReports');\n }", "public function show(Generalreport $generalreport)\n {\n //\n }", "public static function get_form($args, $nid, $response=null) {\n iform_load_helpers(array('report_helper','map_helper'));\n $readAuth = report_helper::get_read_auth($args['website_id'], $args['password']);\n $sharing='reporting';\n $reportOptions = array_merge(\n iform_report_get_report_options($args, $readAuth),\n array(\n 'reportGroup' => 'explore',\n 'rememberParamsReportGroup' => 'explore',\n 'paramsOnly'=>true,\n 'paramsInMapToolbar'=>true,\n 'sharing'=>$sharing,\n 'paramsFormButtonCaption'=>lang::get('Filter'),\n 'rowId' => 'occurrence_id',\n )\n );\n iform_report_apply_explore_user_own_preferences($reportOptions);\n $reportOptions['extraParams']['limit']=3000;\n $r = report_helper::report_grid($reportOptions);\n\n $r .= report_helper::report_map(array(\n 'readAuth' => $readAuth,\n 'dataSource'=>$args['report_name'],\n 'extraParams'=>$reportOptions['extraParams'],\n 'paramDefaults'=>$reportOptions['paramDefaults'],\n 'autoParamsForm'=>false,\n 'reportGroup' => 'explore',\n 'rememberParamsReportGroup' => 'explore',\n 'clickableLayersOutputMode' => 'report',\n 'sharing'=>$sharing,\n 'rowId' => 'occurrence_id',\n 'ajax'=>TRUE\n ));\n $options = array_merge(\n iform_map_get_map_options($args, $readAuth),\n array(\n 'featureIdField' => 'occurrence_id',\n 'clickForSpatialRef'=>false,\n 'reportGroup' => 'explore',\n 'toolbarDiv' => 'top'\n )\n );\n $olOptions = iform_map_get_ol_options($args);\n $r .= map_helper::map_panel($options, $olOptions);\n $downloadOwnDataOnlyInArgs = isset($args['downloadOwnDataOnly']) && $args['downloadOwnDataOnly'];\n $ownDataValueInPost = isset($_POST['explore-ownData']);\n $exploreOwnDataEnabledInPost = $ownDataValueInPost && $_POST['explore-ownData']==='1';\n $reportParamPresetsSetToOwnData = isset($reportOptions['extraParams']['ownData']) && $reportOptions['extraParams']['ownData']==='1';\n $reportParamDefautsSetToOwnData = isset($reportOptions['paramDefaults']['ownData']) && $reportOptions['paramDefaults']['ownData']==='1';\n $allowDownload = !$downloadOwnDataOnlyInArgs\n || $reportParamPresetsSetToOwnData\n || $exploreOwnDataEnabledInPost\n || (!$ownDataValueInPost && $reportParamDefautsSetToOwnData);\n $reportOptions = array_merge(\n $reportOptions,\n array(\n 'id' => 'explore-records',\n 'paramsOnly'=>false,\n 'autoParamsForm'=>false,\n 'downloadLink'=>$allowDownload,\n 'rowClass' => 'certainty{certainty}'\n )\n );\n if (isset($args['includeEditLink']) && $args['includeEditLink'] && !empty($args['includeEditLinkPath']))\n $reportOptions['columns'][] = array(\n 'display' => 'Actions',\n 'actions'=>array(\n array('caption' => 'edit','url'=>url($args['includeEditLinkPath']),'urlParams'=>array('occurrence_id' => '{occurrence_id}'),'visibility_field' => 'belongs_to_user')\n )\n );\n $r .= report_helper::report_grid($reportOptions);\n return $r;\n\n }", "function reports($args){\n $this->view->add('page_title','Reports');\n \n\t\t//Set tool box\n\t\tif( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n\t\t if( $func = $this->reports_toolbox($tool,$this) ) {\n \n // check for success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/reports')\n );\n\t}", "public static function getReports()\n {\n return ReportServices::getReports();\n }", "public function getAllReporteGeneral() {\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->select = 't.DES, t.COD, upje.CED AS C, pers.NOM AS N, tipos.DES AS D, SUM( pob.HOM ) + SUM( pob.MUJ ) AS P';\r\n\t\t$criteria->join = 'INNER JOIN pob ON t.COD = pob.COD\r\n\t INNER JOIN upje ON t.COD = upje.COD\r\n\t INNER JOIN pers ON upje.CED = pers.CED\r\n\t INNER JOIN tipos ON upje.CODT = tipos.CODT';\r\n\t\t$criteria->group= \"t.COD\";\r\n\t\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t\t'criteria'=>$criteria,\r\n\t\r\n\t\t));\r\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "public static function getReportsForClip($clipid, \n\t\t\t$m, \n\t\t\t$n, \n\t\t\tShortDate $startDate, \n\t\t\tShortDate $endDate) {\n\t\t$GLOBALS[\"logger\"]->debug('getReportsForClip');\n\t\t$selstmt = \"SELECT * \" .\n\t\t\t\"FROM \" .\n\t\t\tself::REPORT_TABLE .\n\t\t\t\" WHERE master_id IS NULL AND clip_id = '$clipid' \" .\n\t\t\t\"ORDER BY date DESC \" .\n\t\t\t\"LIMIT $m, $n \";\n\t\t$GLOBALS[\"logger\"]->debug('selstmt = ' . $selstmt);\n\t\t$resultSet = ORM::for_table(self::REPORT_TABLE)->\n\t\t\traw_query($selstmt)->\n\t\t\tfind_many();\n\t\t$GLOBALS[\"logger\"]->debug('returned from query');\n\t\treturn self::getReports1 ($resultSet, $m, $n);\n\t}", "public function index()\n {\n return Report::all();\n }", "public function overviewAction(){\n \t$analytics = new Pas_Analytics_Gateway($this->_ID, $this->_pword);\n \t$analytics->setProfile(25726058);\n \t$timeframe = new Pas_Analytics_Timespan(); \n $timeframe->setTimespan($this->_getParam('timespan'));\n \t$dates = $timeframe->getDates();\n \t$analytics->setStart($dates['start']);\n \t$analytics->setEnd($dates['end']);\n \t$analytics->setMetrics(\n array(\n Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS,\n Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_UNIQUE_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_AVG_TIME_ON_PAGE,\n Zend_Gdata_Analytics_DataQuery::METRIC_ENTRANCES,\n Zend_Gdata_Analytics_DataQuery::METRIC_EXITS,\n Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES\n \t\t));\n \t$analytics->setDimensions(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_TITLE,\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH,\t\t\n \t\t));\n \tif(is_null($this->_getParam('filter'))){\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR_NOT . 'forum'\n\t ));\n\t } else {\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR . '/'\n . $this->_getParam('filter')\n\t ));\n\t }\n \t$analytics->setMax(20);\n \t$analytics->setSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS);\n \t$analytics->setSortDirection(true);\n \t$analytics->setStartIndex($this->getStart());\n \t$this->view->results = $analytics->getData();\n $paginator = Zend_Paginator::factory((int)$analytics->getTotal());\n $paginator->setCurrentPageNumber((int)$this->getPage())\n\t\t\t->setItemCountPerPage((int)self::MAX_RESULTS);\n $this->view->paginator = $paginator;\n }", "public function getReports() {\n return $this->model->all()->toArray();\n }", "public function getReports()\n\t{\n\t\t$this->load->model('admin/inceptra_admin_model');\n\t\t$res=$this->inceptra_admin_model->get_report();\n\t\t\n\t\t$this->load->helper('file'); \n\t\t$this->load->helper(array('dompdf', 'file'));\n\t\t$head=\"LIST OF Candidates and there Marks\";\n\t\t$html=\"<center><h3>\".$head.\"</h3></center><br/>\";\n\t\t\t\t\n\t\t$html.='<center><table width=\"600\">';\n\t\t$html.='<tr><th align=\"left\">Username</th><th align=\"left\">Multichoice</th><th align=\"left\">Pickup1</th><th align=\"left\">Pickup2</th><th align=\"left\">Match Catch</th><th align=\"left\">Toal Marks</th></tr>';\n\t\tforeach($res as $r)\n\t\t{\n\t\t$html.='<tr><td>'.$r->r_id.'</td><td>'.$r->username.'</td><td>'.$r->multichoice.'</td><td>'.$r->pickup1marks.'</td><td>'.$r->pickup2marks.'</td><td>'.$r->matchcatch.'</td><td>'.$r->totalmarks.'</td></tr>';\n\t\t\n\t\t}\n\t\t$html.='</table></center>';\n\t\t\t\t\n \tpdf_create($html, 'pdfreport');\n write_file('name', $data);\n\t}", "public function showBetweenReport(){\n $reports = false;\n return view('dashboard.reports',compact('reports'));\n }", "function getArticleReport($journalId) {\n\t\t$primaryLocale = Locale::getPrimaryLocale();\n\t\t$locale = Locale::getLocale();\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\n\t\t\t\ta.article_id AS article_id,\n\t\t\t\tCOALESCE(asl1.setting_value, aspl1.setting_value) AS title,\n\t\t\t\tCOALESCE(asl2.setting_value, aspl2.setting_value) AS abstract,\n\t\t\t\tu.first_name AS fname,\n\t\t\t\tu.middle_name AS mname,\n\t\t\t\tu.last_name AS lname,\n\t\t\t\tu.email AS email,\n\t\t\t\tu.affiliation AS affiliation,\n\t\t\t\tu.country AS country,\n\t\t\t\tu.phone AS phone,\n\t\t\t\tu.fax AS fax,\n\t\t\t\tu.url AS url,\n\t\t\t\tu.mailing_address AS address,\n\t\t\t\tCOALESCE(usl.setting_value, uspl.setting_value) AS biography,\n\t\t\t\tCOALESCE(sl.setting_value, spl.setting_value) AS section_title,\n\t\t\t\ta.language AS language\n\t\t\tFROM\n\t\t\t\tarticles a\n\t\t\t\t\tLEFT JOIN users u ON a.user_id=u.user_id\n\t\t\t\t\tLEFT JOIN user_settings uspl ON (u.user_id=uspl.user_id AND uspl.setting_name = ? AND uspl.locale = ?)\n\t\t\t\t\tLEFT JOIN user_settings usl ON (u.user_id=usl.user_id AND usl.setting_name = ? AND usl.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings aspl1 ON (aspl1.article_id=a.article_id AND aspl1.setting_name = ? AND aspl1.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings asl1 ON (asl1.article_id=a.article_id AND asl1.setting_name = ? AND asl1.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings aspl2 ON (aspl2.article_id=a.article_id AND aspl2.setting_name = ? AND aspl2.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings asl2 ON (asl2.article_id=a.article_id AND asl2.setting_name = ? AND asl2.locale = ?)\n\t\t\t\t\tLEFT JOIN section_settings spl ON (spl.section_id=a.section_id AND spl.setting_name = ? AND spl.locale = ?)\n\t\t\t\t\tLEFT JOIN section_settings sl ON (sl.section_id=a.section_id AND sl.setting_name = ? AND sl.locale = ?)\n\t\t\tWHERE\n\t\t\t\ta.journal_id = ?\n\t\t\tORDER BY\n\t\t\t\ttitle',\n\t\t\tarray(\n\t\t\t\t'biography',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'biography',\n\t\t\t\t$locale,\n\t\t\t\t'title',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'title',\n\t\t\t\t$locale,\n\t\t\t\t'abstract',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'abstract',\n\t\t\t\t$locale,\n\t\t\t\t'title',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'title',\n\t\t\t\t$locale,\n\t\t\t\t$journalId\n\t\t\t)\n\t\t);\n\t\t$articlesReturner =& new DBRowIterator($result);\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\tMAX(ed.date_decided) AS date,\n\t\t\t\ted.article_id AS article_id\n\t\t\tFROM\tedit_decisions ed,\n\t\t\t\tarticles a\n\t\t\tWHERE\ta.journal_id = ? AND\n\t\t\t\ta.article_id = ed.article_id\n\t\t\tGROUP BY ed.article_id',\n\t\t\tarray($journalId)\n\t\t);\n\t\t$decisionDatesIterator =& new DBRowIterator($result);\n\t\t$decisions = array();\n\t\t$decisionsReturner = array();\n\t\twhile ($row =& $decisionDatesIterator->next()) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t'SELECT\tdecision AS decision,\n\t\t\t\t\tarticle_id AS article_id\n\t\t\t\tFROM\tedit_decisions\n\t\t\t\tWHERE\tdate_decided = ? AND\n\t\t\t\t\tarticle_id = ?',\n\t\t\t\tarray(\n\t\t\t\t\t$row['date'],\n\t\t\t\t\t$row['article_id']\n\t\t\t\t)\n\t\t\t);\n\t\t\t$decisionsReturner[] =& new DBRowIterator($result);\n\t\t\tunset($result);\n\t\t}\n\n\t\treturn array($articlesReturner, $decisionsReturner);\n\t}", "public function listing_camp($stat='',$campid='',$adv='',$start=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = $campid;\n\t\t\t\t$data['sel_adv'] = $adv;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t$limit = $this->page_limit;\n\t\tif($campid!='')\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array('ox_banners.campaignid'=>$campid);\n }\n }\n else\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n }\n //print_r($where_arr);exit;\n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\n\t\t$data['tot_list'] = $list_data;\n\n\t\t$config['per_page'] \t= $limit;\n\t\tif($campid!='')\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat.\"/\".$campid);\n $config['uri_segment'] \t= 6;\n }\n else\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat);\n $config['uri_segment'] \t= 5;\n }\n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);\n\t\t$page_data = $this->mod_banner->get_banners($where_arr,$start,$limit);\n\t\t$data['banner_list']\t=\t$page_data;\n\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\n\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/\n if($campid!='')\n {\n $where_tot = array('ox_banners.campaignid'=>$campid);\n $where_act = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>0);\n $where_inact = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>1);\n }\n else\n {\n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n $where_inact = array('ox_banners.status'=>1);\n }\n\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\n\t}", "public function index()\n\t{\n\t\t$reports = Report::with('report_type')->orderBy('created_at','desc')->get();\n return $reports;\n\t}", "public function reports()\n {\n return $this->hasMany(MICheckReport::class, 'target', 'gtin_code');\n }", "function archimedes_build_report() {\n global $databases;\n\n $owl = new Archimedes('drupal', variable_get('site_mail', FALSE), archimedes_get_token());\n\n $owl->createField('title', variable_get('site_name', \"Drupal\"));\n $owl->createField('field_drupal_version', VERSION);\n\n // This allows site instances of the same project to be\n // related. For example my.site.com may also have staging.my.site.com\n // and we don't want the reports to clash, but grouping these sites\n // is still useful.\n $owl->createField('field_common_hash', variable_get('archimedes_common_key', ''));\n\n if (variable_get('archimedes_description', '') != '') {\n $nid = arg(1,drupal_get_normal_path(variable_get('archimedes_description', 'node')));\n $node = node_load($nid);\n $body = trim(substr(drupal_html_to_text($node->body,array('b','strong','i','em','p')),0,500));\n $owl->createField('body', $body);\n } else {\n $owl->createField('body', variable_get('site_mission', 'No description has been set.'));\n }\n\n // If Drush (or some other CLI passed method) is used to \n // run cron. You'll need to ensure a correct servername is\n // passed to PHP. With drush, use -l http://mysite.com.\n $owl->createField('field_servername', url('', array('absolute' => 1)));\n\n // The location where Drupal believes it resides.\n $owl->createField('field_webroot', DRUPAL_ROOT);\n\n // Build an understanding of the databases Drupal\n // can connect too. At this stage, Archimedes only\n // reports on the default connections, i.e, master\n // slave databases for Drupal only.\n $values = array();\n $connections = array();\n foreach($databases['default'] as $key => $connection) {\n if ($key == 'slave') {\n foreach ($connection as $slave) {\n $connections[] = $slave;\n }\n }\n else {\n $connections[] = $connection;\n }\n }\n\n foreach ($connections as $url) {\n //format into url like drupal 6\n $db_url = $url['driver'] . '://' . $url['username'] . ':' . $url['password'] . '@' . $url['host'] . '/' . $url['database'];\n $db = parse_url($db_url);\n if (!isset($database_name)) {\n $database_name = substr($db['path'],1);\n $owl->createField('field_dbname', $database_name);\n }\n $dbhost = ($db['host'] == 'localhost' || $db['host'] == '127.0.0.1') ? 'localhost' : $db['host'];\n $values[] = archimedes_value($dbhost,'nodereference')->addNode(array('title' => $dbhost, 'type' => 'host'));\n }\n\n $owl->createField('field_dbhost', $values)\n ->invokeFacet();\n\n $user = array(\n 'type' => 'mail',\n 'mailto' => 'mailto:' . db_query(\"SELECT u.mail FROM {users} u WHERE uid = 1 LIMIT 1\")->fetchField(),\n );\n $value = archimedes_value($user['mailto'],'userreference')\n ->addUser($user);\n $owl->createField('field_users', array($value))\n ->invokeFacet();\n\n // Graphable data.\n $users = archimedes_value(db_query(\"SELECT COUNT(uid) as count FROM {users}\")->fetchField() - 1, 'dataset')->setTitle('Users');\n $nodes = archimedes_value(db_query(\"SELECT COUNT(nid) as count FROM {node}\")->fetchField(), 'dataset')->setTitle('Nodes');\n $revisions = archimedes_value(db_query(\"SELECT COUNT(nid) as count FROM {node_revision}\")->fetchField(), 'dataset')->setTitle('Revisions');\n $owl->createField('field_c_dataset', array($nodes, $revisions, $users));\n\n $modules = $themes = array();\n foreach (module_list() as $module) {\n $info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info');\n $node = array(\n 'title' => (isset($info['name']) ? $info['name'] : ''),\n 'body' => (isset($info['description']) ? $info['description'] : ''),\n 'field_name' => $module,\n 'field_dru_pkg' => (isset($info['package']) ? $info['package'] : ''),\n 'field_dru_proj' => (isset($info['project']) ? $info['project'] : 'drupal'),\n 'field_mod_version' => (isset($info['version']) ? $info['version'] : ''),\n 'field_mod_url' => (isset($info['project status url']) ? $info['project status url'] : ''),\n 'type' => 'drupal_module',\n );\n if (empty($node['field_dru_proj']) && !empty($node['field_dru_pkg']) && (strpos($node['field_dru_pkg'], 'Core -') !== FALSE)) {\n $node['field_dru_proj'] = 'drupal';\n }\n $value = archimedes_value($node['title'], 'drupalmod')\n ->addNode($node);\n $modules[] = $value;\n }\n\n $owl->createField('field_drupal_mod', $modules)\n ->invokeFacet();\n\n\n $result = db_query(\"SELECT name FROM {system} WHERE status = 1 AND type = 'theme'\");\n while ($theme = $result->fetchField()) {\n $info = drupal_parse_info_file(drupal_get_path('theme', $theme) . '/' . $theme . '.info');\n $node = array(\n 'title' => (isset($info['name']) ? $info['name'] : ''),\n 'body' => (isset($info['description']) ? $info['description'] : ''),\n 'field_name' => $theme,\n 'field_mod_version' => (isset($info['version']) ? $info['version'] : ''),\n 'field_dru_proj' => (isset($info['project']) ? $info['project'] : 'drupal'),\n 'field_mod_url' => (isset($info['project status url']) ? $info['project status url'] : ''),\n 'type' => 'drupal_theme',\n );\n if (empty($node['field_dru_proj']) && in_array($theme, array('bluemarine', 'chameleon', 'garland', 'marvin', 'minnelli', 'pushbutton'))) {\n // Unfortunately, there's no way to tell if a theme is part of core,\n // so we must hard-code a list here.\n $node['field_dru_proj'] = 'drupal';\n }\n\n $value = archimedes_value($node['title'], 'drupalmod')\n ->addNode($node);\n\n $themes[] = $value;\n }\n\n $owl->createField('field_drupal_theme', $themes)\n ->invokeFacet();\n\n $environment = array_shift(environment_current(NULL,NULL,TRUE));\n\n $owl->createField('field_site_env', $environment['label']);\n\n $ignore = array('#(\\w*/)*sites/\\w*/files#', '#.*\\.(git|svn|bzr|cvs)/.*#');\n \n // The point of the directory hash is to record the state of the deployed code base.\n // If the code base changes, then the site could have been redeployed or hacked! However,\n // in development scenarios, the code changes very frequently so we don't care to change\n // it.\n $dir_hash = archimedes_directory_hash(DRUPAL_ROOT, $ignore);\n $owl->createField('field_directory_hash', $dir_hash);\n\n if (variable_get('archimedes_use_unsafe_collection', FALSE)) {\n $collect = new ArchimedesDrupalUnsafeCollection($owl);\n $collect->servername()\n ->database_size()\n ->storage_usage();\n }\n\n // Allow other modules to add data via hook_archimedes.\n drupal_alter('archimedes', $owl);\n \n return $owl;\n}", "public function reports()\n\t{\n\t\treturn new Engine_ProxyObject($this, Engine_Api::_() -> getDbtable('reports', 'core'));\n\t}", "function get_all_reports()\r\n {\r\n return $this->db->get('reports')->result_array();\r\n }", "public function actionInquiryReport()\n {\n $s_date='';\n $e_date='';\n $export = Yii::$app->request->get('export');\n $search = Yii::$app->request->get('search');\n if(isset($export) && !isset($search)) {\n $this->InquiryExport();\n }\n else{\n if (isset(Yii::$app->request->queryParams['BookingSearch']['start_date']))\n $s_date = Yii::$app->request->queryParams['BookingSearch']['start_date'];\n if (isset(Yii::$app->request->queryParams['BookingSearch']['end_date']))\n $e_date = Yii::$app->request->queryParams['BookingSearch']['end_date'];\n if($s_date=='')\n $s_date = date(\"M-d-Y\");\n if($e_date=='')\n $e_date = date(\"M-d-Y\");\n $searchModel = new RecordInquirySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('inquiry_index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 's_date' => $s_date,\n 'e_date' => $e_date,\n ]);\n }\n\n }", "function woocommerce_admin_reports( $reports ) {\n $reports[ 'customers' ][ 'reports' ][ 'customer-serial-numbers' ] = array(\n 'title' => __( 'Customer Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n $reports[ 'orders' ][ 'reports' ][ 'product-serial-numbers' ] = array(\n 'title' => __( 'Product Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n $reports[ 'stock' ][ 'reports' ][ 'serial-numbers' ] = array(\n 'title' => __( 'Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n return $reports;\n }", "public static function getReportHome()\n {\n$data = User::findBySql(\"SELECT COUNT(ei.ei_id) as totalstudent, i.*,ei.ei_graduation_year FROM university u \".\n \"JOIN institution i on u.uni_id = i.uni_id \".\n \"JOIN education_information ei on i.inst_id = ei.inst_id \".\n \"WHERE ei.ei_graduation_year BETWEEN '2010' AND '2014' AND u.uni_status = '1' \".\n \"AND i.inst_status = '1' GROUP BY ei.inst_id,ei.ei_graduation_year\")\n ->asArray()\n ->all();\n\n return $data;\n }", "abstract protected function grabReport( $report_id );", "public function index()\n {\n if (!Auth::user()->provider) return $this->errorUnauthorized();\n $Ad = Ads::Location('upNewsReports')->first();\n return $this->respondWithItem([\n 'provider' => new ProviderLargeResource(Auth::user()->provider),\n 'Ad' => $Ad\n ]);\n }", "public function getPageDetails()\n\t{\n\t\t$v = new View(0);\n\t\treturn $v->getAllRecords( FALSE );\n\t\t\n\t}", "public function getList()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n $report_arr = $this->inspection->readAllReport();\n\n if (count($report_arr) > 0)\n {\n echo $this->encodeJson(\"Inspections found.\", 0x00, $report_arr);\n }\n else\n {\n echo $this->encodeJson(\"No inspections found.\", 0xD1ED, NULL);\n }\n }", "function getSiteReport($siteID)\r\n\t{\r\n\t}", "public function index()\n {\n $members = Members::whereHas('programs', function ($query) {\n $query->whereIn('ed_level', ['Basic Education']);\n })->get();\n\n $formula = Formula::where('formula_id','Basic Education')->first();\n $bedpieces = explode(\" \", $formula->formula);\n $variabled = Variable::whereIn('code',$bedpieces)->where('ed_type', 'Basic Education')->get();\n return view('main.membershipenroll.bed.index')->with('members',$members)->with('formula',$formula)->with('bedpieces',$bedpieces)->with('variabled',$variabled);\n }", "private function basicReport()\n {\n return $this->report->count();\n }", "public function reports()\n\t{\n\t\treturn $this->belongsToMany('App\\Report');\n\t}", "protected function _getAvailableReports()\n {\n $factory = $this->getContainer()->get('orkestra.report_factory');\n\n return $factory->getReports();\n }", "public function index()\n {\n $processed_fields= Processed_field::with('field','tractor')->get();\n\n return view('reports', compact('processed_fields'));\n\n\n }", "protected function get_reports( $args = array() ) {\n\t\t$defaults = array(\n\t\t\t'post_id'\t\t=> $this->post_id,\n\t\t\t//'post_status' => 'completed'\n\t\t);\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\treturn APP_Report_Factory::get_reports( $args );\n\t}", "public function getOverview();", "function getOverview() ;", "public function index()\n {\n $reports = Report::active()->newest()->relation()->get();\n\n return response()->json([\n 'code' => 200,\n 'message' => 'OK',\n 'data' => $reports\n ]);\n }", "public function advancedSearchDataProvider()\n {\n return $this->getApiRequestsData(\n __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'advanced_requests'\n );\n }", "function getViewableReports($conn){\n\t$sql = \"SELECT PlanId, plan.Name AS PlanName, CompanyName FROM plan JOIN client ON plan.ClientId = client.ClientId WHERE plan.UserId = :userID\";\n\n\n\t$userID = getLoggedInID();\n\n\t\n\t$sth = $conn->prepare($sql);\n\t$sth->bindParam(':userID', $userID, PDO::PARAM_INT, 11);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n}", "public function index()\n {\n //$results = DB::table('individual_report_cicl')->select('id', 'section', 'key_indicators_of_performance', 'total', 'cr', 'cv', 'adm1', 'adm2', 'adm3')->where('user_id', auth('api')->user()->id)->get();\n //return $results;\n }", "public function overview()\n {\n \n $data['title']= 'My created cases';\n $data['status'] = 1;\n $data['myreports']= $this->Report_model->get_myreports($data['status']);\n $running_cases = $this->Report_model->get_myreports('2');\n $data['myreports'] = array_merge($data['myreports'], $running_cases);\n //print_r($running_cases);\n /*\n $running['title']= 'My not closed Reports';\n $running['status'] = 2;\n $running['myreports']= $this->Report_model->get_myreports($running['status']);\n */\n $closed['title']= 'My closed cases';\n $closed['status'] = 3;\n $closed['myreports']= $this->Report_model->get_myreports($closed['status']);\n //print_r($data['users']);\n //$this->load->helper('url'); \n $this->load->view('templates/header');\n //php block\n //just created reports\n $this->load->view('reports/myreports',$data);\n //not closed still running reports\n //$this->load->view('reports/myreports',$running);\n //My closed Reports\n $this->load->view('reports/myreports',$closed);\n \n $this->load->view('templates/footer');\n\n }", "public function getOverview() {}", "public function getOverview() {}", "public function index()\n {\n $inc_reports = Report::paginate(15);\n return view('report.index')->with('inc_reports', $inc_reports);\n }", "function action() {\n\t\t// to use. In this case, that's below.\n\t\t$this->setSubview('example.reportDashboard');\n\t\t$this->setTitle('Dashboard');\n\t\t\n\t\t// the getParam method is used to get things from the $_GET and $POST objects\n\t\t// note that, if you ask for currentUser, it will look for owa_currentUser\n\t\t// Existing OWA code mainly uses the $_GET variable more than $_POST\n\t\t// by default, you will have the following parameters in any new module you create:\n\t\t// siteId, period (e.g.: last_seven_days), startDate, endDate, action (your reportName)\n\t\t$currentUser = $this->getParam('currentUser');\n\t\t$startDate = $this->getParam('startDate');\n\t\t$endDate = $this->getParam('endDate');\n\t\t\n\t\t// Getting Data\n\t\t// There are a couple ways to get data from the database\n\t\t\n\t\t// First: you can use OWA's Data Access API (controlled by owa_coreAP.php)\n\t\t// Documentation: http://wiki.openwebanalytics.com/index.php?title=Data_Access_API\n\t\t// List of all metrics and dimensions: http://wiki.openwebanalytics.com/index.php?title=Metrics_%26_Dimensions\n\t\t// The following API request gets the list of all actions performed within the specified date range\n\t\t$params = array('do'\t\t => 'getResultSet',\n\t\t\t\t\t\t'period' \t => $this->get('period'),\n\t\t\t\t\t\t'startDate'\t => $startDate,\n\t\t\t\t\t\t'endDate'\t => $endDate,\n\t\t\t\t\t\t'metrics' \t => 'actions,uniqueActions',\n\t\t\t\t\t\t'dimensions' => 'actionGroup',\n\t\t\t\t\t\t'siteId' \t => $this->getParam('siteId'),\n\t\t\t\t\t\t'resultsPerPage' => 10,\n\t\t\t\t\t\t'sort' => 'actionGroup-'\n\t\t\t\t\t\t);\n\t\t$actions = owa_coreAPI::executeApiCommand($params);\n\n\t\t// But the Data Access API is limited. E.g.: you can't filter actions by user name, since that's not a dimension\n\t\t// To do more normal sql queries, you can do the following (for more info, you can see owa_db.php)\n\t\t// The follow DB request gets the list of all actions performed by a particular user (if one is selected)\n\t\tif ($currentUser){\n\t\t\t$db = owa_coreAPI::dbSingleton();\n\t\t\t$db->selectFrom('owa_action_fact');\n\t\t\t$db->selectColumn('timestamp,action_group,action_name,action_label');\n\t\t\t$db->where('user_name', $user);\n\t\t\t$actionsByUser = $db->getAllRows();\n\t\t}\n\t\t// If you expect to do a lot of similar sql commands like above, you can put that functionality into a class\n\t\t// Should have path example/classes/className.php \n\t\t// Use the supportClassFactory method to include your class\n\t\t// This code gets the list of all visitor names that have performed actions on the site(s) you are tracking\n\t\t$p = owa_coreAPI::supportClassFactory('example', 'exampleClass');\n\t\t$users = $p->getAllUserNames();\n\t\t\n\t\t// To make the data compiled here accessible to the view controller class (below), use the set method\n\t\t// It's good practice to keep the variable names the same when you do this\n\t\t$this->set('actions', $actions);\n\t\tif ($currentUser)\n\t\t\t$this->set('actionsByUser', $actionsByUser);\n\t\t$this->set('users', $users);\n\t\t$this->set('currentUser', $currentUser);\n\t\t\n\t\t$this->set('actionsByUser',$actionsByUser);\n\t\t\n\t}", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "private function getDashboardNews(){\n $this->dashboard->findDashboardNewsData();\n }", "function can_view_report() {\n\n //no default restrictions, implement restrictions in report instance class\n return true;\n }", "protected function getDetailedQuery() {\n \n return $this->createQueryBuilder('n')\n ->select('n, ng, ngi, ntg, ntgi, ru, rug, rugi, u, r')\n ->join('n.gallery', 'ng')\n ->leftJoin('ng.images', 'ngi')\n ->leftJoin('ng.tmp', 'ntg')\n ->leftJoin('ntg.images', 'ntgi')\n ->join('n.user', 'u')\n ->join('u.user_regular', 'ru')\n ->join('ru.gallery', 'rug')\n ->leftJoin('rug.images', 'rugi')\n ->leftJoin('n.reviews', 'r');\n }", "public function index()\n {\n $reports = Report::whereType('post')\n ->with('type', 'member', 'reportable', 'reportable.media')\n ->orderBy('created_at', 'DESC')\n ->paginate(20);\n\n return view('dashboard.report.index', compact('reports'));\n }", "function getAdminDetails($nws_id)\n {\n $stmt = \"SELECT\n *\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"news\n WHERE\n nws_id=\" . Misc::escapeInteger($nws_id);\n $res = DB_Helper::getInstance()->getRow($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return \"\";\n } else {\n // get all of the project associations here as well\n $res['projects'] = array_keys(self::getAssociatedProjects($res['nws_id']));\n return $res;\n }\n }", "function nycc_rides_report_leaders() {\r\n $sql = array();\r\n $sql['query'] = \"SELECT np.title AS name, np.nid, count(*) AS cnt FROM node np, content_type_rides r, content_field_ride_leaders l, node nr WHERE l.field_ride_leaders_nid = np.nid AND np.type='profile' AND l.nid = r.nid AND l.vid = r.vid AND np.status <> 0 AND nr.nid = r.nid AND nr.vid = r.vid AND nr.status <> 0 \";\r\n\r\n $sql['count'] = \"SELECT COUNT(DISTINCT np.title) AS cnt FROM node np, content_type_rides r, content_field_ride_leaders l, node nr WHERE l.field_ride_leaders_nid = np.nid AND np.type='profile' AND l.nid = r.nid AND l.vid = r.vid AND np.status <> 0 AND nr.nid = r.nid AND nr.vid = r.vid AND nr.status <> 0 \";\r\n\r\n return nycc_rides_report(\"Ride Reports: Leaders\", $sql, nycc_rides_report_rides_header_1(), 'nycc_rides_report_rides_process_row_1', 1);\r\n}", "public function actionIndex() {\n\n $criteria = new CDbCriteria;\n $criteria->join = 'inner join content ON content.object_id = t.object_id and t.object_model = content.object_model and content.space_id is null';\n \n $reportedContent = ReportContent::model()->findAll($criteria);\n $dataProvider = new CArrayDataProvider($reportedContent, array(\n 'id' => 'id',\n 'pagination' => array(\n 'pageSize' => 20\n )\n ));\n \n $this->render('index', array('reportedContent' => $dataProvider));\n }", "function onShowDetail(&$pr, &$ds) {\n\t$hotel = $this->dTable->detailed($this->entryId)->execute()->getFirst();\n\n\t$this->dsDb->add(\"Hotel\",$hotel->toArray(true));\n\n\t$fn = $this->name() . \"/show.xml\";\n\t$pr->loadPage( $fn );\n }", "public function mortality_reports_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n }", "public function reporting(): array\n {\n ConfigHelper::mustAllow('production');\n\n $route = '/invoices/reporting/single';\n\n return $this->report($route, DocumentType::SIMPILIFIED);\n }", "function exeGetreport($payid) {\n if($this->uri->segment(5) != '') {\n $and = \" AND b.user_id = \".$this->db->escape($this->uri->segment(5)).\" \";\n } else {\n if($_SESSION['userLevel'] != 1 ) {\n $and = \" AND b.user_id = \".$this->db->escape($_SESSION['userId']).\" \";\n } else {\n $and = \"\"; \n }\n }\n $exeGetreport = $this->db->query(\"SELECT *\n FROM report a\n LEFT JOIN employees b\n ON a.user_id = b.user_id \n LEFT JOIN employee_details c\n ON c.user_id = b.user_id\n LEFT JOIN payperiod d\n ON d.id = a.payperiod\n WHERE a.payperiod = \".$this->db->escape($payid).\"\n $and \");\n\n if($exeGetreport->num_rows() > 0) {\n return $exeGetreport->result_array();\n } else {\n return false;\n } \n }", "abstract public function showFieldSets();", "public function get_open_home_report( $open_home_report_id ) {\n\t\t\t\n\t\t}", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "public function index()\n {\n $module = Module::get('Ledgerreports');\n \n $acc_items = Acc_account::where('acc_or_group','account')->get();\n return View('la.ledgerreports.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => $this->listing_cols,\n 'acc_items' => $acc_items, \n 'module' => $module\n ]);\n }", "public function reports()\n {\n $registeredReports = new ReportFullCollection([\n 'console' => new PrintableReport(new LogOutputReport()),\n 'teamcity' => new PrintableReport(\n new TeamcityBuiltImageVersionReport(\n new TeamcityVariableCollection()\n )\n ),\n 'index' => new SavableReport(\n new HTMLReport(new Engine(HTMLReport::REPORT_TEMPLATE_PATH))\n )\n ]);\n\n return $registeredReports;\n }", "protected function ShowExporterReport()\n\t{\n\t\t$this->_LoadExportSession();\n\n\t\tif(!isset($_GET['module'])) {\n\t\t\texit;\n\t\t}\n\n\t\tif(!isset($this->_exportSession[$_GET['module']])) {\n\t\t\texit;\n\t\t}\n\n\t\t$GLOBALS['Report'] = $this->BuildExporterReport($_GET['module'], $this->_exportSession[$_GET['module']]);\n\n\t\t$GLOBALS['ReportTitle'] = GetLang('ReportTitle' . $_GET['module']);\n\t\t$GLOBALS['ReportDesc'] = GetLang('ReportDesc' . $_GET['module']);\n\t\t$GLOBALS['Module'] = $_GET['module'];\n\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"pageheader.popup\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t$this->ParseTemplate(\"exporters.report\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"pagefooter.popup\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t}", "private function report(array $params): array {\n\n // Drupal's entity query API isn't up to the task of creating this report.\n $query = \\Drupal::database()->select('ebms_review', 'review');\n $query->join('ebms_packet_article__reviews', 'reviews', 'reviews.reviews_target_id = review.id');\n $query->join('ebms_packet_article', 'packet_article', 'packet_article.id = reviews.entity_id');\n $query->join('ebms_packet__articles', 'articles', 'articles.articles_target_id = packet_article.id');\n $query->join('ebms_packet', 'packet', 'packet.id = articles.entity_id');\n $query->join('ebms_article', 'article', 'article.id = packet_article.article');\n $query->join('ebms_article__topics', 'topics', 'topics.entity_id = article.id');\n $query->join('ebms_article_topic', 'article_topic', 'article_topic.id = topics.topics_target_id AND article_topic.topic = packet.topic');\n $query->join('ebms_topic', 'topic', 'topic.id = packet.topic');\n $query->leftJoin('ebms_article__authors', 'authors', 'authors.entity_id = article.id AND authors.delta = 0');\n\n // Add the conditions to the query.\n if (!empty($params['topic'])) {\n $query->condition('packet.topic', $params['topic']);\n }\n else {\n $query->condition('topic.board', $params['board']);\n }\n if (!empty($params['reviewer'])) {\n $query->condition('review.reviewer', $params['reviewer']);\n }\n if (!empty($params['cycle'])) {\n $query->condition('article_topic.cycle', $params['cycle']);\n }\n if (!empty($params['packet'])) {\n $query->condition('packet.id', $params['packet']);\n }\n if (!empty($params['submission-start'])) {\n $query->condition('review.posted', $params['submission-start'], '>=');\n }\n if (!empty($params['submission-end'])) {\n $end = $params['submission-end'];\n if (strlen($end) === 10) {\n $end .= ' 23:59:59';\n }\n $query->condition('review.posted', $end, '<=');\n }\n if (!empty($params['creation-start'])) {\n $query->condition('packet.created', $params['creation-start'], '>=');\n }\n if (!empty($params['creation-end'])) {\n $end = $params['creation-end'];\n if (strlen($end) === 10) {\n $end .= ' 23:59:59';\n }\n $query->condition('packet.created', $end, '<=');\n }\n\n // Select the fields to be returned with the results set.\n $query->addField('article', 'id', 'article_id');\n $query->addField('article', 'search_title', 'title');\n $query->addField('article_topic', 'id', 'article_topic_id');\n $query->addField('article_topic', 'cycle', 'cycle');\n $query->addField('authors', 'authors_search_name', 'author');\n $query->addField('packet', 'title', 'packet');\n $query->addField('packet', 'created', 'packet_created');\n $query->addField('packet', 'id', 'packet_id');\n $query->addField('review', 'id', 'review_id');\n $query->addField('review', 'posted', 'review_posted');\n $query->addField('topic', 'id', 'topic_id');\n $query->addField('topic', 'name', 'topic');\n $query->distinct();\n\n // Provide a ressonable sort order for the results.\n $query->orderBy('author');\n $query->orderBy('title');\n $query->orderBy('topic');\n $query->orderBy('packet_created');\n $query->orderBy('review_posted');\n\n // Create the render arrays for the articles with their reviews.\n $articles = [];\n $packets = [];\n $review_count = 0;\n foreach ($query->execute() as $row) {\n $review_count++;\n $article_id = $row->article_id;\n $topic_id = $row->topic_id;\n $packet_id = $row->packet_id;\n $packets[$packet_id] = $packet_id;\n $review = Review::load($row->review_id);\n if (!array_key_exists($article_id, $articles)) {\n $article = Article::load($article_id);\n $article_topic = ArticleTopic::load($row->article_topic_id);\n $high_priority = FALSE;\n foreach ($article_topic->tags as $article_tag) {\n if ($article_tag->entity->tag->entity->field_text_id->value === 'high_priority') {\n $high_priority = TRUE;\n break;\n }\n }\n $articles[$article_id] = [\n 'id' => $article->id(),\n 'url' => Url::fromRoute('ebms_article.article', ['article' => $article->id()]),\n 'authors' => implode(', ', $article->getAuthors(3)) ?: '[No authors named]',\n 'title' => $article->title->value,\n 'publication' => $article->getLabel(),\n 'pmid' => $article->source_id->value,\n 'high_priority' => $high_priority,\n 'topics' => [],\n ];\n }\n if (!array_key_exists($topic_id, $articles[$article_id]['topics'])) {\n $articles[$article_id]['topics'][$topic_id] = [\n 'name' => $row->topic,\n 'cycle' => Batch::cycleString($row->cycle),\n 'packets' => [],\n ];\n }\n if (!array_key_exists($packet_id, $articles[$article_id]['topics'][$topic_id]['packets'])) {\n $articles[$article_id]['topics'][$topic_id]['packets'][$packet_id] = [\n 'name' => $row->packet,\n 'created' => $row->packet_created,\n 'reviews' => [],\n ];\n }\n $symbol = '✅';\n $dispositions = [];\n foreach ($review->dispositions as $disposition) {\n $dispositions[] = $disposition->entity->name->value;\n if ($disposition->entity->name->value === Review::NO_CHANGES) {\n $symbol = '❌';\n }\n }\n $comments = [];\n foreach ($review->comments as $comment) {\n if (!empty($comment->value)) {\n $comments[] = $comment->value;\n }\n }\n $reasons = [];\n foreach ($review->reasons as $reason) {\n $reasons[] = $reason->entity->name->value;\n }\n $articles[$article_id]['topics'][$topic_id]['packets'][$packet_id]['reviews'][] = [\n 'posted' => $row->review_posted,\n 'reviewer' => $review->reviewer->entity->name->value,\n 'dispositions' => $dispositions,\n 'comments' => $comments,\n 'reasons' => $reasons,\n 'symbol' => $symbol,\n ];\n }\n\n // Assemble and return the render array for the report.\n $article_count = count($articles);\n $packet_count = count($packets);\n $article_s = $article_count === 1 ? '' : 's';\n $review_s = $review_count === 1 ? '' : 's';\n $packet_s = $packet_count === 1 ? '' : 's';\n return [\n '#theme' => 'literature_reviews',\n '#title' => \"Literature Reviews ($article_count Article$article_s with $review_count Review$review_s in $packet_count Packet$packet_s)\",\n '#articles' => $articles,\n ];\n }", "public function getDevReports ()\n { \n return $this->hasMany('App\\DevReport','task_id', 'id'); \n }", "function view_report($reportID)\r\n\t{\r\n\t\t// load view : report_detail avec en parametre ce que la fonction getSiteReport ou getTargetReport a retourne\r\n\t\t// la vue loadee est dupliquee par les controlleurs \"website\" et \"target\" (raison: loader la vue depuis le controlleur eponyme pour conserver une URL coherente pour le user)\r\n\t}", "public function show(HRReports $hRReports)\n {\n //\n }", "function report_search()\n\n {\n $this->load->model( 'main_model');\n $data['get_node_type'] = $this->main_model->get_node_type();\n $data['get_circle'] = $this->main_model->get_circle();\n\t $data['get_site'] = $this->main_model->get_site();\n\t $data['get_node_device'] = $this->main_model->get_node_in_device();\n $this->load->view('report_search',$data);\n\n }", "public function loadReportView()\n {\n //retrieve this month revenue data to generate the description\n $thisMonthRevenue = $this->main_model->retrieveRevenueThisMonth();\n\n //get the average revenue per month to generate the description\n $avgRevenue = $this->main_model->retrieveRevenueAverage();\n\n //to send those data to the view\n $data['thisMonthTotal'] = $thisMonthRevenue['thisMonthTotal'];\n $data['avgRevenue'] = $avgRevenue['avgRevenue'];\n\n\n //retrieve data needed for the bottom part\n $bottomData = $this->main_model-> totalAverageVisitors();\n\n //to send those data to the view\n $data['totalVisitors'] = $bottomData['totalVisitors'];\n $data['avgVisitors'] = $bottomData['avgVisitors'];\n\n \n $this->view(\"adminReportMod\", $data);\n }" ]
[ "0.57960796", "0.56453884", "0.55919605", "0.55919605", "0.55478764", "0.546281", "0.54500854", "0.5443246", "0.54071546", "0.5309802", "0.53067887", "0.53067887", "0.5281823", "0.5250932", "0.52440524", "0.521269", "0.5179699", "0.5157947", "0.51575637", "0.51534766", "0.5152844", "0.5145432", "0.5130875", "0.5122369", "0.5094343", "0.5089202", "0.5078691", "0.5078008", "0.50739866", "0.5065703", "0.5058463", "0.5054411", "0.5035286", "0.5028398", "0.5028398", "0.5017586", "0.50050527", "0.4991231", "0.49902797", "0.49851105", "0.49831024", "0.498057", "0.49699143", "0.4960276", "0.49578315", "0.4944949", "0.4934103", "0.49138498", "0.4913642", "0.4899626", "0.4899495", "0.48964188", "0.48913753", "0.48867476", "0.48855272", "0.48763594", "0.48754627", "0.486614", "0.48564023", "0.48445228", "0.48277178", "0.4827234", "0.48208964", "0.48202547", "0.48175642", "0.4812637", "0.48107713", "0.48011774", "0.47926927", "0.47904608", "0.47900078", "0.47806966", "0.47802573", "0.4780143", "0.4780143", "0.4780143", "0.4780143", "0.47728494", "0.47689772", "0.476405", "0.47617853", "0.476154", "0.4758086", "0.47482157", "0.47463638", "0.47338203", "0.47326764", "0.4731822", "0.4729762", "0.47282356", "0.47260925", "0.4723879", "0.4718019", "0.47127533", "0.46993402", "0.46978927", "0.46971363", "0.46861205", "0.4686054", "0.46851978" ]
0.7193118
0
to logout the user
function killsession() { $_SESSION = array(); $var = session_destroy(); if($var == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logout(){\n $this->_user->logout();\n }", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "public function logout() {\n $this->_disconnect_user();\n redirect(base_admin_url('identification'), 'refresh');\n }", "public function logout() {\n\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\n\t# Create the data array we'll use with the update method\n\t# In this case, we're only updating one field, so our array only has one entry\n\t$data = Array(\"token\" => $new_token);\n\t\n\t# Do the update\n\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\n\t# Delete their token cookie - effectively logging them out\n\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\n\tRouter::redirect(\"/users/login\");\n }", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "public function action_logout()\n\t{\n\t\tCookie::delete('user');\n\t\t\t\n\t\t// Redirect to the login\n\t\t$this->request->redirect(Route::get('kohanut-login')->uri(array('action'=>'login')));\n\t}", "function logout()\n\t\t{\n\t\t\t// log the user out\n\t\t\t$logout = $this->ion_auth->logout();\n\t\t\tredirect('login');\n\t\t}", "public function actionLogout()\n\t{\n $userid = Yii::app()->user->userUuid;\n $map = AcUsers::model()->findByAttributes(array('userUuid'=>$userid));\n $user = $map->email;\n\n date_default_timezone_set('Africa/Kampala');\n $today = date(\"Y-m-d H:i:s\");\n\n Yii::app()->user->logout();\n\n $logger = AcUserSignIn::model()->findByAttributes(array('userUuid'=>$userid));\n $sign_in = $logger->userSignInUuid;\n\n $l = uniqid('',true);\n $log = new AcUserSignOut();\n $log->userSignOutUuid = $l;\n $log->userSignInUuid = $sign_in;\n $log->save(false);\n\n\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "public function logout()\n {\n DbModel::logUserActivity('logged out of the system');\n\n //set property $user of this class to null\n $this->user = null;\n\n //we call a method remove inside session that unsets the user key inside $_SESSION\n $this->session->remove('user');\n\n //we then redirect the user back to home page using the redirect method inside Response class\n $this->response->redirect('/');\n\n\n }", "public function logout(){\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logout() {\n\t\t# Generate and save a new token for next login\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string() );\n\n\t\t# Create the data array we'll use with the update method\n\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect(\"/\");\n\t}", "function logout() {\r\n $this->auth->logout();\r\n }", "public function logout()\n {\n $this->session->remove('user');\n }", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout() {\n # Generate and save a new token for next login\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past, logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logout() {\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n\n }", "function logout()\n\t{\n\n\t\t// log the user out\n\t\t$this->session->sess_destroy();\n\n\t\t// redirect them to the login page\n\t\tredirect('auth', 'refresh');\n\t}", "public function logout() {\n\t\t$user = $this->Auth->user();\n\t\t$this->Session->destroy();\n\t\t$this->Cookie->destroy();\n\t\t$this->Session->setFlash(sprintf(__('%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function user_logout()\n {\n $this->session->sess_destroy();\n redirect('userController/login_view', 'refresh');\n }", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public function logout(){\r\n if(isset($_SESSION['user'])){\r\n session_destroy();\r\n header('Location:'.ROUTE);\r\n }\r\n }", "public function logout(){\r\n // $UsersModel ->logout();\r\n session('user_id', null);\r\n // session('user_auth_sign', null);\r\n // cookie('user_auth', null);\r\n // cookie('user_auth_sign', null);\r\n\r\n $this->redirect('index/index');\r\n }", "public function action_logout(){\n\t\tAuth::instance()->logout();\n \n\t\t#redirect to the user account and then the signin page if logout worked as expected\n\t\tHTTP::redirect('/');\t\n\n\t}", "public function logoutUser()\n\t{\n\t\t\\JFactory::getApplication()->logout();\n\t}", "public function action_logout()\n\t{\n\t\tAuth::instance()->logout(TRUE);\n\n\t\t// Redirect back to the login object\n\t\tRequest::current()->redirect(url::site('auth/login',Request::current()->protocol(),false));\n\n\t}", "public function logoutUser(){\n $userHandler = new UserHandler();\n $userHandler->logout();\n }", "private function logout() {\n }", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public function logout() {\n\t\t$this->Auth->logout();\n\t\t$this->redirect($this->referer($this->Auth->redirect(), true)); \n\t}", "public function logoutAction() {\r\n\t\t$logoutdb = new Model_UsersTimeInfo();\r\n\t\t$logoutdb->logoutDB(login_user(),login_user_role());\r\n \t$storage = new Zend_Auth_Storage_Session();\r\n $storage->clear();\r\n $this->_redirect('auth/login');\r\n }", "public function logout() {\t\n\t\t$this->Session->destroy();\n\t\t$this->delete_cookie('KEYADMUSER');\n\t\t$this->disable_cache();\t\t\n\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>You have successfully signed off', 'default', array('class' => 'alert alert-success'));\n\t\t$this->redirect('/admin/login/');\n\n\t}", "public static function logout(){\n \n //Tornando se sessão User nulla\n $_SESSION[User::SESSION] = null;\n \n }", "private function logout()\n {\n try\n {\n global $userquery;\n\n \n if(!userid())\n {\n $logout_response['logged_out'] = 0;\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'you are not logged in', \"data\" => $logout_response);\n $this->response($this->json($data)); \n }\n\n $userquery->logout();\n if(cb_get_functions('logout')) \n cb_call_functions('logout'); \n \n setcookie('is_logout','yes',time()+3600,'/');\n\n $logout_response['logged_out'] = 1;\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'logout successfully', \"data\" => $logout_response);\n $this->response($this->json($data));\n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function logout()\r\n {\r\n if($this->twitter->check_login() != False)\r\n {\r\n // Revoke the session - this means logging out\r\n // Note that it also removes the Oauth access keys from Twitter NOT jsut removing the cookie\r\n $this->twitter->revokeSession(True);\r\n \r\n }\r\n //url::redirect('ktwitter/demo');\r\n url::redirect($this->docroot.'users');\r\n }", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "public function userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function Logout()\n\t{\n\t\t$this->user->Logout();\n\t\t$this->RedirectToController();\n\t}", "public function logout() {\n $logout = $this->ion_auth->logout();\n\n // redirect them back to the login page\n redirect('login');\n }", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function logout(){\n unset($_SESSION['user_id']);\n \n session_destroy();\n redirect('users/login');\n }", "function do_logout()\n\t{\n\t\t//log the user out\n\t\t$logout = $this->ion_auth->logout();\n\n\t\tredirect('cms/login', 'refresh');\n\t}", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "function logout()\n{\n\t$this->Session->delete('user');\n\t$this->redirect('/inhabitants/');\n}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array(\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LOGGED_IN',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_ID',\n\t\t\t\t\t\t\t\t\t\t\t'VB_FULL_NAME',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_EMAIL',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_MOBILE',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_CURRENT_PATH',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LAST_LOGIN'));\n\t\t\t\t\t\t\n\t\tredirect(base_url());\n\t}", "public function logout(){\r\n unset($_SESSION['user_id']);\r\n unset($this->user_id);\r\n $this->signed_in = false;\r\n }", "public function logout(){\n session_destroy();\n $arr = array(\n 'sessionID' => ''\n );\n dibi::query('UPDATE `user` SET ', $arr, \n 'WHERE `email`=%s', $email);\n parent::redirection(\"index.php\");\n }", "public function logout()\n {\n $this->_delAuthId();\n }", "public function logout() {\n $this->run('logout', array());\n }", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public function logout(){\n if(isset($_SESSION[\"identity\"])){\n \n unset($_SESSION[\"identity\"]);\n }\n\n if(isset($_SESSION[\"admin\"])){\n \n unset($_SESSION[\"admin\"]);\n }\n\n /* redireccionar, cuando me elimine la sesion del logueo */\n header(\"Location:\".base_url);\n }", "public function logout ()\n {\n User::logout(\"home\");\n }", "public function logout() {\r\n \r\n // signal any observers that the user has logged out\r\n $this->setState(\"logout\");\r\n }", "public static function logout();", "public function logout() {\n\t\t$this->session->unset_userdata('uid');\n\t\tredirect('/', 'refresh');\n\t}", "public function logout(){\n\n //xoa tat ca cac session lien quan den user da dang nhap\n unset($_SESSION['user']);\n //xoa tat ca cac session khac tren he thong\n $_SESSION['success'] = 'Đăng xuất thành công';\n// session_destroy();\n //chuyen huong ve trang login\n header('Location:index.php?controller=login&action=login');\n exit();\n }", "public function logout()\n\t{\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$this->auth->logout();\n\t\t// retornamos a la vista de inicio de sesion\n\t\t$this->redirect('/');\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout() {\n\n\t}", "public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}", "public function logoutUser() {\n $this->debugPrint(\"Logging out user...\");\n\n if ($this->auth_http_method == 'DIGEST')\n $data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']);\n\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'NONCE' && !empty($data))\n $this->{$this->nonce_expire_function}($data['nonce']);\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'COOKIE') {\n session_start();\n $_SESSION['lastseen'] = time() - ($this->cookie_expire + 3600 );\n }\n if ($this->redirect_on_logout) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_logout_url}?error=2\" />\n <body><h2>{$this->logout_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->logout_text}</h2></body></html>\";\n }\n exit();\n }", "public function action_logout()\r\n\t{\r\n\t\tAuth::instance()->logout();\r\n\t\tRequest::instance()->redirect('/');\r\n\t}", "public function logout()\n {\n if (isset($_SESSION['user_id']))\n {\n unset($_SESSION['user_id']);\n }\n redirect('', 'location');\n }", "public function actionLogout() {\r\n\t\tYii::$app->user->logout ();\r\n\t}", "public function logout()\n { \n // Cerramos sesion de usuario\n $this->mlogin->cerrar_sesion();\n redirect();\n }", "public function logout()\n {\n $this->Session->delete('User');\n\n $this->redirect($this->Auth->logout());\n }", "public function actionLogout() {\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->getModule('user')->returnLogoutUrl);\n\t}", "public function logout() { \n \n session_destroy(); \n }", "function logout()\n {\n $this->data['title'] = \"Logout\";\n\n //log the user out\n $logout = $this->ion_auth->logout();\n\n //redirect them to the login page\n flashMsg('message', $this->ion_auth->messages());\n redirect('auth/login', 'refresh');\n }", "public function logoutUser(){\n\t\t \n\t\t// UC 2 3: User tells the system he wants to log out\n\t\tif($this->view->userTryQuit()){\n\t\t\t\n\t\t\t// UC 2 4: The system logs the user out and presents a feedback message\n\t\t\t$this->model->logoutUser();\n\t\t\t$this->view->removeCredentials();\n\t\t\t\n\t\t\t// does not /* redirects to self */\n\t\t\t$this->view->storeMessage(\"Du har blivit utloggad\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t\t\n\t\t// UC 2 1: The system presents a logout choice\t\n\t\t} else {\n\t\t\treturn $this->view->showLogin(true);\n\t\t}\n\t}", "public function logout() {\n\t\t\tunset( $_SESSION['user_id'] );\n\t\t\tunset( $this->user_id );\n\t\t\t$this->logged_in = false;\n\t\t}", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "public function logout(){ \n $this->user_model->logout();\n redirect( 'user/login' );\n }", "public function logoutAction(){\n if(!$this->input->isGet()) return $this->response->SendResponse(\n 403, false, GET_MSG\n );\n if(!$this->indexMiddleware->isUser()) return $this->response->SendResponse(\n 401, false, ACL_MSG\n ); \n //checking if the user is logged in \n $loggedUsername = $this->indexMiddleware->loggedUser();\n $checkLogged = $this->model->findByUsername('session_tb', $loggedUsername);\n // var_dump($checkLogged);die();\n if(!$checkLogged)return $this->response->SendResponse(\n 401, false, 'You are logged out already.'\n );\n\n $db = new DataBase();\n $logOut = $db->delete('session_tb', $checkLogged->id);\n\n if($logOut) return $this->response->SendResponse(200, false, 'You have successfully loggged out.');\n }", "public function logout()\n\t{\n\t\t$this->data['title'] = \"Logout\";\n\n\t\t$agentId = $this->session->userdata('user_id'); //get_cookie('landela_user');\n\t\t$this->db->delete('finger_cookie',array('agent_id' => $agentId));\n\n\t\t// log the user out\n\t\t$logout = $this->ion_auth->logout();\n\n\t\t// redirect them to the login page\n\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\tredirect('/', 'refresh');\n\t}", "public function logout(){\n\t\t$this->aauth->logout();\n\t\tredirect(BASEURL);\n\t}", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "public function logout()\n {\n if ( !$this->isAuthenticated() )\n {\n return;\n }\n\n $event = new OW_Event(OW_EventManager::ON_USER_LOGOUT, array('userId' => $this->getUserId()));\n OW::getEventManager()->trigger($event);\n\n $this->authenticator->logout();\n }", "function logout(){\r\n\t\t$action_details=array();\r\n\t\t$action_details['table_name']='users';\r\n\t\t$action_details['row_id']=$this->user_id;\r\n\t\t$action_details['operation']='Logged Out';\r\n\t\t$this->createActionLog($action_details);\r\n\t\t//$_SESSION['user_id'] = null;\r\n\t\treturn true;\r\n\t}", "public function logout()\r\r\n\t{\r\r\n\t\t// Destroy all sessions\r\r\n\t\t$this->session->sess_destroy();\r\r\n\t\t$this->session->unset_userdata('userid');\r\r\n\t\t$this->session->unset_userdata('userinfo');\r\r\n\t\tredirect(base_url());\r\r\n\t\texit();\r\r\n\r\r\n\t}", "public function userLogout()\n\t{\n\t\t$result = $this->session->unset_userdata('user_name');\n\t\techo 'true';\n\t\t\n\t}", "function logoutUser($user) {\n\t}", "public function logout()\n\t{\n\t\t$unset_array = array('set_id', 'access_pass', 'username');\n\t\t$this->session->unset_userdata($unset_array);\n\t}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array('logged_in'=>'','last_visit'=>''));\n\t\t$this->session->sess_destroy();\n\t\t$this->layout->view('user/login_page');\n\n\t}", "public function logout(){\n\t\tunset($_SESSION['auth']);\n\t\theader('Location: index.php?p=users.login');\n\t}", "function user_logging_out($user_id) {\n \n }", "function logout() {\n if ($this->getRequestMethod() != 'POST') {\n $this->response('', 406);\n }\n\t \t\n\t $userId = $_POST['user_id']; \n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($userId, $auth)) {\n\t\terror_log(\"logout: token expired\"); \n\t\t$this->response('',204);\n }\n $query = \"delete from tokens where user_id = $userId\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__); \n $success = array('status' => \"Success\", \"msg\" => \"Successfully logged out.\");\n $this->response(json_encode($success), 200);\n }", "public function getLogout(){\n unset($_SESSION['userId']);\n unset($_SESSION['userName']);\n unset($_SESSION['userEmail']);\n header(\"Location: \". BASE_URL);\n }" ]
[ "0.9136542", "0.86219144", "0.8608152", "0.8573457", "0.855198", "0.8546323", "0.853538", "0.8534508", "0.8534342", "0.852702", "0.8519795", "0.8512989", "0.85081226", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8492816", "0.8476247", "0.8473511", "0.84540147", "0.84467393", "0.84323394", "0.83957124", "0.839569", "0.8389649", "0.838154", "0.83774155", "0.83763486", "0.8356124", "0.8355496", "0.8346367", "0.834459", "0.8342302", "0.8341462", "0.83243084", "0.8311704", "0.83112836", "0.8305293", "0.8303094", "0.82951945", "0.82833195", "0.8275929", "0.82673943", "0.8266411", "0.826271", "0.8257825", "0.82523125", "0.82521456", "0.8249815", "0.82454205", "0.82379246", "0.8230145", "0.82278943", "0.8219828", "0.8217576", "0.8212826", "0.82095665", "0.8208205", "0.8207881", "0.8206211", "0.8205933", "0.8194494", "0.81924564", "0.81924564", "0.81917095", "0.81860524", "0.8184524", "0.8169214", "0.81671876", "0.81669194", "0.81619596", "0.8160428", "0.8151366", "0.81500167", "0.81437427", "0.81434983", "0.8142498", "0.81393605", "0.81386584", "0.8132802", "0.8132734", "0.81297606", "0.81295943", "0.81276685", "0.8126878", "0.8121623", "0.8121381", "0.812013", "0.81195146", "0.8112908", "0.8110025", "0.810794", "0.8105604", "0.8104413", "0.8103627" ]
0.0
-1
to store the data given by the user's upload file
function storeDictionary($conn, $username) { if(htmlentities(isset($_FILES['textfile']))) { $user = $username; $temp_file = htmlentities($_FILES['textfile']['tmp_name']); $content = file_get_contents($temp_file); $printed_data = $content; //split the data and store in an array $eachLine = explode(',', $printed_data); array_pop($eachLine); foreach($eachLine as $product) { $item = explode('=', $product); $eng = htmlentities($conn->real_escape_string($item[0])); $spa = htmlentities($conn->real_escape_string($item[1])); $trim_eng = trim($eng); $trim_spa = trim($spa); //to check duplicates $check_if_exists = "SELECT * FROM dictionary WHERE username='$user' AND english='$trim_eng' AND spanish='$trim_spa'"; $check_result = $conn->query($check_if_exists); if(!$check_result) die("Database access failed:" . $conn->error); $checkrows = $check_result->num_rows; //if there's duplicate then continue, else insert the word into the db. if($checkrows > 0){ continue; $check_result->close(); $insert_result->close(); } else{ $insert_dictionary = "INSERT INTO dictionary (username, english, spanish) VALUES ('$user', '$trim_eng', '$trim_spa')" ; $insert_result = $conn->query($insert_dictionary); if(!$insert_result) echo "INSERT failed: '$query' <br>" . $conn->error. "<br><br>"; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function store(&$data) {\n\n\t\t// Prepare some info that we need all over\n\t\t$storageFolder = $this->getPropertyDefinition('dirBase');\n\t\t$optionTags = $this->getPropertyDefinition('optionTags');\n\t\t$canDelete = (!isset($optionTags['NODELETEFILE']) && $this->isRequired() === false);\n\t\t$shouldDelete = (KRequest::getInt($this->propertyName.'-delete', 0) == 1);\n\t\t$currentFileName = $this->getCurrentFilename($data->id);\n\t\t$recordId = $data->{$this->model->getTableKey()};\n\n\t\t// Create the storage folder if needed\n\t\tif (is_dir($storageFolder) == false) {\n\t\t\t$success = mkdir($storageFolder, 0777, true);\n\t\t\tif ($success == false) {\n\t\t\t\t$errorMsg = KText::sprintf('Could not create the file folder for %s in %s. Please check if your data folder and its content are writable and try again.', $this->getPropertyDefinition('label'), $storageFolder);\n\t\t\t\t$this->setError($errorMsg);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Get the uploaded file's info (This is the typical array you'd get from $_FILES['your_file'])\n\t\t$file = KRequest::getFile($this->propertyName);\n\n\t\t// If the user checked the 'delete' checkbox, delete the item\n\t\tif ($shouldDelete) {\n\n\t\t\tif ($canDelete == false) {\n\t\t\t\tthrow new Exception('User tried to delete a file that should not be deletable (by settings)');\n\t\t\t}\n\n\t\t\t$fileToRemove = $storageFolder.'/'.$currentFileName;\n\n\t\t\t// Go on and delete the file (if it exists, otherwise just let it be)\n\t\t\tif (is_file($fileToRemove)) {\n\n\t\t\t\t$success = unlink($fileToRemove);\n\n\t\t\t\tif ($success == false) {\n\t\t\t\t\t$errorMsg = KText::sprintf('Could not remove the file for field %s in %s. Please check if your data folder and its content are writable and try again.', $this->getPropertyDefinition('label'), $fileToRemove);\n\t\t\t\t\t$this->setError($errorMsg);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Set the file name storage field to empty (if we store the file name)\n\t\t\tif (isset($optionTags['SAVE_FILENAME'])) {\n\t\t\t\t$data->{$this->propertyName} = '';\n\t\t\t\t$this->updateFilenameBaseTable($recordId, '');\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\n\t\t// If the user uploaded no file, all stays the same for our prop.\n\t\tif (empty($file['tmp_name'])) {\n\n\t\t\t// Just sneak in the file name in the data object (just in case the data is used after storing)\n\t\t\t$data->{$this->propertyName} = $this->getCurrentFilename($recordId);\n\n\t\t\treturn true;\n\n\t\t}\n\n\n\t\t// Prepare the filename (there are a few settings that control how the file name is 'built' together)\n\t\t$newFileName = $this->getNewFileName($data);\n\n\t\t// Figure out the full filesystem path for the file\n\t\t$destinationPath = $storageFolder . '/' . $newFileName;\n\n\t\t// Move the file from tmp to destination\n\t\t$moveSuccess = rename($file['tmp_name'], $destinationPath);\n\n\t\t// Send false and feedback if moving didn't go well\n\t\tif ($moveSuccess == false) {\n\t\t\t$errorMsg = KText::sprintf('Could not store file for field %s in %s. Please check if your data folder and its content are writable and try again.', $this->getPropertyDefinition('label'), $destinationPath);\n\t\t\t$this->setError($errorMsg);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Put file permissions to 0775 (it allows for having shared write permissions when you organise unix groups nicely)\n\t\tchmod($destinationPath, 0775);\n\n\t\t// Save the file name in table if configured for that\n\t\tif (isset($optionTags['SAVE_FILENAME'])) {\n\t\t\t$this->updateFilenameBaseTable($recordId, $newFileName);\n\t\t}\n\n\t\t// Add the file name to the data object (just in case someone uses this object right after storing)\n\t\t$data->{$this->propertyName} = $newFileName;\n\n\t\t// If the file name changed (because of the 'appendSerial' setting or anything else), remove the old file\n\t\tif ($currentFileName && $currentFileName != $newFileName) {\n\n\t\t\t$fileToRemove = $storageFolder . '/' . $currentFileName;\n\n\t\t\tif (is_file($fileToRemove)) {\n\n\t\t\t\t$success = unlink($fileToRemove);\n\n\t\t\t\tif ($success == false) {\n\t\t\t\t\t$errorMsg = KText::sprintf('Could not remove the previous file for field %s in %s. Please check if your data folder and its content are writable and try again.', $this->getPropertyDefinition('label'), $fileToRemove);\n\t\t\t\t\t$this->setError($errorMsg);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}", "public function set_file($file){\n //error checking\n if(empty($file) || !$file || !is_array($file)){\n $this->errors[] =\"There was no file uploaded here\";\n return false; \n // Check if the file is uploaded \n }elseif($file['error'] !==0){\n \n $this->error[] = $this->upload_errors_array[$file['error']];\n return false;\n \n }else {\n //Submit data \n $this->user_image = basename($file['name']); //basename is function\n $this->tmp_path = $file['tmp_name'];\n $this->type = $file ['type'];\n $this->size = $file ['size'];\n }\n }", "function _submit_data()\n {\n\t$data = $this->_get_data_from_post();\n\t//$this->debug($_FILES);\n\tif (isset($_FILES['photo']) && $_FILES['photo']['name'] != NULL) {\n\t $data['image'] = Modules::run('upload_manager/upload', 'photo', 'profile');\n\t}\n\n\t$id = $this->uri->segment(3) == 'edit' ? $this->session->user_id : '';\n\tif (is_numeric($id)) {\n\t $this->_update($id, $data);\n\t Modules::run('auth/create_session', $this->session->user_id);\n\t redirect($this->uri->segment(3) == 'edit' ? 'users/profile' : 'users');\n\t} else {\n\t $this->_insert($data);\n\t redirect('login');\n\t}\n }", "abstract public function store(File $file);", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function storeResumeFile()\n\t\t{\n\t\t\t// check to make sure file was posted\n\t\t\tif (!isset($_FILES['resume'])) {\n\t\t\t\t$this->throwJsonError(500, 'No resume file found.');\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// Get the PHP assigned file name & location from the RAM storage of the file\n\t\t\t$tmp_name = $_FILES['resume']['tmp_name'];\n\t\t\t// Get the original file name as uploaded\n\t\t\t$name = $_FILES['resume']['name'];\n\t\t\t// To ensure all files are unique, get the timestamp of the uplaod.\n\t\t\t$timestamp = date('YmdHis');\n\t\t\t// Determine the server location for the file to be stored.\n\t\t\t$location = \"$this->uploads_dir/$timestamp-$name\";\n\t\t\t// Store the file.\n\t\t\tif (move_uploaded_file($tmp_name, $location)) {\n\t\t\t\tchmod($location, 0666);\n\t\t\t\treturn $location;\n\t\t\t}\n\t\t\treturn $tmp_name;\n\t\t}", "function file_storeData($page_id, $identifier) {\n\tglobal $Auth,$input_language;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t$userfile\t= $_FILES[$identifier]['tmp_name'];\n\t$file_name\t= $_FILES[$identifier]['name'];\n\t$file_size\t= $_FILES[$identifier]['size'];\n\t$file_type\t= $_FILES[$identifier]['type'];\n\t//$text\t\t= $_POST[$identifier.\"name\"];\n\t$text\t\t= mysql_real_escape_string($_POST[\"HEADLINE\"]);\n\n\t## for security and convenience reasons we have to convert the\n\t## supplied string\n\n\t## prepare the db-object\n\t$db_connectionStore = new DB_Sql();\n\n\t## okay we first create an upload object\n\t$f = new file_object(); \n\t##$userfile = stripslashes($userfile);\n\tif ($userfile != \"none\" && $userfile!='') { \n\t\t## then we upload the file\n\t\t$filename = $f->upload($userfile, $file_name,$file_size,$file_type, MATRIX_UPLOADDIR_DOCS);\n\t\tif($filename != -1) {\n\t\t\t## first we need to find out if the entry already exists\n\t\t\t$select_query = \"SELECT file_id,filename FROM \".PAGE_FILE.\" WHERE page_id = '$page_id' AND identifier = '$identifier' AND client_id='$client_id' AND language='$input_language'\";\n\t\t\t$result_pointer = $db_connectionStore->query($select_query);\t\n\t\n\t\t\tif($db_connectionStore->num_rows() == 0) { \n\t\t\t\t## no entry found\n\t\t\t\t$insert_query = \"INSERT INTO \".PAGE_FILE.\" (page_id, identifier, filename, text, mime_type, client_id,language) values ('$page_id', '$identifier', '$filename', '$text', '$file_type', '$client_id','$input_language')\";\n\t\t\t\t$result_pointer = $db_connectionStore->query($insert_query);\n\t\t\t} else {\n\t\t\t\t$db_connectionStore->next_record();\n\t\t\t\t$file_id = $db_connectionStore->Record[\"file_id\"];\n\t\t\t\t$old_filename = $db_connectionStore->Record[\"filename\"];\n\t\t\t\t\n\t\t\t\t## delete the old file first\n\t\t\t\t$f->delete_file(MATRIX_UPLOADDIR_DOCS.$old_filename);\n\t\t\t\t\n\t\t\t\t$update_query = \"UPDATE \".PAGE_FILE.\" SET filename = '$filename', text='$text' WHERE file_id = '$file_id' AND client_id='$client_id' AND language='$input_language'\";\n\t\t\t\t$result_pointer = $db_connectionStore->query($update_query);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t## in this case we will update the text element\n\t\t\t## first we need to find out if the entry already exists\n\t\t\t$select_query = \"SELECT file_id FROM \".PAGE_FILE.\" WHERE page_id = '$page_id' AND identifier = '$identifier' AND client_id='$client_id' AND language='$input_language'\";\n\t\t\t$result_pointer = $db_connectionStore->query($select_query);\t\n\t\n\t\t\tif($db_connectionStore->num_rows() == 0) { \n\t\t\t\t## no entry found\n\t\t\t\t$insert_query = \"INSERT INTO \".PAGE_FILE.\" (page_id, identifier, text, client_id,language) values ('$page_id', '$identifier', '$text','$client_id','$input_language')\";\n\t\t\t\t$result_pointer = $db_connectionStore->query($insert_query);\n\t\t\t} else {\n\t\t\t\t$db_connectionStore->next_record();\n\t\t\t\t$file_id = $db_connectionStore->Record[\"file_id\"];\n\t\t\t\t$update_query = \"UPDATE \".PAGE_FILE.\" SET text='$text' WHERE file_id = '$file_id' AND client_id='$client_id' AND language='$input_language'\";\n\t\t\t\t$result_pointer = $db_connectionStore->query($update_query);\n\t\t\t}\n\t\t}\n}", "public function store() {\n if (!$this->isPostRequest() ||\n !$this->isValidToken($_POST['token']))\n return Helper::redirect(HOME.'404');\n\n $this->destroyToken();\n\n if (empty($_FILES['docfile']['name'])) {\n $_SESSION['flash'] = NO_FILE_CHOSEN_ERROR;\n $_SESSION['status'] = 'error';\n return Helper::redirect(HOME.'uploads/create');\n }\n\n $upload = new RawFile(\n $_FILES['docfile']['name'],\n $_FILES['docfile']['size'],\n $_FILES['docfile']['tmp_name']\n );\n $store = $upload->saveFile();\n\n if (!$store['success']) {\n $_SESSION['flash'] = $store['error'];\n $_SESSION['status'] = 'error';\n return Helper::redirect(HOME.'uploads/create');\n }\n\n $_SESSION['flash'] = $store['message'];\n return Helper::redirect(HOME.'uploads');\n }", "public function upload();", "public function handle_upload()\n {\n }", "function storeFiles()\n {\n }", "private function fileFields()\n {\n $disk = 'public';\n\n if ($this->jsonData['disk']) {\n $disk = $this->jsonData['disk'];\n }\n\n $newData = [\n 'type' => $this->jsonData['type'],\n 'component' => 'file-field',\n 'vue' => $this->getCorrectVueComponent('form-file-field'),\n 'deletable' => true,\n 'downloadable' => false,\n 'deletable' => false,\n 'previewUrl' => null,\n 'thumbnailUrl' => null,\n 'disk' => $disk,\n 'textAlign' => 'center',\n ];\n\n $this->data = array_merge($this->data, $newData);\n }", "public function store_upload_details($upload_data)\n {\n \n\n return $this->db->insert('uploads', $upload_data);\n \n \n }", "function storeData(){\n global $data_file;\n $content = file_get_contents($data_file); //failo turinys\n $formData = implode(',', $_POST); //konvertuojame POST masyva i string\n $content .= $formData.\"\\n\"; //ivedame po kiekvieno submit pabaiga prie formos duomenu pridedame eilutes pabaigos zenkla\n file_put_contents($data_file, $content); //rasom i txt faila formos duomenis\n var_dump($content);\n}", "public function storedata(Request $request)\n {\n $validatedData = $request->validate([\n 'filename' => 'required',\n 'uploadfilename' => 'required | max:2048',\n ]);\n\n $filename = $request->filename;\n $uploadedfile = $request->file('uploadfilename');\n \n // dd($uploadfilename);\n\n if ($uploadedfile) {\n $uploadfilename = uniqid() . '.' . $uploadedfile->getClientOriginalExtension();\n $fileSize = $uploadedfile->getSize();\n $mimeType = $uploadedfile->getMimeType();\n\n // 2MB in bytes\n $maxFileSize = 2097152; \n\n if($fileSize <= $maxFileSize){\n // dd($uploadfilename);\n $file = $uploadedfile->storeAs('public/files/', $uploadfilename);\n\n $data = new File;\n $data ->name = $filename;\n $data ->filename = $uploadfilename;\n $data->save();\n\n\n $log = new Log;\n $log ->doneby = Auth::user()->name;\n $log ->activity = \"inserted file : \".$filename;\n $log->save();\n\n\n }else{\n return back()->withErrors(['Successfully inserted data']);\n\n }\n return back()->withSuccess('Successfully uploaded files');\n\n\n }\n\n \n }", "public function saveStorage($file){\n\t\t$ser_storage = serialize($this->user);\n\t\tfile_put_contents($file, $ser_storage) or die(\"save: unable to open File\");\t\t\n\t}", "public function storeIncomingData() {}", "public function uploadverhaal() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "public function store(Request $request)\n {\n \tFile::create($request->all());\n }", "private function uploadFile()\n {\n $uid = $this->param[2];\n $src = $_FILES['Filedata']['tmp_name'];\n $dst = TEMP_DIR . '/' . $uid . $_FILES['Filedata']['name'];\n \n if(@move_uploaded_file($src, $dst))\n {\n $data = \"{$_FILES['Filedata']['name']}:$dst:{$_FILES['Filedata']['size']}\";\n echo $data;\n }\n exit;\n }", "public function uploadPhoto($f3){\n \n\n $latitude = $f3->get('POST.latitude');\n $longitude = $f3->get('POST.longitude');\n $salete = $f3->get('POST.salete');\n \n \n$f3->set('UPLOADS','public/images/uploaded/');\n\n \n \\Web::instance()->receive(function($file) use ($f3){\n var_dump($file);\n $monupload=$file['name'];\n $f3->set('monupload',$monupload);\n },true,true);\n \n \n $chemin = $f3->get('monupload');\n \n if ($latitude) {\n\t\t $this->model->insertScrap($chemin,$latitude, $longitude, $salete);\n }\n $this->merci($f3);\n\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function store(Request $request)\n { \n $this->validate($request, [\n 'title' => 'nullable|max:100',\n 'file' => 'required|file|max:2000', // max 2MB\n ]);\n $uploadedFile = $request->file('file'); \n $path = $uploadedFile->store('public/files');\n $data = file::create([\n 'id_wp' => $request->id_wp,\n 'jenis_dok' => $request->jenis_dok,\n 'nomor_ketetapan' => $request->nomor_ketetapan,\n 'no_dok' => $request->no_dok,\n 'tittle' => $request->title ?? $uploadedFile->getClientOriginalName(),\n 'filename' => $path\n ]);\n\n Alert::success('Berhasil.','Data telah ditambahkan!');\n return redirect()->route('berkas.index');\n\n }", "public function upload(){\n\n //$mailer->resend('[email protected]','kusamochi2','44444444','test');\n\n $result = $this->TOOL->loadChildData();\n\n $childData = array();\n foreach($result as $tmp){\n $childData[] = ['id' => $tmp['Id'],'name' => $tmp['username']];\n }\n\n $this->set('data',$childData);\n\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public function store()\n {\n \n //POST\n $nombres = Security::verificateName( $_POST['nombres']);\n $apellidos = Security::verificateName( $_POST['apellidos']);\n $correo = Security::verificateEmail( $_POST['correo']);\n $clave1 = Security::verificatePassword($_POST['clave']);\n $numero_documento = Security::verificateDocument( $_POST['numero_documento']);\n $fk_rol = Security::verificateInt( $_POST['rol']);\n $fk_cargo = Security::verificateInt( $_POST['cargo']);\n $fk_tipo_documento = Security::verificateInt( $_POST['tipo_documento']);\n $fk_tipo_contrato = Security::verificateInt( $_POST['fk_tipo_contrato']);\n $salario = Security::verificateInt( $_POST['salario']);\n\n\n\n //Nomina\n $fecha_de = $_POST['fecha_de'];\n $fecha_hasta = $_POST['fecha_hasta'];\n $arrayDatos = json_decode($_POST['arrayDatos']);\n\n if($nombres && $apellidos && $correo && $clave1 && $numero_documento && $fk_rol && $fk_cargo && $fk_tipo_documento && $fk_tipo_contrato && $salario && $fecha_de && $fecha_hasta && $arrayDatos)\n {\n\n if(!Login::verificarSiExisteEmail($correo))\n {\n //? img si no se pone una img tomara el valor por defecto empty(si esta undefined da false)\n if(empty($_POST['user_img']))\n {\n //? Update Img\n $fecha = new DateTime();\n // funcion img\n $directorio = \"assets/uploud/profile/\";\n $archivo= $directorio.basename($fecha->getTimeStamp().$_FILES[\"user_img\"][\"name\"]);\n //info de ext(jpg,png,etc)\n $tipoArchivo =strtolower(pathinfo($archivo,PATHINFO_EXTENSION));\n //verifica que el archivo tenga dimensiones(w,h) \n $DimensionesImg =getimagesize($_FILES['user_img']['tmp_name']);\n \n if($DimensionesImg == true)\n {\n $tamañoImg = $_FILES['user_img'][\"size\"];\n if($tamañoImg > 2000000)\n {\n // echo \"El archivo tiene que ser menor a 2mb\";\n echo json_encode(['error'=>\"El archivo tiene que ser menor a 2mb\"]);\n return;\n }\n else{\n if($tipoArchivo == \"jpg\" || $tipoArchivo == \"png\" || $tipoArchivo == \"jpeg\" )\n {\n move_uploaded_file($_FILES[\"user_img\"][\"tmp_name\"],$archivo);\n $img_usuario=$archivo;\n }\n else{\n // echo \"la extension del archivo no es valida\";\n echo json_encode(['error'=>'a extension del archivo no es valida']);\n return;\n }\n }\n }else\n {\n // echo \"el documento no es una img\";\n echo json_encode(['error'=> 'el documento no es una img']);\n return;\n \n }\n }else{\n $img_usuario = 'assets/uploud/profile/default.svg';\n }\n\n\n $token = $this->seguridad->encryptToken(str_replace(' ','',$nombres.$numero_documento.$apellidos));\n $clave = password_hash($clave1,PASSWORD_DEFAULT);\n parent::storeUser($nombres,$apellidos,$correo,$salario,$clave,$img_usuario,$numero_documento,$fk_rol,$fk_cargo,$fk_tipo_documento,$fk_tipo_contrato,$token);\n \n \n\n //?NOMINA\n $fk_usuario = parent::consultarUltimoUsuario();\n $nomina = new Nomina();\n if($fecha_de && $fecha_hasta && $arrayDatos){\n\n $nomina->createNomina($fk_usuario->id, $fecha_de, $fecha_hasta,2);\n \n $lastNomina =$nomina->consultarUltimaNomina();\n \n $total = 0;\n for ($i=0; $i < count($arrayDatos); $i++) { \n $data = $arrayDatos[$i];\n $nomina->createConcept($data->descripcion,2, $data->fk_asiento_contable, $data->valor, $data->fk_tipo_concepto, $lastNomina->id_nomina);\n \n if($data->fk_asiento_contable == 2)\n {\n $total -=$data->valor;\n \n }else{\n $total +=$data->valor;\n }\n }\n \n \n $nomina->updateNominaValor($total,$lastNomina->id_nomina);\n echo json_encode(['ok'=> 'Creado']);\n return;\n }else{\n return;\n }\n\n //? END-NOMINA\n\n echo json_encode(['ok' => 'usuarioCreado']);\n\n\n }else{\n echo json_encode(['error' => 'correoExistente']);\n }\n }\n else{\n echo json_encode(['error' => 'errorAgregarUsuario']);\n return;\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "protected function _singleUpload(){\r\n\t\t$this->_infoPic = new api_libs_InfoPic($_FILES['userfile']['tmp_name']);\r\n\t\t$params['name'] = $_FILES['userfile']['name'];\r\n\t\t$params['w'] = $this->_infoPic->getW();\r\n\t\t$params['h'] = $this->_infoPic->getH();\r\n\t\t$params['mime_type'] = $this->_infoPic->getMime();\r\n\t\t$params['source'] = 'site_upload_single';\r\n\t\t$params['status'] = 'live';\r\n\t\t$params['extension'] = $this->_infoPic->getExt();\r\n\t\t\r\n\t\t$hash = $this->_model->buildNewDynamicEntry($params);\r\n\t\t// file to be uploaded\r\n\t\t$uploadfile = $this->_upLoc . $hash.'.'.$params['extension'];\r\n\t\t\r\n\t\tif(! move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))\r\n\t\t throw new Exception(\"File was not uploaded!\");\r\n\t\t\r\n\t\t$this->_newHashes = array($hash);\r\n\t}", "public function upload()\n\t{\n\t}", "public function saveData()\r\n {\r\n \r\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 }", "public function store()\n\t {\n\t //\n\t }", "function store_pic_data($data){\n\t\t$insert_data['pic_title'] = $data['pic_title'];\n\t\t$insert_data['pic_desc'] = $data['pic_desc'];\n\t\t$insert_data['pic_file'] = $data['pic_file'];\n\n\t\t$query = $this->db->insert('pictures', $insert_data);\n\t}", "abstract protected function doUpload();", "private function saveData()\n { \n // Save form data in session\n if (count($this->post) > 0) {\n $_SESSION['gentlesource_voting_configuration'] = $this->post;\n $this->data = $this->post;\n $this->votingOptions = $this->post['votingOptions'];\n } else {\n if (isset($_SESSION['gentlesource_voting_configuration'])) {\n $this->data = $_SESSION['gentlesource_voting_configuration'];\n $this->votingOptions = $this->data['votingOptions'];\n }\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function content_for_upload();", "function uploadMaterial(){\n if(isset($_FILES['userfile'])) {\n // Make sure the file was sent without errors\n if($_FILES['userfile']['error'] == 0) {\n \n // Gather all required data \n $name = $_FILES['userfile']['name'];\n $type = $_FILES['userfile']['type'];\n $content = $_FILES['userfile']['tmp_name']; //this is the actual file\n \n // Create the SQL query\n $query = \"INSERT INTO _uploaded_mateirial('cwid','course_id','file_name', 'file_type','content')VALUES('$cwid','$courseID','$name', '$type','$content')\";\n \n // Execute the query\n $result = $this->connection->query($query);\n \n // Check if it was successfull\n if($result) {\n echo 'Success! Your file was successfully added!';\n }\n else {\n echo 'Error! Failed to insert the file'\n . \"<pre>{$this->connection->error}</pre>\";\n }\n }\n else {\n echo 'An error accured while the file was being uploaded. '\n .'Error code: '. intval($_FILES['userfile']['error']);\n }\n \n \n }\n else {\n echo 'Error! A file was not sent!';\n } \n\n }", "public static function upload($data = []){\n if(!empty($data['new_name'])){\n $new_name = $data['new_name'] === null ?time():$data['new_name'];\n }\n if (request()->hasFile($data['request']) && $data['upload_type'] == 'single'){\n// !empty($data['delete_file'])?Storage::delete($data['delete_file']):'';\n return request()->file($data['request'])->store($data['path']);\n }elseif (request()->hasFile($data['request']) && $data['upload_type'] == 'files'){\n $file = request()->file($data['request']);\n\n $size = $file->getSize();\n $mime_type = $file->getMimeType();\n $name = $file->getClientOriginalName();\n $hashname = $file->hashName();\n\n $file->store($data['path']);\n\n $add = product_photos::create([\n 'product_id' => $data['product_id'],\n 'photo' => $data['path'].'/' . $hashname,\n 'description' => $name,\n 'tag' => $name,\n 'main' => 0,\n ]);\n return $data['path'].'/' . $hashname;\n }\n }", "function _submit_data()\n {\n\t$data = $this->get_data_from_post();\n\t\n\t//$data['photo'] = Modules::run('upload_manager/upload','image');\n\t$id = $this->uri->segment( 3 );\n\tif ( is_numeric( $id ) ) {\n\t $this->_update( $id, $data );\n\t redirect( 'auth/profile/' . $id );\n\t} else {\n\t $this->_insert( $data );\n\t redirect( 'auth/add_lecturer' );\n\t}\n }", "public function store(Request $request)\n { \n $data = new Documents;\n if ($request->file('file')) {\n $file=$request->file('file');\n $filename=$file->getClientOriginalName();\n $request->file->move('storage/', $filename);\n $data->file= $filename;\n }\n $data->user_id = auth()->user()->id;\n $data->judul= $request->judul;\n $data->description = $request->description;\n $data->save(); \n return redirect()->back()->with('sukses','Document berhasil diupload');\n }", "function SaveUpload() {\n // save entry for it in the database\n global $cDB, $cErr;\n \n if($this->filename == null)\n $this->filename = $_FILES['userfile']['name'];\n \n $query = $cDB->Query(\"SELECT null from \". DATABASE_UPLOADS .\" WHERE filename ='\".$_FILES['userfile']['name'].\"';\");\n \n if($row = mysql_fetch_array($query)) {\n $cErr->Error(\"Ya existe un documento con ese nombre en el sistema\");\n return false;\n } \n \n if(move_uploaded_file($_FILES['userfile']['tmp_name'], UPLOADS_PATH . $this->filename)) {\n $insert = $cDB->Query(\"INSERT INTO \". DATABASE_UPLOADS .\" (type, title, filename, note) VALUES ('\".$this->type .\"', '\". $this->title .\"', '\". $this->filename .\"', \". $cDB->EscTxt($this->note) .\");\");\n \n if(mysql_affected_rows() == 1) {\n $this->upload_id = mysql_insert_id(); \n $query = $cDB->Query(\"SELECT upload_date FROM \".DATABASE_UPLOADS.\" WHERE upload_id=\". $this->upload_id.\";\");\n if($row = mysql_fetch_array($query))\n $this->upload_date = $row[0]; \n return true;\n } else {\n $cErr->Error(\"No se ha podido insertar el elemento en la base de datos para el documento subido.\");\n return false;\n } \n } else {\n $cErr->Error(\"No se ha podido subir el elemento. Puede deberse a un problema de permisos. ¿Tiene el usuario permiso de escritura para el directorio de subidas? Puede que el documento sea demasiado grande. El tamaño de fichero máximo permitido es de \".MAX_FILE_UPLOAD.\" bytes.\");\n return false;\n }\n }", "public function step_2_manage_upload()\n {\n }", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function file() {\n // get the post data\n $param = $_POST;\n\n // get the config data\n $hc_config = hc_config();\n\n // define the response first\n $res = $hc_config['response'];\n\n // just check if param is not empty\n if ( empty( $param ) || !is_array( $param ) || !isset( $param['type'] ) ) {\n $res['msg'] = hc_get_msg( 'ERR-01' );\n return $res;\n }\n\n // sanitize the input data if there's no error in checking\n foreach ( $param as $key => &$value ) {\n // sanitize for the email\n if ( $key === 'content' ) {\n $sanitize = sanitize_textarea_field( $value );\n $strip = stripslashes( $value );\n $param[$key] = str_replace( site_url(), '[url]', $strip );\n\n continue;\n }\n\n // do not sanitize the list of members for registration in file\n if ( $key === 'mem_data' ) {\n continue;\n }\n\n // sanitize all the params according to text\n $param[$key] = sanitize_text_field( $value );\n }\n\n // check input data first\n $checked = $this->check_file( $param );\n if ( $checked !== true ) {\n $res['msg'] = $checked;\n return $res;\n }\n\n switch ( $param['type'] ) {\n // ファイル登録\n case 'register':\n $insert = $this->insert_file( $param );\n // check if insert is unsuccessful\n if ( $insert === false ) {\n $res['msg'] = hc_get_msg( 'ERR-02' );\n\n return $res;\n }\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'file_id' => $insert,\n 'admin_url' => admin_url(),\n );\n\n return $res;\n break;\n\n // ファイル更新\n case 'detail':\n $update = $this->update_file( $param );\n // check if update is unsuccessful\n if ( $update === false ) {\n $res['msg'] = hc_get_msg( 'ERR-03' );\n\n return $res;\n }\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'file_id' => $param['file_id'],\n 'admin_url' => admin_url(),\n );\n\n return $res;\n break;\n\n // ファイル削除\n case 'delete':\n $delete = $this->delete_file( $param );\n // check if delete is unsuccessful\n if ( $delete === false ) {\n $res['msg'] = hc_get_msg( 'ERR-04' );\n\n return $res;\n }\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'admin_url' => admin_url(),\n );\n\n return $res;\n break;\n\n // ファイルとメンバー紐付け登録\n case 'file_mem_register':\n // check if registration is unsuccessful\n if ( !$this->file_member_register( $param ) ) {\n $res['msg'] = hc_get_msg( 'ERR-02' );\n\n return $res;\n }\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'admin_url' => admin_url(),\n 'id' => $param['file_id']\n );\n\n return $res;\n break;\n\n // ファイルとメンバー紐付け登録\n case 'file_mem_delete':\n // check if delete is unsuccessful\n if ( !$this->file_member_delete( $param ) ) {\n $res['msg'] = hc_get_msg( 'ERR-04' );\n\n return $res;\n }\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'admin_url' => admin_url(),\n 'id' => $param['file_id']\n );\n\n return $res;\n break;\n\n default:\n $res['msg'] = hc_get_msg( 'ERR-01' );\n break;\n }\n\n return $res;\n }", "public function save_file_data($fileData) {\n\t\tif(!empty($fileData)) :\n\t\t\t$this->filename = $fileData->image;\n\t\tendif;\n\t}", "function processAndStoreUploadedFile()\n{\n\t$allowedFileTypes = array(\"image/png\", \"image/jpeg\", \"image/gif\", \"text/plain\", \"application/pdf\");\n\t$allowedExtensions = array('jpg', 'jpeg', 'png', 'gif', 'pdf');\n\t\n\t\n\tif(in_array($_FILES['fileUpload']['type'], $allowedFileTypes))\n {\n \t$dateiname = standardizeFileName($_FILES['fileUpload']['name']);\n \tmove_uploaded_file (\n $_FILES['fileUpload']['tmp_name'] ,\n 'uploadedFiles/'. $dateiname);\n \techo \"Hochladen war erfolgreich <br>\";\n \techo \"<a href='uploadedFiles/\" . $_FILES['fileUpload']['name'] . \"'> uploadedFiles/\" . $_FILES['fileUpload']['name'] . \" </a> <br> <br>\";\n\t}\n\telse echo \"Ungültiger Dateityp\";\t\n}", "public function save($file_data)\n\t{\n\t\t$data = $file_data;\n\t\t$field = $this->_name;\n\t\t$flag = true;\n\n\t\tswitch($data['error'][$field])\n\t\t{\n\t\t\tcase \\UPLOAD_ERR_OK:\n\t\t\t\tbreak;\n\t\t\tcase \\UPLOAD_ERR_NO_FILE:\n\t\t\t\treturn true;\n\t\t\tcase \\UPLOAD_ERR_INI_SIZE:\n\t\t\t\t$val = ini_get('upload_max_filesize');\n\t\t\tcase \\UPLOAD_ERR_FORM_SIZE:\n\t\t\t\tif(!isset($val))\n\t\t\t\t\t$val = $_POST['MAX_FILE_SIZE'].' Bytes';\n\n\t\t\t\t$this->_parent->_addError($field, 'Maximum File Size of '.$val.' Exceeded');\n\t\t\t\treturn false;\n\t\t\tcase \\UPLOAD_ERR_PARTIAL:\n\t\t\t\t$this->_parent->_addError($field, 'Only part of the file was uploaded');\n\t\t\t\treturn false;\n\t\t\tcase \\UPLOAD_ERR_NO_TMP_DIR:\n\t\t\t\t$this->_parent->_addError($field, 'There is no temporary directory configured for your PHP Installation');\n\t\t\t\treturn false;\n\t\t\tcase \\UPLOAD_ERR_CANT_WRITE:\n\t\t\t\t$this->_parent->_addError($field, 'PHP cannot write to configured temporary directory');\n\t\t\t\treturn false;\n\t\t\tcase \\UPLOAD_ERR_EXTENSION:\n\t\t\t\t$this->_parent->_addError($field, 'A PHP extension stopped the file upload');\n\t\t\t\treturn false;\n\t\t\tdefault:\n\t\t\t\t$this->_parent->_addError($field, 'An unknown error happened during the file upload');\n\t\t\t\treturn false;\n\t\t}\n\n\n\t\t$this->_parent->{$field.'_file_name'} = $data['name'][$field];\n\t\t$path = $this->path();\n\n\t\tif(!is_dir(dirname($path)) && !@mkdir(dirname($path), 0777, true))\n\t\t\tthrow new \\P3\\Exception\\ActiveRecordException(\"Attachment directory doesn't exist (%s: %s)\", array(get_class($this->_parent), dirname($path)), 500);\n\n\n\t\tif(!move_uploaded_file($data['tmp_name'][$field], $path)) {\n\t\t\t$ret = false;\n\t\t\t$this->_parent->_addError($field, 'Upload failed');\n\t\t\treturn false;\n\t\t}\n\n\t\t$finfo = finfo_open(\\FILEINFO_MIME_TYPE);\n\n\t\tif(!$finfo)\n\t\t\tthrow new \\P3\\Exception\\ActiveRecordException(\"Failed to stat file. See finfo_open on php.net for info.\", array(), 500);\n\n\t\t$this->_parent->{$field.'_content_type'} = finfo_file($finfo, $path);\n\t\tfinfo_close($finfo);\n\n\t\t$this->_parent->{$field.'_file_size'} = $data['size'][$field];\n\n\t\tif(isset($this->_options['styles']))\n\t\t\t$flag = $flag && $this->_generateStyles();\n\n\t\t$this->deleteJunk();\n\n\t\t$flag = $flag && $this->_parent->save(array('save_attachments' => false));\n\n\t\treturn $flag;\n\t}", "function _webform_submit_file(&$data, $component) {\r\n $upload_dir = file_directory_path() .'/webform/'. $component['extra']['savelocation'];\r\n if (!empty($_FILES['files']['name'][$data['new']])) {\r\n if (file_check_directory($upload_dir, FILE_CREATE_DIRECTORY)) {\r\n $file_saved = file_save_upload($data['new'], array(), $upload_dir);\r\n if (!$file_saved) {\r\n drupal_set_message(t('The uploaded file %filename was unable to be saved. The destination directory may not be writable.', array('%filename' => $file_saved['filename'])), 'error');\r\n }\r\n else {\r\n @chmod($file_saved->filepath, 0664);\r\n file_set_status($file_saved, FILE_STATUS_PERMANENT);\r\n if (isset($data['existing']['filepath'])) {\r\n file_delete($data['existing']['filepath']);\r\n }\r\n $data = serialize((array)$file_saved);\r\n }\r\n }\r\n else {\r\n drupal_set_message(t('The uploaded file was unable to be saved. The destination directory does not exist.'), 'error');\r\n }\r\n }\r\n else {\r\n $data = serialize(array());\r\n }\r\n}", "public function store(Request $request){\n \tif ($request->form_type == 1) {\n\t \t$dir = 'files/';\n\t \t$files = $request->file('file');\n\t \tforeach ($files as $file) {\n \t\t\t// Subida del archivo al server\n\t \t\t$nombreFichero = $file->getClientOriginalName();\n\t \t\t$file->move($dir, $nombreFichero);\n\n\t \t\t// Se guarda la informacion de la imagen en la base de datos\n\t $archivo = new Archivo();\n\t $archivo->inmueble_id = $request->inmueble_id;\n\t $archivo->nombre = $nombreFichero;\n\t $archivo->save();\n\t \t};\n \t}\n\n \t// Guardamos la informacion del archivo en a base de datos\n\n\n\n }", "public function store($data)\n {\n $query = \"INSERT INTO $this->table VALUES (DEFAULT, :module_name, :description, :module_file, :course_id)\";\n\n\n $files = $_FILES['module_file']['tmp_name'];\n $uploadDir = BASE_PATH . '/assets/uploads/modules/';\n $isUpload = move_uploaded_file($files, $uploadDir . $data['module_name'] . '.pdf');\n\n if ($isUpload) {\n $this->db->query($query);\n $this->db->bind('module_name', $data['module_name']);\n $this->db->bind('description', $data['description']);\n $this->db->bind('module_file', $data['module_name'] . '.pdf');\n $this->db->bind('course_id', $data['course_id']);\n\n $this->db->execute();\n return $this->db->rowCount();\n }\n }", "function insert($filedata) {\r\n\t\t// Upload the file\r\n\t\t$uploadedFile = $this->upload($filedata);\r\n\t\tif (!empty($uploadedFile['error'])) {\r\n\t\t\treturn $uploadedFile;\r\n\t\t}\r\n\r\n\t\t// Creating the model instance\r\n\t\t$this->create(array($this->alias => $uploadedFile));\r\n\r\n\t\t// Does not validate\r\n\t\tif (!$this->validates()) {\r\n\t\t\t$this->deleteFile();\r\n\t\t\treturn array('error' => $this->validationErrors);\r\n\t\t}\r\n\r\n\t\t// Saving\r\n\t\t$this->data = $this->save();\r\n\r\n\t\treturn $this->data;\r\n\r\n\t}", "public function store(Request $request)\n {\n \n if($request->hasFile('file')){\n \n\n $filename=$request->file('file')->getClientOriginalName();\n $path = $request->file('file')->storeAs('public/books',$filename);\n $file = $path; \n \n\n $a = new Book();\n $a->book = $request->book;\n $a->author = $request->author;\n $a->edition = $request->edition;\n $a->publication = $request->publication;\n $a->year = $request->year;\n $a->file = $file;\n\n $a->save();\n return redirect()->back()->with('success',\"Book Uploaded to Server\");\n }\n\n return redirect()->back()->with('fail',\"Upload Failed\");\n }", "function form_file_upload_handle($file_data, $field_config, $table_name = null) {\n $file_max_size = $field_config['file-max-size'] + 0;\n $file_type = $field_config['file-type'];\n if (strstr($file_data['type'], $file_type) === FALSE) {\n return \"The file type is {$file_data['type']} not {$file_type}\";\n }\n if ($file_data['size'] > $file_max_size) {\n return \"Size is bigger than \" . $file_max_size / 1024 . \"k\";\n }\n /**\n * ALL ok? then place the file and let it go... let it goooo! (my daughter Allison fault! <3 )\n */\n if (file_uploads::place_upload_file($file_data['tmp_name'], $file_data['name'], $table_name)) {\n return TRUE;\n } else {\n return file_uploads::get_last_error();\n }\n// $file_location = file_uploads::get_uploaded_file_path($file_data['name']);\n// $file_location_url = file_uploads::get_uploaded_file_url($file_data['name']);\n}", "public function store(Request $request)\n {\n $file=$request->file('archivo')->store('practicas');\n $tarea=new Tarea();\n $tarea->archivo=$file;\n $tarea->nota=\"ENVIADO\";\n $tarea->user_id=Auth::user()->id;\n $tarea->plan_id=$request->plan_id;\n $tarea->save();\n }", "public function data() {\n return $this->uploadedData;\n }", "function upload_file() {\n upload_file_to_temp();\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function fileData($key)\n {\n \treturn isset($_FILES[$key]) ? $_FILES[$key] : null;\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function uploadfileAction(){\n \t$cand_model = new Default_Model_Candidatedetails();\n \t$result = $cand_model->saveUploadedFile($_FILES);\n \t$this->_helper->json($result);\n }", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.67448384", "0.65130305", "0.6492715", "0.64670604", "0.646397", "0.64564556", "0.645306", "0.6447592", "0.64202505", "0.6388606", "0.63804126", "0.6358027", "0.63499415", "0.630652", "0.6301165", "0.628932", "0.62806135", "0.6248031", "0.62107205", "0.61863667", "0.61573505", "0.61403364", "0.6133493", "0.61250025", "0.6121184", "0.61193275", "0.610694", "0.6101428", "0.609013", "0.6089124", "0.60882115", "0.6067849", "0.60656005", "0.6055639", "0.6054047", "0.6044505", "0.6043419", "0.60335207", "0.60257304", "0.6022021", "0.6014857", "0.60146415", "0.60137284", "0.6012342", "0.6007686", "0.6004844", "0.60039246", "0.6002346", "0.5998212", "0.5996847", "0.5988242", "0.5984686", "0.59829444", "0.59731764", "0.59703475", "0.5968301", "0.5968283", "0.5963476", "0.596319", "0.59619343", "0.5960852", "0.5956149", "0.5956149", "0.5956149", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295", "0.59548295" ]
0.0
-1
Create instance of Headers object from instance of Environment object
public function create(Environment $environment) { return new Headers($this->resolveHeaders($environment->getServer())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initHeaders()\n {\n $headers = new DataHolder();\n\n foreach ($_SERVER as $key => $value)\n {\n if (strpos($key, 'HTTP_') === 0)\n {\n $headers->set(substr($key, 5), $value);\n }\n elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_TYPE')))\n {\n $headers->set($key, $value);\n }\n }\n\n $this->set('_headers', $headers);\n }", "public function populate_headers() {\n // If header is already defined, return it immediately\n if (!empty($this->headers)) {\n return;\n }\n\n // In Apache, you can simply call apache_request_headers()\n if (function_exists('apache_request_headers')) {\n $this->headers = apache_request_headers();\n } else {\n isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $val) {\n if (sscanf($key, 'HTTP_%s', $header) === 1) {\n // take SOME_HEADER and turn it into Some-Header\n $header = str_replace('_', ' ', strtolower($header));\n $header = str_replace(' ', '-', ucwords($header));\n\n $this->headers[$header] = $val;\n $this->header_map[strtolower($header)] = $header;\n }\n }\n }\n\n }", "public static function getRequestHeaders() {}", "public function setRequestHeaders($requestHeaders);", "public static function set_headers()\n {\n }", "abstract public function SetHeaders();", "public function getRequestHeaders();", "protected function createHeaderDriver()\n {\n $determiner = new Determiners\\Header(\n $this->app['config']['localize-middleware']['header']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\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 setHeaders()\n {\n }", "public function getHeaders() {}", "protected function makeHeader()\n {\n }", "public function getHttpHeaders()\n {\n if ($this->headers === null) {\n $this->headers = new SimpleHeaders();\n $this->headers->setContentType('application/json', 'utf-8');\n //$this->headers->setContentDispositionType(SimpleHeaders::DIPOSITION_ATTACHEMENT);\n }\n\n return $this->headers;\n }", "protected function setRequestHeaders() \n {\n $headers = [];\n\n foreach ($this->headerManager->get() as $key => $value) {\n $headers[] = $key . ': ' . $value;\n }\n\n $this->optionManager->set('HTTPHEADER', $headers);\n\n return $this;\n }", "private function __construct(private readonly array $headers)\n {\n // ..\n }", "private function setHeaderInformation()\n {\n $this->header = new \\stdClass();\n $request \t= \\Yii::$app->request;\n $requestHeaders = $request->getHeaders();\n foreach ($this->headerKey as $key => $value) {\n if ($requestHeaders->offsetExists($value)) {\n $this->header->$value = $requestHeaders->get($value);\n $this->header->status =200;\n } else {\n $this->header->status =500;\n yii::error('Header '.$value.\" is missing\", 'api_request');\n break;\n }\n }\n }", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "abstract public function getHeaders();", "public function __construct()\n\t{\n\t\t$this->_headers = function_exists('getallheaders') ? getallheaders() : array();\n\t\tif (!count($this->_headers))\n\t\t{\n\t\t\tforeach($_SERVER as $key => $value)\n\t\t\t{\n\t\t\t\tif (strpos($key, 'HTTP_') === 0)\n\t\t\t\t\t$this->_headers[str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))))] = $value;\n\t\t\t}\n\t\t}\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 }", "private function _initializeResponseHeaders()\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTLENGTH] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_ETAG] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CACHECONTROL] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LASTMODIFIED] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LOCATION] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_DESC] = null;\n $this->_dataServiceVersion = null;\n }", "protected function set_headers()\n\t{\n\t\tif($this->headers_required) { \n\n\t\t\t$this->headers = [\n\t\t\t \n\t\t\t\t'Authorization: '. $_SESSION['token'] .'',\n\t\t\t];\n\n\t\t}\n\n\t}", "public abstract 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();", "protected function createHeaders($data = [])\n {\n return new Headers($data);\n }", "public function defineHeader()\n {\n $this->header = new Header();\n }", "public function sendHttpHeaders() {}", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }", "public function headers(array $headers) : Http{\n try {\n\n $this->headersToBeUsed = $headers;\n return $this;\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "public function getHeaders ();", "protected static function get_response_headers()\n {\n }", "public function populateHeaders(): void\n\t{\n\t\t$contentType = $_SERVER['CONTENT_TYPE'] ?? getenv('CONTENT_TYPE');\n\t\tif (! empty($contentType))\n\t\t{\n\t\t\t$this->setHeader('Content-Type', $contentType);\n\t\t}\n\t\tunset($contentType);\n\n\t\tforeach ($_SERVER as $key => $val)\n\t\t{\n\t\t\tif (sscanf($key, 'HTTP_%s', $header) === 1)\n\t\t\t{\n\t\t\t\t// take SOME_HEADER and turn it into Some-Header\n\t\t\t\t$header = str_replace('_', ' ', strtolower($header));\n\t\t\t\t$header = str_replace(' ', '-', ucwords($header));\n\n\t\t\t\t$this->setHeader($header, $_SERVER[$key]);\n\n\t\t\t\t// Add us to the header map so we can find them case-insensitively\n\t\t\t\t$this->headerMap[strtolower($header)] = $header;\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\n {\n $this->_headers = array();\n $this->_initializeResponseHeaders();\n }", "public function getHeaders()\n{\n return $this->headers;\n}", "public static function createFromGlobals() {\n throw new Exception(\"Can not generate request from globals in a hprose environment.\");\n }", "public function headers()\n {\n $h = &$this->headers;\n return $h;\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function headers($headers = true)\n {\n $this->headers = $headers;\n $this->load();\n\n return $this;\n }", "public function getHeaders(){\n return $this->headers;\n }", "function pxlz_edgtf_set_header_object() {\n $header_type = pxlz_edgtf_get_meta_field_intersect('header_type', pxlz_edgtf_get_page_id());\n $header_types_option = pxlz_edgtf_get_header_type_options();\n\n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if (Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\PxlzEdgefHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "public function getHttpHeaders()\n {\n return $this->headers;\n }", "public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach( $headers AS $key => $value ) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\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 if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\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(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }", "public function getResponseHeaders();", "public function testHttpResponseHeadersInstanceOf(UnitTester $I)\n {\n $headers = new Headers();\n\n $I->assertInstanceOf(\n Headers::class,\n $headers\n );\n }", "public function setRequestHeaders($request_headers)\r\n {\r\n $this->request_headers = $request_headers;\r\n\r\n return $this;\r\n }", "public function doMetaHeaders(&$headers)\r\n {\r\n $headers = array(\r\n 'title' => 'Title',\r\n 'description' => 'Description',\r\n 'author' => 'Author',\r\n 'date' => 'Date',\r\n 'robots' => 'Robots',\r\n 'template' => 'Template'\r\n );\r\n }", "public function createFromEnvironment(Environment $environment)\n {\n // Scheme\n $isSecure = $environment->get('HTTPS');\n $scheme = (empty($isSecure) || $isSecure === 'off') ? 'http' : 'https';\n\n // Authority: Username and password\n $username = $environment->get('PHP_AUTH_USER', '');\n $password = $environment->get('PHP_AUTH_PW', '');\n\n // Authority: Host\n if ($environment->has('HTTP_HOST')) {\n $host = $environment->get('HTTP_HOST');\n } else {\n $host = $environment->get('SERVER_NAME');\n }\n\n // Authority: Port\n $port = (int)$environment->get('SERVER_PORT', 80);\n if (preg_match('/^(\\[[a-fA-F0-9:.]+\\])(:\\d+)?\\z/', $host, $matches)) {\n $host = $matches[1];\n\n if ($matches[2]) {\n $port = (int) substr($matches[2], 1);\n }\n } else {\n $pos = strpos($host, ':');\n if ($pos !== false) {\n $port = (int) substr($host, $pos + 1);\n $host = strstr($host, ':', true);\n }\n }\n\n // Path\n// $requestScriptName = parse_url($environment->get('SCRIPT_NAME'), PHP_URL_PATH);\n// $requestScriptDir = dirname($requestScriptName);\n\n // parse_url() requires a full URL. As we don't extract the domain name or scheme,\n // we use a stand-in.\n $rUFromRequestUri = parse_url('http://example.com' . $environment->get('REQUEST_URI'), PHP_URL_PATH);\n $requestUri = $rUFromRequestUri ?? '';// parse_url() pro neexistující komponentu url vrací null, $requestUri musí být string\n// $basePath = '';\n// $virtualPath = $requestUri;\n// if (stripos($requestUri, $requestScriptName) === 0) {\n// $basePath = $requestScriptName;\n// } elseif ($requestScriptDir !== '/' && stripos($requestUri, $requestScriptDir) === 0) {\n// $basePath = $requestScriptDir;\n// }\n//\n// if ($basePath) {\n// $virtualPath = ltrim(substr($requestUri, strlen($basePath)), '/');\n// }\n\n // Query string\n $queryString = $environment->get('QUERY_STRING', '');\n if ($queryString === '') {\n $qSFromRequestUri = parse_url('http://example.com' . $environment->get('REQUEST_URI'), PHP_URL_QUERY);\n $queryString = $qSFromRequestUri ?? '';// parse_url() pro neexistující komponentu url vrací null, $queryString musí být string\n }\n\n // Fragment\n $fragment = '';\n\n // Build Uri\n// $uri = new Uri($scheme, $host, $port, $virtualPath, $queryString, $fragment, $username, $password);\n $uri = new Uri($scheme, $host, $port, $requestUri, $queryString, $fragment, $username, $password);\n// if ($basePath) {\n// $uri = $uri->withBasePath($basePath);\n// }\n\n return $uri;\n }", "public static function provideHeaders(): array\n {\n return [\n 'simple' => [\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ],\n\n 'with authorization as string' => [\n ['Content-Type' => 'application/json', 'Authorization' => 'bearer some-foo-token'],\n ['Content-Type' => 'application/json', 'Authorization' => '***'],\n ],\n\n 'with authorization as array' => [\n ['Content-Type' => 'application/json', 'Authorization' => ['bearer some-foo-token', 'basic foo']],\n ['Content-Type' => 'application/json', 'Authorization' => ['***']],\n ],\n ];\n }", "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 function setHeaders() {\n // Data required for the token request\n $data = array(\n 'client_id' => $this->client_id,\n 'sign' => $this->calcSign($this->client_id, $this->secret, $this->getTime()),\n 't' => $this->getTime(),\n 'sign_method' => 'HMAC-SHA256',\n 'Content-Type' => 'application/json'\n );\n // If we have an access token, include it in the request\n if($this->access_token !== '') {\n $data['access_token'] = $this->access_token;\n }\n // Create a $dataHeaders array and assign it with colon separated key value pairs\n $dataHeaders = array();\n foreach($data as $k => $d) {\n $dataHeaders[] = \"$k:$d\";\n }\n return $dataHeaders;\n }", "public function setHeaders(array $header) {}", "function getHeaders(){ return $this->_Headers; }", "function createHeader($options = array()) {\n $header = new Header( $options );\n $html = $header->html();\n return $html;\n}", "public static function getHeader(&$headers)\n {\n $headers['Authorization'] = 'Bearer '.self::getToken();\n }", "public function sendHeaders()\n {\n if (!$this->canSendHeaders()) {\n Mage::log('HEADERS ALREADY SENT: '.mageDebugBacktrace(true, true, true));\n return $this;\n }\n\n if (in_array(substr(php_sapi_name(), 0, 3), array('cgi', 'fpm'))) {\n // remove duplicate headers\n $remove = array('status', 'content-type');\n\n // already sent headers\n $sent = array();\n foreach (headers_list() as $header) {\n // parse name\n if (!$pos = strpos($header, ':')) {\n continue;\n }\n $sent[strtolower(substr($header, 0, $pos))] = true;\n }\n\n // raw headers\n $headersRaw = array();\n foreach ($this->_headersRaw as $i=>$header) {\n // parse name\n if (!$pos = strpos($header, ':'))\n continue;\n $name = strtolower(substr($header, 0, $pos));\n\n if (in_array($name, $remove)) {\n // check sent headers\n if (isset($sent[$name]) && $sent[$name]) {\n unset($this->_headersRaw[$i]);\n continue;\n }\n\n // check header\n if (isset($headers[$name]) && !is_null($existing = $headers[$name])) {\n $this->_headersRaw[$existing] = $header;\n unset($this->_headersRaw[$i]);\n } else {\n $headersRaw[$name] = $i;\n }\n }\n }\n\n // object headers\n $headers = array();\n foreach ($this->_headers as $i=>$header) {\n $name = strtolower($header['name']);\n if (in_array($name, $remove)) {\n // check sent headers\n if (isset($sent[$name]) && $sent[$name]) {\n unset($this->_headers[$i]);\n continue;\n }\n\n // check header\n if (isset($headers[$name]) && !is_null($existing = $headers[$name])) {\n $this->_headers[$existing] = $header;\n unset($this->_headers[$i]);\n } else {\n $headers[$name] = $i;\n }\n\n // check raw headers\n if (isset($headersRaw[$name]) && !is_null($existing = $headersRaw[$name])) {\n unset($this->_headersRaw[$existing]);\n }\n }\n }\n }\n\n parent::sendHeaders();\n }", "public function getHeaders()\n {\n if ($this->headers === null || is_string($this->headers)) {\n // this is only here for fromString lazy loading\n $this->headers = is_string($this->headers) ? Headers::fromString($this->headers) : new Headers();\n }\n\n return $this->headers;\n }", "private static final function getApacheRequestHeaders () {\r\n \tif (self::$objApacheReqHeaders == NULL) {\r\n \t\t// Determine if we're an APACHE module ...\r\n \t\tif (function_exists ('apache_request_headers')) {\r\n\t\t \t// Get the Apache Client Request HDR ...\r\n\t\t \tself::$objApacheReqHeaders = new A (apache_request_headers ());\r\n\t\t \treturn new B (TRUE);\r\n \t\t} else {\r\n \t\t // Do return ...\r\n \t\t\treturn new B (FALSE);\r\n \t\t}\r\n \t} else {\r\n \t // Do return ...\r\n \t\treturn new B (TRUE);\r\n \t}\r\n }", "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 getHeader($headerName);", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "protected function getHeaders()\n {\n return $this->headers;\n }", "protected function getHeaders()\n {\n return $this->headers;\n }", "private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}", "public function setHeaders($headers) {\n $this->headers = [];\n $this->headerNames = [];\n\n $headers = $this->parseHeaders($headers);\n foreach ($headers as $name => $lines) {\n $key = strtolower($name);\n if (isset($this->headers[$key])) {\n $this->headers[$key] = array_merge($this->headers[$key], $lines);\n } else {\n $this->headers[$key] = $lines;\n }\n $this->headerNames[$key] = $name;\n }\n\n return $this;\n }", "public function headers() {\n return $this->headers;\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "private static function getHeaders( )\n\t{\n\t\tif ( \\function_exists( 'apache_request_headers' ) === true )\n\t\t{\n\t\t\treturn \\apache_request_headers( );\n\t\t}\n\n\t\tforeach ( $_SERVER as $key => $value )\n\t\t{\n\t\t\tif ( substr( $key, 0, 5 ) === 'HTTP_' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $key, 5 ) ) ) ) )] = $value;\n\t\t\t}\n\t\t\telseif ( $key === 'CONTENT_TYPE' || $key === 'CONTENT_LENGTH' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( '_', '-', ucwords( strtolower( $key ) ) )] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $headers ) === true )\n\t\t{\n\t\t\treturn $headers;\n\t\t}\n\n\t\treturn false;\n\t}", "public function __construct(array $headers = array()) {\n\n foreach($headers as $name => $value) {\n $this->addHeader($name, $value);\n }\n\n $this->rewind();\n\n }", "public static function __set_state($data) {\n\n\t\t$headers = new self();\n\n\t\tif(isset($data['_headers'])) {\n\n\t\t\tforeach($data['_headers'] as $key => $value)\n\t\t\t\t$headers->set($key, $value);\n\n\t\t}\n\n\t\treturn $headers;\n\t}", "public function testConstructorSetsTheHeadersArrayIfTheyArePassedCorrectlyAsAString()\n\t{\n $inputHeadersString = 'GET /test/jsonrpc.php HTTP/1.1' . \"\\r\\n\" .\n 'Host: test.mysite.local' . \"\\r\\n\" .\n 'Connection: close' . \"\\r\\n\";\n $expectedHeadersArray = array(\n 'Host' => 'test.mysite.local',\n 'Connection' => 'close'\n );\n $mock = new Headers($inputHeadersString);\n $this->assertEquals($expectedHeadersArray, $mock->getAsArray());\n\t}", "public function headers($key = null, $value = null)\n {\n if ($key instanceof HTTPHeader) {\n // Act a setter, replace all headers\n $this->header = $key;\n\n return $this;\n }\n\n if (is_array($key)) {\n // Act as a setter, replace all headers\n $this->header->exchangeArray($key);\n\n return $this;\n }\n\n if ($this->header->count() === 0 AND $this->isInitial()) {\n // Lazy load the request headers\n $this->header = HTTP::requestHeaders();\n }\n\n if ($key === null) {\n // Act as a getter, return all headers\n return $this->header;\n } elseif ($value === null) {\n // Act as a getter, single header\n return ($this->header->offsetExists($key)) ? $this->header->offsetGet($key) : null;\n }\n\n // Act as a setter for a single header\n $this->header[$key] = $value;\n\n return $this;\n }", "public function testHttpResponseHeadersGetSet(UnitTester $I)\n {\n $headers = new Headers();\n\n $headers->set('Content-Type', 'text/html');\n\n $I->assertSame(\n 'text/html',\n $headers->get('Content-Type')\n );\n }", "#[Pure]\nfunction http_get_request_headers() {}", "public function headers()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return apache_request_headers();\n }", "public function setHeaders(Headers $headers)\n {\n $this->headers = $headers;\n return $this;\n }", "public function getHeadersSet()\n {\n return $this->headersSet;\n }", "public static function headers()\n {\n\n return [\n 'APCA-API-KEY-ID' => config('alpaca.live_mode') ? config('alpaca.live_key') : config('alpaca.paper_key'),\n 'APCA-API-SECRET-KEY' => config('alpaca.live_mode') ? config('alpaca.live_secret') : config('alpaca.paper_secret')\n ];\n }", "public function withHeaders(array $headers): RequestInterface;", "public function getHttpHeaders()\n {\n $headers = array(\n 'X-Client-Env: PHP ' . PHP_VERSION\n );\n\n foreach ($this->headers as $name => $value) {\n if (strtolower($name) != 'user-agent') {\n $headers[] = \"$name: $value\";\n }\n }\n\n return $headers;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public static function getStoreAndHeaders(&$env, $cookies)\n {\n if (isset($env['WOVN_CONFIG'])) {\n $file = $env['WOVN_CONFIG'] ? $env['WOVN_CONFIG'] : DIRNAME(__FILE__) . '/../../../../wovn.json';\n } else {\n $file = DIRNAME(__FILE__) . '/../../../../wovn.ini';\n }\n\n $store = Store::createFromFile($file);\n $cookieLang = new CookieLang($cookies);\n $headers = new Headers($env, $store, $cookieLang);\n return array($store, $headers);\n }", "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\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 }" ]
[ "0.64663017", "0.61760974", "0.6117139", "0.60135657", "0.5932401", "0.588565", "0.5863152", "0.5843509", "0.57841384", "0.5782216", "0.576597", "0.5727603", "0.57211536", "0.57118666", "0.5711274", "0.5647395", "0.56083405", "0.56083405", "0.56082624", "0.55858845", "0.5578869", "0.5569527", "0.55642235", "0.5556961", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548619", "0.5547974", "0.5538313", "0.5524642", "0.5524642", "0.5524481", "0.55130756", "0.54974866", "0.549367", "0.54595196", "0.5435929", "0.54298717", "0.5427114", "0.5414668", "0.5408076", "0.54079086", "0.53997874", "0.53979456", "0.53912437", "0.53764105", "0.53741807", "0.53725404", "0.5359695", "0.53449154", "0.5339246", "0.5335309", "0.53303874", "0.53239524", "0.53154206", "0.5311032", "0.53103817", "0.52966964", "0.52913624", "0.5282882", "0.5273096", "0.52672756", "0.52610177", "0.52599525", "0.5256733", "0.5243593", "0.5243593", "0.5238747", "0.5238682", "0.5237873", "0.52360874", "0.52360874", "0.5227973", "0.5227111", "0.5224549", "0.5208194", "0.5206714", "0.5204377", "0.5184711", "0.51752377", "0.5174677", "0.51668644", "0.516501", "0.5162407", "0.5155982", "0.51512116", "0.51492554", "0.51492554", "0.51492554", "0.51482064", "0.51474255", "0.5137698" ]
0.77983695
0
Resolve headers from provided array
private function resolveHeaders($headersForResolve) { $headers = []; foreach ($headersForResolve as $name => $value) { if (strpos($name, 'REDIRECT_') === 0) { $name = substr($name, 9); // Do not replace existing variables if (array_key_exists($name, $headersForResolve)) { continue; } } if (substr($name, 0, 5) == 'HTTP_' || isset($this->specialHeaders[$name])) { $headers[$name] = $value; } } return $headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 loadHeaders(array $headers);", "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}", "protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }", "public static function formatHeaders(array $rawHeaders)\n {\n $headers = array();\n\n foreach ($rawHeaders as $line) {\n if (strpos($line, ':') === false) {\n // set our http status code\n $headers['http_code'] = $line;\n } else {\n // set this header entry\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n }\n\n return $headers;\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 }", "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 }", "private function convertHeaders(array $headers)\n {\n $result = [];\n foreach ($headers as $key => $value) {\n $result[] = $key . ': ' . $value;\n }\n\n return $result;\n }", "private static function ParseHeadersFromArray(array $Headers)\n\t{\n\t\t$Result = array();\n\n\t\t$CurrentHeader = 0;\n\n\t\tforeach ($Headers as $Index => $RawHeader)\n\t\t{\n\t\t\tif ($Index == 0 || strpos($RawHeader, 'HTTP/') === 0)\n\t\t\t{\n\t\t\t\t// HTTP status headers could be repeated on further lines if any redirects are encountered.\n\t\t\t\tlist($Discard, $StatusCode, $Status) = explode(' ', $RawHeader, 3);\n\t\t\t\t$Result['Response Code'] = $StatusCode;\n\t\t\t\t$Result['Response Status'] = $Status;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$RawHeader = explode(':', $RawHeader, 2);\n\n\t\t\tif (count($RawHeader) > 1)\n\t\t\t{\n\t\t\t\t$CurrentHeader = trim($RawHeader[0]);\n\t\t\t\t$Result[$CurrentHeader] = trim($RawHeader[1]);\n\t\t\t}\n\t\t\telseif (count($RawHeader) == 1)\n\t\t\t{\n\t\t\t\t$Result[$CurrentHeader] .= ' '.trim($RawHeader[0]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$CurrentHeader = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $Result;\n\t}", "protected function compileHeaders(array $headers) {\n\t\t$return = array();\n\n\t\tforeach ($headers as $key => $value) {\n\t\t\t$return[] = $key . ': ' . $value;\n\t\t}\n\n\t\treturn $return;\n\t}", "protected function parseHeaders(array $headers)\n {\n $this->headers = array();\n\n // find and set the HTTP status code and reason\n $firstHeader = array_shift($headers);\n if (!preg_match('/^HTTP\\/\\d(\\.\\d)? [0-9]{3}/', $firstHeader)) {\n throw new \\InvalidArgumentException('Invalid response header');\n }\n list(, $status) = explode(' ', $firstHeader, 2);\n $code = explode(' ', $status);\n $code = (int)$code[0];\n\n // special handling for HTTP 100 responses\n if ($code === 100) {\n // remove empty header lines between 100 and actual HTTP status\n foreach ($headers as $key => $header) {\n if ($header) {\n break;\n }\n unset($headers[$key]);\n }\n\n // start the process over with the 100 continue header stripped away\n return $this->parseHeaders($headers);\n }\n\n $this->httpStatusText = $status;\n $this->httpStatusCode = $code;\n\n foreach ($headers as $header) {\n // skip empty lines\n if (!$header) {\n continue;\n }\n\n $delimiter = strpos($header, ':');\n if (!$delimiter) {\n continue;\n }\n\n $key = trim(strtolower(substr($header, 0, $delimiter)));\n $val = ltrim(substr($header, $delimiter + 1));\n\n if (isset($this->headers[$key])) {\n if (is_array($this->headers[$key])) {\n $this->headers[$key][] = $val;\n } else {\n $this->headers[$key] = array($this->headers[$key], $val);\n }\n } else {\n $this->headers[$key] = $val;\n }\n }\n }", "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 getHeader(string ...$headers): string|array|null\n {\n\n $list = [];\n\n if (count($headers) > 1) {\n foreach ($headers as $header) {\n if ($this->hasHeader($header)) {\n $list[$header] = $this->getAll()[$header];\n }\n }\n } else if ($this->hasHeader($headers[0])) {\n $list = $this->getAll()[$headers[0]];\n }\n\n return $list;\n\n }", "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 }", "private static function ParseHeadersFromArray(array $Headers)\n\t{\n\t\t$Result = [];\n\n\t\t$CurrentHeader = 0;\n\n\t\tforeach ($Headers as $Index => $RawHeader)\n\t\t{\n\t\t\tif ($Index == 0 || strpos($RawHeader, 'HTTP/') === 0)\n\t\t\t{\n\t\t\t\t// HTTP status headers could be repeated on further lines if any redirects are encountered.\n\t\t\t\tlist($Discard, $StatusCode, $Status) = explode(' ', $RawHeader, 3);\n\t\t\t\t$Result['Response Code'] = $StatusCode;\n\t\t\t\t$Result['Response Status'] = $Status;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$RawHeader = explode(':', $RawHeader, 2);\n\n\t\t\tif (count($RawHeader) > 1)\n\t\t\t{\n\t\t\t\t$CurrentHeader = trim($RawHeader[0]);\n\t\t\t\t$Result[$CurrentHeader] = trim($RawHeader[1]);\n\t\t\t}\n\t\t\telseif (count($RawHeader) == 1)\n\t\t\t{\n\t\t\t\t$Result[$CurrentHeader] .= ' '.trim($RawHeader[0]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$CurrentHeader = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $Result;\n\t}", "public static function provideHeaders(): array\n {\n return [\n 'simple' => [\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ],\n\n 'with authorization as string' => [\n ['Content-Type' => 'application/json', 'Authorization' => 'bearer some-foo-token'],\n ['Content-Type' => 'application/json', 'Authorization' => '***'],\n ],\n\n 'with authorization as array' => [\n ['Content-Type' => 'application/json', 'Authorization' => ['bearer some-foo-token', 'basic foo']],\n ['Content-Type' => 'application/json', 'Authorization' => ['***']],\n ],\n ];\n }", "private function composeFirstHeader(string $header): array\n {\n preg_match('/http\\/(.+) (\\d+) (.*)/i', $header, $matches);\n return $matches;\n }", "public function setHeaders(array $header) {}", "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 }", "public static function parseHeaders($headers) {\n $found = array();\n\n // extract version and status\n $versionAndStatus = array_shift($headers);\n $m = Strings::match($versionAndStatus, '~HTTP/(?P<version>\\d\\.\\d)\\s(?P<code>\\d\\d\\d)\\s(?P<status>.*)~');\n if (count($m) > 0) {\n $found['Http-Version'] = $m['version'];\n $found['Status-Code'] = $m['code'];\n $found['Status'] = $m['code'] . ' ' . $m['status'];\n }\n\n // convert headers to associative array\n foreach ($headers as $header) {\n $m = Strings::match($header, '~(?P<header>.*?)\\:\\s(?P<value>.*)~');\n if (isset($found[$m['header']])) {\n if (is_array($found[$m['header']])) {\n $found[$m['header']][] = $m['value'];\n } else {\n $found[$m['header']] = array($found[$m['header']]);\n $found[$m['header']][] = $m['value'];\n }\n } else {\n $found[$m['header']] = $m['value'];\n }\n }\n\n return $found;\n }", "private function compileHeaders($headers){\n $result = [];\n if ($headers & self::HEADER_BASE){\n\n $mimeType = \"application/json\";\n if ($headers & self::HEADER_DOCUMENT){\n $mimeType = \"application/octet-stream\";\n }\n\n $result = [\n \"mimeType: {$mimeType}\",\n \"x-api-key: \". \\Yii::$app->perfectParser->dataSource->apiKey\n ];\n }\n if ($headers & self::HEADER_CUSTOMER){\n $result[] = self::AUTH_PREFIX . $this->api->getCustomerToken();\n }\n if ($headers & self::HEADER_USER){\n $result[] = self::AUTH_PREFIX . $this->api->getUserToken();\n }\n if ($headers & self::HEADER_CONTENT_TYPE_OCTET_STREAM){\n $result[] = \"content-type: application/octet-stream\";\n } else {\n $result[] = \"content-type: application/json\";\n }\n return $result;\n }", "public function addHeaders(array $headers) {}", "function setHeaders(array $headers){\n\t\tforeach($headers as $header => $value){\n\t\t\t$this->headers[strtolower($header)] = trim($value);\n\t\t}\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 }", "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 _load_headers(&$app, &$c) {\n\t\t$headers =& $c->param('app.view_http.request.headers');\n\t\tif (is_array($headers)) {\n\t\t\tforeach($headers as $h_name => $h_value) {\n\t\t\t\t$this->_http->addHeader($h_name, $h_value);\n\t\t\t}\n\t\t}\n\t}", "protected function prepareHeaders($headers)\n\t{\n\t\t$lines = array();\n\t\t$from = null;\n\n\t\tforeach ($headers as $key => $value) {\n\t\t\tif (strcasecmp($key, 'From') === 0) {\n\t\t\t\t$parser = new Mail_RFC822();\n\t\t\t\t$addresses = $parser->parseAddressList($value, 'localhost', false);\n\t\t\t\tif ( $addresses instanceOf Error ) {\n\t\t\t\t\treturn $addresses;\n\t\t\t\t}\n\n\t\t\t\t$from = $addresses[0]->mailbox . '@' . $addresses[0]->host;\n\n\t\t\t\t// Reject envelope From: addresses with spaces.\n\t\t\t\tif (strstr($from, ' ')) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$lines[] = $key . ': ' . $value;\n\t\t\t} elseif (strcasecmp($key, 'Received') === 0) {\n\t\t\t\t$received = array();\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\tforeach ($value as $line) {\n\t\t\t\t\t\t$received[] = $key . ': ' . $line;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$received[] = $key . ': ' . $value;\n\t\t\t\t}\n\t\t\t\t// Put Received: headers at the top. Spam detectors often\n\t\t\t\t// flag messages with Received: headers after the Subject:\n\t\t\t\t// as spam.\n\t\t\t\t$lines = array_merge($received, $lines);\n\t\t\t} else {\n\t\t\t\t// If $value is an array (i.e., a list of addresses), convert\n\t\t\t\t// it to a comma-delimited string of its elements (addresses).\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$value = implode(', ', $value);\n\t\t\t\t}\n\t\t\t\t$lines[] = $key . ': ' . $value;\n\t\t\t}\n\t\t}\n\n\t\treturn array($from, join($this->sep, $lines));\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 }", "private function get_saved_headers($array_headers, $raw_headers) {\n\n $saved_headers = array();\n\n foreach ($array_headers as $header_name => $value) {\n\n $header_value = $this->get_header_value($raw_headers, $header_name);\n\n if ($header_value) {\n $saved_headers[$header_name] = $header_value;\n }\n }\n\n return $saved_headers;\n }", "final static public function validateHeaders($headers = array()) {\n // Validate headers\n if (!is_array($headers)) {\n throw new Zend_Http_Client_Exception('Headers must be supplied as an array');\n } else {\n foreach ($headers as $header) {\n if (!is_string($header)) {\n throw new Zend_Http_Client_Exception('Illegal header supplied; header must be a string');\n } else if (!strpos($header, ': ')) {\n \t/**\n \t * @todo should protect against injections by making sure one and only one header is here\n \t */\n throw new Zend_Http_Client_Exception('Bad header. Headers must be formatted as \"Field: value\"');\n }\n }\n }\n }", "abstract public function getHeaders();", "public function setHeaders(array $headers)\n {\n foreach ($headers as $directive => $value) {\n\n if (is_array($value)) {\n\n if (isset($value['directive'])) {\n $directiveValue = $value['directive'];\n } else {\n throw new InvalidArgument(\n 'Missing \\'directive\\' offset in $headers array.');\n }\n\n if (isset($value['value'])) {\n $headerValue = $value['value'];\n } else {\n throw new InvalidArgument(\n 'Missing \\'value\\' offset in $headers array.');\n }\n\n $replaceValue = isset($value['replace']) ? $value['replace'] : null;\n $this->setHeader($directiveValue, $headerValue, $replaceValue);\n\n } else {\n $this->setHeader($directive, $value);\n }\n }\n }", "public static function compileHeaders(array $headers = []): array\n {\n if (empty($headers)) {\n return [];\n }\n\n $headers = Collection::make($headers)->map(function ($value, $key) {\n return \"{$key}: {$value}\";\n })->filter()->push(\"\")->implode(\"\\r\\n\");\n\n return ['-headers', $headers];\n }", "private function setHttpHeaders(array $headers): void\n {\n foreach ($headers as $header) {\n $values = explode(':', $header, 2);\n\n // Ignore invalid header\n if (count($values) < 2) {\n continue;\n }\n\n $this->setHttpHeader(trim($values[0]), trim($values[1]));\n }\n }", "protected function transformHeadersToServerVars(array $headers)\n {\n return collect($headers)->mapWithKeys(function ($value, $name) {\n $name = strtr(strtoupper($name), '-', '_');\n\n return [$this->formatServerHeaderKey($name) => $value];\n })->all();\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}", "public abstract function getHeaders();", "public function initializeHeader(array $header): void\n {\n // removes forbidden symbols from header (field names)\n $this->header = array_map(function (string $name): string {\n return preg_replace('~[^a-z0-9_-]+~i', '_', $name);\n }, $header);\n }", "public static function addHeaders(array $headers)\n {\n if(empty($headers)) {\n return;\n }\n\n self::$legacyHeaders = array_merge(self::$legacyHeaders, $headers);\n }", "protected function _parseHeaders($headers)\n {\n foreach ($headers as $key => $value) {\n if (substr($value, 0, 5) === 'HTTP/') {\n preg_match('/HTTP\\/([\\d.]+) ([0-9]+)(.*)/i', $value, $matches);\n $this->protocol = $matches[1];\n $this->code = (int)$matches[2];\n $this->reasonPhrase = trim($matches[3]);\n continue;\n }\n list($name, $value) = explode(':', $value, 2);\n $value = trim($value);\n $name = trim($name);\n\n $normalized = strtolower($name);\n\n if (isset($this->headers[$name])) {\n $this->headers[$name][] = $value;\n } else {\n $this->headers[$name] = (array)$value;\n $this->headerNames[$normalized] = $name;\n }\n }\n }", "public function setHeaders(?array $headers = null) {}", "public function populate_headers() {\n // If header is already defined, return it immediately\n if (!empty($this->headers)) {\n return;\n }\n\n // In Apache, you can simply call apache_request_headers()\n if (function_exists('apache_request_headers')) {\n $this->headers = apache_request_headers();\n } else {\n isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $val) {\n if (sscanf($key, 'HTTP_%s', $header) === 1) {\n // take SOME_HEADER and turn it into Some-Header\n $header = str_replace('_', ' ', strtolower($header));\n $header = str_replace(' ', '-', ucwords($header));\n\n $this->headers[$header] = $val;\n $this->header_map[strtolower($header)] = $header;\n }\n }\n }\n\n }", "public function setHeaders(array $headerlist)\n {\n // NOTE: could use addHeaders() but that blows if value is not mime encoded. wtf\n //$this->headers->addHeaders($headerlist);\n\n $headers = $this->headers;\n foreach ($headerlist as $name => $value) {\n /** @var $header GenericHeader */\n if ($headers->has($name)) {\n $header = $headers->get($name);\n $header->setFieldValue($value);\n } else {\n $header = new GenericHeader($name, $value);\n $this->headers->addHeader($header);\n }\n }\n }", "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 }", "private function formatHeaders(array $headers)\n {\n $formattedHeaders = [];\n\n foreach ($headers as $name => $value) {\n $formattedHeaders[] = sprintf('%s: %s', $name, $value);\n }\n\n return $formattedHeaders;\n }", "private function email_headers($extra_headers_array) {\n $header_array = array('From' => ADMIN_EMAIL);\n if (is_array($extra_headers_array)) {\n foreach($extra_headers_array as $label=>$value) {\n $header_array[$label] = $value;\n }\n }\n\n $expanded_headers = array();\n\n foreach($header_array as $label=>$value)\n {\n $expanded_headers[] = $label . ': ' . $value;\n }\n $headers = implode(\"\\r\\n\", $expanded_headers);\n return $headers;\n}", "public function rfc822_parse_headers($raw_headers): object {\n $headers = [];\n $imap_headers = [];\n if (extension_loaded('imap') && $this->config[\"rfc822\"]) {\n $raw_imap_headers = (array)\\imap_rfc822_parse_headers($raw_headers);\n foreach ($raw_imap_headers as $key => $values) {\n $key = strtolower(str_replace(\"-\", \"_\", $key));\n $imap_headers[$key] = $values;\n }\n }\n $lines = explode(\"\\r\\n\", preg_replace(\"/\\r\\n\\s/\", ' ', $raw_headers));\n $prev_header = null;\n foreach ($lines as $line) {\n if (str_starts_with($line, \"\\n\")) {\n $line = substr($line, 1);\n }\n\n if (str_starts_with($line, \"\\t\")) {\n $line = substr($line, 1);\n $line = trim(rtrim($line));\n if ($prev_header !== null) {\n $headers[$prev_header][] = $line;\n }\n } elseif (str_starts_with($line, \" \")) {\n $line = substr($line, 1);\n $line = trim(rtrim($line));\n if ($prev_header !== null) {\n if (!isset($headers[$prev_header])) {\n $headers[$prev_header] = \"\";\n }\n if (is_array($headers[$prev_header])) {\n $headers[$prev_header][] = $line;\n } else {\n $headers[$prev_header] .= $line;\n }\n }\n } else {\n if (($pos = strpos($line, \":\")) > 0) {\n $key = trim(rtrim(strtolower(substr($line, 0, $pos))));\n $key = strtolower(str_replace(\"-\", \"_\", $key));\n\n $value = trim(rtrim(substr($line, $pos + 1)));\n if (isset($headers[$key])) {\n $headers[$key][] = $value;\n } else {\n $headers[$key] = [$value];\n }\n $prev_header = $key;\n }\n }\n }\n\n foreach ($headers as $key => $values) {\n if (isset($imap_headers[$key])) {\n continue;\n }\n $value = null;\n switch ((string)$key) {\n case 'from':\n case 'to':\n case 'cc':\n case 'bcc':\n case 'reply_to':\n case 'sender':\n $value = $this->decodeAddresses($values);\n $headers[$key . \"address\"] = implode(\", \", $values);\n break;\n case 'subject':\n $value = implode(\" \", $values);\n break;\n default:\n if (is_array($values)) {\n foreach ($values as $k => $v) {\n if ($v == \"\") {\n unset($values[$k]);\n }\n }\n $available_values = count($values);\n if ($available_values === 1) {\n $value = array_pop($values);\n } elseif ($available_values === 2) {\n $value = implode(\" \", $values);\n } elseif ($available_values > 2) {\n $value = array_values($values);\n } else {\n $value = \"\";\n }\n }\n break;\n }\n $headers[$key] = $value;\n }\n\n return (object)array_merge($headers, $imap_headers);\n }", "private static function get_signed_headers($headers) {\n\t\t$signed_headers = Array();\n\t\tforeach ($headers as $header) {\n\t\t\t$signed_headers[] = substr($header, 0, strpos($header, ':'));\n\t\t}\n\t\treturn $signed_headers;\n\t}", "public static function parseHeader($header): array;", "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}", "private function normalizeHeader(array $header): array\n {\n if ($this->isNormalizeHeader()) {\n return array_map('strtolower', $this->normalizer->normalizeHeader($header));\n }\n\n return $header;\n }", "protected function transformHeadersToServerVars(array $headers): array\n {\n $result = [];\n\n foreach ($headers as $key => $header) {\n $result[$this->formatServerHeaderKey($key)] = $header;\n }\n\n return $result;\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}", "public function testAddingANewHeaderIsFoundTheTheHeadersArray()\n {\n $inputHeaders = array(\n 'Host' => 'test.mysite.local'\n );\n $inputHeaderName = 'Connection';\n $inputHeaderValue = 'close';\n $mock = new Headers($inputHeaders);\n $mock->add($inputHeaderName, $inputHeaderValue);\n\n $this->assertEquals($inputHeaderValue, $mock->get($inputHeaderName));\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}", "protected function getHeaders($params)\n {\n $headers = array();\n \n foreach ($params as $name => $value) {\n if (substr($name, 0, 5) === 'HTTP_') {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));\n $headers[$key] = $value;\n }\n }\n \n return $headers;\n }", "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 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 getHeaders(array $headers = []): array\n {\n return [\n 'ApiToken' => $this->apiToken,\n 'Subscription-Key' => $this->subscriptionKey,\n ];\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 }", "protected function httpParseHeaders($raw_headers) {\n // ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986\n $headers = array();\n $key = '';\n\n foreach (explode(\"\\n\", $raw_headers) as $h) {\n $h = explode(':', $h, 2);\n\n if (isset($h[1])) {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n } elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));\n } else {\n $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));\n }\n\n $key = $h[0];\n } else {\n if (substr($h[0], 0, 1) == \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\" . trim($h[0]);\n } elseif (!$key) {\n $headers[0] = trim($h[0]);\n }\n trim($h[0]);\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 ();", "#[Pure]\nfunction http_parse_headers($header) {}", "public function readHeaders(): ?array;", "public function testSetHeadersArray()\n {\n $in = [\n 'hello' => 'world',\n 'foo' => 'bar',\n 'time' => 123,\n ];\n\n $this->object->setHeaders($in);\n\n $this->assertEquals($in, $this->object->getHeaders());\n }", "public function getHttpResponseHeaders($rawHeaders)\n {\n if (is_array($rawHeaders)) {\n return $this->parseArrayHeaders($rawHeaders);\n } else {\n return $this->parseStringHeaders($rawHeaders);\n }\n }", "public function testConvertingAPlainTextHeadersListToArrayReturnsTheExpectedHeaders()\n {\n $inputHeadersString = 'GET /test/jsonrpc.php HTTP/1.1' . \"\\r\\n\" .\n 'Host: test.mysite.local' . \"\\r\\n\" .\n 'Connection: close' . \"\\r\\n\";\n $expectedHeadersArray = array(\n 'Host' => 'test.mysite.local',\n 'Connection' => 'close'\n );\n $mock = new Headers($inputHeadersString);\n $headersArray = $mock->getAsArray();\n\n $this->assertEquals($headersArray, $expectedHeadersArray);\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 testConstructorSetsTheHeadersArrayIfTheyArePassedCorrectlyAsAnArray()\n\t{\n $inputHeadersArray = array(\n 'Host' => 'test.mysite.local',\n 'Connection' => 'close'\n );\n $mock = new Headers($inputHeadersArray);\n $this->assertEquals($inputHeadersArray, $mock->getAsArray());\n\t}", "private function parseHeaders(string $raw_headers): array\n {\n if (function_exists('http_parse_headers')) {\n return http_parse_headers($raw_headers);\n } else {\n $key = '';\n $headers = [];\n\n foreach (explode(\"\\n\", $raw_headers) as $i => $h) {\n $h = explode(':', $h, 2);\n\n if (isset($h[1])) {\n if (!isset($headers[$h[0]])) {\n $headers[$h[0]] = trim($h[1]);\n } elseif (is_array($headers[$h[0]])) {\n $headers[$h[0]] = array_merge($headers[$h[0]], [trim($h[1])]);\n } else {\n $headers[$h[0]] = array_merge([$headers[$h[0]]], [trim($h[1])]);\n }\n\n $key = $h[0];\n } else {\n if (substr($h[0], 0, 1) == \"\\t\") {\n $headers[$key] .= \"\\r\\n\\t\" . trim($h[0]);\n } elseif (empty($key)) {\n $headers[0] = trim($h[0]);\n }\n }\n }\n\n return $headers;\n }\n }", "public static function prepareHeaders($headers, $count = 1)\n {\n }", "private function _dkim_canonicalize_headers_relaxed($sHeaders){\n\t\t\n\t\t$aHeaders = array();\n\t\t\n\t\t// a header value which is spread over several lines must be 1-lined\n\t\t$sHeaders = preg_replace(\"/\\n\\s+/\", \" \", $sHeaders);\n\t\t\n\t\t$lines = explode(\"\\r\\n\", $sHeaders);\n\t\t\n\t\tforeach($lines as $key => $line){\n\t\t\t\n\t\t\t// delete multiple WSP\n\t\t\t$line = preg_replace(\"/\\s+/\", ' ', $line);\n\t\t\t\n\t\t\tif(!empty($line)){\n\t\t\t\n\t\t\t\t// header type to lowercase and delete WSP which are not part of the header value\n\t\t\t\t$line = explode(':', $line, 2);\n\t\t\t\t\n\t\t\t\t$header_type = trim(strtolower($line[0]));\n\t\t\t\t$header_value = trim($line[1]);\n\t\t\t\t\n\t\t\t\tif(in_array($header_type, $this -> options['signed_headers']) or $header_type == 'dkim-signature'){\n\t\t\t\t\t\n\t\t\t\t\t$aHeaders[$header_type] = $header_type.':'.$header_value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $aHeaders;\n\t}", "public function getHeadersArray() { return $this->headers; }", "protected function getTrustedHeaderNames()\n {\n $result = [];\n $headers = $this->app->make('config')->get('concrete.security.trusted_proxies.headers');\n if (is_array($headers)) {\n $map = $this->getLegacySymfonyHeadersMap();\n foreach ($map as $legacyHeaderName => $headerName) {\n if (in_array($legacyHeaderName, $headers, true)) {\n $result[] = $headerName;\n }\n }\n } else {\n $flags = (int) $headers;\n $map = $this->getSymfonyHeadersMap();\n foreach ($map as $headerFlag => $headerName) {\n if ((int) $headerFlag & $flags) {\n $result[] = $headerName;\n }\n }\n }\n\n return $result;\n }", "function formatHeaders($headers)\n {\n $out_headers = array();\n\n foreach ($headers as $header => $value) {\n if(HorusHttp::DELETE_TAG!==$value)\n $out_headers[] = $header . ': ' . $value;\n }\n\n return $out_headers;\n }", "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 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 headers(): array\n\t{\n\t\t// If no headers are defined, but the user is\n\t\t// requesting it, then it's likely they want\n\t\t// it to be populated so do that...\n\t\tif (empty($this->headers))\n\t\t{\n\t\t\t$this->populateHeaders();\n\t\t}\n\n\t\treturn $this->headers;\n\t}", "function setHeadersNames($names){\n\t\t$this->headers=explode(\",\",$names);\n\t\tforeach($this->headers as &$header){\n\t\t\t$header=trim($header);\n\t\t}\n\t}", "public function response_headers($header_name=null) {\n $headers = null;\n if(is_array($this->response_headers)) {\n $header_name = strtolower($header_name);\n if($header_name===null) {\n $headers = $this->response_headers;\n } else {\n $headers = key_exists($header_name, $this->response_headers)\n ? $this->response_headers[$header_name]\n : null;\n }\n }\n return $headers;\n }", "private function parseHeaders($headers)\n {\n $result = [];\n\n foreach (preg_split(\"/\\\\r\\\\n|\\\\r|\\\\n/\", $headers) as $row) {\n $header = explode(':', $row, 2);\n\n if (count($header) == 2) {\n $result[$header[0]] = trim($header[1]);\n }\n else {\n $result[] = $header[0];\n }\n }\n\n return $result;\n }", "public function getHeadersRaw(): array;", "public function getHeaders(...$params): array\n {\n if (empty($params) || empty(collect($params)->first())) {\n return [\n 'Accept' => 'application/json',\n 'Authorization' => 'Basic ' . base64_encode(Config::get('wordpress.basic_auth_username') .':'. Config::get('wordpress.basic_auth_password')),\n ];\n }\n\n $token = $params['0'];\n\n return [\n 'Accept' => 'application/json',\n 'Authorization' => 'Basic ' . $token\n ];\n }", "private function setHeaders(array $headers): void\n {\n $this->headers = $headers;\n }" ]
[ "0.6966589", "0.6901316", "0.65862864", "0.6415491", "0.63962", "0.6395929", "0.6391153", "0.63374436", "0.63296425", "0.6324967", "0.6309371", "0.62840354", "0.6262256", "0.62622404", "0.62206244", "0.620608", "0.6195556", "0.618765", "0.6167635", "0.6148596", "0.61291605", "0.6071379", "0.6071088", "0.6065191", "0.60545456", "0.6033043", "0.5991706", "0.5984638", "0.5984602", "0.5959813", "0.5946985", "0.5924577", "0.59210527", "0.5920554", "0.5920478", "0.59201336", "0.5918763", "0.58962965", "0.58934605", "0.5868927", "0.58688086", "0.5867772", "0.5863511", "0.58539873", "0.5846067", "0.5830691", "0.5824891", "0.5823908", "0.58109146", "0.5807582", "0.5802209", "0.57856786", "0.5784077", "0.5771793", "0.57656705", "0.57482874", "0.57480675", "0.57480675", "0.57480675", "0.57480675", "0.57480675", "0.57480675", "0.57480675", "0.574151", "0.57288784", "0.57061315", "0.5704831", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.57037115", "0.56855386", "0.568094", "0.56651163", "0.5663016", "0.566217", "0.5651516", "0.5645346", "0.56370664", "0.563485", "0.56268257", "0.56111354", "0.5603727", "0.56030816", "0.55960524", "0.5581034", "0.55732346", "0.55618995", "0.5560406", "0.5557654", "0.555515", "0.55542827", "0.55515015", "0.5550568" ]
0.61550534
19
Get columns from table use Zend_Db_Adapter
public function getColumnsFromTable() { return Zend_Db_Table::getDefaultAdapter()->describeTable($this->_tableName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_columns($table);", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function getColumns()\n\t{\n\t\t\n $result = $this->fetchingData(array(\n 'query' => \"SHOW FULL COLUMNS FROM `$this->table`\"\n ));\n\n return $result;\n\t}", "private function table_columns(){\n $column = array();\n $query = $this->db->select('column_name')\n ->from('information_schema.columns')\n ->where('table_name', $this::$table_name)\n ->get($this::$table_name)->result_array();\n //return individual table column\n foreach($query as $column_array){\n foreach($column_array as $column_name){\n $column[] = $column_name;\n }\n }\n return $column;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "function getColumns() {return $this->_columns;}", "public function get_columns() {\n\n\t\treturn array(\n\t\t\t'id' \t\t => '%d',\n\t\t\t'name' \t\t => '%s',\n\t\t\t'date_created' \t=> '%s',\n\t\t\t'date_modified' => '%s',\n\t\t\t'status'\t\t=> '%s',\n\t\t\t'ical_hash'\t\t=> '%s'\n\t\t);\n\n\t}", "function columns($table)\n{\n\treturn $this->drv->columns($table);\n}", "public abstract function getColumns($table);", "public function getColumnsList(){\n return $this->_get(3);\n }", "public function get_columns() {\n\t\treturn array(\n\t\t\t'id' => '%d',\n\t\t\t'user_id' => '%d',\n\t\t\t'username' => '%s',\n\t\t\t'name' => '%s',\n\t\t\t'email' => '%s',\n\t\t\t'product_count' => '%d',\n\t\t\t'sales_count'\t => '%d',\n\t\t\t'sales_value'\t => '%f',\n\t\t\t'status'\t\t => '%s',\n\t\t\t'notes' => '%s',\n\t\t\t'date_created' => '%s',\n\t\t);\n\t}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public function getTableColumns() { return $this->table->getColumns(); }", "function lookup_columns()\n {\n // Avoid doing multiple SHOW COLUMNS if we can help it\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n $this->_table_columns = C_Photocrati_Transient_Manager::fetch($key, FALSE);\n if (!$this->_table_columns) {\n $this->object->update_columns_cache();\n }\n return $this->_table_columns;\n }", "public function getColumns(): array;", "public function getTableColumns(){\n\n $show_columns_statement = $this->grammer->compileShowColumns($this);\n return $this->connection->getTableColumns($show_columns_statement);\n\n }", "protected function getColumns() {\n $driver = $this->connection->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\n // Calculate the driver class. Why don't they do this for us?\n $class = '\\\\Aura\\\\SqlSchema\\\\' . ucfirst($driver) . 'Schema';\n $schema = new $class($this->connection, new ColumnFactory());\n return array_keys($schema->fetchTableCols($this->table));\n }", "public function columns($table_name);", "protected function getTableColumns()\n {\n if (!$this->model->getConnection()->isDoctrineAvailable()) {\n throw new \\Exception(\n 'You need to require doctrine/dbal: ~2.3 in your own composer.json to get database columns. '\n );\n }\n\n $table = $this->model->getConnection()->getTablePrefix().$this->model->getTable();\n /** @var \\Doctrine\\DBAL\\Schema\\MySqlSchemaManager $schema */\n $schema = $this->model->getConnection()->getDoctrineSchemaManager($table);\n\n // custom mapping the types that doctrine/dbal does not support\n $databasePlatform = $schema->getDatabasePlatform();\n\n foreach ($this->doctrineTypeMapping as $doctrineType => $dbTypes) {\n foreach ($dbTypes as $dbType) {\n $databasePlatform->registerDoctrineTypeMapping($dbType, $doctrineType);\n }\n }\n\n $database = null;\n if (strpos($table, '.')) {\n list($database, $table) = explode('.', $table);\n }\n\n return $schema->listTableColumns($table, $database);\n }", "abstract protected function getColumns(): array;", "public function getColumns(){\n $url = $this->urlWrapper() . URLResources::COLUMN;\n return $this->makeRequest($url, \"GET\", 2);\n }", "public function getTableColumns()\n\t{\n\t}", "public function getColumns() {\n\t\treturn( $this->getTable()->getColumns() );\n\t}", "abstract protected function _getColumnNames($rs);", "function readColumns() { return $this->_columns; }", "function listColumns($tablename);", "abstract public function getColNames();", "public function getColumns()\r\n {\r\n }", "function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}", "private function get_columns(&$result)\n\t{\n\t\t$i = 0; \n\t\twhile ($result->columnName($i)) {\n\t\t\t$columns[] = $result->columnName($i);\n\t\t\t$i++;\n\t\t}\n\t\treturn $columns;\n\t}", "static function columns($instancia = null) {\n if ($instancia) {\n return fields_of($instancia->_tablename());\n } else {\n return fields_of(self::getInstance()->_tablename());\n }\n }", "public function getColumns()\n {\n if (! is_null($this->columns)) {\n return collect($this->columns);\n }\n\n return $this->columns = collect($this->rows->first())\n ->except(['created_at', 'updated_at', 'deleted_at', 'id'])\n ->keys();\n }", "public function getListColumns(){\n\treturn \"id, codice_categoria, codice, descrizione\";\n}", "public function get_columns() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_columns();\n\n }", "public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }", "public function getColumns() {\n\n\n if (!$this->columns) {\n $this->columns = array();\n for ($i = 0; $i < $this->statement->columnCount(); $i++) {\n try {\n $columnMeta = $this->statement->getColumnMeta($i);\n\n if ($columnMeta) {\n\n // Fall back to varchar\n $columnType = self::NATIVE_SQL_MAPPINGS[$columnMeta[\"native_type\"]] ?? TableColumn::SQL_VARCHAR;\n $lengthDivisor = self::LENGTH_COLUMN_DIVISORS[$columnMeta[\"native_type\"]] ?? null;\n\n if ($columnType == TableColumn::SQL_BLOB && $columnMeta[\"len\"] > 300000)\n $columnType = TableColumn::SQL_LONGBLOB;\n\n // Record decimal types for later\n if ($columnType == TableColumn::SQL_REAL || $columnType == TableColumn::SQL_DOUBLE || $columnType == TableColumn::SQL_DECIMAL || $columnType == TableColumn::SQL_FLOAT) {\n $this->decimalColumns[] = $columnMeta[\"name\"];\n }\n\n\n $this->columns[] = new ResultSetColumn($columnMeta[\"name\"], $columnType,\n $lengthDivisor ? $columnMeta[\"len\"] / $lengthDivisor : null, $lengthDivisor ? $columnMeta[\"precision\"] : null);\n\n } else {\n $this->columns[] = new ResultSetColumn(\"column\" . ($i + 1), TableColumn::SQL_VARCHAR);\n }\n\n } catch (\\PDOException $e) {\n }\n }\n }\n return $this->columns;\n }", "abstract public function listColumns();", "public function getColumns()\n {\n return $this->select_list;\n }", "abstract public function tableColumns();", "protected function getColumn()\n {\n return DB::select(\n 'SELECT\n\t\t\t\t\t\t\t c.COLUMN_NAME\n\t\t\t\t\t\t\t,c.COLUMN_DEFAULT\n\t\t\t\t\t\t\t,c.IS_NULLABLE\n\t\t\t\t\t\t\t,c.DATA_TYPE\n\t\t\t\t\t\t\t,c.CHARACTER_MAXIMUM_LENGTH\n\t\t\t\t\t\t\t,pk.CONSTRAINT_TYPE AS EXTRA\n\t\t\t\t\t\t\tFROM INFORMATION_SCHEMA.COLUMNS AS c\n\t\t\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\t\t SELECT ku.TABLE_CATALOG,ku.TABLE_SCHEMA,ku.TABLE_NAME,ku.COLUMN_NAME, tc.CONSTRAINT_TYPE\n\t\t\t\t\t\t\t FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS tc\n\t\t\t\t\t\t\t INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS ku ON tc.CONSTRAINT_NAME = ku.CONSTRAINT_NAME\n\t\t\t\t\t\t\t) AS pk ON c.TABLE_CATALOG = pk.TABLE_CATALOG\n\t\t\t\t\t\t\t AND c.TABLE_SCHEMA = pk.TABLE_SCHEMA\n\t\t\t\t\t\t\t AND c.TABLE_NAME = pk.TABLE_NAME\n\t\t\t\t\t\t\t AND c.COLUMN_NAME = pk.COLUMN_NAME\n\t\t\t\t\t\t\tWHERE c.TABLE_NAME = ? AND c.TABLE_CATALOG = ? ',\n [$this->tableName, $this->databaseName]\n );\n }", "function get_columns(){\n\t\treturn array('id' => 'ID', 'orderinfo' => 'Customer Information', 'company' => 'Company', 'transaction_id' => 'Paypal Transaction ID', 'email' => 'Email Address', 'expiration' => 'Access Expiration', 'accesstourlkey' => 'Order Access URLs', 'webinarpass' => 'Webinars Passkey', 'total' => 'Order Total');\n\t}", "static function getColumns()\n {\n }", "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "abstract protected function columns();", "public function getAlumns()\n\t{\n $query = $this->db->get('alumns');\n return $query->result();\n\t}", "public function columns()\n {\n return $this->get('columns', []);\n }", "function getAllColumns($table){\n\t\t$types=sqlite_fetch_column_types($table,$this->id,SQLITE_ASSOC);\n\t\t$columns=array();\n\t\tforeach($types as $column=>$type){\n\t\t\t$columns[$column]=array(\n\t\t\t\t\"name\"=>$column,\n\t\t\t\t\"key\"=>&$row['Key'],\n\t\t\t\t\"type\"=>&$types[$column],\n\t\t\t\t\"default\"=>&$row['Default'],\n\t\t\t\t\"comment\"=>&$row['Comment']\n\t\t\t\t);\n\t\t}\n\t\treturn $columns;\n\t}", "public function getColumns() {\n $columns = array();\n foreach($this->mapping as $key => $value) {\n array_push($columns, $value);\n }\n return $columns;\n }", "private function getColumns() : array\n {\n return [\n self::column('id'),\n self::column('order'),\n RoomCategoryTranslationMapper::column('lang_id'),\n RoomCategoryTranslationMapper::column('name'),\n ];\n }", "public function getColumns()\n {\n return $this->_columns;\n }", "public static function getColumns()\n {\n return array('title', 'bindingId', 'minYear', 'maxYear',\n 'preciseDate', 'placePublished', 'publisher', 'printVersion',\n 'firstPage', 'lastPage');\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n // code...\n return $this->__COLUMNS__ ?? [];\n }", "function get_movie_table_columns()\n{\n\t$db = open_database_connection();\n\t$stmt = $db->prepare(\"DESCRIBE movie\");\n\t$stmt->execute();\n\t$columns = $stmt->fetchAll(PDO::FETCH_COLUMN);\n close_database_connection($db);\n return $columns;\n}", "public function getColumns(): array\n {\n return $this->columns;\n }", "public function getColumns(): array\n {\n return $this->columns;\n }", "function _get_querable_table_columns()\n {\n return array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');\n }", "public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }", "public function get_columns($table)\n\t{\n\t\treturn $this->driver_query($this->sql->column_list($this->prefix_table($table)), FALSE);\n\t}", "public function getAllColumnsNames()\n {\n switch (DB::connection()->getConfig('driver')) {\n case 'pgsql':\n $query = \"SELECT column_name FROM information_schema.columns WHERE table_name = '\".$this->table.\"'\";\n $column_name = 'column_name';\n $reverse = true;\n break;\n\n case 'mysql':\n $query = 'SHOW COLUMNS FROM '.$this->table;\n $column_name = 'Field';\n $reverse = false;\n break;\n\n case 'sqlsrv':\n $parts = explode('.', $this->table);\n $num = (count($parts) - 1);\n $table = $parts[$num];\n $query = \"SELECT column_name FROM \".DB::connection()->getConfig('database').\".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'\".$table.\"'\";\n $column_name = 'column_name';\n $reverse = false;\n break;\n\n default: \n $error = 'Database driver not supported: '.DB::connection()->getConfig('driver');\n throw new Exception($error);\n break;\n }\n\n $columns = array();\n\n foreach(DB::select($query) as $column)\n {\n $columns[] = $column->$column_name;\n }\n\n if($reverse)\n {\n $columns = array_reverse($columns);\n }\n\n return $columns;\n }", "static function get_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('link') => 'Link',\r\n self::qcol('date_from') => 'In use from',\r\n self::qcol('date_till') => 'In use till',\r\n self::qcol('main') => 'Main website'\r\n ];\r\n }", "public function getTableColumns() {\n return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());\n }", "public function getColumns($cache = true);", "abstract public function getColsFields();", "public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}", "private function getColumns() : array\r\n {\r\n return [\r\n self::column('id'),\r\n self::column('type_id'),\r\n self::column('region_id'),\r\n self::column('district_id'),\r\n self::column('phone'),\r\n self::column('fax'),\r\n self::column('zip'),\r\n self::column('rate'),\r\n self::column('discount'),\r\n self::column('website'),\r\n self::column('email'),\r\n self::column('active'),\r\n self::column('closed'),\r\n self::column('legal_address'),\r\n self::column('legal_name'),\r\n self::column('lat'),\r\n self::column('lng'),\r\n self::column('lng'),\r\n self::column('city_tax_include'),\r\n self::column('contact_full_name'),\r\n self::column('contact_position'),\r\n self::column('contact_email'),\r\n self::column('contact_first_phone'),\r\n self::column('contact_second_phone'),\r\n self::column('checkin_from'),\r\n self::column('checkin_to'),\r\n self::column('checkout_from'),\r\n self::column('checkout_to'),\r\n self::column('payment_time'),\r\n self::column('breakfast'),\r\n self::column('has_restaurant'),\r\n self::column('restaurant_opening'),\r\n self::column('restaurant_closing'),\r\n self::column('center_distance'),\r\n self::column('penality_enabled'),\r\n self::column('penality_not_taken_after'),\r\n self::column('penality_not_later_arrival'),\r\n self::column('penality_cancelation_item'),\r\n self::column('penality_cancelation_type'),\r\n self::column('penality_percentage'),\r\n self::column('penality_percentage_type'),\r\n self::column('card_required'),\r\n HotelTranslationMapper::column('lang_id'),\r\n HotelTranslationMapper::column('name'),\r\n HotelTranslationMapper::column('address'),\r\n HotelTranslationMapper::column('description')\r\n ];\r\n }", "abstract protected function columns(): array;", "public function getAllColumnsNames()\n {\n switch (DB::connection()->getConfig('driver')) {\n case 'pgsql':\n $query = \"SELECT column_name FROM information_schema.columns WHERE table_name = '\".$this->getTable().\"'\";\n $column_name = 'column_name';\n $reverse = true;\n break;\n\n case 'mysql':\n $query = 'SHOW COLUMNS FROM '.$this->getTable();\n $column_name = 'Field';\n $reverse = false;\n break;\n\n case 'sqlsrv':\n $parts = explode('.', $this->getTable());\n $num = (count($parts) - 1);\n $table = $parts[$num];\n $query = \"SELECT column_name FROM \".DB::connection()->getConfig('database').\".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'\".$table.\"'\";\n $column_name = 'column_name';\n $reverse = false;\n break;\n\n default:\n $error = 'Database driver not supported: '.DB::connection()->getConfig('driver');\n throw new \\Exception($error);\n break;\n }\n\n $columns = array();\n\n foreach(DB::select($query) as $column)\n {\n array_push($columns, $column->$column_name);\n }\n\n if($reverse)\n {\n $columns = array_reverse($columns);\n }\n\n return $columns;\n }", "private function getSelectTableColumns($model){\n return $this->querySqlFormatter->getModelTableShowColumns($this->subClassoF($model)->table);\n }", "public function getColumns()\n {\n return $this->allColumns ?: $this->defineListColumns();\n }", "public static function getDbFields()\n {\n global $zdb;\n $columns = $zdb->getColumns(self::TABLE);\n $fields = array();\n foreach ( $columns as $col ) {\n $fields[] = $col->getName();\n }\n return $fields;\n }", "protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }", "public function getTemporalColumns();", "abstract public static function columnData();", "private function getTableColumns() : ?array {\n\t\t$query = 'SELECT column_name, data_type, column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N\\'' . $this->tableNamePrefixed . '\\'';\n\t\t$columns = $this->database->query($query);\n\n\t\t$columnsArr = array();\n\t\tforeach ($columns as $column) {\n\t\t if (property_exists($column, 'COLUMN_NAME')) {\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n if (property_exists($column, 'column_name')) {\n $column->COLUMN_NAME = $column->column_name;\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n\t\t}\n\n\t\treturn !empty($columnsArr) ? $columnsArr : null;\n\t}", "function get_columns( $table, $db = null ) {\n\n\t\tif ( !$this->verify_table( $table ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\t$key = $this->get_db( $db )->name . '.' . $table . '_columns';\n\t\t\n\t\tif ( $cache = $this->cache_get( $key ) ) {\n\t\t\treturn $cache;\n\t\t}\n\t\t\t\n\t\t$dbh = &$this->connect( $db );\n\t\t\n\t\ttry {\n\t\t\t$q = $dbh->prepare( \"DESCRIBE $table\" );\n\t\t\t$q->execute();\n\t\t\t$columns = $q->fetchAll(PDO::FETCH_COLUMN);\n\t\t} catch( PDOException $e ) {\n\t\t\t$this->error( $e );\n\t\t}\n\t\t\n\t\t$this->cache_set( $key, $columns, $this->get_db( $db )->ttl );\n\t\treturn $columns;\n\t}", "public function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'title' => __( 'Name' ),\n\t\t\t'client_id' => __( 'Client ID' ),\n\t\t\t//'client_secret' => __( 'Redirect URI' )\n\t\t);\n\t}", "public function get_column_names()\r\n {\r\n if (array_get(static::$tables, $this->from)) {\r\n return static::$tables[$this->from]['columns'];\r\n }\r\n\r\n $database = $this->db->get_connection()->get_database();\r\n\r\n $table = $this->from;\r\n\r\n $query = new Query();\r\n return $query->from('INFORMATION_SCHEMA.COLUMNS')\r\n ->where(array(\r\n 'table_schema' => $database,\r\n 'table_name' => $table\r\n ))\r\n ->pluck('column_name');\r\n }", "public function getColumns() {\n return $this->columns;\n }" ]
[ "0.7227525", "0.7048627", "0.7048627", "0.7048627", "0.7048627", "0.7046267", "0.7046267", "0.6980839", "0.6975782", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6910914", "0.6861104", "0.6846852", "0.6839846", "0.68080914", "0.6791578", "0.6791046", "0.6782598", "0.677738", "0.6769422", "0.67688864", "0.6758892", "0.67438143", "0.6716481", "0.67014647", "0.66768056", "0.66708755", "0.6661836", "0.6622638", "0.66135585", "0.661223", "0.6592898", "0.65879333", "0.6580832", "0.6577741", "0.657642", "0.65457195", "0.6541868", "0.6525837", "0.65216804", "0.6506852", "0.6505853", "0.65046793", "0.65039337", "0.64710206", "0.6458287", "0.64405966", "0.6429041", "0.64191943", "0.6403895", "0.6403743", "0.6400426", "0.6398401", "0.6394812", "0.63866794", "0.6384406", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6381211", "0.63778716", "0.635557", "0.635557", "0.63554394", "0.63549805", "0.6348703", "0.6348473", "0.6342385", "0.63423365", "0.6335873", "0.63349473", "0.6334922", "0.632408", "0.63019544", "0.6296135", "0.62885255", "0.6286808", "0.62825805", "0.6282101", "0.6275847", "0.62754905", "0.6272854", "0.6270443", "0.62702125", "0.62678605", "0.6260092" ]
0.78532004
0
Created by PhpStorm. User: jamesskywalker Date: 04/06/2019 Time: 13:23
function loadDashPage($params) { $content = '<div class="container"> <div class="jumbotron"> ' . $params->views->stats . ' </div> <div class="jumbotron"> <div class="container"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> ' . $params->views->gamesHistoryTable . ' </div> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> ' . $params->views->newGame . ' </div> </div> </div> </div>'; return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "final private function __construct(){\r\r\n\t}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function _i() {\n }", "private function __construct () {}", "public function helper()\n\t{\n\t\n\t}", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "private function __construct() {\n ;\n }", "public function __construct() {\r\n ;\r\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() { }", "final function __construct() { \n\t}", "final private function __construct() {}", "final 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 function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {;}", "private function __construct()\r\n {\r\n }", "private function __construct()\r\n {\r\n }", "private function __construct() {\r\n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }", "function __construct() {\n \n }" ]
[ "0.5936153", "0.58457", "0.58442605", "0.58442605", "0.58442605", "0.58214027", "0.58214027", "0.58214027", "0.5788374", "0.5762147", "0.57532597", "0.5731893", "0.5731893", "0.57265383", "0.5710697", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5708969", "0.5695283", "0.56952304", "0.56952304", "0.56928617", "0.56928617", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.56917185", "0.5691583", "0.5688701", "0.5688701", "0.5665528", "0.5656152", "0.5656152", "0.5647277", "0.56408", "0.56408", "0.56408", "0.56408", "0.56408" ]
0.0
-1
Compare function NOTE: In theory only $object1 has to implement the Comparable interface but as you cannot know in which order the parameters come i.e. from a sorting algorithm, both are checked. Also it is assumed that $object1>compareTo($object2) == (1) $object2>compareTo($object1) otherwise ComparatorTools may not work properly
public function compare($object1, $object2) { if (! $object1 instanceof Comparable) { throw new ComparatorException('$object1 (type: ' . gettype($object1) . ') does not implement the Comparable interface.'); } if (! $object2 instanceof Comparable) { throw new ComparatorException('$object2 (type: ' . gettype($object2) . ') does not implement the Comparable interface.'); } return $object1->compareTo($object2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}", "public function compareTo($object) : int;", "public /*int*/ function compareTo(/*mixed*/ $object)\n\t{\n\t\tif($this->equals($object))\n\t\t\treturn 0;\n\t\treturn -1;\n\t}", "public function compare(\\morph\\Object $objectA, \\morph\\Object $objectB)\n {\n $compare = null;\n $propertyA = (float)$objectA->{$this->propertyName};\n $propertyB = (float)$objectB->{$this->propertyName};\n if ($propertyA == $propertyB){\n $compare = 0;\n }else{\n $compare = ($propertyA < $propertyB) ? -1 : 1;\n }\n return $compare;\n }", "public static function compare($a,$b);", "public function compareTo($other);", "protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_hash($a), spl_object_hash($b));\n }", "public function compare();", "function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }", "function compareObjects(&$ob1, &$ob2) {\n\tprint_pre('o1 == o2 : ' . bool2str($ob1 == $ob2));\n\tprint_pre('o1 != o2 : ' . bool2str($ob1 != $ob2));\n\tprint_pre('o1 === o2 : ' . bool2str($ob1 === $ob2));\n\tprint_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2));\n}", "public function compare($priority1, $priority2)\n {\n }", "function cmp_function($value1, $value2)\n{\n if($value1 == $value2) {\n return 0;\n }\n else if($value1 > $value2) {\n return 1;\n }\n else {\n return -1;\n }\n}", "function comparator($elem1,$elem2) {\n\n\tif ($elem1->getId() == $elem2->getId()) \n\t\treturn 0;\n\telse \n\t\tif ($elem1->getId() > $elem2->getId())\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn -1;\n\n}", "abstract protected function _compare($val1, $val2);", "protected function compare(array $dispatchable1, array $dispatchable2)\n {\n if ($dispatchable1['priority'] === $dispatchable2['priority']) {\n return ($dispatchable1['serial'] > $dispatchable2['serial'] ? -1 : 1);\n }\n\n return ($dispatchable1['priority'] > $dispatchable2['priority'] ? -1 : 1);\n }", "public function compareDataTo($key, BL_CustomGrid_Object $object)\n {\n $value = $this->getData($key);\n $otherValue = $object->getData($key);\n return ($value > $otherValue ? 1: ($value < $otherValue ? -1 : 0));\n }", "function cmp($a, $b) {\n $valueA = getCompareValue($a);\n $valueB = getCompareValue($b);\n return $valueA - $valueB;\n }", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "public function scompare($o = null) {}", "public function compare($o = null, $attrs = array()) {}", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "function compare($d1, $d2)\r\n {\r\n $d1->convertTZ(new Date_TimeZone('UTC'));\r\n $d2->convertTZ(new Date_TimeZone('UTC'));\r\n $dias1 = Data_Calc::dataParaDias($d1->dia, $d1->mes, $d1->ano);\r\n $dias2 = Data_Calc::dataParaDias($d2->dia, $d2->mes, $d2->ano);\r\n if($dias1 < $dias2) return -1;\r\n if($dias1 > $dias2) return 1;\r\n if($d1->hora < $d2->hora) return -1;\r\n if($d1->hora > $d2->hora) return 1;\r\n if($d1->minuto < $d2->minuto) return -1;\r\n if($d1->minuto > $d2->minuto) return 1;\r\n if($d1->segundo < $d2->segundo) return -1;\r\n if($d1->segundo > $d2->segundo) return 1;\r\n return 0;\r\n }", "private static function compare($a, $b) {\n $ordera = $a->get_order();\n $orderb = $b->get_order();\n if ($ordera > $orderb) {\n return 1;\n }\n if ($ordera < $orderb) {\n return -1;\n }\n $classa = get_class($a);\n $classb = get_class($b);\n if ($classa > $classb) {\n return 1;\n }\n if ($classb < $classa) {\n return -1;\n }\n return 0;\n }", "public function compare($object,$array) {\n\t\tforeach($object as $property=>$value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t\tforeach($value as $index=>$nestedObject) {\n\t\t\t\t\t\tif ($nestedObject->id) {\n\t\t\t\t\t\t\t$foundMatch = false;\n\t\t\t\t\t\t\t//order might be different\n\t\t\t\t\t\t\tforeach($array[$property] as $k=>$a) {\n\t\t\t\t\t\t\t\tif ($a['id']==$nestedObject->id) {\n\t\t\t\t\t\t\t\t\t$foundMatch = true;\n\t\t\t\t\t\t\t\t\t$index = $k;\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 (!$foundMatch) throw new Exception('failed to find match for object '.$nestedObject->id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->compare($nestedObject,$array[$property][$index]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!is_object($value)){\n\t\t\t\tasrt(strval($array[$property]),strval($value));\n\t\t\t}\n\t\t}\n\t}", "public function comparator();", "abstract protected function compare($idA, $idB);", "public function sortNavObjects($navObject1, $navObject2)\n {\n if ($navObject1->menu_order == $navObject2->menu_order) {\n return 0;\n }\n return $navObject1->menu_order < $navObject2->menu_order ? -1 : 1;\n }", "public function compareTo($item);", "function comp($a,$b)\r\n{\r\n\treturn ($a[0] < $b[0]);\r\n}", "public function cmp( $a, $b )\n {\n return gmp_cmp( $a, $b );\n }", "public static function compare($variable1, $variable2) {\n if (!is_array($variable1->value) && !(is_array($variable2->value))) {\n return strcmp($variable1->value, $variable2->value);\n }\n if (count($variable1->value) != count($variable2->value)) {\n // This doesn't mean anything\n return count($variable1->value) - count($variable2->value);\n }\n // If it's multiple just do a diff\n if ($variable1->cardinality == 'multiple') {\n return count(array_diff($variable1->value, $variable2->value));\n } else if ($variable1->cardinality == 'ordered') {\n // check them pairwise\n for($i = 0; $i < count($variable1->value); $i++) {\n if ($variable1->value[$i] != $variable2->value[$i]) {\n // This doesn't mean too much either\n return strcmp($variable1->value[$i], $variable2->value[$i]);\n }\n }\n return 0;\n }\n \n // default to not equal\n return -1;\n }", "function compare($a, $b) {\n if ($this->access($a) == $this->access($b)) {\n return 0;\n }\n return ($this->access($a) < $this->access($b)) ? -1 : 1;\n }", "function compareUsers($user1, $user2)\n{\n\tif ($user1->id > $user2->id) return 1;\n\telseif ($user1->id == $user2->id) return 0;\n\telse return -1;\n}", "function compare($x, $y) {\n if($x[0] == \"N\" && $x[0] == $y[0]) return 0;\n if($x[0] == \"N\" && $y[0] == \"Y\") return 1;\n if($x[0] == \"Y\" && $y[0] == \"N\") return -1;\n $type1 = intval($x[3]);\n $type2 = intval($y[3]);\n if($type1 > $type2) return -1;\n if($type1 < $type2) return 1;\n $time1 = (float)$x[1];\n $time2 = (float)$y[1];\n if($time1 > $time2) return 1;\n if($time1 < $time2) return -1;\n $len1 = intval($x[2]);\n $len2 = intval($y[2]);\n if($len1 > $len2) return 1;\n if($len1 < $len2) return -1;\n return 0;\n}", "public function compare($item);", "function cmp($a, $b){\n if($a->score == $b->score){\n return 0;\n }\n\n return ($a->score<$b->score) ? 1:-1;\n }", "function compare($wert_a, $wert_b)\n {\n $a = $wert_a[0];\n $b = $wert_b[0];\n if ($a == $b) {\n return 0;\n }\n return ($a > $b) ? -1 : +1;\n }", "public function compare($priority1, $priority2): int;", "function cmp($a,$b) {\r\rif($a > $b){\r $x=put_string($a,\">\",$b,\"\\n\");\r}\rif ($a >= $b ) {\r $x=put_string($a,\">=\",$b,\"\\n\");\r}\rif ($a === $b ) {\r $x=put_string($a,\"===\",$b,\"\\n\");\r}\rif ($b < $a ) {\r $x=put_string($b,\"<\",$a,\"\\n\");\r}\rif ($b <= $a ) {\r $x=put_string($b,\"<=\",$a,\"\\n\");\r}\rif ($b === $a ) {\r $x=put_string($b,\"===\",$a,\"\\n\");\r}\rif ($a > $a ) {\r $x=put_string($a,\">\",$a,\"\\n\");\r}\rif ($a < $a ) {\r $x=put_string($a,\"<\",$a,\"\\n\");\r}\rif ($a !== $a ) {\r $x=put_string($a,\"!==\",$a,\"\\n\");\r}\rif ($b > $b ) {\r $x=put_string($b,\">\",$b,\"\\n\");\r}\rif ($b < $b ) {\r $x=put_string($b,\"<\",$b,\"\\n\");\r}\rif ($b !== $b ) {\r $x=put_string($b,\"!==\",$b,\"\\n\");\r}\r\r}", "function cmp($a, $b) \n\t{\t\t\t \n\t $a=key($a);\n\t $b=key($b);\t \n\t if ($a==$b) \n\t {\n\t\t return 0;\n\t }\n\t return ($a < $b) ? -1 : 1;\n\t}", "function cmp($stacka,$stackb) {\n\tif ($stacka['stackid'] == $stackb['stackid']) return 0;\n\treturn ($stacka['stackid'] < $stackb['stackid']) ? -1:1;\n}", "public function compareTo($other): int;", "function ObjectSorter(&$array, $props){\n if(!is_array($props)) $props = array($props => true); \n\t\t$function = '$props=unserialize(\\''.trim(serialize($props)).'\\');\n\t\t\t\tforeach($props as $prop => $ascending) { \n\t\t\t\t\tif($a->$prop != $b->$prop) { \n\t\t\t\t\t\tif($ascending==\"ASC\") return ($a->$prop > $b->$prop) ? 1 : -1; \n\t\t\t\t\t\telse return ($b->$prop > $a->$prop) ? 1 : -1; \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t\treturn -1;';\n usort($array, create_function('$a,$b', $function) );\n\t}", "function cmp($a, $b) {\n\treturn $a['posi'] - $b['posi'];\n}", "function cmp($a, $b)\n{\n $aID = substr($a->getId(), 1);\n $bID = substr($b->getId(), 1);\n if ($aID == $bID) {\n return 0;\n }\n return $aID < $bID ? -1 : 1;\n}", "public function cmp($a, $b)\n {\n if((int)$a->cardsValue < (int)$b->cardsValue){\n return true;\n }else{\n return false;\n }\n }", "function CompareValeurs($val1, $val2) {\r\n\tif ($val2[1] == $val1[1])\r\n\t\treturn(strcmp($val1[0],$val2[0]));\r\n\telse\r\n\t\treturn($val2[1] - $val1[1]);\r\n }", "public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n return 0; \r\n } else if(!is_numeric($K1) || !is_numeric($K2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($K1 < $K2) {\r\n return -1;\r\n } else if($K1 > $K2) {\r\n return 1;\r\n } \r\n } else if(!is_numeric($M1) || !is_numeric($M2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($M1 < $M2) {\r\n return -1;\r\n } else if($M1 > $M2) {\r\n return 1;\r\n } \r\n } else if($N1 < $N2) {\r\n return -1;\r\n } else if($N1 > $N2) {\r\n return 1;\r\n } \r\n }", "function sort_compare_type($a, $b) {\n // Order table types by hardcoded values in a local function getTypePriority.\n // Order tables alphabetically.\n //$cmp = $this->getTypePriority($a['Type']) - $this->getTypePriority($b['Type']);\n //if ($cmp != 0) return $cmp;\n //return strnatcmp($a['Name'], $b['Name']);\n\n // New way of sort. 11/27/2015.\n // Order both table types and tables by priority defined in WMD.\n //print $a['Type'] . \" := \" . $this->tableTypePriorityHash[$a['Type']] . \" - \" .\n // $b['Type'] . \" := \" . $this->tableTypePriorityHash[$b['Type']] . \"<br/>\";\n $cmp = $this->tableTypePriorityHash[$a['Type']] - $this->tableTypePriorityHash[$b['Type']];\n if ($cmp != 0) return $cmp;\n return $this->tablePriorityHash[$a['Name']] - $this->tablePriorityHash[$b['Name']];\n }", "private function _cmp($a, $b)\n {\n if ($a[0] != $b[0])\n {\n if ($a[0] == '*') {return 1;}\n else if ($b[0] == '*') {return -1;}\n else {if ($a[0] < $b[0]) {return -1;} else {return 1;}}\n }\n else\n {\n if ($a[1] != $b[1])\n {\n if ($a[1] == '*') {return 1;}\n else if ($b[1] == '*') {return -1;}\n else {if ($a[1] < $b[1]) {return -1;} else {return 1;}} \n }\n else\n {\n if ($a[2] != $b[2])\n {\n if ($a[2] == '*') {return 1;}\n else if ($b[2] == '*') {return -1;}\n else {\n $lga = strlen($a[2]); $lgb = strlen($b[2]);\n if ($lga > $lgb) {return -1;}\n else if ($lga < $lgb) {return 1;}\n else {if ($a[2] < $b[2]) {return -1;} else {return 1;}}\n }\n }\n else\n {\n if ($a[3] == '*') {return 1;}\n else if ($b[3] == '*') {return -1;}\n else if ($a[3] < $b[3]) {return -1;}\n else if ($a[3] > $b[3]) {return 1;}\n else {return 0;}\n }\n }\n }\n \n }", "public function compareTo(Comparable $valueObject) : int;", "function compare($row1, $row2) {\n\t\treturn $this->compare_priv($row1, $row2, 0);\n\t}", "function cmp_by_name($val1, $val2){\n return strcmp($val1->name, $val2->name);\n}", "function dateCompare($a, $b) { \n\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\treturn 0;\n\t}\n\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n}", "function dateCompare($a, $b) { \n\t\t\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n\t\t}", "function dateCompare($a, $b) { \n\t\t\t\t\t\tif(sameDate($a->startDate, $b->startDate)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ($a->startDate->getTimestamp() < $b->startDate->getTimestamp()) ? -1 : 1;\n\t\t\t\t\t}", "function cmp($a, $b)\n\t{\n\t\tif($a[4] == $b[4]) return 0;\n\t\t\n\t\tif($a[4] < $b[4]) return -1;\n\t\t\n\t\treturn 1;\n\t}", "public function comparison(DynamicOperandInterface $operand1, $operator,\n StaticOperandInterface $operand2);", "public function compareIntDataTo($key, BL_CustomGrid_Object $object)\n {\n $value = (int) $this->getData($key);\n $otherValue = (int) $object->getData($key);\n return ($value > $otherValue ? 1: ($value < $otherValue ? -1 : 0));\n }", "function compararUsuarios($a, $b)\n{\n if ($a->value == $b->value) {\n return 0;\n }\n return ($a->value < $b->value) ? 1 : -1;\n}", "function adodb_cmp($a, $b) {\n\tif ($a[0] == $b[0]) return 0;\n\treturn ($a[0] < $b[0]) ? -1 : 1;\n}", "private function comparaObjetoObjetoUltimaVersao($objeto)\n {\n \t// codificando objeto para comparacao\n \t$objetoCodificado = Basico_OPController_UtilOPController::codificar($objeto);\n \t// recuperando id da relacao de categoria chave estrangeira\n \t$categoriaChaveEstrangeira = $this->_categoriaAssocChaveEstrangeiraOPController->retornaObjetoCategoriaChaveEstrangeiraCVC($objeto);\n \t// recuperando id generico do objeto\n \t$idGenerico = Basico_OPController_PersistenceOPController::bdRetornaValorIdGenericoObjeto($objeto);\n \t\n \t// recuperando objeto CVC contendo a ultima versao do objeto\n \t$objUltimaVersao = self::retornaObjUltimaVersao($categoriaChaveEstrangeira->id, $idGenerico);\n\n \t// retornando resultado da comparacao entre objetos\n \treturn (strcmp($objetoCodificado, $objUltimaVersao->objeto) === 0);\n }", "function cmp2($a, $b) {\n return strcmp($a['age_start'], $b['age_start']);\n\t}", "public static function cmp_items_func($a, $b){\n\n if (intval($a['order']) == intval($b['order']))\n return 0;\n if (intval($a['order']) > intval($b['order']))\n return 1;\n\n return -1;\n }", "function intcmp ($a, $b)\n{\n\treturn (int)$a - (int)$b;\n}", "protected function compare(string $date1, string $date2)\n {\n $date1 = strtotime($date1);\n $date2 = strtotime($date2);\n if (($date1 === false) || ($date2 === false)) {\n return false;\n } elseif ($date1 < $date2) {\n return -1;\n } elseif ($date1 > $date2) {\n return 1;\n } else {\n return 0;\n }\n }", "function cmp($a, $b) {\n return strcmp($a['generation_id'], $b['generation_id']);\n\t}", "public static function compareDates($date1, $date2)\r\n {\r\n if (!is_numeric($date1)) {\r\n $date1 = izDateTime::timeStringToStamp($date1);\r\n }\r\n if (!is_numeric($date2)) {\r\n $date2 = izDateTime::timeStringToStamp($date2);\r\n }\r\n if ($date1 < $date2) {\r\n return -1;\r\n } else if ($date1 > $date2) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }", "function alistcmp($a,$b) {\n $abook_sort_order=get_abook_sort();\n\n switch ($abook_sort_order) {\n case 0:\n case 1:\n $abook_sort='nickname';\n break;\n case 4:\n case 5:\n $abook_sort='email';\n break;\n case 6:\n case 7:\n $abook_sort='label';\n break;\n case 2:\n case 3:\n case 8:\n default:\n $abook_sort='name';\n }\n\n if ($a['backend'] > $b['backend']) {\n return 1;\n } else {\n if ($a['backend'] < $b['backend']) {\n return -1;\n }\n }\n\n if( (($abook_sort_order+2) % 2) == 1) {\n return (strtolower($a[$abook_sort]) < strtolower($b[$abook_sort])) ? 1 : -1;\n } else {\n return (strtolower($a[$abook_sort]) > strtolower($b[$abook_sort])) ? 1 : -1;\n }\n}", "function _wp_object_name_sort_cb($a, $b)\n {\n }", "public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }", "function cmp($a, $b) {\n $cmp_pattern = \"/_nr_([0-9]*)_([0-9]{4})/\";\n if ((preg_match($cmp_pattern, $a[1], $a_) == 0) || (preg_match($cmp_pattern, $b[1], $b_) == 0)) {\n strcmp($a[1],$b[1]);\n }\n $a = $a_[2].$a_[1];\n $b = $b_[2].$b_[1];\n\n return intval($a) > intval($b);\n}", "public function getComparatorFor($expected, $actual);", "private static function DateCmp($a, $b)\n {\n if ($a[1]<$b[1])\n $r = -1;\n else if ($a[1]>$b[1])\n $r = 1;\n else $r=0;\n return $r;\n }", "function cmp($payments, $invoices){\n\t\t\t\t\t\t$pd = strtotime($payments['date']);\n\t\t\t\t\t\t$id = strtotime($invoices['date']);\n\t\t\t\t\t\treturn ($pd-$id);\n\t\t\t\t\t}", "function _compareActions($a,$b){\n\t\tif ( @$a['order'] < @$b['order'] ) return -1;\n\t\telse return 1;\n\t}", "function cmp($line1, $line2){\n\t$line1elements = explode(\" \", $line1);\n\t$line2elements = explode(\" \", $line2);\n\t$score1 = $line1elements[3];\n\t$score2 = $line2elements[3];\n\tif($score1>$score2)\n\t\treturn -1;\n\telse if($score1<$score2)\n\t\treturn 1;\n\telse\t\n\t\treturn 0;\n}", "function ScoreCmp2( $a, $b ) {\n\t\n\t$c = $a['score'];\n\t$d = $b['score'];\n\tif( $c == $d ) return 0;\n\treturn ($c>$d) ? -1 : 1;\n}", "function excSort($aItem,$bItem){\n\t\tif($aItem['bgcolor']<$bItem['bgcolor']){\n\t\t\treturn 1;\n\t\t}elseif($aItem['bgcolor']>$bItem['bgcolor'])\n\t\t\treturn -1;\n\n\t\tif($aItem['priority']>$bItem['priority']){\n\t\t\treturn 1;\n\t\t}elseif($aItem['priority']<$bItem['priority']){\n\t\t\treturn -1;\n\t\t}\n\n\t\tif($aItem['uid']<$bItem['uid']){\n\t\t\treturn -1;\n\t\t}elseif($aItem['uid']>$bItem['uid'])\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "function compare(la_time $other) {\n if($this->counter == $other->counter) {\n if( $this->actor_id < $other->actor_id) {\n return -1;\n }\n else if( $this->actor_id > $other->actor_id) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else if ($this->counter > $other->counter) {\n return 1;\n }\n else if ($this->counter < $other->counter) {\n return -1;\n }\n }", "function adodb_cmpr($a, $b) {\n\tif ($a[0] == $b[0]) return 0;\n\treturn ($a[0] > $b[0]) ? -1 : 1;\n}", "function compare_func($a, $b)\n\t\t{\n\t\t\t$t1 = strtotime($a[\"org_date_added\"]);\n\t\t\t$t2 = strtotime($b[\"org_date_added\"]);\n\t\t\n\t\t\treturn ($t2 - $t1);\n\t\t}", "function version_compare($version1, $version2, $operator = NULL)\n{\n}", "public static function sort_objects(array &$objects_array, $sort_by, $sort_order = \"desc\") {\n $sort_order = strtolower($sort_order);\n uasort(\n $objects_array,\n function ($a, $b) use ($sort_by, $sort_order) {\n if($a->$sort_by == $b->$sort_by) {\n return 0;\n } else {\n $comparison = $a->$sort_by > $b->$sort_by;\n if($sort_order == \"desc\") {\n return $comparison ? -1 : 1;\n } else {\n return $comparison ? 1 : -1;\n }\n }\n });\n }", "function date_compare($a, $b) {\n //var_dump($a);\n $t1 = strtotime($a);\n $t2 = strtotime($b);\n // The negative in front the result sorts by the most recent entry\n return -($t1 - $t2);\n }", "function make_comparer() {\n $criteria = func_get_args();\n foreach ($criteria as $index => $criterion) {\n $criteria[$index] = is_array($criterion) ? array_pad($criterion, 3, null) : array($criterion, SORT_ASC, null);\n }\n\n return function($first, $second) use (&$criteria) {\n foreach ($criteria as $criterion) {\n // How will we compare this round?\n list($column, $sortOrder, $projection) = $criterion;\n $sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\n // If a projection was defined project the values now\n if ($projection) {\n $lhs = call_user_func($projection, $first[$column]);\n $rhs = call_user_func($projection, $second[$column]);\n } else {\n $lhs = $first[$column];\n $rhs = $second[$column];\n }\n\n // Do the actual comparison; do not return if equal\n if ($lhs < $rhs) {\n return -1 * $sortOrder;\n } else if ($lhs > $rhs) {\n return 1 * $sortOrder;\n }\n }\n\n return 0; // tiebreakers exhausted, so $first == $second\n };\n }", "protected function compare($a, $b) {\n return $a->total > $b->total;\n }", "function comp($a1, $a2) {\n if (is_null($a1) || is_null($a2)) return false;\n sort($a1);\n sort($a2);\n // There is no comparison of arrays, only values.\n // The minimum number of iterations is 1, the maximum is n.\n foreach ($a2 as $key => $value) {\n if($a1[$key] ** 2 !== $value) return false;\n }\n return true;\n}", "function compare_by_area($a, $b)\n{\n $areaA = $a->width * $a->height;\n $areaB = $b->width * $b->height;\n return $areaA <=> $areaB;\n}", "public function compare($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['static_position']) {\n return 1;\n }\n if ($t2['static_position']) {\n return -1;\n }\n\n // Zuerst die Punkte\n if ($t1['points'] == $t2['points']) {\n // tx_rnbase_util_Debug::debug($t1,'compare'.__LINE__);\n // Die gewonnenen Spiele prüfen\n if ($t1['winCount'] == $t2['winCount']) {\n // Jetzt den Satzquotient prüfen\n $t1setquot = $t1['sets_quot'];\n $t2setquot = $t2['sets_quot'];\n if ($t1setquot == $t2setquot) {\n // Jetzt der Ballquotient\n $t1balls = $t1['balls_quot'];\n $t2balls = $t2['balls_quot'];\n if ($t1balls == $t2balls) {\n // Und jetzt der direkte Vergleich\n $baseData = Util::prepareH2H($this->_teamData, $t1, $t2);\n $t1vst2 = $baseData['t1vst2'];\n $t2vst1 = $baseData['t2vst1'];\n $t1H2HPoints = $baseData['t1H2HPoints'];\n $t2H2HPoints = $baseData['t2H2HPoints'];\n if ($t1H2HPoints == $t2H2HPoints) {\n // dann eben zuerst die Satzdifferenz der 2 Spiele prüfen (Hin- und Rückspiel)\n $t1H2HDiff = 0 + $t1vst2[0] + $t2vst1[1] - $t1vst2[1] - $t2vst1[0];\n $t2H2HDiff = 0 + $t1vst2[1] + $t2vst1[0] - $t1vst2[0] - $t2vst1[1];\n if ($t1H2HDiff == $t2H2HDiff) {\n return 0; // Gleichstand. Entscheidungsspiel wird nicht beachtet\n }\n\n return $t1H2HDiff > $t2H2HDiff ? -1 : 1;\n }\n\n return $t1H2HPoints > $t2H2HPoints ? -1 : 1;\n }\n\n return $t1balls > $t2balls ? -1 : 1;\n }\n\n return $t1setquot > $t2setquot ? -1 : 1;\n }\n\n return $t1['winCount'] > $t2['winCount'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "public static function compare($f1, $f2, $properties, $flags = 0)\n\t{\n\t\t$i1 = 0;\n\t\t$i2 = 0;\n\t\t$methods = array_map(function ($prop) {\n\t\t\treturn \"get\" . ucfirst($prop);\n\t\t}, $properties);\n\t\twhile (!method_exists($f1, $methods[$i1]) && $i1 < count($methods))\n\t\t\t$i1++;\n\t\twhile (!method_exists($f2, $methods[$i2]) && $i2 < count($methods))\n\t\t\t$i2++;\n\t\t$method1 = $methods[$i1];\n\t\t$method2 = $methods[$i2];\n\t\t$val1 = $f1->$method1();\n\t\t$val2 = $f2->$method2();\n\t\tif (is_string($val1) && $flags & SORT_NATURAL)\n\t\t\treturn strnatcmp($val1, $val2);\n\t\tif ($val1 == $val2)\n\t\t\treturn 0;\n\t\treturn $val1 > $val2 ? 1 : -1;\n\t}", "public function getComparison();", "public static function compareDates( $date1, $date2 )\n\t{\n\t\t$date1 = strtotime( $date1 );\n\t\t$date2 = strtotime( $date2 );\n\n\t\tif ( $date1 < $date2 )\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telseif( $date1 > $date2 )\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t}", "public static function cmp($a, $b)\n {\n return $a['name'] > $b['name'];\n }", "static function compare(Transfer $a, Transfer $b) {\n\t\treturn $a->value - $b->value;\n\t}", "function compare_internal($elem1, $elem2)\n{\n\t// assume NULL > everything\n\tif (is_null( $elem1 ) && is_null( $elem2 ))\n\t{\n\t\treturn 0; // assume they are equal\n\t}\n\tif (is_null( $elem1 ))\n\t{\n\t\treturn 1;\n\t}\n\telse if (is_null( $elem2 ))\n\t{\n\t\treturn -1;\n\t}\n\t\n\t// check to see if both sort index values are numbers, in which case, perform a natsort\n\tif (strlen( $elem1 ) && strlen( $elem2 ) &&\n\t\tctype_digit( $elem1 ) && ctype_digit( $elem2 ))\n\t{\n\t\treturn strnatcmp( $elem1, $elem2 );\n\t}\n\t\n\t// try to compare Persian strings\t\n\t$sort_order = //'آاأإؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی۱۲۳۴۵۶۷۸۹۰';\n\t\tarray( 'آ', 'ا', 'أ', 'إ', 'ؤ', 'ئ', 'ب', 'پ', 'ت', 'ث', 'ج', 'چ', 'ح', 'خ', 'د',\n\t\t\t'ذ', 'ر', 'ز', 'ژ', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ک', 'گ',\n\t\t\t'ل', 'م', 'ن', 'و', 'ه', 'ی', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹', '۰' );\n\t$sort_array = array();\n\t$index = 1;\n\tforeach ($sort_order as $item)\n\t{\n\t\t$sort_array[ $item ] = $index ++;\n\t}\n\t$len1 = strlen( $elem1 );\n\t$len2 = strlen( $elem2 );\n\t$failed = false;\n\tfor ($i = 0, $j = 0; $i < $len1 && $j < $len2;)\n\t{\n\t\t$c1 = extract_utf8_char( $elem1, $i );\n\t\t$c2 = extract_utf8_char( $elem2, $j );\n\t\t\n\t\tif (array_key_exists( $c1, $sort_array ) &&\n\t\t\tarray_key_exists( $c2, $sort_array ))\n\t\t{\n\t\t\tif ($sort_array[ $c1 ] == $sort_array[ $c2 ])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $sort_array[ $c1 ] - $sort_array[ $c2 ];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$failed = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tif ($failed == false)\n\t{\n\t\treturn 0; // equal strings\n\t}\n\t\n\treturn strcmp( $elem1, $elem2 );\n}", "function recognizer_node_cmp($a, $b)\r\n{\r\n if($a->score == $b->score) return 0;\r\n return ($a->score < $b->score) ? -1 : 1; //从小到大排序\r\n}", "public function compareTo($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function compareTo($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }" ]
[ "0.7869542", "0.73873293", "0.6969621", "0.6778731", "0.6716064", "0.65809304", "0.6570545", "0.6551522", "0.64861166", "0.6469694", "0.639923", "0.6388334", "0.6379284", "0.62946475", "0.6271855", "0.6217345", "0.62134933", "0.62018955", "0.62018955", "0.61652607", "0.611706", "0.60866374", "0.6052081", "0.59897816", "0.5980906", "0.5966543", "0.5927214", "0.5919623", "0.5907169", "0.5782079", "0.5751814", "0.57164085", "0.57108724", "0.5693371", "0.5689738", "0.56722283", "0.56648505", "0.5651389", "0.56472504", "0.56448704", "0.56340396", "0.5590431", "0.5584414", "0.55322075", "0.5524866", "0.55167216", "0.55150145", "0.55077976", "0.55031085", "0.5497708", "0.5462766", "0.54545516", "0.54519033", "0.544978", "0.5419982", "0.53937966", "0.53934497", "0.5387279", "0.5381419", "0.5379812", "0.53560686", "0.5348549", "0.53359115", "0.5334769", "0.5329892", "0.53225183", "0.5321483", "0.5318297", "0.53154486", "0.53094757", "0.53090054", "0.530892", "0.52992934", "0.5250874", "0.5233447", "0.5231052", "0.5215344", "0.5214653", "0.51827955", "0.51804686", "0.51681685", "0.5166678", "0.51641655", "0.5162422", "0.5156709", "0.5145976", "0.5141117", "0.5139684", "0.5138977", "0.51351357", "0.5128995", "0.51286536", "0.5127234", "0.5122369", "0.5118923", "0.51165235", "0.51164603", "0.5113552", "0.51005113", "0.51005113" ]
0.78664535
1
Returns a callback object that can be used for core functions that take a callback parameter
public static function callback() { return new InvokableComparator(new static); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCallback(): ?callable;", "public function callback();", "public function get_callback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function getCallback(): callable\n {\n return $this->callback;\n }", "abstract protected function registerCallback();", "public function getDefaultCallback();", "public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function setCallback($callback);", "public function getCallback() {\n return $this->callback;\n }", "function getCallback()\n {\n return $this->callback;\n }", "public function getCallback()\n {\n return $this->callback;\n }", "public function getCallback()\n {\n return $this->callback;\n }", "public function getCallback()\n {\n return $this->callback;\n }", "public function getCallback()\n {\n return $this->callback;\n }", "function example_callback( $example ) {\n echo \"HAI\";\n return $example;\n}", "public static function callback(callable $callback)\n {\n return new Matcher\\Callback($callback);\n }", "public function defaultCallback()\n {\n return func_get_arg(0);\n }", "public function getDefaultCallback()\n {\n\treturn $this->defaultCallback;\n }", "public function getCallback() {\r\n\t\treturn $this->options ['callback'];\r\n\t}", "function smarty_function_callback(array $params, Smarty &$smarty)\r\n{\r\n $callback = null;\r\n $callee = null;\r\n if (isset($params['function']) && is_string($params['function'])) {\r\n $callee = trim($params['function']);\r\n } elseif (isset($params['class']) && class_exists($params['class'], true)) {\r\n $callee = $params['class'];\r\n } elseif (isset($params['object']) && is_object($params['object'])) {\r\n $callee = $params['object'];\r\n }\r\n\r\n if (!$callee) {\r\n $smarty->trigger_error(\"callback: missing 'function', 'class' or 'object' parameter\", E_USER_ERROR, __FILE__, __LINE__);\r\n return;\r\n }\r\n\r\n if (!is_callable($callee) && !isset($params['method'])) {\r\n $smarty->trigger_error(\"callback: '$callee' is not callable or missing 'method' parameter\", E_USER_ERROR, __FILE__, __LINE__);\r\n return;\r\n }\r\n\r\n $callback = $callee;\r\n if (!is_callable($callee) && isset($params['method'])) {\r\n $method = trim($params['method']);\r\n if (!is_callable(array($callee, $method))) {\r\n $smarty->trigger_error(\"callback: '$callee::$method' is not callable\", E_USER_ERROR, __FILE__, __LINE__);\r\n return;\r\n }\r\n $callback = array($callee, $method);\r\n }\r\n\r\n $callbackParams = array();\r\n if (isset($params['params'])) {\r\n $callbackParams = (array) $params['params'];\r\n }\r\n\r\n $result = call_user_func_array($callback, $callbackParams);\r\n\r\n if (isset($params['assign']) && is_string($params['assign'])) {\r\n $smarty->assign(trim($params['assign']), $result);\r\n } else {\r\n return $result;\r\n }\r\n}", "public function getCallback(): mixed\n {\n return $this->callback ?? null;\n }", "abstract public function __construct(Closure $callback);", "function _get_plugin_from_callback($callback)\n {\n }", "public function getCallback()\n {\n if (null === $this->_callback) {\n if (null !== ($callback = $this->getOption('callback'))) {\n $this->setCallback($callback);\n $this->removeOption('callback');\n }\n }\n\n return $this->_callback;\n }", "public function getCallback($option);", "public function pipeAndReturnCallbackResult(callable $callback);", "public function getCallbackAction() {}", "public function getCallbackAction() {}", "public function setCallback(callable $cb, mixed $arg = null): void {}", "public function callback( callable $callback ): self {\n\t\t$this->callback = $callback;\n\t\treturn $this;\n\t}", "public function setDefaultCallback($callback);", "public function __construct($callback)\n {\n $this->callback = $callback;\n }", "public function __construct(Callback $callback)\n {\n //\n $this->callback = $callback;\n }", "function invoke_callback(callable $hook, string $module) {\n $hook();\n}", "protected function callback($callback)\n\t{\n\t\tif (is_string($callback))\n\t\t{\n\t\t\tif (strpos($callback, '::') !== FALSE)\n\t\t\t{\n\t\t\t\t$callback = explode('::', $callback);\n\t\t\t}\n\t\t\telseif (function_exists($callback))\n\t\t\t{\n\t\t\t\t// No need to check if the callback is a method\n\t\t\t\t$callback = $callback;\n\t\t\t}\n\t\t\telseif (method_exists($this, $callback))\n\t\t\t{\n\t\t\t\t// The callback exists in Validation\n\t\t\t\t$callback = array($this, $callback);\n\t\t\t}\n\t\t\telseif (method_exists('valid', $callback))\n\t\t\t{\n\t\t\t\t// The callback exists in valid::\n\t\t\t\t$callback = array('valid', $callback);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! is_callable($callback, FALSE))\n\t\t{\n\t\t\tif (is_array($callback))\n\t\t\t{\n\t\t\t\tif (is_object($callback[0]))\n\t\t\t\t{\n\t\t\t\t\t// Object instance syntax\n\t\t\t\t\t$name = get_class($callback[0]).'->'.$callback[1];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Static class syntax\n\t\t\t\t\t$name = $callback[0].'::'.$callback[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Function syntax\n\t\t\t\t$name = $callback;\n\t\t\t}\n\n\t\t\tthrow new Kohana_Exception('Callback %name% used for Validation is not callable', array('%name%' => $name));\n\t\t}\n\n\t\treturn $callback;\n\t}", "function callback($retval, $callinfo) {\r\n\r\n var_dump($callinfo);\r\n print_r($retval . PHP_EOL);\r\n\r\n}", "function handle_callback() {\r\n }", "public function add_callback($callback)\n {\n }", "private function callback($callback)\n\t{\n\t\treturn new CallbackConstraint($callback);\n\t}", "public function callback(callable $callback)\n {\n return $this\n ->addCallback($callback)\n ->execute();\n }", "public function __construct(\\Closure $callback)\n {\n $this->callback = $callback;\n }", "public static function callbackStaticTestFunction() {}", "public function initialize_option_callback()\n {\n $classname = $this->option_callback;\n\n if (!class_exists($classname)) {\n throw new midcom_error(\"Auto-loading of the class {$classname} failed: File does not exist.\");\n }\n\n $callback = new $classname($this->option_callback_arg);\n if (!($callback instanceof midcom_helper_datamanager2_callback_interface)) {\n throw new midcom_error($classname . ' must implement interface midcom_helper_datamanager2_callback_interface');\n }\n\n $callback->set_type($this);\n\n if (is_callable([$callback, 'initialize'])) {\n $callback->initialize();\n }\n\n return $callback;\n }", "public function registerCallback($valueName, $callback) {}", "public static function make(\\Closure $callback = null);", "private function callCallback() {\n\t\tif ($this->callback !== null) {\n\t\t\t$response = $this->buildResponse();\n\t\t\tcall_user_func($this->callback, $response, $this->data);\n\t\t}\n\t}", "public function __construct(callable $callback)\n {\n $this->setCallback($callback);\n }", "public static function instance(\\Closure $callback = null);", "public static function call($callback, &$args = array())\n {\n if (!is_callable($callback))\n {\n throw new Kohana_Exception('Callback is not callable. :callback', array(':callback'=> $callback));\n }\n\n // If args is not an array, assume it is the first argument\n if (!is_array($args))\n {\n $ref_args = array(0=> &$args);\n }\n // If args was sent as an array\n else\n {\n // Assume all args need to be passed by reference\n $ref_args = array(); \n foreach($args as $k => &$arg){ \n $ref_args[$k] = &$arg; \n } \n }\n \n try {\n $return_value = call_user_func_array($callback,$ref_args);\n\n return $return_value;\n } \n catch (Exception $e) \n {\n throw $e;//new Kohana_Exception('Callback caused Exception! :message :error',array(':message'=> $e->getMessage(), ':error', $e));\n } \n }", "public function setDefaultCallback(string $cb, ?string $arg = null): void {}", "function sqlite_create_function($function_name, $callback, $num_args = -1)\n{\n}", "function webrock_hook($event, $value = NULL, $callback = NULL) {\r\n static $events;\r\n\r\n // Adding or removing a callback?\r\n if ($callback !== NULL) {\r\n if ($callback) {\r\n $events[$event][] = $callback;\r\n } else {\r\n unset($events[$event]);\r\n }\r\n } elseif (isset($events[$event])) { // Fire a callback\r\n foreach ($events[$event] as $function) {\r\n $value = call_user_func($function, $value);\r\n }\r\n return $value;\r\n }\r\n}", "public function callback($callback)\n\t{\n\t\t$this->callback = $callback;\n\n\t\treturn $this;\n\t}", "public function do_callback(&$callback)\n\t{\n\t\tif (is_string($callback)) {\n\t\t\tif (preg_match('/^([^\\[]++)\\[(.+)\\]$/', $callback, $matches)) {\n\t\t\t\t// Split the function and args\n\t\t\t\t$callback = $matches[1];\n\t\t\t\t$args = preg_split('/(?<!\\\\\\\\),\\s*/', $matches[2]);\n\t\t\t}\n\t\t}\n\n\t\tif (is_string($callback)) {\n\t\t\tif (strpos($callback, '::') !== FALSE) {\n\t\t\t\t$callback = explode('::', $callback);\n\t\t\t} elseif (function_exists($callback)) {\n\t\t\t\t// No need to check if the callback is a method\n\t\t\t\t$callback = $callback;\n\t\t\t}\n\t\t}\n\n\t\tif ($callback === 'array' && is_array($args) && !empty($args)) {\n\t\t\t$val = $args[0];\n\t\t\t# remove first element which is the value to be \"translated\"\n\t\t\tarray_shift($args);\n\t\t\tif (array_key_exists($val, $args)) {\n\t\t\t\treturn $args[$val];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$value = false;\n\t\t$name = false;\n\t\tif (is_callable($callback)) {\n\t\t\tif (is_array($callback)) {\n\t\t\t\tif (is_object($callback[0])) {\n\t\t\t\t\t// Object instance syntax\n\t\t\t\t\t$name = get_class($callback[0]).'->'.$callback[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Static class syntax\n\t\t\t\t\t$name = $callback[0].'::'.$callback[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Function syntax\n\t\t\t\t$name = $callback;\n\t\t\t}\n\t\t}\n\n\t\tif (function_exists($name)) {\n\t\t\t$value = call_user_func_array($name, $args);\n\t\t}\n\t\treturn $value;\n\t}", "public function setCallback(string $path, string $cb, ?string $arg = null): bool {}", "abstract protected function register_hook_callbacks();", "function setCallback($c) {\n\t\t$this->_callback = $c ;\n\t}", "public function setCallback (callable $callback) : self {\n $this->callback = $callback;\n return $this;\n }", "public function getNullCallback()\n {\n\treturn $this->nullCallback;\n }", "public function setCallback($callback)\n\t{\n\t\t$this->callback = $callback;\n\t}", "public function success(Closure $callback);", "public function always(Closure $callback);", "public function pretend(Closure $callback);", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "public function setCallback($value)\n {\n return $this->set('Callback', $value);\n }", "abstract public function register_hook_callbacks();", "static function callback($callback)\n {\n return call_user_func_array('PHPUnit_Framework_Assert::callback', func_get_args());\n }", "function sqlite_create_function($dbhandle, $function_name, $callback, $num_args = -1)\n{\n}", "public function getCallbacks(): array;", "public function __construct(callable $callback)\n {\n $this->buffer = \"\";\n $this->callback = $callback;\n }", "public function __construct(callable $callback)\n\t{\n\t\t$this->setCallback($callback);\n\t\t$this->setAdditionalParams(array_slice(func_get_args(), 1));\n\t}", "public function apply(callable $callback);", "public function setCallback($callback) {\r\n\t\tif (! is_callable ( $callback )) {\r\n\t\t\tthrow new Exception\\InvalidArgumentException ( 'Invalid callback provided' );\r\n\t\t}\r\n\t\t\r\n\t\t$this->options ['callback'] = $callback;\r\n\t\treturn $this;\r\n\t}", "public function callback($callback)\n {\n $this->callback = $callback;\n\n return $this;\n }" ]
[ "0.73338103", "0.72637314", "0.71662605", "0.7164941", "0.7083451", "0.70586765", "0.68430144", "0.68430144", "0.6787865", "0.67826724", "0.67263603", "0.67124546", "0.67124546", "0.67124546", "0.67124546", "0.666425", "0.6620192", "0.659676", "0.65362495", "0.65306866", "0.64948386", "0.64088595", "0.6361632", "0.6358674", "0.63237005", "0.6319641", "0.63040197", "0.62940544", "0.62930137", "0.6292834", "0.6283427", "0.62819093", "0.62803316", "0.62703496", "0.62358797", "0.62203026", "0.6108842", "0.61080706", "0.6107036", "0.6093219", "0.60910046", "0.6049622", "0.60393167", "0.6035239", "0.60155135", "0.5999981", "0.59847623", "0.59721017", "0.5937214", "0.5933183", "0.592708", "0.5912956", "0.59038013", "0.5902105", "0.59020466", "0.5886122", "0.5884472", "0.58688426", "0.5860227", "0.5859879", "0.58514017", "0.5845016", "0.58417666", "0.5805767", "0.58023226", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.5799806", "0.57989407", "0.57989407", "0.57989407", "0.57989407", "0.579612", "0.5790908", "0.57879215", "0.5771613", "0.57691157", "0.5764678", "0.57616407", "0.5760841", "0.5753155" ]
0.594912
48
views the add tax page
public function getCreate(){ return View::make('tax.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addTax(){\n $data['title'] = \"Add Tax\";\n $this->admin_load('taxes/add_tax',$data); \n }", "function tax()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $manufacturer['content'] = Modules::run('tax/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('tax');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdmintax',$manufacturer);\n \n \n $this->load->view('general',$data);\n \n }\n }", "public function taxupdate() {\n $arr['page'] = 'taxdetail';\n\t\t$arr['active'] = 'other';\n\t\t$arr['productTax'] = $this->setting->getTax('product');\n\t\t$arr['shippingTax'] = $this->setting->getTax('shipping');\n\t\t$this->load->view('vwSettingTax',$arr);\n\t}", "public function create()\n {\n return view('tax.create');\n }", "public function actionCreate()\r\n {\r\n $model = new Tax;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'added' => 'yes']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "function invoice_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'invoice_add';\n $page_data['page_title'] = get_phrase('add_invoice');\n $this->load->view('backend/index', $page_data);\n }", "public function create()\n {\n\n\n $hasCustomField = in_array($this->taxRepository->model(), setting('custom_field_models', []));\n if ($hasCustomField) {\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->taxRepository->model());\n $html = generateCustomField($customFields);\n }\n return view('settings.taxes.create')->with(\"customFields\", isset($html) ? $html : false);\n }", "public function actionCreate()\n {\n $model = new ShopxieItemsTaxes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'item_id' => $model->item_id, 'name' => $model->name, 'percent' => $model->percent]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function insertTax(){\n \n if($this->form_validation->run('add_tax') == FALSE){\n $data['title'] = \"Add Tax\";\n $this->admin_load('taxes/add_tax',$data); \n }else{\n\n $data= array(\n 'name'=>$this->input->post('name'),\n 'taxrate'=>$this->input->post('taxrate')\n );\n $table = 'tbltaxes';\n $insertData= $this->TaxModel->insert($table, $data);\n if($insertData){\n\n redirect('admin/taxes');\n }\n }\n\n }", "public function add() \r\n\t{\r\n\t\t$data['header']['title'] = 'Add a new country';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_add_view';\r\n\t\t$data['view_data'] = '';\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function add()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular_add',\n 'title' => 'Tambah Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => [],\n ];\n\n $this->load->view('template', $data);\n }", "public function index(){\n $data['title'] = \"Taxes\";\n $data['records']= $this->TaxModel->get_list('tbltaxes');\n\n $this->admin_load('taxes/tax_list',$data); \n }", "function expense_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'expense_add';\n $page_data['page_title'] = get_phrase('add_expense');\n $this->load->view('backend/index', $page_data);\n }", "function transport_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'transport_add';\n $page_data['page_title'] = get_phrase('add_transport');\n $this->load->view('backend/index', $page_data);\n }", "function invoice_mass_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'invoice_mass_add';\n $page_data['page_title'] = get_phrase('add_mass_invoice');\n $this->load->view('backend/index', $page_data);\n }", "public function create()\n {\n return view('admin::settings.taxes.create',[\n 'types' => $this->types\n ]);\n }", "public function create()\n {\n JavaScript::put('invoice_id',(int)$this->service->getLastInsertId()+1);\n return view('admin.invoice.add',[\n 'invoice_id'=>((int)$this->service->getLastInsertId()+1),\n 'taxes' => Tax::all(),\n ]);\n }", "public function add_invoice()\n\t{\n\t\t$this->load->view('london/layout/header');\n\t\t$this->load->view('london/layout/sidenavbar');\n\t\t$this->load->view('london/pages/add-invoice');\n\t\t$this->load->view('london/layout/footer');\n\t}", "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function Add()\n\t{\n\t\t$this->load->view(\"admin/barang/tambah_barang\");\n\t}", "public function index()\n {\n\n $taxes =Tax::all();\n\n return view('admin.tax.tax',compact('taxes'));\n }", "public function index()\n {\n $taxes = Tax::all();\n\n return view('wizard.taxes.index', compact('taxes'));\n }", "public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}", "public function get_add(){\n return View::make('stance.add')->with('title', 'Submit a Stance')->with('subtitle', 'Try to make your views official party Stances');;\n }", "public function index()\n\t{\n\t\t$content = $this->lcustomer->customer_add_form();\n\t\t$this->template->full_admin_html_view($content);\n\t}", "public function addTax() {\n\t\t$adb = PearDatabase::getInstance();\n\n\t\t$tableName = $this->getTableNameFromType();\n\t\t$taxid = $adb->getUniqueID($tableName);\n\t\t$taxLabel = $this->getName();\n\t\t$percentage = $this->get('percentage');\n\n\t\t//if the tax is not available then add this tax.\n\t\t//Add this tax as a column in related table\n\t\tif($this->isShippingTax()) {\n\t\t\t$taxname = \"shtax\".$taxid;\n\t\t\t$query = \"ALTER TABLE vtiger_inventoryshippingrel ADD COLUMN $taxname decimal(7,3) DEFAULT NULL\";\n\t\t} else {\n\t\t\t$taxname = \"tax\".$taxid;\n\t\t\t$query = \"ALTER TABLE vtiger_inventoryproductrel ADD COLUMN $taxname decimal(7,3) DEFAULT NULL\";\n\t\t}\n\t\t$res = $adb->pquery($query, array());\n\n\t\tvimport('~~/include/utils/utils.php');\n\n\t\tif ($this->isProductTax()) {\n\t\t\t// TODO Review: if field addition is required in shipping-tax case too.\n\t\t\t// NOTE: shtax1, shtax2, shtax3 that is added as default should also be taken care.\n\n\t\t\t$inventoryModules = getInventoryModules();\n\t\t\tforeach ($inventoryModules as $moduleName) {\n\t\t\t\t$moduleInstance = Vtiger_Module::getInstance($moduleName);\n\t\t\t\t$blockInstance = Vtiger_Block::getInstance('LBL_ITEM_DETAILS',$moduleInstance);\n\t\t\t\t$field = new Vtiger_Field();\n\n\t\t\t\t$field->name = $taxname;\n\t\t\t\t$field->label = $taxLabel;\n\t\t\t\t$field->column = $taxname;\n\t\t\t\t$field->table = 'vtiger_inventoryproductrel';\n\t\t\t\t$field->uitype = '83';\n\t\t\t\t$field->typeofdata = 'V~O';\n\t\t\t\t$field->readonly = '0';\n\t\t\t\t$field->displaytype = '5';\n\t\t\t\t$field->masseditable = '0';\n\n\t\t\t\t$blockInstance->addField($field);\n\t\t\t}\n\t\t}\n\n\t\t//if the tax is added as a column then we should add this tax in the list of taxes\n\t\tif($res) {\n\t\t\t$deleted = 0;\n\t\t\tif($this->isDeleted()) {\n\t\t\t\t$deleted = 1;\n\t\t\t}\n\n\t\t\t$compoundOn = Zend_Json::encode($this->get('compoundon'));\n\t\t\t$regions = Zend_Json::encode($this->get('regions'));\n\n\t\t\t$query = 'INSERT INTO '.$tableName.' values(?,?,?,?,?,?,?,?,?)';\n\t\t\t$params = array($taxid, $taxname, $taxLabel, $percentage, $deleted, $this->get('method'), $this->get('type'), $compoundOn, $regions);\n\t\t\t$adb->pquery($query, $params);\n\t\t\treturn $taxid;\n\t\t}\n\t\tthrow new Error('Error occurred while adding tax');\n\t}", "function account_add()\r\n {\r\n $page_data['module_type'] = 'account';\r\n $page_data['page_name'] = 'account_add';\r\n $page_data['page_title'] = lang_key('create_new_account');\r\n $this->load->view('admin/index', $page_data);\r\n }", "public function add()\n {\n //renderView('add');\n }", "public function index()\n {\n $this->permission->check_label('add_variant')->create()->redirect();\n\n $content = $this->lvariant->variant_add_form();\n $this->template_lib->full_admin_html_view($content);\n }", "public function patients_add(){\n\t\t$data['meta_description']='';\n\t\t$data['menu']= $this->menu;\n\n\t\t$data['user'] = $this->user;\n\t\t$data['group'] = $this->group->name;\n\t\t$data['superviser']=$this->superviser_name;;\n\n\t\t$data['page']='patients/patients-add'; //page view to load\n\t\t$data['pls'] = array(); //page level scripts\n\t\t$data['plugins'] = array(); //plugins\n\t\t$data['javascript'] = array(); //javascript\n\t\t$views= array('design/html_topbar','sidebar','design/page','design/html_footer');\n\t\t$this->layout->view($views, $data);\n\t}", "public function index($vat_tax_rule_id = 0)\n\t{\n\t\t$permission \t=\t$this->module_model->get_permission_by_module_id_and_user_id(25, $this->session->userdata('user_id')); // module_id for vat_tax is 20.....\n\t\tif($permission->permission_add != 1){\n\t\t\tredirect('access_control/denied/vat_tax/add_vat_tax_rule','refresh');\n\t\t}\n\t\t$data\t\t\t\t\t\t\t=\tarray();\n\t\t$data['page_title']\t\t\t\t=\t\"Inventory Management\";\n\t\t$nav_data['dev_key']\t\t\t=\t\"vat_tax\";\n\t\t$nav_data['selected']\t\t\t=\t\"create_vat_tax_rule\";\n\t\t$nav_data['company_name'] \t= $this->company_model->get_company_by_id(1)->company_name;\n\t\t$nav_data['user_permission'] \t=\t$this->module_model->get_permission_by_user_id($this->session->userdata('user_id'));\n\t\t$vat_tax_data\t\t\t\t\t=\tarray();\n\t\tif($vat_tax_rule_id!=0){\n\t\t\t$vat_tax_data['vat_tax_detail']\t\t=\t$this->vat_tax_model->get_vat_tax_rule_by_id($vat_tax_rule_id);\t\n\t\t}else{\n\t\t\t$vat_tax_data['vat_tax_detail']\t\t=\tNULL;\n\t\t}\n\n\t\t$data['navigation']\t\t\t\t=\t$this->load->view('templates/navigation',$nav_data,TRUE);\n\t\t$data['footer']\t\t\t\t\t=\t$this->load->view('templates/footer','',TRUE);\n\t\t$data['content']\t\t\t\t=\t$this->load->view('partials/vat_tax',$vat_tax_data,TRUE);\n\n\t\t$this->load->view('templates/main_template',$data);\n\t}", "public function show(Tax $tax)\n {\n\n }", "function add()\n\t{\n\t\t// hien thi form them san pham\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/add');\n\t}", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "function expense_category_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'expense_category_add';\n $page_data['page_title'] = get_phrase('add_expense_category');\n $this->load->view('backend/index', $page_data);\n }", "public function xadd() {\n\t\t$args = $this->getAllArguments ();\n\t\tif ($args ['view'] == 'forms') {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t} elseif ($args ['view'] == 'fields') {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t} elseif ($args ['view'] == 'actions') {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t} else {\n\t\t\tparent::xadd ();\n\t\t}\n\t}", "public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }", "public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}", "public function loan_form_add() {\n $bank_view = Bank::all();\n //dd($bank_view);\n\n $rental = view('ap.form.form_loan', compact('bank_view'));\n return view('ap_master')->with('maincontent', $rental);\n }", "public function index() {\n $content = $this->llocation->location_add_form();\n $this->template->full_admin_html_view($content);\n }", "public function saveTax() {\n // $productIds = explode(\",\", Input::get('ProductIds'));\n $marchantId = Input::get(\"merchantId\");\n $merchant = Merchant::find(Input::get('merchantId'))->getstores()->first();\n $prifix = $merchant->prefix;\n $taxNew = [];\n $taxNew['label'] = Input::get('label');\n $taxNew['name'] = Input::get('label');\n $taxNew['rate'] = Input::get('rate');\n $taxNew['tax_number'] = Input::get('tax_number');\n $taxNew['status'] = Input::get('status');\n\n if (Input::get('id')) {\n DB::table($prifix . '_tax')->where(\"id\", Input::get(\"id\"))->update($taxNew);\n } else {\n DB::table($prifix . '_tax')->insert($taxNew);\n }\n\n $viewname = \"\";\n $data = ['status' => '1', 'msg' => (Input::get('id')) ? 'Tax updated successfully.' : 'Tax added successfully.', 'taxinfo' => $taxNew];\n return Helper::returnView($viewname, $data, $url = 'admin.tax.view');\n }", "public function pendadaran_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'pendadaran/pendadaran_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/v_nav_admin',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function create()\n {\n return view('backend.taxonomy.create');\n }", "public function add_sale_ret_ac_Option_Option(){\n \t$data['title'] = 'Add sale Ret. A/C Option';\n $data['totalGotPO']= $this->login_model->countGotPo();\n \t\t$this->load->view('common/header',$data);\n\t\t$this->load->view('add_saleretac_option_form');\n\t\t$this->load->view('common/footer');\n }", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function permit_type_add_form()\n {\n $this->load->view('common/header');\n $this->load->view('permit/permittype/create_form');\n $this->load->view('common/footer');\n }", "function add_bankdetails()\r\n\t\t{\r\n\t\t\t$data['page']='add_bankdetails';\r\n\t\t\t$this->load->view('admin',$data);\r\n\t\t}", "public function index()\n {\n $this->permission->check_label('add_customer')->create()->redirect();\n\n $content = $this->lcustomer->customer_add_form();\n $this->template_lib->full_admin_html_view($content);\n }", "public function add()\n {\n $this->load->view('system_view/petani/data/Tambah');\n }", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "function add_owner_input()\n {\n $data['heading'] = 'Add a new owner';\n\t\t$headerView = $this->global_model->get_standard_header_view();\n\t\t$this->load->view('owners/add_owner_input',$data);\n\t\t$this->load->view('footer_view');\n }", "function display_add() {\n $this->_addform->display();\n }", "public function addView()\n {\n return $this->render('Add');\n }", "public function create()\n {\n $taxi = taxi::all(['CodeTaxi', 'ImmaTaxi']);\n\n return view('pages.creerchauffeurs',compact(['taxi', $taxi])); \n }", "public function add()\n\t{\n\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n\t\t$this->data['option'] \t\t= \"add\";\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}", "public function create()\n\t{\n return View::make('taxonomies.create', ['taxonomy' => $this->taxonomy]);\n\t}", "public function index() {\n $content = $this->lcopun->copun_add_form();\n $this->template->full_admin_html_view($content);\n }", "public function termsAction() {\n\n $this->_helper->layout->setLayout('default-simple');\n }", "public function add_place_of_supply_Option(){\n \t$data['title'] = 'Add Place Option';\n $data['totalGotPO']= $this->login_model->countGotPo();\n \t\t$this->load->view('common/header',$data);\n\t\t$this->load->view('add_place_of_supply_option_form');\n\t\t$this->load->view('common/footer');\n }", "function showCompany_ADD() \n\t{\n\t\treturn view('company_add');\n \t\n\t}", "function class_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'class_add';\n $page_data['page_title'] = get_phrase('add_class');\n $this->load->view('backend/index', $page_data);\n }", "public function companyadd() {\r\n $contragent_types = $this->model->getContragentTypes();\r\n return $this->view('company/companyadd', $contragent_types);\r\n }", "public function getnewtown() //get town form\n {\n return view('formaddtown');\n }", "public function showAddPage(){\n return view('add');\n }", "public function add(){\n if ($_POST) {\n if ($_POST[\"operation\"] == 'egreso'){\n $_POST[\"amount\"] = $_POST[\"amount\"]*(-1);\n }\n if ($this->transactions->save(\"transactions\", $_POST)) {\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }else{\n $this->redirect(array(\"controller\"=>\"transactions\", \"method\"=>\"add\"));\n }\n }\n \n $this->set(\"accounts\", $this->transactions->find(\"accounts\"));\n $this->set(\"categories\", $this->transactions->find(\"categories\"));\n $this->_view->setView(\"add\");\n /* }else{\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }*/\n }", "public function regpay() {\n $this->load->view('trader/trader_regpay_vw');\n }", "function enable_tax_notice() {\n\n $url = admin_url( 'edit.php?post_type=download&page=edd-settings&tab=taxes' );\n ?>\n <div class=\"error\">\n <p><?php echo sprintf( __( 'Taxamo Integration needs Taxes to be Enabled. <a href=\"%s\">Click Here to enable Taxes</a>.', 'taxamoedd' ), esc_url( $url ) ); ?></p>\n </div>\n <?php\n }", "public function add_data()\n {\n $this->load->helper('url');\n $this->load->view('add_data_view');\n }", "public function agregar()\n\t\t{\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$transacciones = $this->loadModel(\"transaccion\");\n\t\t\t\t$this->_view->transacciones = $transacciones->agregar($_POST);\n\t\t\t\t$this->redirect(array(\"controller\"=>\"transacciones\"));\n\t\t\t}\n\t\t\t$categorias = $this->loadModel(\"categoria\");\n\t\t\t$usuarios = $this->loadModel(\"usuario\");\n\t\t\t$this->_view->categorias=$categorias->getcategoriasTab();\n\t\t\t$this->_view->usuarios=$usuarios->getUsuarios();\n\t\t\t$this->_view->titulo=\"Agregar transacciones\";\n\t\t\t$this->_view->renderizar(\"agregar\");\n\n\t\t}", "function teacher_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'teacher_add';\n $page_data['page_title'] = get_phrase('add_teacher');\n $this->load->view('backend/index', $page_data);\n }", "public function add(){\n\n\t $data = array(\n\t \t 'laptops' =>$this->Laptop_model->getLaptops() ,\n\n\t \t );\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/prestamos/add',$data); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function class_schedule_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'class_schedule_add';\n $page_data['page_title'] = get_phrase('add_class_schedule');\n $this->load->view('backend/index', $page_data);\n }", "function exam_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'exam_add';\n $page_data['page_title'] = get_phrase('add_exam');\n $this->load->view('backend/index', $page_data);\n }", "public function paytax_reports()\n\t{\n\t\t$data['title'] = \"Payroll Tax Report\"; //Page title\n\t\t$this->reports_model->_table_name = \"tbl_allow_ded\";\n\t\t$this->reports_model->_order_by = \"id\";\n\t\t\n $data['global_allowance'] = $this->reports_model->get_by(array('id_gsettings' => $this->session->userdata('id_gsettings')));\n\t\t\n\t\t$flag = $this->input->post('sbtn', TRUE);\n\t\tif(!empty($flag))\n\t\t{\n\t\t\t$data['flag'] = 1;\n\t\t\t$data['month'] = $this->input->post('txtmonth');\n\t\t\t$data['paytax_history'] = $this->reports_model->get_emp_salary_details($data['month'],'pay_tax');\n\t\t}\n $data['subview'] = $this->load->view('admin/reports/paytax_reports', $data, TRUE);\n $this->load->view('admin/_layout_main', $data); //page load\n\t}", "function staff_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'staff_add';\n $page_data['page_title'] = get_phrase('add_staff');\n $this->load->view('backend/index', $page_data);\n }", "public function add()\n {\n $this->form_validation->set_rules('distribution_location', 'Distribution Location', 'trim|required');\n $this->form_validation->set_rules('distribution_city', 'Town/City', 'trim|required');\n $this->form_validation->set_rules('distribution_pcode', 'Postal Code', 'trim|required');\n // $this->form_validation->set_rules('distribution_county', 'County', 'trim|required');\n // $this->form_validation->set_rules('distribution_email', 'Email', 'trim|required|valid_email');\n // $this->form_validation->set_rules('distribution_phone', 'Phone', 'trim|required|numeric');\n $this->form_validation->set_rules('distribution_latitude', 'latitude', 'trim|required');\n $this->form_validation->set_rules('distribution_longitude', 'longitude', 'trim|required');\n $this->form_validation->set_error_delimiters('<li>', '</li>');\n\n if ($this->form_validation->run() == false) {\n $inner = array();\n $page = array();\n $page['content'] = $this->load->view('distribution-add', $inner, true);\n $this->load->view('shell', $page);\n } else {\n $this->Distributionmodel->insertRecord();\n $this->session->set_flashdata('SUCCESS', 'distribution_added');\n redirect(\"distribution/index/\", 'location');\n exit();\n }\n }", "public function pos_invoice(){\n\t\t\n\t\tredirect('dashboard_pharmacist/invoice/Cinvoice');\n\t\t\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('linvoice');\n\t\t$content = $CI->linvoice->pos_invoice_add_form();\n\t\t$this->template->full_admin_html_view($content);\n\t}", "public function add() {\n $this->layout = 'ajax';\n if ($this->request->is('post')) {\n $this->Tratamiento->create();\n if ($this->Tratamiento->save($this->request->data)) {\n $this->Session->setFlash('Se Registro correctamente', 'msgbueno');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('No se pudo registrar!!', 'msgerror');\n }\n }\n $penfigo_tipo = $this->Penfigo->find('list', array('fields' => 'nombre'));\n $this->set(compact('penfigo_tipo'));\n }", "public function getAdd()\n {\n $modelSize = new TfSize();\n $accessObject = 'banner';\n return view('manage.content.sample.banner.add', compact('modelSize', 'accessObject'));\n }", "public function add(){\n\t\t$this->load->view('top');\n\t\t$this->load->view(\"timHPS/timHps_add\",$data);\n\t\t$this->load->view('bottom');\n\t}", "function wp_ajax_inline_save_tax()\n {\n }", "function add()\r\n\t{\r\n\t\t$data['main_content'] = 'policy_add';\r\n\t\t$opt_load = array(\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/dashboardui.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/css3-buttons.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/progress.css\" />',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery-1.6.4.min.js\"></script>',\r\n\t\t\t'<script src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery.easytabs.min.js\" type=\"text/javascript\"></script>',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/progress.js\"></script>',\r\n\t\t\t);\r\n\t\t$opt_head = array(\r\n\t\t\t\"title\" => \"Policies\",\r\n\t\t\t\"opt_load\" => $opt_load,\r\n\t\t\t);\r\n\t\t$data['opt_head'] = $opt_head;\r\n\t\t$this->load->view('includes/template-beta', $data);\t\r\n\t}", "public function index()\n {\n $data['title'] = \"Insert Personal Expense\";\n return view(\"admincontrol.personalexpenses.create\",$data);\n }", "public function actionAdd() {\n $this->setView('edit');\n }", "public function renderAdd()\r\n\t{\r\n\t\t$this['tarifForm']['save']->caption = 'Přidat';\r\n\t}", "public function renderAdd()\r\n\t{\r\n\t\t$this['itemForm']['save']->caption = 'Přidat';\r\n $this->template->titul = self::TITUL_ADD;\r\n\t\t$this->template->is_addon = TRUE;\r\n\r\n\t}", "public function add(){\n $unit = MasterUnit::all();\n return view('admin.master.inventory.masterkonfig.unit', compact('unit'));\n }", "public function index()\n {\n return view('tax.index')->with('taxes', Tax::all(['id', 'code', 'description', 'rate', 'is_active']));\n }", "public function product_addition() {\n\t\t$this->load->view(\"product_view\");\n\t}", "public function create()\n {\n return view('sadmin.shippingadd');\n }", "public function index()\n {\n\n return view('admin::settings.taxes.list',[\n 'taxes' => Tax::all()\n ]);\n }", "public function create()\n {\n $admin = AdminProfile::all()->last();\n //Return the view\n return view('admin.price.add.index' , ['admin'=>$admin] );\n }", "public function addNewAction()\n {\n // echo 'Hello from the addNew action in the Books controller!';\n View::renderTemplate('Books/addBook.html');\n }", "public function addForm() {\n $this->view->displayForm();\n }", "public function getAdd()\n {\n $accessObject = 'content';\n return view('manage.content.system.country.add', compact('accessObject'));\n }", "function student_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'student_add';\n $page_data['page_title'] = get_phrase('add_student');\n $this->load->view('backend/index', $page_data);\n }", "public function VatAddSupplierView() {\n return view('board.pages.ajaxPages.addVatSupplier');\n }", "public function addAction() {\r\n \t$this->checkRight();\r\n \t$gid = $this->getInput('gid');\r\n \t$title = \"添加收货人地址\";\r\n \t$this->assign('title', $title);\r\n \t$this->assign('gid', $gid);\r\n }", "public function getAdd()\n\t{\n\t $form = \\FormBuilder::create($this->form, [\n 'method' => 'POST',\n 'model' => $this->getModelInstance(),\n 'url' => ($this->url_prefix.'/add')\n ]);\n return view($this->tpl_prefix.'add',array('catalog'=>$this), compact('form'));\n\t}", "private function registerTax() {\n $labels = array(\n 'name' => esc_html__('Masonry Gallery Categories', 'eltdf-core'),\n 'singular_name' => esc_html__('Masonry Gallery Category', 'eltdf-core'),\n 'search_items' => esc_html__('Search Masonry Gallery Categories', 'eltdf-core'),\n 'all_items' => esc_html__('All Masonry Gallery Categories', 'eltdf-core'),\n 'parent_item' => esc_html__('Parent Masonry Gallery Category', 'eltdf-core'),\n 'parent_item_colon' => esc_html__('Parent Masonry Gallery Category:', 'eltdf-core'),\n 'edit_item' => esc_html__('Edit Masonry Gallery Category', 'eltdf-core'),\n 'update_item' => esc_html__('Update Masonry Gallery Category', 'eltdf-core'),\n 'add_new_item' => esc_html__('Add New Masonry Gallery Category', 'eltdf-core'),\n 'new_item_name' => esc_html__('New Masonry Gallery Category Name', 'eltdf-core'),\n 'menu_name' => esc_html__('Masonry Gallery Categories', 'eltdf-core'),\n );\n\n register_taxonomy($this->taxBase, array($this->base), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'show_admin_column' => true,\n 'rewrite' => array( 'slug' => 'masonry-gallery-category' ),\n ));\n }" ]
[ "0.7639222", "0.7605617", "0.6999087", "0.69834703", "0.6749255", "0.6689019", "0.6656032", "0.66480654", "0.66232944", "0.66072035", "0.65587837", "0.65355647", "0.65151644", "0.6495827", "0.6376431", "0.6360319", "0.634183", "0.6336768", "0.630134", "0.6203818", "0.6202338", "0.6195829", "0.6194397", "0.6172618", "0.6156805", "0.6138103", "0.6132375", "0.6125255", "0.61206156", "0.6116968", "0.61085886", "0.6106652", "0.6105799", "0.6101321", "0.60729164", "0.6071318", "0.6059981", "0.6059596", "0.60490185", "0.604512", "0.60441864", "0.6041577", "0.60352665", "0.6030323", "0.60222316", "0.60209054", "0.60192394", "0.6018779", "0.6013966", "0.60084075", "0.6006429", "0.599032", "0.59881383", "0.59756213", "0.59712774", "0.5968709", "0.5964168", "0.59562814", "0.59370875", "0.5931809", "0.59284586", "0.5927606", "0.59185654", "0.5899283", "0.5882146", "0.5871729", "0.58705264", "0.58690447", "0.5862906", "0.5851261", "0.5828274", "0.5825691", "0.5816845", "0.58148307", "0.58000636", "0.57982796", "0.5794457", "0.57848877", "0.5780633", "0.5779276", "0.57757646", "0.5774894", "0.57686365", "0.57641083", "0.5764077", "0.57619274", "0.5758359", "0.5758012", "0.57531714", "0.57497716", "0.5748507", "0.5745078", "0.57448804", "0.5738675", "0.5735694", "0.5735525", "0.57339513", "0.5731889", "0.57298154", "0.5723927" ]
0.6965068
4
Views all tax page
public function getIndex(){ return View::make('tax.view') ->with('taxes', Tax::all()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tax()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $manufacturer['content'] = Modules::run('tax/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('tax');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdmintax',$manufacturer);\n \n \n $this->load->view('general',$data);\n \n }\n }", "public function index()\n {\n\n $taxes =Tax::all();\n\n return view('admin.tax.tax',compact('taxes'));\n }", "public function index()\n {\n return view('tax.index')->with('taxes', Tax::all(['id', 'code', 'description', 'rate', 'is_active']));\n }", "public function index()\n {\n $taxes = Tax::all();\n\n return view('wizard.taxes.index', compact('taxes'));\n }", "public function index(){\n $data['title'] = \"Taxes\";\n $data['records']= $this->TaxModel->get_list('tbltaxes');\n\n $this->admin_load('taxes/tax_list',$data); \n }", "public function index()\n {\n\n return view('admin::settings.taxes.list',[\n 'taxes' => Tax::all()\n ]);\n }", "public function index()\n\t{\n return View::make('taxonomies.index', ['taxonomies' => $this->taxonomy->all()]);\n\t}", "public function tax_types()\n {\n $taxTypes = TaxTypes::where('status', 'active')->orderBy('idx')->get();\n return view('setup.tax_types.index', compact('taxTypes'));\n }", "public function tax_codes()\n {\n $taxCodes = TaxCodes::where('status', 'active')->orderBy('idx')->get();\n return view('setup.tax_codes.index', compact('taxCodes'));\n }", "public function taxupdate() {\n $arr['page'] = 'taxdetail';\n\t\t$arr['active'] = 'other';\n\t\t$arr['productTax'] = $this->setting->getTax('product');\n\t\t$arr['shippingTax'] = $this->setting->getTax('shipping');\n\t\t$this->load->view('vwSettingTax',$arr);\n\t}", "public function index()\n {\n $orders = Order::where('user_type', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id', 'desc')\n ->paginate(3, ['*'], 'orders');\n $taxi_orders = TaxiOrder::where('user_type', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id', 'desc')\n ->paginate(3, ['*'], 'taxi_orders');\n\n $tariffs = Tarif::all();\n $tariff = array();\n foreach ($tariffs as $tr) {\n if ($tr->type == 0)\n $tariff[$tr->id] = \"Внутри города\";\n else\n $tariff[$tr->id] = \"За городом\";\n }\n\n $cars = Automobile::all();\n $car = array();\n\n foreach ($cars as $key) {\n $car[$key->id] = $key->name;\n }\n\n $taxi_tariff = TaxiTarif::first();\n return view('home')\n ->withTariff($tariff)\n ->withTariffs($tariffs)\n ->withAutomobile($car)\n ->withAutomobiles($cars)\n ->withTaxi_tariff($taxi_tariff)\n ->withOrders($orders)\n ->withTaxi_orders($taxi_orders);\n }", "public function index()\n {\n $input = Request::all();\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n $taxes = $this->repo->getListing($input);\n\n if (!$limit) {\n $taxes = $taxes->get();\n\n return ApiResponse::success($this->response->collection($taxes, new CustomTaxesTransformer));\n }\n $taxes = $taxes->paginate($limit);\n\n return ApiResponse::success($this->response->paginatedCollection($taxes, new CustomTaxesTransformer));\n }", "public function show(Tax $tax)\n {\n\n }", "function indexViewTerritory() {\n $this->template->attach($this->resours);\n $this->template->draw('territory/indexViewTerritory', true);\n }", "public function index()\n {\n \n $this->data['turmas'] = $this->turma->getAll();\n \n $this->loadTemplate($this->templatedefault, self::$path . '/index');\n }", "public function actionIndex()\n {\n $searchModel = new ShopxieItemsTaxesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function indexTerritory() {\n $this->template->attach($this->resours);\n $this->template->draw('territory/indexTerritory', true);\n }", "public function index()\n\t{\n\t\t$this->data['pagebody'] = 'flight';\n\t\t$this->data['all_flights'] = $this -> flights -> viewAll();\n\t\t$this->render();\n\n }", "public function index() //106\n {\n $this->authorize('index.typologies');\n\n $typologies=Typology::SearchFromRequest()->PaginateForTable();\n\n return view('admin.typologies.index', compact('typologies'));\n }", "public function index()\n {\n $especialidads = Especialidad::paginate();\n\n return view('especialidad.index', compact('especialidads'))\n ->with('i', (request()->input('page', 1) - 1) * $especialidads->perPage());\n }", "public function index()\n {\n $baseTCs = BaseTestCenter::paginate(10);\n\n return view('baseTCFolder/baseTC')->with(compact('baseTCs'));//->with($APP_URL);\n }", "public function index()\n {\n // $transactions = IncomeExpense::all();\n // $transactions = IncomeExpense::paginate(3);\n $transactions = IncomeExpense::Paginate(10);\n return view('pages.index', compact('transactions'));\n }", "function Index()\n\t{\n\n\t\t$this->assign( 'tax_rate', 100 * Site_Config::GetVat() );\n\t\t$this->assign( 'customer', $_SESSION[ 'customer_details' ] );\n\t\t$this->assign( 'basket', $_SESSION[ 'basket' ] );\n\t\t$this->assign( 'customer_country', Country::Retrieve( $_SESSION[ 'customer_details' ]->country ) );\n\t\t$this->assign( 'shipping', Shipping::Retrieve( $_SESSION[ 'shipping' ] ) );\n\t\techo $this->Decorate( \"payment/choose_payment_method.tpl\" );\n\t}", "public function show_all()\n\t{\n\t\tif(isset($this->session->isactive)){\n\t\t\t// Layout view is common view containing sidebar and navbar\n\t\t\t// in which respective view is loaded as main content view\n\n $data['view'] = 'invoice_show_all_view';\n\t\t\t$data['title'] = 'IQRA | Invoice';\n\t\t\t$data['breadcrumb_1'] = 'Invoice';\n\t\t\t$data['breadcrumb_2'] = 'Invoice';\n\t\t\t$data['breadcrumb_3'] = 'Show All';\n $this->load->view('layout_view',$data);\n\t\t}\n\t\telse {\n\t\t\tredirect('login');\n\t\t}\n\t}", "public function showIndex()\n\t{\n\n\t\t//var_dump(Parser::GetRazdely());\n\n\t\t//var_dump(Parser::getCarPost('prodam-mikroavtobus-26483298'));\n\n\t\t//var_dump(Parser::getPosts('realty/sell_flats', 5));\n\n\t\t//var_dump(Parser::getPosts('auto/sale', 5, 5));\n\n\t\tvar_dump(Parser::getPosts('free', 4, 1, 10));\n\t}", "public function index()\n {\n $data['page_title'] = lang('public_treebanks');\n $data['treebanks'] = $this->treebank_model->get_public_treebanks(current_user_id());\n\n $this->load->view('header', $data);\n $this->load->view('treebank_list', $data);\n $this->load->view('footer');\n }", "public function index()\n {\n $tramites = Tramite::orderBy('id', 'asc')->paginate(5);\n $catalogos= CatalogoTramite::all();\n\n return view('Cruds.Tramite.index',compact('tramites', 'catalogos'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n \n }", "public function index()\n {\n $this->viewIs('tankvtank/index');\n }", "public function index()\n {\n return view('point_sale.index');\n }", "public function index()\n {\n $data[\"page_id\"] = 1;\n $data[\"page_tag\"] = \"Articulos\";\n $data[\"page_title\"] = \"Articulos - Yo contribuyo\";\n $data[\"page_name\"] = \"articulos\";\n $data[\"nav_articulos\"] = \"active\";\n $data[\"script\"] = \"Articulo/articulos.js\";\n $this->getView(\"Articulo/articulos\", $data);\n }", "public function index()\n {\n $space_generic_extras = SpaceExtrasGeneric::paginate(10);\n return view('space_manager.space_generic_extras.index', compact('space_generic_extras'));\n }", "public function IndexPage()\n {\n $record = TypesTargetsModel::all(); \n\n return view('TypesTargets', compact('record'));\n\n }", "public function index()\r\n\t{\r\n\t\t$this->template->content = new View('shippingpolicies');\r\n\r\n\t\t$this->template->metaDescription = $this->description;\r\n\t\t$this->template->metaKeywords = $this->keywords;\t\r\n\t\t$this->template->metaTitle = $this->title;\r\n\t\t$this->template->title = $this->title;\r\n\t}", "function index() {\r\n $this->page();\r\n }", "public function view_all_payment()\n\t{\n\t\t$data['main_content']='view_payment';\n\t\t$data['allbatch']=$this->Batch_model->view_all_running_batch();\n\t\t$data['all_payment']=$this->Payment_model->view_all_payment();\n\t\t$this->load->view('page', $data);\n\t}", "public function terms(){\n // Set the Page Title ('pageName', 'pageSection', 'areaName')\n $this->_view->pageTitle = array('Terms and Conditions');\n // Set Page Description\n $this->_view->pageDescription = 'Terms and Conditions';\n // Set Page Section\n $this->_view->pageSection = 'Terms';\n // Set Page Sub Section\n $this->_view->pageSubSection = '';\n\n // Render the view ($renderBody, $layout, $area)\n $this->_view->render('home/terms');\n }", "public function index(Request $request)\n {\n return view('taxupload.index');\n }", "function all(){\r\n $data = $this -> model -> getXML();\r\n render('index',$data);\r\n }", "public function index()\n {\n return view('pos.sales.payment.viewAll');\n }", "public function index()\n {\n \treturn view('dashboard.territory.region.index')->with([ \n\t\t\t'viewdata' => $this->region->all(),\n\t\t]);\n }", "public function index()\n {\n return view('paytype.index', \n [\n 'payTypes' => PayType::paginate(10),\n 'types' => Type::all()\n ]\n );\n }", "public function index(){ \n $this->view->types = $this->_massage_type->getAll();\n $this->view->render(\"service/index\");\n }", "public function show(IceTax $iceTax)\n {\n //\n }", "public function index()\n {\n $data['titulo'] = \"\";\n $data['_id'] = '';\n $data['results'] = DB::table('service')\n ->select('service_id','type', 'text', 'price', 'rate')\n ->orderBy('type','ASC')\n ->paginate(15);\n return view('pages.general', $data);\n }", "public function index() {\n\n $this->view->render('vtcare/index');\n }", "public function index()\n {\n $nots = specialites::paginate(5);\n return view ('specialites.index')->with('bspecialites',$nots);\n }", "public function index()\n {\n return view('domestic-waybill.index')\n ->with('domestics', DomesticWaybill::all());\n }", "public function index()\n {\n $salaries= Salarytype::all();\n return view('salary_type.index', compact('salaries'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function page_tindakan(){\n\t\t$data['list'] = $this->tindakan_m->list_tindakan();\n\t\t$data['list_tindakan_golongan'] = $this->tindakan_m->list_tindakan_golongan();\n\t\t$data['isi'] = \"tindakan/page-tindakan\";\n\t\t$data['title'] = 'Daftar Tindakan';\n\t\t$this->load->view('layout',$data);\n\t}", "public function index()\n {\n $datas = $this->_model->getTakes();\n $this->render('Take/index', ['datas' => $datas, 'title' => 'Page d\\'emprunt']);\n }", "public function index($vat_tax_rule_id = 0)\n\t{\n\t\t$permission \t=\t$this->module_model->get_permission_by_module_id_and_user_id(25, $this->session->userdata('user_id')); // module_id for vat_tax is 20.....\n\t\tif($permission->permission_add != 1){\n\t\t\tredirect('access_control/denied/vat_tax/add_vat_tax_rule','refresh');\n\t\t}\n\t\t$data\t\t\t\t\t\t\t=\tarray();\n\t\t$data['page_title']\t\t\t\t=\t\"Inventory Management\";\n\t\t$nav_data['dev_key']\t\t\t=\t\"vat_tax\";\n\t\t$nav_data['selected']\t\t\t=\t\"create_vat_tax_rule\";\n\t\t$nav_data['company_name'] \t= $this->company_model->get_company_by_id(1)->company_name;\n\t\t$nav_data['user_permission'] \t=\t$this->module_model->get_permission_by_user_id($this->session->userdata('user_id'));\n\t\t$vat_tax_data\t\t\t\t\t=\tarray();\n\t\tif($vat_tax_rule_id!=0){\n\t\t\t$vat_tax_data['vat_tax_detail']\t\t=\t$this->vat_tax_model->get_vat_tax_rule_by_id($vat_tax_rule_id);\t\n\t\t}else{\n\t\t\t$vat_tax_data['vat_tax_detail']\t\t=\tNULL;\n\t\t}\n\n\t\t$data['navigation']\t\t\t\t=\t$this->load->view('templates/navigation',$nav_data,TRUE);\n\t\t$data['footer']\t\t\t\t\t=\t$this->load->view('templates/footer','',TRUE);\n\t\t$data['content']\t\t\t\t=\t$this->load->view('partials/vat_tax',$vat_tax_data,TRUE);\n\n\t\t$this->load->view('templates/main_template',$data);\n\t}", "public function index()\n {\n $tipo = TipoServicio::all();\n\n return view('tipos.index')->with('tipo', $tipo);\n }", "public function index()\n {\n $turma = $this->objTurma->paginate(5);\n return view('turma/index',compact('turma'));\n }", "public function index() {\n\t\t$data = array(\n\t\t\t'categories' => $this->ProductCategoriesModel->view(),\n\t\t\t'customers' => $this->CustomerModel->view(),\n\t\t\t'company'\t => $this->CompanyModel->view(),\n\t\t);\n\n\t\t$this->load->view('header');\n\t\t$this->load->view('returns/returns_view', $data);\n\t\t$this->load->view('footer');\n\t}", "public function indexTypo3PageContent() {}", "public function index()\n {\n $ngoaitrus = NgoaiTru::all();\n\n return view('ngoaitrus.index')->with('ngoaitrus', $ngoaitrus);\n }", "public function index()\n {\n $realestates=Realestate::paginate(15);\n return view('realestates.showall')->with('realestates',$realestates);\n }", "public function index()\n {\n $especialidad = especialidad::orderBy('id', 'ASC')->paginate(5);\n \n return view('pagina.funcionalidad.admin.especialidad.especialidad')->with('especialidad', $especialidad);\n }", "public function index()\n {\n // $donation = Donations::with('users')->with('terms')->get(); udah oke\n $donation = Donations::with('users')->with('terms')->paginate(10);\n return view('administator.donation', compact('donation'));\n }", "public function index() {\n $this->template->attach($this->resours);\n $this->template->draw('index/index', true);\n }", "public function index()\n {\n $getAllTransaction = \\seekit\\transaction::orderBy('created_at','desc')->paginate(10);\n return view('transaction.index')->with('queriedTransaction',$getAllTransaction);\n }", "public function index()\n {\n $specialties=Specialty::all();//latest()->paginate(5);\n return $this->showAll($specialties);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function index()\n {\n // checkout muncul dari method index ini.\n return view('front.shipping-info');\n }", "public function index()\n\t{\n\t\t// get all the Turma\n\t\t$turmas = Turma::all();\n\n\t\t$this->layout->content = View::make('Turma.index')->with('turmas', $turmas);\n\t}", "function indexdrawViewTerritory() {\n $this->template->attach($this->resours);\n $this->template->draw('territory/indexViewTerritory', true);\n }", "public function index($tax = 'product')\n\t{\n\t\t$categories = Category::where('taxonomy', $tax)->paginate(30);\n\n return View::make('admin.categories.index', compact('categories'));\n\t}", "public function index(Request $request)\n {\n $fullUrl = $request->fullUrl();\n $type = !empty(explode('=', $fullUrl)[1]) ? explode('=', $fullUrl)[1] : 'category';\n $taxonomies = Taxonomy::all();\n return view('backend.taxonomy.index', compact('taxonomies'));\n }", "public function index()\n {\n //\n $bar = new alumnosController;\n $pagosr = \\impotlx\\pagos::All();\n return view('pagos.index',compact('pagosr','bar'));\n }", "public function index()\n {\n $travel_homestay = TravelHomestay::all();\n return view('backend.travel_homestay.index')->with('travel_homestay', $travel_homestay)->with('i',(request()->input('page',1)-1)*5);\n }", "public function index()\n {\n return view('xsim.treaty.index');\n }", "function invoices_view_all(){\n\t\t$user_transactions=array();\n\t\t$user_transactions=$this->UserModel->get_user_transactions(array('user_id'=>$this->session->userdata('member_id'),'gateway !='=>'ADMIN','t.is_deleted'=>0),0,0,'like');\n\t\tif($_SERVER['HTTP_REFERER']!=base_url().\"account/invoices_view_all\"){\n\t\t\t$this->session->set_userdata('HTTP_REFERER', $_SERVER['HTTP_REFERER']);\n\t\t\t$previous_page_url=$_SERVER['HTTP_REFERER'];\n\t\t}else{\n\t\t\t$previous_page_url=$this->session->userdata('HTTP_REFERER');\n\t\t}\n\t\t//Loads header, Invoices list and footer view.\n\t\t$this->load->view('header',array('title'=>'My Invoices','previous_page_url'=>$previous_page_url));\n\t\t$this->load->view('user/invoices_list',array('user_transactions'=>$user_transactions));\n\t\t$this->load->view('footer-inner-red');\n\t}", "public function index()\n {\n return view('pages.incomes.index');\n }", "public function indexAction() {\n $types = new VanArsdellTypes();\n $va = $types->getVaTypes($this->_getAllParams());\n $contexts = array('json','xml');\n\tif(in_array($this->_helper->contextSwitch()->getCurrentContext(),$contexts)) {\n\t$data = array('pageNumber' => $macks->getCurrentPageNumber(),\n\t\t\t\t 'total' => number_format($macks->getTotalItemCount(),0),\n\t\t\t\t 'itemsReturned' => $macks->getCurrentItemCount(),\n\t\t\t\t 'totalPages' => number_format($macks->getTotalItemCount() /\n\t\t\t\t $macks->getCurrentItemCount(),0));\n\t$this->view->data = $data;\n\t$vaa = array();\n\tforeach($va as $r => $v){\n\t$vaa['type'][$r] = $v;\n\t}\n\t$this->view->va = $vaa;\n\t} else {\n\t$this->view->va = $va;\n\t}\n }", "public function index()\n {\n //\n // get all the nerds\n $mun = Mun::where('type','international')->orderBy('id','desc')->get();\n\n // load the view and pass the nerds\n return View::make('admin.view_int_mun')\n ->with('mun', $mun);\n }", "public function index()\n {\n $terms = Terms::All(); //get Terms from Terms table\n return view('terms.view', compact('terms'));\n }", "public function indexAction() {\n $this->view->tribes = $this->_tribes->getTribesList();\n }", "public function index()\n {\n $this->authorize('use-permission', 'adm/smartcars/flights');\n\n $flights = Pirep::query()->orderByDesc('created_at')->paginate(50);\n\n return $this->viewMake('adm.smartcars.flights')->with('flights', $flights);\n }", "public function terms()\n {\n $page = Page::where('slug', 'terms_of_use')->first();\n return View::make('front.pages.detail')->with('page', $page);\n }", "public function index()\n\t{\n\t\t$tlbs = Tlbpayment::all();\n\t\treturn View::make('tlbs.index', compact('tlbs'));\n\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 index()\n {\n $specialtys = Specialty::orderBy('id','DESC')->paginate(5);\n return view('specialities.index', compact('specialtys'));\n }", "public function index()\n {\n // Retrieving models\n $site_info = SiteInfo::first();\n $any_pages = AnyPage::all()->sortByDesc('id');\n\n // Initial int value\n $i = 1 ;\n\n return view('admin-panel.any-page.index', compact('site_info', 'any_pages', 'i'));\n }", "public function index()\n {\n $classification_list = Classification::orderBy('classification.id','ASC')->get();\n $classification_level_list = ClassificationLevel::orderBy('classification_level.id','ASC')->get();\n $semester_level_list = SemesterLevel::orderBy('semester_level.id','ASC')->get();\n $term_list = Term::orderBy('term.id','ASC')->get();\n // Show the page\n return view('registrar_report/cor.index',compact('classification_list', 'classification_level_list', 'semester_level_list', 'term_list'));\n }", "function index(){\r\n \r\n $all = $this->model->selectAll();\r\n $this->data('all', $all);\r\n $this->loadView();\r\n }", "public function viewall() {\n $kidphysical_view = NidaraKidPhysicalInfo::find();\n if ($kidphysical_view):\n \n\n\t\treturn $this->response->setJsonContent ([ \n\t\t\t\t\t'status' => true,\n\t\t\t\t\t'data' =>$kidphysical_view\n\t\t\t]);\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'Faield']);\n endif;\n }", "public function index() {\n $pageSizes = explode(\",\", $this->configItems['rdn.admin.paginator-sizes']);\n \n // Load paginator default value\n $pageDefault = $this->configItems['rdn.admin.paginator-default.value'];\n \n // Add breadcrumbs\n $this->addBreadcrumb('Cuotas', route('management/fees'));\n \n // Set Title and subtitle\n $this->title = 'Cuotas';\n \n // Find current Fee\n $fee = Fee::getCurrentFee();\n if(!$fee){\n \n $fee = new Fee();\n $fee->amount = 0;\n }\n \n // Display view\n return $this->view('pages.admin.management.fees.index')\n ->with('fee', $fee)\n ->with('pageDefault', $pageDefault)\n ->with('pageSizes', $pageSizes)\n ;\n }", "public function indexregion()\n {\n $region=Region::all();\n foreach ($region as $r) {\n $r->pays=Pays::find($r->PAY_NUM);\n //dd($r);\n }\n return view('Region.indexregion', compact('region'));\n }", "public function index()\n {\n //\n $tran= \\App\\transaksi::paginate(5);\n return view('transaksi.index', compact('tran'));\n }", "function index(){\n //Get data dari model\n $data['hasil']=$this->tr_surat_jalan_model->get_paged_list();\n //load view\n $this->load->view('content/tr_surat_jalan/tr_surat_jalan_Detail',$data);\n }", "public function index()\n {\n $this->model->load('TacGia');\n $list_tacgia = $this->model->TacGia->all();\n $data = array(\n 'title' => 'index',\n 'list_tacgia' => $list_tacgia\n );\n\n // Load view\n $this->view->load('tacgias/index', $data);\n }", "public function index()\r\n {\r\n if (!has_permission('items', '', 'view')) {\r\n access_denied('Invoice Items');\r\n }\r\n if ($this->input->is_ajax_request()) {\r\n $this->perfex_base->get_table_data('invoice_items');\r\n }\r\n $this->load->model('taxes_model');\r\n $data['taxes'] = $this->taxes_model->get();\r\n $data['items_groups'] = $this->invoice_items_model->get_groups();\r\n\r\n $data['title'] = _l('invoice_items');\r\n $this->load->view('admin/invoice_items/manage', $data);\r\n }", "public function index()\n {\n $transfers = Transfer::paginate(20);\n return view('pages.transfer.index', compact('transfers'));\n }", "public function index()\n {\n $drzave = Country::all();\n return view('drzava.index',compact('drzave'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function index()\n {\n $diretores = Diretor::paginate(10);\n return view('admin.diretores.index', compact('diretores'));\n }", "public function index()\n {\n //\n ;//for specific price list\n }", "public function index()\n {\n return view('backend.region.index')->withRegions($this->region->getForDataTable()->paginate(10));\n }", "public function index()\n {\n return view('hms.testReport.xray.xray');\n }" ]
[ "0.78218234", "0.7355406", "0.728078", "0.7124663", "0.68532604", "0.6847306", "0.6752247", "0.6699389", "0.6591184", "0.6538653", "0.6415681", "0.6389581", "0.6348284", "0.633121", "0.6326061", "0.6318637", "0.6268577", "0.626623", "0.6246067", "0.6206845", "0.6176714", "0.6141629", "0.61265916", "0.6112665", "0.6088576", "0.6057214", "0.6056949", "0.60526997", "0.6049043", "0.60396206", "0.60387206", "0.60330003", "0.60320824", "0.60278594", "0.6020153", "0.60193527", "0.60112756", "0.60071343", "0.6006577", "0.5993692", "0.5991154", "0.5978584", "0.5963343", "0.5957193", "0.5956784", "0.5938598", "0.59349567", "0.5928214", "0.5927811", "0.59215236", "0.5919799", "0.591929", "0.59178966", "0.5917257", "0.5916492", "0.591411", "0.5910953", "0.59079015", "0.59039426", "0.5902506", "0.59006286", "0.5899227", "0.5898605", "0.5898568", "0.5891376", "0.58910114", "0.58885604", "0.58858985", "0.58846915", "0.58824426", "0.5882225", "0.5873714", "0.5870362", "0.5866683", "0.5864502", "0.58472157", "0.58437264", "0.5840223", "0.58368933", "0.583658", "0.58256024", "0.58256024", "0.58256024", "0.58118755", "0.58117396", "0.5808911", "0.5797289", "0.5795627", "0.5793009", "0.5790626", "0.5789751", "0.5788463", "0.57884496", "0.57881945", "0.57861984", "0.5783058", "0.57818115", "0.5781037", "0.577617", "0.57755286" ]
0.71366966
3
views the tax edit page
public function postEdit(){ $tax = Tax::find(Input::get('id') ); return View::make('tax.edit') ->with('id', $tax->id) ->with('name', $tax->name) ->with('rate', $tax->rate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function taxupdate() {\n $arr['page'] = 'taxdetail';\n\t\t$arr['active'] = 'other';\n\t\t$arr['productTax'] = $this->setting->getTax('product');\n\t\t$arr['shippingTax'] = $this->setting->getTax('shipping');\n\t\t$this->load->view('vwSettingTax',$arr);\n\t}", "function tax()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $manufacturer['content'] = Modules::run('tax/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('tax');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdmintax',$manufacturer);\n \n \n $this->load->view('general',$data);\n \n }\n }", "public function edit($id)\n {\n $tax = $this->taxRepository->findWithoutFail($id);\n\n\n if (empty($tax)) {\n Flash::error(__('lang.not_found', ['operator' => __('lang.tax')]));\n\n return redirect(route('taxes.index'));\n }\n $customFieldsValues = $tax->customFieldsValues()->with('customField')->get();\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->taxRepository->model());\n $hasCustomField = in_array($this->taxRepository->model(), setting('custom_field_models', []));\n if ($hasCustomField) {\n $html = generateCustomField($customFields, $customFieldsValues);\n }\n\n return view('settings.taxes.edit')->with('tax', $tax)->with(\"customFields\", isset($html) ? $html : false);\n }", "public function edit(IceTax $iceTax)\n {\n //\n }", "public function edit($id)\n {\n return view('admin::settings.taxes.edit', [\n 'tax' => Tax::find($id),\n 'types' => $this->types\n ]);\n }", "public function show(Tax $tax)\n {\n\n }", "function edit()\r\n\t{\r\n\t\tJRequest::setVar('view', 'transactions');\r\n\t\tJRequest::setVar('layout', 'edit');\r\n\t\tparent::display();\r\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 editar_tip($codigo_tip){\n $data['tip_editar'] = $this->model_admin->form_tip($codigo_tip);\n \n $this->load->view('view_librerias');\n $this->load->view('view_form_tips',$data);\n }", "public function addTax(){\n $data['title'] = \"Add Tax\";\n $this->admin_load('taxes/add_tax',$data); \n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function index(){\n $data['title'] = \"Taxes\";\n $data['records']= $this->TaxModel->get_list('tbltaxes');\n\n $this->admin_load('taxes/tax_list',$data); \n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function postEdit(){\n return view(\"admin.product.edit\" );\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "function editInfo()\n {\n $this->view->load('frontend/user/editInfo');\n }", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function edit(Tax $tax)\n {\n return view('tax.edit')->with('tax', $tax);\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "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_book_resault()\n\t{\n\t\t$this->edit_book_model->editBook();\n\t\t$this->load->view('edit_book_resault');\n\t}", "public function edit($id, Request $request)\n {\n $receipt = Receipt::findOrFail($id);\n $receiptTaxes = ReceiptTax::where('receipt_id', '=', $id)->get();\n\n $periods = \\App\\Models\\Period::where('person_id', '=',\n session('current_person_id'))\n ->orderBy('year', 'asc')->orderBy('period_number', 'asc')->get();\n $receiptTypes = \\App\\Models\\ReceiptType::orderBy('name', 'asc')->get();\n $activities = \\App\\Models\\Activity::orderBy('name', 'asc')->get();\n $zones = \\App\\Models\\Zone::orderBy('name', 'asc')->get();\n $person = \\App\\Models\\Person::find(session('current_person_id'));\n $systemTaxes = \\App\\Models\\SystemTax::orderBy('taxable_iva', 'desc')\n ->orderBy('percent_iva', 'desc')\n ->select('*'\n , \\DB::raw(\"case when apply_to='iva' then 1 else 2 end as iva\"))->get();\n $otherTaxes = \\App\\Models\\OtherTax::orderBy('section', 'asc')\n ->orderBy('name', 'asc')\n ->select('*'\n , \\DB::raw(\"case when section='iva' then 1\n when section='iibb' then 2\n when section='gas' then 3 end as iva\"))->get();\n $tabsOtherTaxes = $otherTaxes;\n $retentionTypes = \\App\\Models\\RetentionType::orderBy('apply_to', 'asc')\n ->orderBy('name', 'asc')->get();\n /*$statesForeigns = \\App\\Models\\State::where('idCountry', 5)->get();\n $immigrationSituations = ImmigrationSituation::all();\n $bloodTypes = \\App\\Traits\\ConstantPeople::getBloodTypes();*/\n $type_id = $receipt->type_id;\n $receiptTaxes = $receiptTaxes->keyBy('tax_id');\n //dd($receiptTaxes);\n //dd($receiptTaxes[3]);\n return view('receipt.form'.$type_id, compact([ 'periods', 'receiptTypes',\n 'activities', 'zones', 'type_id', 'person', 'systemTaxes', 'otherTaxes',\n 'receipt', 'receiptTaxes', 'tabsOtherTaxes', 'retentionTypes'\n ]));\n\n }", "public function edit($typology) //110\n {\n $this->authorize('edit.typologies');\n\n return view('admin.typologies.edit', compact('typology','supervisions'));\n }", "public function edit()\n\t{\n\t\t//\n\t}", "function index()\n {\n $this->_view_edit('view');\n }", "public function edit($id)\n {\n\n $info=Terms::where('type',10)->where('auth_id',Auth::id())->find($id);\n return view('plugin::coupon.edit',compact('info'));\n \n }", "public function annimalEditAction()\n {\n }", "function invoice_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'invoice_edit';\n $page_data['page_title'] = get_phrase('edit_invoice');\n $this->load->view('backend/index', $page_data);\n }", "public function edit(Town $town)\n {\n //\n }", "public function edit($id)\n {\n //\n return view('users.accounting.transaction.edit');\n }", "public function showEdit()\n {\n\n }", "public function edit(accidentsTravail $accidentsTravail)\n {\n //\n }", "public function show(IceTax $iceTax)\n {\n //\n }", "abstract protected function renderEdit();", "function expense_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'expense_edit';\n $page_data['page_title'] = get_phrase('edit_expense');\n $this->load->view('backend/index', $page_data);\n }", "public function editAction() {}", "public function edit(Territory $territory)\n {\n //\n }", "public function edit($id)\n {\n $taxonomy = Taxonomy::findOrFail($id);\n\n return view('backend.taxonomy.edit', compact('taxonomy'));\n }", "public function edit($id)\n {\n $transaction = IncomeExpense::find($id);\n return view('pages.edit',compact('transaction'));\n }", "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "public function edit()\n {\n return view('stores::edit');\n }", "public function edit($fno)\n {\n $payment = \\App\\Payment::find($fno);\n $data[\"payment\"] = $payment;\n \n return view('payment.edit',$data);//\n }", "function transport_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'transport_edit';\n $page_data['page_title'] = get_phrase('edit_transport');\n $this->load->view('backend/index', $page_data);\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\n\n }", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\n }", "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit() {\n $data['individual'] = $this->individual();\n $data['menus'] = $this->allmenus();\n $data['pages'] = $this->allpages();\n $this->load->view('Dashboard/header');\n $this->load->view('Menu/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "function edit() {\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->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\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 edit($id)\n {\n //\n $incoterm = Incoterm::find($id);\n return view('admin.incoterm.edit',compact('incoterm'));\n }", "public function index()\n {\n\n $taxes =Tax::all();\n\n return view('admin.tax.tax',compact('taxes'));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit($id)\n {\n $type = transaction_types::findOrFail($id);\n return view('admin.transactionType.edit',compact('type'));\n }", "public function edit($id)\n {\n $advance=AdvanceSettlementCustomer::find($id);\n $customer = Customer::all();\n return view('admin.advance_settlement_customer.edit',compact('advance','customer'));\n }", "public function edit()\n {\n // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\n }", "public function edit()\n {\n \n \n }", "public function edit($id) {\n\n //page settings\n $page = $this->pageSettings('edit');\n\n //client leadsources\n $taxrates = $this->taxraterepo->search($id);\n\n //not found\n if (!$taxrate = $taxrates->first()) {\n abort(409, __('lang.error_loading_item'));\n }\n\n //reponse payload\n $payload = [\n 'page' => $page,\n 'taxrate' => $taxrate,\n ];\n\n //response\n return new EditResponse($payload);\n }", "public function editAction()\n {\n $traineedocId = $this->getRequest()->getParam('id');\n $traineedoc = $this->_initTraineedoc();\n if ($traineedocId && !$traineedoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_traineedoc')->__('This trainee document no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getTraineedocData(true);\n if (!empty($data)) {\n $traineedoc->setData($data);\n }\n Mage::register('traineedoc_data', $traineedoc);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'))\n ->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'));\n if ($traineedoc->getId()) {\n $this->_title($traineedoc->getTraineeDocName());\n } else {\n $this->_title(Mage::helper('bs_traineedoc')->__('Add trainee document'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit() {\n\t\t$userId = $this->uri->segment(3);\n\t\t$name = 'Juan Saluminag';\n\n\t\t$this->breadcrumbs->set(['Edit: ' . $name => 'members/edit/' . $userId]);\n\n\t\t$this->render('register');\n\t}", "public function editView() {\n Template_Module::setFullWidth(true);\n $this->edit = true;\n $this->addView();\n // cestak obrázků\n $this->imagePath = $this->category()->getModule()->getDataDir(true);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit($id)\n {\n $data = TD::where('id',$id)->get();\n $banks = MasterBank::all();\n $tipeDeps = M_Tipe_Deposito::all();\n return view('registrasi-td-form-edit',compact('data','banks','tipeDeps'));\n }", "public function edit($id)\n {\n $countries = Country::find($id);\n // Redirect to taxon list if updating taxon wasn't existed\n if ($countries == null || count($countries) == 0) {\n return redirect()->intended('/country');\n }\n\n return view('countries/edit', ['countries' => $countries]);\n }", "public function editQuotationInvoice($id){\n $invoice = WlgCorporationInvoice::find($id);\n\n $invoiceForms = WlgCorporationInvoice::where('if_id', $id)->get()->toArray();\n return view('edit-wlg-corportaion-invoice', compact('invoice', 'invoiceForms'));\n }", "public function edit(BaseTestCenter $baseTC)\n {\n //$cities = \\App\\Entity\\City::all('id', 'name', 'countryId');\n $testProviders = \\App\\Entity\\TestProvider::all('name', 'id');\n //$clickoutURLs = \\App\\Entity\\ClickoutURL::all('trackingLinkName', 'id');\n \n\n return view('baseTCFolder/baseTCEdit')->with(compact('baseTC', 'testProviders'));\n\n }", "public function edit() {\n }", "function edit() {\n\t\t\t\n\t\t// Require a validated association \n\t\tProfileAssociationValidRequired::check();\r\n\t\n\t\t// Get annonce\r\n\t\t$this->fetchAnnonce();\n\t\t\n\t\t// We should have write access to this annonce\n\t\t$this->checkWriteAccess();\r\n\t\r\n\t\t// Redirect to the annonce\r\n\t\t$this->renderView(\"editAnnonce\");\r\n\t\r\n\t}", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function edit()\n {\n return view('inventory::edit');\n }", "function edit(){\n $data['title'] = 'Edit Obat';\n $kode_barcode = $this->input->get('kode_barcode'); //\n\n $where = array('kode_barcode'=>$kode_barcode); //\n\n $data['row'] = $this->m_barang->get_bydata($where); //\n $data['query'] = $this->m_barang->tampil_satuan(); //query dari model\n\n //utk form edit nya, saya tambahkan sebuah view bernama feupload.php\n $this->template->load('static','barang/editbarang',$data);\n }", "public function edit($id)\n\t{\n\t\t$tlb = Tlbpayment::find($id);\n $equities = Account::where('category','EQUITY')->get();\n $asset = Account::where('category','ASSET')->get();\n\n $vehicles = Vehicle::all();\n\t\treturn View::make('tlbs.edit', compact('tlb','equities','asset','vehicles'));\n\t}", "public function edit_toko(){\n\t}", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit()\n {\n // $setting = Setting::findOrFail($id);\n\n // return view('invoice.edit');\n }", "public function editAction()\r\n {\r\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "public function edit($id)\n { \n $pageTitle='System Information Edit';\n return view('setups::systemInformation.edit',compact('pageTitle'));\n }", "public function edit(tip $tip)\n {\n $page_title = 'Update Tips';\n $this->authorize('view', $tip);\n return view('admin.tip.edit',compact('page_title','tip'));\n }", "public function edit($id)\n {\n // include view file\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\t\t$transaction = Expense::find($id); // getting the speific user to edit\n\t\treturn view('driver.expense.edit')->with([\n 'transaction' => $transaction\n\t\t]);\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }" ]
[ "0.76382494", "0.7034002", "0.70160884", "0.69389576", "0.67746663", "0.66096514", "0.64846355", "0.6437889", "0.6419488", "0.641871", "0.63995886", "0.63995886", "0.6371156", "0.6371156", "0.63658327", "0.63194865", "0.6287405", "0.6282806", "0.62676173", "0.62562585", "0.625274", "0.6243929", "0.62396556", "0.62256217", "0.62097853", "0.620635", "0.6201926", "0.6178843", "0.6176467", "0.6176454", "0.6169546", "0.61648655", "0.6161191", "0.6159401", "0.61566854", "0.6154968", "0.6143833", "0.61385643", "0.61341053", "0.61322135", "0.6130676", "0.6122227", "0.61082524", "0.61011356", "0.6096261", "0.6095764", "0.6089273", "0.60881174", "0.6086675", "0.6085832", "0.60768235", "0.606771", "0.60623133", "0.6059601", "0.6045644", "0.6042516", "0.60423386", "0.60417944", "0.6035602", "0.6027692", "0.602159", "0.602084", "0.6019688", "0.6019102", "0.60096854", "0.599581", "0.599581", "0.5994784", "0.5991889", "0.5987489", "0.5982109", "0.59817266", "0.5976034", "0.59712553", "0.59658134", "0.595974", "0.59572417", "0.59526795", "0.59507984", "0.5948046", "0.59464806", "0.59450024", "0.5941493", "0.593919", "0.59329337", "0.5926961", "0.592133", "0.592133", "0.592133", "0.59186214", "0.5913573", "0.5913228", "0.5912436", "0.59121335", "0.5912072", "0.59092885", "0.5909053", "0.5902125", "0.5902125", "0.5902125" ]
0.77472943
0
protected $status = '';
public function __construct() { $this->project_id = (int) Input::get('project_id'); $this->svn_name = Input::get('svn_name'); $this->version = Input::get('version'); $this->exclude_files = Input::get('exclude_files'); if ($this->version == 0 || $this->version == '') { //默认获取svn服务器上的最新版本号 $url = self::SVN_URL . $this->svn_name; $this->version = exec( "svn log " . $url . " --limit 1 | grep -E '^r[0-9]+' | awk '{print $1}'| awk -F 'r' '{print $2}'", $output, $retun_var); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_status(){\n return $this->status;\n }", "function getStatus() {\n return $this->status;\n }", "function get_status() {\n return $this->status;\n }", "function getStatus()\n {\n return $this->status;\n }", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "public function status(): string;", "public function status()\r\n {\r\n return $this->status;\r\n }", "public function get_status() {\n return $this->_status;\n }", "public function getStatus(){\n\t\treturn $this->status;\n\t}", "public function getStatus() {\n return $this->status;\n }", "public function getStatus() {\n return $this->status;\n }", "public function status(): string\n {\n return $this->status;\n }", "public function getStatus()\n {\n }", "public function status()\n {\n return $this->status;\n }", "public function get_status() {\n return $this->status;\n }", "public function status()\n {\n return $this->_status;\n }", "function Status()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }", "public function respon(){\n //update 'status'\n }", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus()\r\n {\r\n return $this->status;\r\n }", "public function getStatus()\r\n {\r\n return $this->status;\r\n }", "public function getStatus()\n {\n return isset($this->status) ? $this->status : '';\n }", "public function getStatus()\n {\n return 'OK';\n }", "function getStatus() \n {\n return $this->instance->getStatus();\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "public function status() {\n\t\treturn $this->_status;\n\t}", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n\t{\n\t\treturn $this->status; \n\n\t}", "public function status();", "public function status();", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }" ]
[ "0.8174398", "0.79952323", "0.79469347", "0.7875637", "0.7743889", "0.7743889", "0.77277076", "0.7720363", "0.7712261", "0.7708965", "0.7636758", "0.7636758", "0.7631413", "0.7628813", "0.7615055", "0.755501", "0.7482353", "0.744988", "0.7429337", "0.7418955", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74129766", "0.74122864", "0.74122864", "0.74122864", "0.74122864", "0.7404796", "0.7404796", "0.7382229", "0.735731", "0.7352154", "0.73473585", "0.73473585", "0.73473585", "0.73473585", "0.7306005", "0.73054194", "0.7298694", "0.7298694", "0.72982746", "0.7290299", "0.7290299", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184", "0.7286184" ]
0.0
-1
Display a listing of the resource.
public function index() { try { $response['divisions'] = Division::all(); $status = 200; } catch(Exception $e) { $response = $e->getMessage(); $status = 400; } finally { return new JsonResponse($response, $status); } }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { try { $response = Division::create($request->all()); $status = 200; } catch (Exception $e) { $response = $e->getMessage(); $status = 400; } finally { return new JsonResponse($response, $status); } }
{ "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(Division $division) { $response['division'] = $division; return new JsonResponse($response, 200); }
{ "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
Update the specified resource in storage.
public function update(Request $request, Division $division) { try { $update = $request->all(); foreach($update as $key => $value) { $division[$key] = $value; } $division->save(); $response = $division; $status = 200; } catch(Exception $e) { $response = $e->getMessage(); $status= 400; } finally { return new JsonResponse($response, $status); } }
{ "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(Division $division) { try { $division->delete(); $response = null; $status = 204; } catch(Exception $e) { $response = $e->getMessage(); $status = 400; } finally { return new JsonResponse($response, $status); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
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&oacute; 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}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "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 }", "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 }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\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}", "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 }", "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 }", "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 }", "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.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application dashboard.
public function referralSetting() { // $users=User::get(); $referralsetting=ReferralSetting::get(); // $referralcontestsetting=ReferralContestSetting::get(); // $loansetting=LoanSetting::get(); return view('admin.referralSetting.index',compact('referralsetting')); }
{ "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
Get all bundles defined by this model bundle
public static function allBundles(): Collection;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBundles()\n {\n return $this->bundles;\n }", "public function getBundles() {\n return $this->getConfig(\"bundles\");\n }", "public function getBundles()\n {\n return array();\n }", "public function registerBundles()\n {\n return $this->getBundleInstances(\n $this,\n $this->bundlesToLoad\n );\n }", "public function bundles() {\n $bundles = $this->user->find(Auth::user()->id)->bundles()->get();\n return view('frontend.bundle.list_bundle', compact('bundles'));\n }", "private function initializeBundles(): array\n {\n // as this method is not called when the container is loaded from the cache.\n $kernel = $this->getApplication()->getKernel();\n $container = $this->getContainerBuilder($kernel);\n $bundles = $kernel->getBundles();\n foreach ($bundles as $bundle) {\n if ($extension = $bundle->getContainerExtension()) {\n $container->registerExtension($extension);\n }\n }\n\n foreach ($bundles as $bundle) {\n $bundle->build($container);\n }\n\n return $bundles;\n }", "public function getAvailableBundles() {\n $options = [];\n $entityTypes = $this->getSupportedEntityTypes();\n\n foreach ($entityTypes as $entityType => $entityLabel) {\n $options[$entityLabel][$entityType] = \"$entityLabel (Default)\";\n\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entityType);\n\n foreach ($bundles as $bundleId => $bundleData) {\n $defaultsId = $entityType . '__' . $bundleId;\n $options[$entityLabel][$defaultsId] = $bundleData['label'];\n }\n }\n\n return $options;\n }", "protected static function loadFixturesBundles()\n {\n return [\n 'ElcodiCartBundle',\n 'ElcodiCouponBundle',\n 'ElcodiProductBundle',\n 'ElcodiCurrencyBundle',\n ];\n }", "protected static function loadFixturesBundles()\n {\n return [\n 'ProductBundle',\n ];\n }", "public function getBundles(ParserInterface $parser): array\n {\n return [\n BundleConfig::create(ApiPlatformBundle::class),\n BundleConfig::create(RichardhjContaoApiBundle::class)\n ->setLoadAfter([ApiPlatformBundle::class, ContaoCoreBundle::class]),\n ];\n }", "protected function loadFixturesBundles()\n {\n return [\n 'ElcodiUserBundle',\n 'ElcodiCurrencyBundle',\n 'ElcodiAttributeBundle',\n 'ElcodiProductBundle',\n 'ElcodiCurrencyBundle',\n 'ElcodiCartBundle',\n 'ElcodiCouponBundle',\n 'ElcodiRuleBundle',\n ];\n }", "public function registerBundles(): iterable\n {\n $contents = require $this->getProjectDir().'/config/bundles.php';\n foreach ($contents as $class => $envs) {\n if ($envs[$this->environment] ?? $envs['all'] ?? false) {\n yield new $class();\n }\n }\n }", "public function isAllBundles() {\n return $this->getConfig(\"all_bundles\");\n }", "private function _callBundlesConfig(): array\n {\n $contents = require $this->getProjectDir().'/config/bundles.php';\n /**\n * Load the current micro-service extra bundle\n */\n $extra_bundle_file = sprintf('%s/extra.bundles.php' , APPLICATION_LIB_PATH ) ;\n\n ##\n if(file_exists($extra_bundle_file)) {\n ##\n $contents = array_merge($contents , require $extra_bundle_file) ;\n }\n ##\n return $contents;\n }", "public function discover(): array\n {\n $schemas = $this->loadModelsFromBundles();\n\n return $schemas;\n }", "protected function loadBundles()\n {\n /**\n * @var $bundle BundleInterface\n */\n foreach (static::$bundles as $bundle) {\n $bundle->init($this);\n }\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }", "public static function getAll(){\n\t\treturn self::$components;\n\t}", "public function get_assets_all()\n {\n return $this->assets;\n }", "function _hps_courses_bundles() {\n $bundles = array(\n 'taxonomy_term' => array(\n 'hps_participant_role' => array(\n 'name' => t(\"HPS Courses Participant Role\"),\n 'description' => t(\"Contains roles of course participants.\"),\n 'machine_name' => 'hps_participant_role',\n ),\n 'hps_person_authority' => array(\n 'name' => t(\"HPS Person Authority\"),\n 'description' => t(\"Contains authority records for people names.\"),\n 'machine_name' => 'hps_person_authority',\n ),\n 'hps_course_item_type' => array(\n 'name' => t(\"HPS Course Item Type\"),\n 'description' => t('Terms describe the type of item associated with '.\n 'a course e.g. official course photo, syllabus etc.'),\n 'machine_name' => 'hps_course_item_type',\n ),\n ),\n );\n return $bundles;\n}", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function tags()\n {\n return $this->morphedByMany(Tag::class, 'bundleable');\n }", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function getCatalogues()\n {\n return Catalogue::all();\n }", "public function registerBundles()\n {\n $bundles = [\n ];\n\n return $bundles;\n }", "public static function getCustomBundleNameList(Controller $controller, Container $container)\n {\n $srcPath = rtrim(dirname($controller->get('kernel')->getRootDir()), '/') . '/src';\n $allBundles = $container->getParameter('kernel.bundles');\n $bundles = array();\n\n // find all bundles in src folder\n foreach ($allBundles as $bundle=>$path)\n {\n $dir = dirname(str_replace('\\\\', '/', $srcPath . '/' . $path));\n\n if (is_dir($dir))\n {\n $bundles[] = $bundle;\n }\n }\n\n asort($bundles);\n\n return $bundles;\n }", "public function getModels();", "public function getModels();", "public static function getBrandsAll()\n {\n $pdo = Database::getPDO();\n $sql = \"SELECT * FROM `\". static::$table .\"` \n WHERE `order` > 0\n ORDER BY `order` ASC \";\n \n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "public function getAll()\n {\n return $this->database->getAll('Extension', 'slicerpackages');\n }", "protected function loadBundleConfiguration(): array\n {\n if($arrFiles = $this->getBundleConfigurationFiles())\n {\n return ImportController::importFiles($arrFiles, false);\n }\n\n return [[],[]];\n }", "public function registerBundles()\n {\n return [\n new FrameworkBundle(),\n new TwigBundle(),\n new DoctrineBundle(),\n new SymfonyAnalyticsBundle(),\n ];\n }", "public function bundle()\n {\n return $this->hasOne(ProductBundle::class, 'id','bundle_id');\n }", "protected function get($bundles)\n\t{\n\t\t$responses = array();\n\n\t\t$repository = IoC::resolve('bundle.repository');\n\n\t\tforeach ($bundles as $bundle)\n\t\t{\n\t\t\t// First we'll call the bundle repository to gather the bundle data\n\t\t\t// array, which contains all of the information needed to install\n\t\t\t// the bundle into the application. We'll verify that the bundle\n\t\t\t// exists and the API is responding for each bundle.\n\t\t\t$response = $repository->get($bundle);\n\n\t\t\tif ( ! $response)\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"The bundle API is not responding.\");\n\t\t\t}\n\n\t\t\tif ($response['status'] == 'not-found')\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"There is not a bundle named [$bundle].\");\n\t\t\t}\n\n\t\t\t// If the bundle was retrieved successfully, we will add it to\n\t\t\t// our array of bundles, as well as merge all of the bundle's\n\t\t\t// dependencies into the array of responses so that they are\n\t\t\t// installed along with the consuming dependency.\n\t\t\t$bundle = $response['bundle'];\n\n\t\t\t$responses[] = $bundle;\n\n\t\t\t$responses = array_merge($responses, $this->get($bundle['dependencies']));\n\t\t}\n\n\t\treturn $responses;\n\t}", "protected function loadBundles($bundles)\n {\n $am = $this->getAssetManager();\n $result = [];\n foreach ($bundles as $name) {\n $this->stdout(\"Loading bundle '{$name}' with dependencies...\\n\");\n $result[$name] = $am->getBundle($name);\n }\n foreach ($result as $bundle) {\n $this->loadDependency($bundle, $result);\n }\n\n return $result;\n }", "public function getAllObjectConfigurations(): array\n {\n return $this->objects;\n }", "public function all()\n {\n return $this->modules;\n }", "public function getBundle($name);", "public function bundle();", "protected function parseComposer()\r\n {\r\n $bundles = parent::parseComposer();\r\n foreach ($this->getPackages() as $package) {\r\n if (!strncmp($package['name'], 'superrb/', strlen('superrb/'))) {\r\n $bundles[] = array(\r\n 'name' => $package['name'],\r\n 'version' => $package['version'],\r\n 'reference' => $package['source']['reference'],\r\n );\r\n }\r\n }\r\n\r\n return $bundles;\r\n }", "public static function getAll() : array {\n return self::$objects;\n }", "public function registerBundles($environment) {\n $bundles = array(\n //new AsseticBundle(),\n new \\Symfony\\Bundle\\AsseticBundle\\AsseticBundle(),\n new \\Lexik\\Bundle\\TranslationBundle\\LexikTranslationBundle(),\n );\n\n if (in_array($environment, array('dev', 'test'))) {\n ;\n }\n\n $newBundles = array();\n foreach ($bundles as $bundle) {\n if (method_exists($bundle, 'registerBundles')) {\n $newBundles = array_merge($newBundles, $bundle->registerBundles($environment));\n }\n }\n $bundles = array_merge($bundles, $newBundles);\n\n return $bundles;\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function getMappingEntityBundle();", "public function getArrayOfBrands();", "public function getEnviesLib(){\n $dataEnvies = \\app\\modules\\libraries\\models\\Category::findOne(['slug' => 'envies'])->children()->with('items')->asArray()->all();\n $enviesLib = [];\n foreach ($dataEnvies as $key => $value) {\n $enviesLib[$value['slug']] = ArrayHelper::map($value['items'], 'item_id', function ($element) {\n return ['slug'=>$element['slug'], 'title' => $element['title']];\n });\n }\n return $enviesLib;\n }", "public function getModels()\n {\n return $this->_models;\n }", "public function getAll()\n {\n $this->_modules['core'][] = array (\n 'module' => 'Magento',\n 'codePool' => 'core',\n 'active' => 'true',\n 'version' => Mage::getVersion()\n );\n\n foreach (Mage::getConfig()->getModuleConfig() as $node) {\n foreach ($node as $module => $data) {\n if (!isset($data->codePool)) {\n continue;\n }\n $codePool = $data->codePool->asArray();\n if (empty($codePool)) {\n continue;\n }\n if (is_array($codePool)) {\n $codePool = implode('.', $codePool);\n }\n\n $this->_modules[$codePool][] = array (\n 'module' => $module,\n 'codePool' => $codePool,\n 'active' => $data->active,\n 'version' => $data->version\n );\n }\n }\n\n return $this->_modules;\n }", "public function get_all()\n {\n $plugins = $this->get_plugins();\n\n $pluginControllers = array();\n\n foreach($plugins as $plugin){\n foreach($plugin as $controller => $actions){\n $pluginControllers[$controller] = $plugin[$controller];\n }\n }\n\n return array_merge($this->get(), $pluginControllers);\n }", "public function getComponents(): array\n {\n return $this->components;\n }", "public function load() {\n foreach ($this->bundles as $bundle) {\n \n $class = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($bundle);\n \n $prefix = '';\n $this->location[$class->getShortName()] = \\Raptor\\Util\\ClassLocation::getLocation($bundle);\n $this->specif[$class->getShortName()] = array('location' => \\Raptor\\Util\\ClassLocation::getLocation($bundle), 'namespace' => $class->getNamespaceName(), 'name' => $class->getName());\n if (!$class->getReflectionDocComment()->isEmpty() and $class->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $class->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefix = $obj[0]->getDescription();\n }\n \n $controllerDir = \\Raptor\\Util\\ClassLocation::getLocation($bundle) . '/Controller';\n $listfiles= \\Raptor\\Util\\Files::find($controllerDir, \"*Controller.php\");\n \n foreach ($listfiles as $nombre_fichero) {\n $prefixController = $prefix;\n $namespaceSrc = explode('src', $nombre_fichero);\n $real = array();\n if (count($namespaceSrc) > 1)\n $real = $namespaceSrc[1];\n else {\n $namespaceSrc = explode('libs', $nombre_fichero);\n $real = $namespaceSrc[1];\n }\n $namespaceClass = str_replace('.php', '', $real);\n $namespace = str_replace('/', '\\\\', $namespaceClass);\n \n $controller = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($namespace);\n if (!$controller->getReflectionDocComment()->isEmpty() and $controller->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $controller->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefixController = $prefixController . $obj[0]->getDescription();\n }\n\n foreach ($controller->getMethods() as $method) {\n /**\n * Searching the API in any method of controller classes\n */\n $api = new \\stdClass();\n $api->hasApi = false;\n $api->version = '0.0.0';\n $api->text = '';\n $doc = $method->getReflectionDocComment();\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('api')) {\n $api->text = $method->getReflectionDocComment()->getFullDescription();\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('api');\n $api->category = $collectionDescrip[0]->getDescription();\n $api->class = $method->getDeclaringClass()->getName();\n $api->bundle = $class->getName();\n $api->method = $method->getName();\n $api->hasApi = true;\n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $collectionRoute = $collectionRouteObj[0];\n $api->route=$prefixController . $collectionRoute->getDescription();\n }else{\n $api->route=false;\n }\n \n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('version')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('version');\n $collectionRoute = $collectionRouteObj[0];\n $api->version=$collectionRoute->getDescription();\n }\n }\n if ($api->hasApi) {\n if (!isset($this->api[$api->category]))\n $this->api[$api->category] = array();\n $this->api[$api->category][] = $api;\n }\n \n if (!$method->getReflectionDocComment()->isEmpty() and $method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('RouteName')) {\n $collectionNameObj = $doc->getAnnotationsCollection()->getAnnotation('RouteName');\n $collectionName = $collectionNameObj[0]->getDescription();\n } else {\n $routeArray = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $Route = $routeArray[0];\n $collectionName = str_replace('/', '_', $prefixController . $Route->getDescription());\n }\n\n \n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n \n $collectionRoute = $collectionRouteObj[0];\n $descrip=\"\";\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Description')) {\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('Description');\n $descrip = $collectionDescrip[0]->getDescription();\n }\n $methodName='ANY';\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Method')) {\n $collectionMethod = $doc->getAnnotationsCollection()->getAnnotation('Method');\n $methodName = $collectionMethod[0]->getDescription();\n }\n \n $this->definitions[$collectionName]=$api;\n $this->definitions[$collectionName] = array($prefixController . $collectionRoute->getDescription(), $method->getDeclaringClass()->getName(), $method->getName(), $class->getName(),'method'=>$methodName);\n $this->description[$prefixController . $collectionRoute->getDescription()]=array($descrip,$method->getReflectionDocComment()->getFullDescription());\n \n }\n }\n }\n }\n \n }", "public function getComponents () : array\n {\n return $this->components;\n }", "public function getDeployedModels()\n {\n return $this->deployed_models;\n }", "public function indexAction()\n {\n $entities = $this->get('mqm_brand.brand_manager')->findBrands();\n\n return array('entities' => $entities);\n }", "public function getComponents()\n {\n return $this->result->getComponents();\n }", "public function getAssets()\n {\n return $this->getService('assets');\n }", "public function fetchBundleTickets($eventType) : array\n\t\t{\n\t\t\t$Bundletickets = [];\n\t\t\ttry {\n\t\t\t\t\tforeach($this->fetchTickets($eventType) as $row) {\n\t\t\t\t\t\t$Bundletickets[] = new BundleTicket($row['ID'], $row['price'], $row['title'], $row['description']);\n\t\t\t\t\t}\n\t\t\t\t} catch (Excetpion $error) {\n\t\t\t\t\tthrow $error;\n\t\t\t\t}\n\n\t\t\treturn $Bundletickets;\n\t\t}", "public function getReferencedModels(): array\n {\n return [];\n }", "public function registerBundles()\n {\n return [\n new \\Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle(),\n new \\Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle(),\n new \\Symfony\\Bundle\\TwigBundle\\TwigBundle(),\n new \\Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle(),\n new \\AdminPanel\\Symfony\\AdminBundle\\AdminPanelBundle(),\n new \\Symfony\\Bundle\\MonologBundle\\MonologBundle()\n ];\n }", "public function getModules(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelist');\n return $this->execute($qb);\n }", "private function getBundleProduct(array $items): array\n {\n foreach ($items as $item) {\n if ($item['product_type'] == 'bundle') {\n return $item;\n }\n }\n\n return [];\n }", "public function findAll()\n {\n return $this->newService(ServiceKeys::APPLICATION)->findAll();\n }", "public function retrieveAll(): array\n {\n return self::flatten($this->versionsDefinition);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "public function splitJsBundles()\n {\n return $this->splitBundles(\n 'js',\n $this->createPath('public/js'),\n $this->filters['js']\n );\n }", "public function getModules();", "public function getModules();", "public function findAll() {\n\t\treturn $this->getCatalog();\n\t}", "public function getAssets(): array {\n\t\treturn $this->assets;\n\t}", "public function ran($bundle)\n\t{\n\t\treturn $this->table()->where_bundle($bundle)->lists('name');\n\t}", "private function retrieveLatestBundleMeta(): array\n {\n $filesystem = Storage::disk($this->lasso_disk);\n $base_path = $this->lasso_path;\n\n // Firstly, let's check if the local filesystem has a \"lasso-bundle.json\"\n // file in it's root directory.\n\n if ($this->local_filesystem->exists(base_path('lasso-bundle.json'))) {\n $this->use_git = true;\n $file = $this->local_filesystem->get(base_path('lasso-bundle.json'));\n return json_decode($file, true);\n }\n\n // If there isn't a \"lasso-bundle.json\" file in the root directory,\n // that's okay - this means that the commit is in \"non-git\" mode. So\n // let's just grab that file.If we don't have a file on the server\n // however; we need to throw an exception.\n\n if (!$filesystem->has($base_path . '/lasso-bundle.json')) {\n $this->rollBack(\n FetchCommandFailed::because('A valid \"lasso-bundle.json\" file could not be found for the current environment.')\n );\n }\n\n $file = $filesystem->get($base_path . '/lasso-bundle.json');\n return json_decode($file, true);\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\r\n {\r\n return $this->themes;\r\n }", "public function getLocales(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('localelist');\n return $this->execute($qb);\n }", "public function index()\n {\n return [\n 'categories' => Category::getRepository()->allWithBrands(),\n 'brands' => Brand::getRepository()->findAll(),\n 'types' => Type::getRepository()->findAll()\n ];\n }", "public function getBuiltItems() {\n return $this->objects;\n }", "public function getModulesList();", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "abstract public function bundle();", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "public function getBrands()\n {\n return $this->brands;\n }", "public static function getList(){\n return self::all();\n }", "public function getAllOptions()\n {\n $collection = Mage::getModel('ak_brands/brand')->getResourceCollection();\n $options = $collection->toOptionArray();\n\n return $options;\n }", "public function all()\n {\n return $this->getModel()->all();\n }", "public function dependencies()\n {\n return $this->bundle['dependencies'] ?? [];\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "public function all() : array\n {\n return $this->container();\n }", "public function registerBundles()\n {\n return array(\n new \\Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle(),\n new \\Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle(),\n new \\Symfony\\Bundle\\TwigBundle\\TwigBundle(),\n new \\JMS\\SerializerBundle\\JMSSerializerBundle(),\n new \\FOS\\RestBundle\\FOSRestBundle(),\n new \\Lesson\\Bundle\\MainBundle\\LessonMainBundle(),\n new \\Lesson\\Bundle\\BackendBundle\\LessonBackendBundle(),\n new Lesson\\Bundle\\FrontendBundle\\LessonFrontendBundle(),\n );\n }", "public function findAllSkeleton()\n {\n return $this->findAllActive();\n }", "public function getModuleList(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelistnames');\n return $this->execute($qb);\n }", "public function GetAll()\n {\n return $this->model->all();\n }", "public function setBundles($bundles) {\n $this->bundles = $bundles;\n }", "public function getAll()\n {\n return $this->all;\n }", "public function getComponents() {\n return $this->components;\n }", "public function get_skin_list()\n {\n $table = 'themes';\n $codename = 'name';\n\n $rows = $this->connection->query_select($table, array($codename));\n return collapse_1d_complexity($codename, $rows);\n }", "static function getAll()\n\t\t{\n\t\t\t$returned_brands = $GLOBALS['DB']->query(\"SELECT * FROM brands;\");\n\t\t\t$all_brands = [];\n\t\t\tforeach($returned_brands as $brand){\n\t\t\t\t$name = $brand['name'];\n\t\t\t\t$id = $brand['id'];\n\t\t\t\t$new_brand = new Brand($name, $id);\n\t\t\t\tarray_push($all_brands, $new_brand);\n\t\t\t}\n\t\t\treturn $all_brands;\n\t\t}", "public function bundleOptions($entity_type) {\n $options = [];\n\n // @todo Remove hack.\n $bundle_info = \\Drupal::service('entity_type.bundle.info');\n foreach ($bundle_info ->getBundleInfo($entity_type->id()) as $bundle => $info) {\n if (!empty($info['label'])) {\n $options[$bundle] = $info['label'];\n }\n else {\n $options[$bundle] = $bundle;\n }\n }\n\n return $options;\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }" ]
[ "0.7814292", "0.7424124", "0.72127044", "0.70319444", "0.6873059", "0.67700356", "0.65892583", "0.615498", "0.6125429", "0.605545", "0.60269505", "0.6019808", "0.5954503", "0.5900245", "0.5826973", "0.58258647", "0.5781311", "0.57634705", "0.56828266", "0.5678196", "0.5676123", "0.56576926", "0.5585354", "0.557491", "0.55655336", "0.55433446", "0.55387163", "0.5531004", "0.5531004", "0.5518116", "0.5478784", "0.5472778", "0.5457657", "0.5447966", "0.54367423", "0.54314333", "0.5405847", "0.5401239", "0.5381699", "0.5368296", "0.53476876", "0.5335732", "0.530514", "0.5286087", "0.52751136", "0.52622634", "0.5246358", "0.5243646", "0.52352357", "0.5231815", "0.52196825", "0.5213492", "0.5212314", "0.52067435", "0.51985556", "0.51871294", "0.5177317", "0.51720667", "0.51683474", "0.51682615", "0.516788", "0.5161599", "0.51560944", "0.5136998", "0.5129841", "0.5114596", "0.5099929", "0.5099929", "0.5092669", "0.5090388", "0.5086732", "0.50824994", "0.5082241", "0.50777966", "0.50719583", "0.506025", "0.5055168", "0.5053518", "0.50490665", "0.5047628", "0.5045386", "0.5043671", "0.5041803", "0.50361997", "0.50317454", "0.50299144", "0.5029104", "0.5023433", "0.502243", "0.5018265", "0.5009999", "0.5005808", "0.49918723", "0.49856004", "0.49815327", "0.49793792", "0.49770808", "0.4971409", "0.49708655", "0.49708655" ]
0.7471644
1
The entity class this bundle is for
public function entityFor(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEntityClass();", "public function getEntityClass()\n {\n return $this->entityClass; \n }", "public function getEntityClass()\n {\n return $this->entityClass;\n }", "public function getEntityClass() {\n return $this->entityClass;\n }", "public function getEntityClass() {\n return $this->entityClass;\n }", "public function getEntityClass()\n {\n $parts = explode(':', $this->entity);\n return $parts[0] . '\\\\' . 'Entity' . '\\\\' . $parts[1];\n }", "public function getUserEntityClass();", "public function getEntityClassName() {}", "public function getEntity()\n {\n return $this->entityClass;\n }", "abstract protected function getEntityClass();", "public function getEntityClass(): string\n {\n return substr(get_class($this), 0, strlen(self::POSTFIX) * -1);\n }", "public function getEntityClass() : string\n {\n return Image::class;\n }", "public function getEntityClassName();", "public function getEntityClassName()\n {\n return $this->_className;\n }", "protected function getEntityClass(): string\n {\n return Account::class;\n }", "protected function entityName()\n {\n return static::ENTITY_CLASSNAME;\n }", "public function getEntityClassName() {\n\t\treturn $this->entityClassName;\n\t}", "public function getEntityClassName(): string;", "public function getEntityClass()\n {\n return 'GravityCMS\\CoreBundle\\Entity\\FieldNumber';\n }", "public function getEntity(): string\n {\n return ContactEntity::class;\n }", "public function getEntityClass()\n {\n if (!$this->entityClass) {\n $default = Document::class;\n $self = static::class;\n $parts = explode('\\\\', $self);\n\n if ($self === self::class || count($parts) < 3) {\n return $this->entityClass = $default;\n }\n\n $alias = Inflector::singularize(substr(array_pop($parts), 0, -5));\n $name = implode('\\\\', array_slice($parts, 0, -1)) . '\\Document\\\\' . $alias;\n if (!class_exists($name)) {\n return $this->entityClass = $default;\n }\n\n $class = App::className($name, 'Model/Document');\n $this->entityClass = $class;\n }\n\n return $this->entityClass;\n }", "public function getExtendedType()\n {\n return EntityType::class;\n }", "public function getEntityClass(): ?string;", "function getEntityType() {\n return $this->entity_type;\n }", "public function entity()\n {\n return Manager::class;\n }", "public function __construct($entity)\n {\n return get_class($entity);\n }", "public function getEntityClass()\n {\n if ($this->repository instanceof DocumentRepository) {\n return $this->repository->getDocumentName();\n }\n\n return null;\n }", "private function getEntity()\n {\n // obtm o nome da classe\n $classe = constant(get_class($this) . '::TABLENAME');\n return $classe;\n // retorna o nome da classe - \"Record\"\n// return substr($classe , 0 , -6);\n }", "public function getEntityType() {\n return $this->datasource()->getEntityType();\n }", "public function getRoleEntityClass();", "public function getWebhookEntityClass(): string\n {\n return 'ticketActivity';\n }", "public function setEntityClass($entityClass);", "public function getClassName()\n {\n return $this->stubEntityClass;\n }", "public function getEntityType()\n {\n return $this->entity_type;\n }", "public function getEntityType()\n {\n return $this->entity_type;\n }", "protected function getReflectedEntity()\n {\n return new \\ReflectionClass($this->getEntityName());\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getNewEntityClass()\n {\n return new $this->entityClassName();\n }", "public function getEntityType();", "public function entityClass($style = 'bare') {\n\t\tif ($style === 'bare') {\n\t\t\treturn $this->_className;\n\t\t} else {\n\t\t\treturn 'App\\\\Model\\\\Entity\\\\'.$this->_className;\n\t\t}\n\n }", "public function getType(): EntityType;", "public function getEntityName()\n {\n if (!isset($this->entityName)) {\n $class = get_called_class();\n\n $parts = explode('\\\\', $class);\n\n return $this->formatEntityName(array_pop($parts));\n }\n\n return $this->entityName;\n }", "public function getEntityType() {\n return $this->entityType;\n }", "public function getEntityType()\n\t{\n\t\treturn $this->entity_type;\n\t}", "public function getEntityName()\n {\n\n return static::$entityName;\n\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function fetchClass()\n {\n return $this->class;\n }", "public function getEntity()\n {\n return $this->parameters['hipay.entity'];\n }", "public function getEntity() {\n\t\treturn 'Custom Cloud Co.';\n\t}", "public function getClass() {\n return $this->class;\n }", "public function getClass() {\n \treturn $this->_class;\n }", "abstract protected function getEntityType(): string;", "public function entity()\r\n {\r\n return $this->entity;\r\n }", "public function getPersonClassName () { return $this->_entityName; }", "function getClass(){\n\t\treturn $this->_class;\n\t}", "public function getEntity() {\n return $this->entity;\n }", "public function getClassName()\n {\n return $this->getDoctrineRepository()->getClassName();\n }", "public function entity ()\n {\n return $this->_entity;\n }", "public function getClass()\n {\n return $this->_className;\n }", "public function getClass()\n {\n \treturn $this->class;\n }", "protected function getEntityServiceName()\n {\n return $this->getEvent()->getEntityClassName();\n }", "public function getEntityListClass(): string|null\n {\n return $this->getDataItem('entityList');\n }", "public function get_class()\n\t{\n\n\t\t$user = Auth::instance()->get_user(NULL);\n\t\t$company_selected = ORM::factory('EAV_Company', Session::instance()->get('company', NULL));\n\t\t$is_user_eav = ORM::factory('User_Eav', array('class' => $this->class));\n\t\tif ($user AND $user->is_admin() AND ! $company_selected->loaded() AND $is_user_eav->loaded())\n\t\t{\n\t\t\treturn $this->class . '_Default';\n\t\t}\n\t\treturn $this->class;\n\t}", "public function GetEntity(){\n\t\treturn $this->_entity;\n\t}", "public function getEntityTypeId() {\n return $this->entityType->id();\n }", "public function getClass()\n {\n return $this->type;\n }", "public function getClass() {\n\t\t$this->checkDomain();\n\t\treturn $this->domain->class;\n\t}", "public function setEntityClass(?string $entityClass);", "public function get_class()\n {\n return $this->class;\n }", "public function getEntityType(): string\n {\n return $this->entityType;\n }", "public function getClass() {\r\n\t\treturn $this->class;\r\n\t}", "function entity_class($entityTypeKey)\n {\n if ($entityTypeClass = config('app.entity_types')[$entityTypeKey] ?? null) {\n return $entityTypeClass;\n }\n throw new \\Illuminate\\Database\\Eloquent\\ModelNotFoundException();\n }", "public function getClass()\t{\n\t\treturn $this->class;\n\t}", "protected function getEntity() {\n return $this->getContextValue('entity');\n }", "public function getEntityName()\n {\n return 'Auth\\Entity\\Authentication';\n }", "public function getEntity()\r\n {\r\n return $this->entity;\r\n }", "public static function getEntityNamespace(): string\n {\n return 'Extend\\Entity';\n }", "public function getEntity()\n {\n return $this->entity;\n }", "public function getEntity()\n {\n return $this->entity;\n }", "public function getEntity()\n {\n return $this->entity;\n }", "public function getEntity();", "public function getEntity();", "public function getEntity();", "public function getClass() {}", "public function getClass() {}", "public function getClass() {}", "private function createEntityClassParameter()\n {\n $id = $this->getServiceId('class');\n if (!$this->container->hasParameter($id)) {\n $this->container->setParameter($id, $this->options['entity']);\n }\n\n $this->configureInheritanceMapping(\n $this->prefix.'.'.$this->resourceName,\n $this->options['entity'],\n $this->options['repository']\n );\n }", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}" ]
[ "0.80206615", "0.7989663", "0.7847127", "0.78364146", "0.78364146", "0.76291174", "0.7542083", "0.753335", "0.7489239", "0.7348995", "0.7334447", "0.73098826", "0.72972155", "0.729344", "0.7136348", "0.7131462", "0.7117794", "0.7080874", "0.70290124", "0.6986592", "0.69794405", "0.6820346", "0.6788063", "0.67146254", "0.67062515", "0.6677036", "0.66657996", "0.6649691", "0.66199195", "0.66097605", "0.6582709", "0.6479116", "0.64569885", "0.6439127", "0.6439127", "0.64177346", "0.64170337", "0.6391738", "0.635496", "0.63477564", "0.63388366", "0.6324197", "0.63172954", "0.6293689", "0.6287994", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62710285", "0.62682253", "0.6267819", "0.62628025", "0.6257561", "0.62526816", "0.62436205", "0.6238495", "0.62354434", "0.62314737", "0.62287354", "0.6220875", "0.62208575", "0.6209306", "0.61983234", "0.6197589", "0.6194278", "0.6193686", "0.6186314", "0.61683834", "0.6165921", "0.61591053", "0.6154502", "0.6150619", "0.6148354", "0.6145182", "0.6144982", "0.6143437", "0.6141", "0.61311984", "0.6130755", "0.61152923", "0.61119324", "0.61119324", "0.61119324", "0.61074036", "0.61074036", "0.61074036", "0.6099087", "0.6098492", "0.6098492", "0.60916686", "0.6067033", "0.6067033" ]
0.0
-1
All entities that have this bundle
public function entities(): Collection;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function getAllEntities();", "public function findAllEntities();", "public function getEntities();", "public function getEntities();", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function getEntities(): array;", "public static function allBundles(): Collection;", "public function getEntities()\n {\n return $this->entities;\n }", "public function getEntities() {\n return $this->entities;\n }", "public function get_entities();", "public function load()\r\n\t{\r\n\t\t$entities = $this->query($this->entity, $this->relation)->getResults($this->relation);\r\n\t\t\r\n\t\t$this->loaded = true;\r\n\r\n\t\treturn $entities;\r\n\t}", "public function findAll()\n {\n return $this->getEntityRepository()->findAll();\n }", "public function getEntities()\n {\n return $this->_entities;\n }", "public function getEntities()\n\t{\n\t\treturn $this->entities;\n\t}", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "public function getAllEntities(): array\n {\n $entities = [];\n foreach ($this->getAllClassNames() as $className) {\n $entities[] = $this->getEntityMetadata($className);\n }\n return $entities;\n }", "public function getEntities()\n {\n /** @var \\Umc\\Base\\Model\\Core\\Module $module */\n if ($module = $this->_coreRegistry->registry('current_module')) {\n return $module->getEntities();\n }\n return [];\n }", "public function getMappingEntityBundle();", "public function getIdentities()\n {\n }", "public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }", "function getAvailableEntities( Application $app ) {\n\n $entitiesList = array();\n $sql = \"SELECT entity FROM entities WHERE active > 0\";\n $res = $app['db']->fetchAll($sql);\n\n foreach( $res as $v )\n $entitiesList[] = $v['entity'];\n\n return $entitiesList;\n}", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "public function findAll()\n {\n return $this->getRepository()->findAll();\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }", "public function findAllLoaded() {}", "protected function getChildEntities() {\n\n\t\treturn array();\n\t}", "public function getReconstitutedEntities() {}", "function getEntityList()\n\t{\n\t\tif($this->entityList === null)\n\t\t{\n\t\t\t$event = new \\Bitrix\\Main\\Event('main', 'onUserTypeEntityOrmMap');\n\t\t\t$event->send();\n\n\t\t\tforeach($event->getResults() as $eventResult)\n\t\t\t{\n\t\t\t\tif($eventResult->getType() == \\Bitrix\\Main\\EventResult::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$result = $eventResult->getParameters(); // [ENTITY_ID => 'SomeTable']\n\t\t\t\t\tforeach($result as $entityId => $entityClass)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mb_substr($entityClass, 0, 1) !== '\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entityClass = '\\\\' . $entityClass;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->entityList[$entityId] = $entityClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityList;\n\t}", "protected function getEntities()\n {\n if (!$this->entities) {\n // indirectly initializes the entities property\n $this->initializeChoices();\n }\n\n return $this->entities;\n }", "public function getEntitiesOverrides(): array;", "public function myFindAll(): array\n {\n $qb = $this->_em->createQueryBuilder()\n ->select('s')\n ->from($this->_entityName, 's')\n ->innerJoin('s.provider', 'p')\n ->addSelect('p')\n ->innerJoin('p.logos','l')\n ->addSelect('l')\n ->orderBy('s.releaseDate','DESC');\n\n return $qb->getQuery()\n ->getResult();\n }", "public function all()\n {\n return $this->repository->findAll();\n }", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "public function getReferencedEntities();", "public function all()\n {\n return $this->getModel()->all();\n }", "public function getIdentities()\n\t{\n\t\treturn [\\Magento\\Catalog\\Model\\Product::CACHE_TAG];\n\t}", "abstract protected function getEntitiesToSync();", "public function getDependentEntities();", "public function getEntities()\n {\n $st = self::execute(\n 'SELECT id AS `eid`,\n name AS `entityid`,\n revisionNr AS `revisionid`,\n `created`\n FROM `'. $this->getTablePrefix() .'connection`;'\n );\n\n if ($st === false) {\n \\SimpleSAML\\Logger::error('JANUS: Error fetching all entities');\n return false;\n }\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n return $rs;\n }", "public function all()\n {\n return $this->repository->all();\n }", "public function all()\n {\n return $this->repository->all();\n }", "public function getEntityManagers()\n {\n // TODO: Implement getEntityManagers() method.\n }", "public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }", "public function getBundles()\n {\n return $this->bundles;\n }", "public function isAllBundles() {\n return $this->getConfig(\"all_bundles\");\n }", "public function getEntityTypes() {\n return $this->entity_types;\n }", "public function all(): \\app\\domain\\interfaces\\EntityCollection {\n $collection = new \\app\\domain\\interfaces\\EntityCollection;\n \n return $collection;\n }", "public function findAll() {\n }", "function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }", "public function allExtras();", "public function getEntitiesInUse()\n {\n switch ($this->workMode) {\n case \"contributor\":\n return $this->contributorEntities;\n\n case \"production\":\n return $this->productionEntities;\n\n default:\n return null;\n }\n }", "protected function subEntities()\n {\n /* 'default' =>MessageMedia::class\n * ],\n * 'reply_markup' =>[\n * 'replyKeyBoardHide'=>replyKeyboardHide::class,\n * 'replyKeyBoardMarkup'=>replyKeyboardMarkup::class,\n * 'default'=>ReplyMarkup::class,\n * ]\n * 'entities' => [\n * 'messageEntityUnknown'=>messageEntityUnknown::class,\n * 'messageEntityMention'=>messageEntityMention::class,\n * 'default'=>MessageEntity::class,\n * ]\n * 'to_id' => [\n * 'peerUser'=>PeerUser::class,\n * 'peerChat'=>PeerChat::class,\n * 'peerChannel'=>PeerChannel::class,\n * ]\n *\n * ]\n *\n *\n * */\n return [];\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "abstract protected function getEntityClassNames();", "public function all()\n {\n return parent::all();\n }", "public function entity() {\n\t\t$assoc = ($this->association) ? $this->association : $this->model;\n\t\tif (!empty($this->entityPath)) {\n\t\t\t$path = explode('.', $this->entityPath);\n\t\t\t$count = count($path);\n\t\t\tif ($count !== 3) {\n\t\t\t\treturn parent::entity();\n\t\t\t}\n\t\t\treturn Set::filter($path);\n\t\t}\n\t\treturn parent::entity();\n\t}", "public function getAll()\n {\n return $this->findAll();\n }", "public function getList()\n {\n return array('entities' => $this->entities);\n }", "public function getAll()\n\t{\n\t\treturn $this->getMyRepository()->findAll();\n\t}", "public function tags()\n {\n return $this->morphedByMany(Tag::class, 'bundleable');\n }", "protected function _getFilterEntityIds()\n {\n return $this->getLayer()->getProductCollection()->getAllIdsCache();\n }", "public function getAll()\n {\n return iterator_to_array($this->repository->findAll());\n }", "public function getAvailableBundles() {\n $options = [];\n $entityTypes = $this->getSupportedEntityTypes();\n\n foreach ($entityTypes as $entityType => $entityLabel) {\n $options[$entityLabel][$entityType] = \"$entityLabel (Default)\";\n\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entityType);\n\n foreach ($bundles as $bundleId => $bundleData) {\n $defaultsId = $entityType . '__' . $bundleId;\n $options[$entityLabel][$defaultsId] = $bundleData['label'];\n }\n }\n\n return $options;\n }", "public function getAll() {\n\t\t\n\t\t$entities = array();\n\t\t$rows = $this->fetchAll();\n\t\tforeach($rows as $row) {\n\t\t\t$entities[] = new UserEntity($row);\n\t\t}\n\t\treturn $entities;\n\t\t\n\t}", "public function getAll(){\n //old : \n // $events = $this->events;\n // return $events;\n $repo = $this->om->getRepository(Event::class); \n return $repo->findAll();\n }", "public function all()\n {\n return $this->model->get();\n }", "private static function discoverEntity()\n {\n Structure::indexEntity(static::class);\n }", "public function findAll() {\n\t\treturn $this->createQuery()->execute();\n\t}", "public function retrieve()\n {\n return $this->getRepository()->findAll();\n }", "public static function getAll() : array {\n return self::$objects;\n }", "public function findAll()\n {\n\n return $this->createQueryBuilder('p')\n ->select('p')\n ->getQuery()\n ->getResult()\n ;\n }", "public function findAll()\n {\n return $this->createQuery()->execute();\n }", "public function alls()\r\n {\r\n $all = ShopCatalog::find()\r\n ->where([\r\n 'id' => 12355\r\n ])\r\n ->asArray()\r\n ->all();\r\n\r\n vd($all);\r\n }", "public function all()\n {\n return $this->model->get();\n }", "public function findAll()\r\n {\r\n }", "public function findAll()\n {\n return $this->findBy(array());\n }", "public function findAll()\n {\n $sql = \"SELECT rowid, * FROM USER\";\n $result = $this->getDb()->fetchAll($sql);\n $entities = array();\n foreach ($result as $row) {\n $id = $row['rowid'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }", "public function registerBundles()\n {\n return $this->getBundleInstances(\n $this,\n $this->bundlesToLoad\n );\n }", "public function findEntityByNameAll($q){\r\n\t\t$this->recursive = 0;\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' AND Entity.active = '1'\");\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\t*/\r\n\t\treturn $entities;\r\n\t}", "public function getAllList(){\n $collection = new Db\\Collection($this->getProductTable());\n return $collection->load();\n }", "public function get_entities()\n\t{\t\n\t\t$query = $this->db->get('entity_types');\n\t\treturn $query->result_array();\n\t}", "public function testFetchEntities() {\n\t\t// find('all') with entitiy => true.\n\t\t$result = $this->Post->entities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\n\t\t// 2. allEntities is alias for entities.\n\n\t\t$result = $this->Post->allEntities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\t}", "public function getIdentities()\n {\n return [\\Algolia\\AlgoliaSearch\\Model\\LandingPage::CACHE_TAG . '_' . $this->getPage()->getId()];\n }", "public function encontrarTodos() {\n return $this->getEntityManager()->getRepository($this->getEntity())->findAll();\n }", "public function all()\n {\n return $this->service->all();\n }", "public function findAllActive() {}", "public function find_all()\n {\n\n return parent::find_all();\n }", "public function referencedEntities();", "public function hasEntitiesList()\n {\n return $this->Entities !== null;\n }", "public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}", "public function indexActionEntities() {\n return [];\n }", "public function tEntities()\n {\n return $this->hasMany(TEntity::class, 'sprachstil_id');\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function entities()\n {\n return $this->belongsToMany('App\\Entity')->withTimestamps();\n }", "public function getAll() {}" ]
[ "0.73310024", "0.7017945", "0.68710697", "0.6788393", "0.6788393", "0.66760916", "0.6594431", "0.65435404", "0.6517737", "0.64955944", "0.647714", "0.64494205", "0.64123815", "0.6343859", "0.63170236", "0.62991434", "0.6236171", "0.6174518", "0.61400235", "0.61255884", "0.61109716", "0.6101942", "0.608444", "0.608444", "0.608444", "0.6052751", "0.604712", "0.6034288", "0.5993488", "0.59930223", "0.5971246", "0.5948844", "0.5931577", "0.5920427", "0.5909476", "0.5896127", "0.58357525", "0.5822278", "0.58132976", "0.5804145", "0.5782424", "0.57769746", "0.57769746", "0.5762457", "0.5758501", "0.5755092", "0.57509", "0.5749982", "0.5741998", "0.57418627", "0.5728383", "0.5714312", "0.5712009", "0.5699074", "0.5694351", "0.5694351", "0.5694351", "0.5694351", "0.56879485", "0.5667601", "0.5651401", "0.5651048", "0.5650818", "0.5640925", "0.563943", "0.5637134", "0.5628928", "0.56281084", "0.5617127", "0.5616639", "0.561619", "0.56033796", "0.5602632", "0.5598654", "0.55981404", "0.5596777", "0.5596019", "0.5591156", "0.5587964", "0.5583798", "0.5579943", "0.55771554", "0.55745703", "0.556798", "0.55627173", "0.5559616", "0.55505395", "0.5549664", "0.55348754", "0.5530861", "0.5527906", "0.5526388", "0.55262995", "0.5524967", "0.5522077", "0.55149317", "0.55144656", "0.5514141", "0.5511601", "0.55092686" ]
0.62814605
16
Get the layout class for this bundle
public function fieldLayout(): FieldLayout;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLayout()\n\t{\n\t\t$name = $this->Layout ? $this->Layout : 'Product_Layout_Standard';\n\t\treturn new $name();\n\t}", "abstract public function getLayoutTemplateClassName();", "function publisher_get_header_layout_class() {\n\n\t\tstatic $class;\n\n\t\tif ( isset( $class ) ) {\n\t\t\treturn $class;\n\t\t}\n\n\t\t$class = '';\n\t\t$layout = publisher_get_header_layout();\n\n\t\t$class_map = array(\n\t\t\t'boxed' => 'boxed',\n\t\t\t'full-width' => 'full-width',\n\t\t\t'stretched' => 'full-width stretched',\n\t\t\t'out-full-width' => 'full-width',\n\t\t\t'out-stretched' => 'full-width stretched',\n\t\t);\n\n\t\tif ( isset( $class_map[ $layout ] ) ) {\n\n\t\t\t$class = $class_map[ $layout ];\n\t\t}\n\n\t\treturn $class;\n\t}", "public function getLayout();", "public function getLayoutClass() {\n return ($this->layout == 'Vertical' ? 'form-vertical' : '');\n }", "public function getLayout() {}", "public function getLayout() {\n if (!isset($this->layout)) {\n $this->layout = $this->layoutManager->createInstance($this->configuration['layout'], $this->configuration['layout_settings']);\n }\n return $this->layout;\n }", "public static function getLayout()\n {\n return self::$layout;\n }", "protected function getLayout() {\n\t\treturn $this->getFrontcontroller()->getResource('layout');\n\t}", "public function getThemeLayout();", "public function getLayout()\n {\n if ($this->layout === null) {\n if (isset($this->cfg['logging.appender.' . $this->name . '.layout'])) {\n $layoutClass = $this->cfg['logging.appender.' . $this->name . '.layout'];\n } else {\n $layoutClass = 'Logger_Layout_Pattern';\n }\n\n loadClass($layoutClass);\n $this->layout = new $layoutClass($this->name, $this->cfg);\n }\n\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout()\n {\n return $this->layout;\n }", "public function getLayout() {\n\n return $this->asset_array['default']['layout']['name'];\n }", "protected function getLayout()\n {\n return $this->layout;\n }", "protected function getLayout()\n {\n return $this->layout;\n }", "public function getLayout(){\n return $this->_layout;\n }", "public function getLayout(){\n\n return $this->layout;\n\n }", "public function getLayout() {\n return $this->_layout;\n }", "public function getLayout() {\n\t\treturn $this->layout;\n\t}", "public function getLayout()\n {\n if ($this->__layout) {\n return $this->__layout;\n }\n\n $this->__layout = new ViewEntity();\n\n $layoutName = 'layout/layout';\n $layoutPath = $this->__defaultScriptPath;\n\n $yaceConfig = $this->__config->get('yace');\n if ($yaceConfig) {\n // Check layout_name configuration\n $test = $yaceConfig->get('layout_name');\n if (!$test) {\n $layoutName = $test;\n }\n\n // Check layout path configuration\n $test = $yaceConfig->get('layout_path');\n if (!$test) {\n $layoutPath = $test;\n }\n }\n\n $this->__layout->setViewName($layoutName)\n ->setScriptPath($layoutPath);\n\n return $this->__layout;\n }", "public function getLayout(): string;", "public function layout() {\n return $this->layout;\n }", "public function getName()\n\t{\n\t\treturn 'layout';\n\t}", "public function layout()\n {\n return $this->layout;\n }", "public function getLayoutController() {\n\n return $this->asset_array['default']['layout']['controller'];\n }", "private function getLayoutTemplate()\n\t{\n\t\tif ($this->layoutTemplate === null) {\n\n\t\t\t$class = $this->getLayoutTemplateClassName();\n\t\t\t$template = new $class;\n\n\t\t\t$this->layoutTemplate = $template;\n\t\t}\n\n\t\treturn $this->layoutTemplate;\n\t}", "public function getLayout() {\n\t\treturn $this->_layout;\n\t}", "function ju_layout() {return ju_o(ILayout::class);}", "public function getLayout()\n\t{\n\t\treturn $this->_layout;\n\t}", "public static function renderLayout()\n {\n return self::$layout;\n }", "function getMenuClass()\n {\n // Get the configured layout class\n $classname = atkMenu::layoutToClass(atkconfig(\"menu_layout\"));\n atkdebug(\"Configured menu layout class: $classname\");\n\n // Check if the class is compatible with the current theme, if not use a compatible menu.\n $theme = &atkinstance(\"atk.ui.atktheme\");\n $compatiblemenus = $theme->getAttribute('compatible_menus');\n // If this attribute exists then retreive them\n if(is_array($compatiblemenus))\n {\n for($i=0,$_i=count($compatiblemenus); $i<$_i; $i++)\n $compatiblemenus[$i] = atkMenu::layoutToClass($compatiblemenus[$i]);\n }\n\n if (!empty($compatiblemenus) && is_array($compatiblemenus) && !in_array($classname, $compatiblemenus))\n {\n $classname = $compatiblemenus[0];\n atkdebug(\"Falling back to menu layout class: $classname\");\n }\n\n // Return the layout class name\n return $classname;\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "public function getLayout()\n {\n return 'layouts/layout-full-width.tpl';\n }", "public function getLayout()\n\t{\n\t\tif(is_null($this->layout))\n\t\t{\n\t\t\t$this->setLayout($this->getDefaultLayout());\n\t\t}\n\n\t\treturn $this->layout;\n\t}", "public function getLayout()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\treturn $input->getCmd('tmpl') ? $input->getCmd('tmpl') : $this->getParam('mainlayout', 'default');\n\t}", "protected function getLayout()\n {\n $layout = new Zend_Layout(dirname(__FILE__));\n $layout->setLayout('log-email');\n return $layout;\n }", "public function getLayoutTemplate()\n {\n return $this->layoutTemplate;\n }", "function getLayout() {return $this->readLayout();}", "public function getLayout() {\n \t\n \t// Return the current layout\n \treturn $this->sLayout;\n }", "public function getLayout() {\n\t\treturn isset($this->cache->layout) ? $this->cache->layout : 'warnfight';\n\t}", "function get_widget_layout_class( $widget = NULL ){\n\n\t\t\tif( NULL == $widget ) return;\n\n\t\t\t// Setup the layout class for boxed/full width/full screen\n\t\t\tif( 'layout-boxed' == $this->check_and_return( $widget , 'design' , 'layout' ) ) {\n\t\t\t\t$layout_class = 'container';\n\t\t\t} elseif('layout-full-screen' == $this->check_and_return( $widget , 'design' , 'layout' ) ) {\n\t\t\t\t$layout_class = 'full-screen';\n\t\t\t} elseif( 'layout-full-width' == $this->check_and_return( $widget , 'design' , 'layout' ) ) {\n\t\t\t\t$layout_class = 'full-width';\n\t\t\t} else {\n\t\t\t\t$layout_class = '';\n\t\t\t}\n\n\t\t\treturn $layout_class;\n\t\t}", "public function getThemeLayout()\n {\n return $this->theme_layout;\n }", "public function getViewLayout()\n {\n if(isset($_GET['debug'])) $this->debug();\n\n switch (true) {\n case isset($this->items):\n return 'man_toc';\n case isset($this->methods):\n return 'man_group';\n default:\n return 'man_single';\n }\n }", "public static function getLayout()\r\n {\r\n if (!isset(static::$_layout[static::layoutName()])) {\r\n $connection = static::getDb();\r\n static::$_layout[static::layoutName()] = $connection->getLayout(static::layoutName());\r\n }\r\n return static::$_layout[static::layoutName()];\r\n }", "public function getLayoutName()\n {\n return $this->layout;\n }", "public function get_layout() {\n return 'admin';\n }", "public function getRenderClass() {\n\t\treturn $this->getBehavior()->renderClass;\n\t}", "public static function getTemplateLayout()\n {\n return self::$templateLayout;\n }", "function zeen_get_article_layout_class( $pid = '', $args = '' ) {\n\n\t$builder = get_post_meta( $pid, 'tipi_builder_active', true );\n\n\tif ( ! empty( $builder ) ) {\n\t\treturn '';\n\t}\n\t$output = '';\n\t$layout = zeen_get_article_layout( $pid, $args );\n\n\t$list = get_post_meta( $pid, 'zeen_list', true );\n\tif ( $layout < 30 ) {\n\t\t$output = 'sidebar-on';\n\t\tif ( $layout < 10 ) {\n\t\t\t$output .= ' sidebar-right';\n\n\t\t} else {\n\t\t\t$output .= ' sidebar-left';\n\t\t}\n\t} elseif ( $layout < 50 ) {\n\t\t$output = 'sidebar-off';\n\t\tif ( 36 == $layout && 'on' != $list ) {\n\t\t\t$output .= ' align-pull align-fade-up align-fs align-fs-center';\n\t\t}\n\t} else {\n\t\t$output = 'sidebar-off-wide';\n\t\tif ( 55 == $layout && 'on' != $list ) {\n\t\t\t$output .= ' align-fs';\n\t\t}\n\t\tif ( $layout > 57 ) {\n\t\t\t$output .= ' compact-content-imgs';\n\t\t}\n\t}\n\n\tif ( 2 == $layout || 12 == $layout || 32 == $layout ) {\n\t\t$output .= ' layout-side-info';\n\t}\n\n\treturn $output;\n\n}", "public static function getLayout($agentName)\n {\n // Determine classname\n $className = Autoloader::concatClassNames($agentName, 'Agent');\n \n // Check property\n if(isset($className::$layout)) {\n return $className::$layout;\n }\n\n\n return null;\n }", "public function getName()\r\n\t{\r\n\t\treturn 'oxygen_framework_twig_layout';\r\n\t}", "public function getLayoutType(): LayoutTypeInterface;", "public function getLayout(){\n $layout = $this->getAttribute('layout');\n\n $initLayout = $this->initLayout();\n\n if(!$layout){ // layout hasn't been initialized?\n $layout = $initLayout;\n $this->layout = json_encode($layout);\n $this->update(array('layout'));\n }else{\n $layout = json_decode($layout, true); // json to associative array\n if (!is_array ($layout)) $layout = array ();\n\n $this->addRemoveLayoutElements('left', $layout, $initLayout);\n $this->addRemoveLayoutElements('right', $layout, $initLayout);\n }\n\n return $layout;\n }", "function getLayout($id){\r\n \r\n $transform = ucfirst(str_replace('-', \"_\", $id));\r\n $layout_name = \"\\\\LK\\PXEdit\\\\Layouts\\\\\" . $transform;\r\n \r\n // Force an Autoload\r\n \\PXEdit_Autoload($layout_name);\r\n \r\n if(!class_exists($layout_name)){\r\n $this ->sendError('Layout ' . $layout_name . \" is not existing.\");\r\n } \r\n \r\n $layout = new $layout_name();\r\n return $layout;\r\n }", "function layoutToClass($layout)\n {\n // Check if the menu config is one of the default atk menus (deprecated)\n if (in_array($layout, array(\"plain\",\"frames\",\"outlook\",\"dhtml\",\"modern\",\"cook\",\"dropdown\")))\n {\n $classname = \"atk.menu.atk\".$layout.\"menu\";\n }\n\n // Application root menu directory (deprecated)\n elseif (strpos($layout, '.') === FALSE)\n {\n $classname = \"menu.\".$layout;\n }\n\n // Full class name with packages.\n else\n {\n $classname = $layout;\n }\n return $classname;\n }", "protected function _getModel()\n {\n require APPLICATION_PATH . '/modules/admin/models/Layout.php';\n\t\tif ($this->_layoutModel == null) \n\t\t{ \n $this->_layoutModel = new Layout();\n }\n return $this->_layoutModel; \n }", "public function getLayouts();", "public function getViewHelperClassName() {}", "private function __layoutContent()\n {\n return VIEWS . DS . 'Layout' . DS . 'base.php';\n }", "public function getObject()\n\t{\n\t\t$application = \\Trinity\\Basement\\Application::getApplication();\n\t\t$broker = $this->_serviceLocator->get('web.Broker');\n\t\t$layout = new Template_Layout($application);\n\t\t$layout->setLayout($this->layout);\n\n\t\t// TODO: Replace with something more clever.\n\t\t$response = $broker->getResponse();\n\t\t$response->setHeader('Content-type', 'text/html;charset=utf-8');\n\n\t\treturn $layout;\n\t}", "public function get_layout_id()\n\t{\n\t\treturn $this->_layout_id;\n\t}", "public function getBoardLayout()\r\n {\r\n return $this->board->getLayout();\r\n }", "public function getCodeClassParent()\n {\n return '\\Main\\Template\\Code\\LayoutCode';\n }", "public function getLayoutCache(){\n\t\tif(isset(self::$_cacheLayout[get_class($this)])){\n\t\t\treturn self::$_cacheLayout[get_class($this)];\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function _getView ()\n {\n if (null === $this->_view) {\n $this->_view = Zend_Layout::startMvc()->getView();\n }\n return $this->_view;\n }", "public function getLayoutName()\n\t{\n\t\treturn $this->layout_name;\n\t}", "public function getLayoutPath()\n {\n if ($this->_layoutPath === null) {\n $this->_layoutPath = realpath($this->getBasePath() . DIRECTORY_SEPARATOR . 'layouts');\n }\n return $this->_layoutPath;\n }", "protected function getViewClass()\n {\n return View::class;\n }", "protected function getViewTemplate(): string\n {\n return 'baseAdmin::site.blockLayouts._pageArea';\n }", "public function getThemeLayouts();", "protected function resourceClass()\n {\n return Str::studly($this->viewsName());\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function getLayoutLoginTemplate()\n {\n return $this->layoutLoginTemplate;\n }", "public function getComponentClass()\n {\n return $this->_componentClass;\n }", "public function getTemplate()\n {\n if ($this->getConfigData('mobile_optimized')) {\n return self::MOBILE_LAYOUT_TEMPLATE;\n } else {\n return self::LAYOUT_TEMPLATE;\n }\n }", "private function view()\n {\n if (isset(static::$view)) {\n return static::$view;\n }\n\n $classNamespace = $this->getModuleName();\n $className = $this->getComponentName();\n\n return \"{$classNamespace}::blocks.{$className}\";\n }", "public function getLayoutDirectory()\n\t{\n\t\treturn ORION_APP_DIR . '/' . strtolower($this->application->getName()) . '/layouts';\n\t}", "public function GetViewClass ();", "public function getWidgetViewHelperClassName() {}", "public static function get_layout() {\n\t\tglobal $post;\n\n\t\tif(!defined('WPV_LAYOUT_TYPE')) {\n\t\t\tif(wpv_has_woocommerce()) {\n\t\t\t\t$id_override = is_single() ? $post->ID : (woocommerce_get_page_id( 'shop' ) ? woocommerce_get_page_id( 'shop' ) : null);\n\t\t\t\tif(is_shop() || is_product_category() || is_product_tag()) {\n\t\t\t\t\tdefine('WPV_LAYOUT_TYPE', wpv_post_meta_default('layout-type', 'default-body-layout', $id_override));\n\t\t\t\t\treturn WPV_LAYOUT_TYPE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(WpvFancyPortfolio::has('page') || is_404() || is_page_template('page-blank.php')) {\n\t\t\t\tdefine('WPV_LAYOUT_TYPE', 'full');\n\t\t\t\tdefine('WPV_LAYOUT', 'no-sidebars');\n\t\t\t\treturn WPV_LAYOUT_TYPE;\n\t\t\t}\n\n\t\t\t$layout_type = '';\n\t\t\tif(is_singular(array('page', 'post', 'portfolio', 'product', 'wpv_sermon', 'tribe_events')) || (wpv_has_woocommerce() && is_woocommerce())) {\n\t\t\t\t$layout_type = wpv_post_meta_default('layout-type', 'default-body-layout');\n\t\t\t} else {\n\t\t\t\t$layout_type = wpv_get_option('default-body-layout');\n\t\t\t}\n\n\t\t\tif(empty($layout_type)) {\n\t\t\t\t$layout_type = 'full';\n\t\t\t}\n\n\t\t\tdefine('WPV_LAYOUT_TYPE', $layout_type);\n\n\t\t\tswitch($layout_type) {\n\t\t\t\tcase 'left-only':\n\t\t\t\t\tdefine('WPV_LAYOUT', 'left-sidebar');\n\t\t\t\tbreak;\n\t\t\t\tcase 'right-only':\n\t\t\t\t\tdefine('WPV_LAYOUT', 'right-sidebar');\n\t\t\t\tbreak;\n\t\t\t\tcase 'left-right':\n\t\t\t\t\tdefine('WPV_LAYOUT', 'two-sidebars');\n\t\t\t\tbreak;\n\t\t\t\tcase 'full':\n\t\t\t\t\tdefine('WPV_LAYOUT', 'no-sidebars');\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $layout_type;\n\t\t}\n\n\t\treturn WPV_LAYOUT_TYPE;\n\t}", "public function getViewClassNameForViewBuilder()\n {\n list($plugin, $theme) = namespaceSplit(get_class($this));\n $plugin = preg_replace('/\\\\\\/', '/', $plugin);\n return $plugin . '.' . $theme;\n }", "public static function instance()\n {\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof NF_Layouts ) ) {\n self::$instance = new NF_Layouts();\n self::$dir = plugin_dir_path(__FILE__);\n self::$url = plugin_dir_url(__FILE__);\n spl_autoload_register( array( self::$instance, 'autoloader' ) );\n }\n return self::$instance;\n }", "public function getTemplateClass();", "public static function MasterLayout()\n \t{\n \t\treturn self::$_master;\n \t}", "public function getLayoutXmlString() {\n return $this->_layoutXml;\n }", "public function get_class()\n {\n return $this->class;\n }", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "protected function getClientClassName()\n\t{\n\t\treturn 'Prado.WebUI.THtmlArea5';\n\t}", "function publisher_get_header_layout() {\n\n\t\t// Return from cache\n\t\tif ( publisher_get_global( 'header-layout' ) ) {\n\t\t\treturn publisher_get_global( 'header-layout' );\n\t\t}\n\n\t\t$layout = 'default';\n\n\t\tif ( publisher_is_valid_tax() ) {\n\t\t\t$layout = bf_get_term_meta( 'header_layout' );\n\t\t} elseif ( publisher_is_valid_cpt() ) {\n\n\n\t\t\t$layout = bf_get_post_meta( 'header_layout' );\n\t\t\t// default -> Retrieve from parent category\n\t\t\tif ( $layout === 'default' ) {\n\n\t\t\t\t$main_term = publisher_get_post_primary_cat();\n\n\t\t\t\tif ( ! is_wp_error( $main_term ) && is_object( $main_term ) && bf_get_term_meta( 'override_in_posts', $main_term ) ) {\n\t\t\t\t\t$layout = bf_get_term_meta( 'header_layout', $main_term );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $layout === 'default' ) {\n\t\t\t$layout = publisher_get_option( 'header_layout' );\n\t\t}\n\n\t\t// Cache\n\t\tpublisher_set_global( 'header-layout', $layout );\n\n\t\treturn $layout;\n\n\t}", "public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }", "protected function resolveViewClassName(): string\n {\n return $this->configurationService->getConfigByPath('Signature', 'Mvc.View.DefaultViewClassname');\n }", "public function theme_layout( $layout ) {\n\t\tif ( is_module( 'users' ) ) {\n\t\t\t$layout = 'clean';\n\t\t}\n\t\t// In case of admin area.\n\t\telseif ( is_controller( 'admin' ) ) {\n\t\t\treturn 'admin';\n\t\t}\n\n\t\treturn $layout;\n\t}", "function the_layout(string $layout)\n {\n return app('armin.layout')->layout($layout);\n }" ]
[ "0.70202655", "0.6969067", "0.6930699", "0.6892897", "0.6885734", "0.68760455", "0.686644", "0.6783848", "0.6735523", "0.67191786", "0.6681724", "0.66416353", "0.66416353", "0.66416353", "0.6638315", "0.6634715", "0.6634715", "0.6617936", "0.65777045", "0.65467197", "0.6545588", "0.65413904", "0.65322596", "0.6510096", "0.650636", "0.65002453", "0.6495276", "0.64938146", "0.64774346", "0.6472007", "0.6464718", "0.644255", "0.6395196", "0.63911074", "0.63911074", "0.63911074", "0.63911074", "0.63911074", "0.63911074", "0.6361052", "0.63563603", "0.6350945", "0.6343219", "0.633382", "0.6322204", "0.62773114", "0.6263073", "0.62629545", "0.6255867", "0.623447", "0.6204642", "0.61874586", "0.6156582", "0.60761726", "0.6038909", "0.6033638", "0.6004992", "0.5996216", "0.59699357", "0.5925884", "0.59081584", "0.5875837", "0.5857329", "0.58520055", "0.584189", "0.5817393", "0.5760188", "0.5758075", "0.5749279", "0.57427883", "0.57395273", "0.5732033", "0.5720006", "0.5716256", "0.5716102", "0.5715518", "0.5692965", "0.5688227", "0.5684331", "0.5670472", "0.5669111", "0.5653041", "0.564383", "0.5618717", "0.5613651", "0.5589063", "0.5562446", "0.5556253", "0.5554801", "0.55454427", "0.554396", "0.5530804", "0.5530062", "0.55203235", "0.5515215", "0.55064577", "0.5501524", "0.54962224", "0.5495507", "0.549498", "0.5492078" ]
0.0
-1
Get the field display class for this bundle
public function fieldDisplay(): FieldDisplay;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDisplayField()\n {\n if ($this->_displayField === null) {\n $primary = (array)$this->getPrimaryKey();\n $this->_displayField = array_shift($primary);\n\n $schema = $this->getSchema();\n if ($schema->getColumn('title')) {\n $this->_displayField = 'title';\n }\n if ($schema->getColumn('name')) {\n $this->_displayField = 'name';\n }\n }\n\n return $this->_displayField;\n }", "public function getDetailFieldsClass()\n {\n return ViewTools::singleton()->array2att($this->owner->getDetailFieldsClassNames());\n }", "public function getType()\n {\n return 'field.type.number.display.number';\n }", "public function displayType(): object\n {\n return $this->displayType;\n }", "public function getDisplayField()\n {\n foreach(['title', 'name'] as $attribute) {\n if ($this->hasAttribute($attribute)) {\n return $this->getAttribute($attribute);\n }\n }\n\n $pk = $this->getPrimaryKey();\n if (is_array($pk))\n {\n $pk = print_r($pk, true);\n }\n\n\n return \"No title for \" . get_class($this) . \"($pk)\";\n }", "public function getJavaScriptClass()\n {\n return 'Field';\n }", "public function showAsField() {\n return $this->configuration['show_as_field'];\n }", "public function get_display_type( $property ) {\n\n\t\t\t// Base Fields\n\t\t\tif ( $this->is_base_field( $property ) ) {\n\t\t\t\tswitch ( $property ) {\n\t\t\t\t\tcase 'image':\n\t\t\t\t\t\treturn 'image';\n\t\t\t\t\tcase 'private':\n\t\t\t\t\t\treturn 'checkbox';\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t// Extended Data\n\t\t\t} else {\n\t\t\t\treturn $this->slplus->database->extension->get_option( $property, 'display_type' );\n\t\t\t}\n\t\t}", "public function getDisplayTypeName()\n {\n $type = static::TYPE;\n\n if ($this instanceof StructureItem) {\n $type = $this->structure->getStructureName();\n }\n\n if ($this->isArray) {\n return $type . '[]';\n }\n\n if ($this->isFixedValues) {\n return '{' . implode(', ', $this->validValues) . '}';\n }\n\n return $type;\n }", "protected function getClassField() {}", "private function getFieldTypeName(FormBuilder $field)\n {\n return get_class($field->getType()->getInnerType());\n }", "public function getFormatClass() {\n\t\t$formatClasses = array(\n\t\t\t'list' => 'CargoListFormat',\n\t\t\t'ul' => 'CargoULFormat',\n\t\t\t'ol' => 'CargoOLFormat',\n\t\t\t'template' => 'CargoTemplateFormat',\n\t\t\t'embedded' => 'CargoEmbeddedFormat',\n\t\t\t'csv' => 'CargoCSVFormat',\n\t\t\t'json' => 'CargoJSONFormat',\n\t\t\t'outline' => 'CargoOutlineFormat',\n\t\t\t'tree' => 'CargoTreeFormat',\n\t\t\t'table' => 'CargoTableFormat',\n\t\t\t'dynamic table' => 'CargoDynamicTableFormat',\n\t\t\t'googlemaps' => 'CargoGoogleMapsFormat',\n\t\t\t'openlayers' => 'CargoOpenLayersFormat',\n\t\t\t'calendar' => 'CargoCalendarFormat',\n\t\t\t'timeline' => 'CargoTimelineFormat',\n\t\t\t'category' => 'CargoCategoryFormat',\n\t\t\t'bar chart' => 'CargoBarChartFormat',\n\t\t);\n\n\t\tif ( array_key_exists( $this->mFormat, $formatClasses ) ) {\n\t\t\treturn $formatClasses[$this->mFormat];\n\t\t}\n\n\t\t$formatClass = null;\n\t\twfRunHooks( 'CargoGetFormatClass', array( $this->mFormat, &$formatClass ) );\n\t\tif ( $formatClass != null ) {\n\t\t\treturn $formatClass;\n\t\t}\n\n\t\tif ( count( $this->mFieldDescriptions ) > 1 ) {\n\t\t\t$format = 'table';\n\t\t} else {\n\t\t\t$format = 'list';\n\t\t}\n\t\treturn $formatClasses[$format];\n\t}", "public function getClassLabel()\n {\n if(is_object($this->_model_class)) {\n $class = $this->_model_class->className();\n return $class::getModelLabel();\n } else {\n return NULL;\n }\n }", "public function get_display_fields() {\n return $this->displayable_fields;\n }", "public function __getClassName($type){\n\t\t\treturn 'field' . $type;\n\t\t}", "public function fieldView()\n {\n return $this->fieldType->viewPath();\n }", "function getFieldType() {\n\t\treturn 'contact_field';\n\t}", "function getFieldType() {\n\t\treturn 'field';\n\t}", "public function getName()\n {\n return 'field_widget';\n }", "public static function getDecoratedClass()\n {\n return DChildObjectsField::class;\n }", "public static function displayFieldName($field, $class = __CLASS__, $htmlentities = true, JeproshopContext $context = null)\n {\n }", "public function getName()\n {\n return 'user_form_type';\n }", "protected static function getConverterDisplayName()\n {\n // https://stackoverflow.com/questions/19901850/how-do-i-get-an-objects-unqualified-short-class-name/25308464\n return substr(strrchr('\\\\' . static::class, '\\\\'), 1);\n }", "public function getClass()\n {\n return $this->type;\n }", "function get_display_name() {\n\n $classname = get_class($this);\n $folder_name = 'rlreport_' . substr($classname, 0, strlen($classname) - strlen('_report'));\n\n //use the displayname string from the specific report instance\n return get_string('displayname', $folder_name);\n }", "public function getClass() {\n\n return 'admin-' . $this::NAME;\n }", "public function getDisplayNameSourceField(): string\n {\n switch ($this->getDisplayNameSourceFieldConf()) {\n case self::INHERIT:\n $type = $this->Type();\n // ID check to prevent infinite recursion since type returns itself as its type\n if ($type && $type->exists() && $type->ID !== $this->ID) {\n return $type->getDisplayNameSourceField();\n }\n\n return 'Title';\n case self::SINGULAR:\n return 'Title';\n case self::PLURAL:\n return 'TitlePlural';\n case self::CUSTOM:\n return 'TitleCustom';\n default:\n return 'Title';\n }\n }", "function GetDisplayNameField($table = \"\")\n{\n\tglobal $cDisplayNameField;\n\treturn $cDisplayNameField;\n}", "private function contentField()\n {\n $field = $this->owner->config()->get('content_field');\n return $field ? $field : 'Content';\n }", "public function display_name() {\r\n\t$class = __CLASS__;\r\n\treturn $class::_object()->display_name;\r\n }", "public function getName()\n {\n return 'translatable_field';\n }", "public function display_name() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn $class::_object()->display_name;\r\n }", "public function getDisplayLabel();", "public function get_display() {\n return $this->view->display_handler;\n }", "function inheritance_field() {\n\t\treturn $this->inheritance_field;\n\t}", "public abstract function getFieldConverterClass();", "public function getFieldType()\n {\n return $this->fieldType;\n }", "public function getFieldType()\n {\n return $this->fieldType;\n }", "public function getFormClassToExtend() {\n return null === ($model = $this->getParentModel()) ? 'BaseFormFilterDoctrine' : sprintf('%sFormFilter', $model);\n }", "public function get_field_name();", "function get_field_label($field_instance) {\n return $field_instance['label'];\n }", "public function get_type_label() {\n\t\t$strings = astoundify_contentimporter_get_string( $this->get_type(), 'type_labels' );\n\t\treturn esc_attr( $strings[0] );\n\t}", "public function getFieldType(){\n \treturn $this->field_type;\n }", "public function getType() {\n return $this->field->type;\n }", "public function getDescriptionField() {\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\tif ($field->getIsSummary() && in_array(get_class($field),array( \"ItemFieldText\",\"ItemFieldHTML\"))) return $field;\n\t\t}\n\t}", "public function getType()\n {\n return $this->i18n_singular_name();\n }", "public static function __getClassName($type)\n {\n return 'field' . $type;\n }", "public function displayType(): string\n {\n return self::DISPLAY_INLINE;\n }", "public function getFieldColClass() {\n return \"col-sm-\" . ($this->layout == 'Vertical' ? 12 : 12 - $this->labelWidth);\n }", "public function get_field_type() {\n\t\treturn $this->get_field_attr( 'type' );\n\t}", "protected function getFormClass() : string\n {\n return 'XLite\\Module\\PureClarity\\Personalization\\View\\Form\\Admin\\Dashboard\\Signup';\n }", "public function displayType(): string\n {\n return parent::DISPLAY_BLOCK;\n }", "public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}", "private function getFieldItemClass($fieldType) {\n $type_definition = $this->typedDataManager\n ->getDefinition('field_item:' . $fieldType);\n return $type_definition['class'];\n }", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public function getDisplayFields(){\n\t\tif(is_array($this->display_fields) && sizeof($this->display_fields) > 0){\n\t\t\t$Fields = array();\n\t\t\tforeach($this->display_fields as $field_name){\n\t\t\t\t$Fields[$field_name] = $this->{$field_name};\n\t\t\t}\n\t\t\t\n\t\t\treturn $Fields;\n\t\t}\n\t\t\n\t\treturn $this->Fields;\n\t}", "public function getName()\n {\n return 'imrim_bundle_lmsbundle_coursetype';\n }", "public function getWidgetViewHelperClassName() {}", "public function get_component() {\n return \"dataformview_$this->type\";\n }", "public function get_class()\n\t{\n\n\t\t$user = Auth::instance()->get_user(NULL);\n\t\t$company_selected = ORM::factory('EAV_Company', Session::instance()->get('company', NULL));\n\t\t$is_user_eav = ORM::factory('User_Eav', array('class' => $this->class));\n\t\tif ($user AND $user->is_admin() AND ! $company_selected->loaded() AND $is_user_eav->loaded())\n\t\t{\n\t\t\treturn $this->class . '_Default';\n\t\t}\n\t\treturn $this->class;\n\t}", "function getDisplay() {\n return $this->display;\n }", "public function getClass(): string\n {\n return $this->class;\n }", "protected function GetRenderViewType()\n {\n return $this->fieldRenderViewType;\n }", "public function getDetailFieldsClassNames()\n {\n $classes = ['detail-fields'];\n \n $classes[] = $this->owner->DetailFieldsInline ? 'inline' : 'block';\n \n if ($this->owner->DetailFieldsHideIcons) {\n $classes[] = 'hide-icons';\n }\n \n if ($this->owner->DetailFieldsHideNames) {\n $classes[] = 'hide-names';\n }\n \n if ($this->owner->DetailFieldsHideHeader) {\n $classes[] = 'hide-header';\n }\n \n $this->owner->extend('updateDetailFieldsClassNames', $classes);\n \n return $classes;\n }", "function getDisplayName(){\n\t\treturn $this->display_name;\n\t}", "protected function getFormClass(){\n return (\n (\n $this->_class!==NULL &&\n is_string($this->_class) &&\n strlen(trim($this->_class))\n )\n ?$this->_class\n :$this->setFormClass()\n );\n }", "public function getComponentClass()\n {\n return $this->_componentClass;\n }", "public function getType()\n {\n return 'text field';\n }", "public function getEntityClass()\n {\n return 'GravityCMS\\CoreBundle\\Entity\\FieldNumber';\n }", "public function getClass()\n {\n return $this->class;\n }", "public function fieldType($field) {\n\t\tif (strstr($field, \".\")) {\n\t\t\t// use the path to get to the data poing\n\t\t\t$fieldParts = explode(\".\", $field);\n\t\t\t$key = array_pop($fieldParts);\n\t\t\t\n\t\t\t// add the field parts to the entityPath to get the correct model\n\t\t\tEntity::_setEntityPath($fieldParts);\n\t\t} else {\n\t\t\t$key = $field;\n\t\t\t$fieldParts = array();\n\t\t}\n\t\t\n\t\t$model = Entity::currentPathClass();\n\t\t\n\t\tEntity::_revertEntityPath(count($fieldParts));\n\t\t\n\t\tApp::uses($model, \"Model\");\n\t\t\n\t\t$modelConf = $this->entityConfig($model, \"Fields\", $key);\n\t\t\t\n\t\tif (is_array($modelConf) && isset($modelConf['type'])) {\n\t\t\treturn $modelConf['type'];\n\t\t}\n\t\t\n\t\tif ($key == $this->primaryKey($model)) {\n\t\t\treturn \"primary\";\n\t\t}\n\n\t\t// if field is not defined in db, and it's not a defined html helper func, then just print whatever it is\n\t\t$types = $this->entityFields($model);\n\t\t\n\t\tif (@$types[$key] == \"virtual\") {\n\t\t\t$type = \"text\";\n\t\t} else {\n\t\t\tif (isset($types[$key]))\n\t\t\t\t$type = $types[$key];\n\t\t\telse\n\t\t\t\t$type = \"text\";\n\t\t}\n\t\t\n\t\tif (substr($type, 0, 5) == \"enum(\") {\n\t\t\t$this->_enumopts[$key] = explode(\"','\", substr($type, 6, -2));\n\t\t\t$type = \"enum\";\n\t\t}\n\t\t\n\t\treturn $type;\n\t}", "protected function get_instance_display_type( $instance ) {\n return 'list';\n }", "public function getField(string $name, string $class=null): Field;", "protected function resourceClass()\n {\n return Str::studly($this->viewsName());\n }", "public function getClass() {\n return $this->class;\n }", "public function getType() {\n return $this->field['type'] ?? '';\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function getEntityListClass(): string|null\n {\n return $this->getDataItem('entityList');\n }", "public function getSettingDisplayValueType()\n {\n if (array_key_exists(\"settingDisplayValueType\", $this->_propDict)) {\n return $this->_propDict[\"settingDisplayValueType\"];\n } else {\n return null;\n }\n }", "public function get_class()\n {\n return $this->class;\n }", "public function getName()\n {\n return 'ic_core_field.twig.extension.aliasToLabel';\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function label()\n {\n return $this->label ?? class_basename($this);\n }", "public function getRenderClass() {\n\t\treturn $this->getBehavior()->renderClass;\n\t}" ]
[ "0.7019422", "0.6904135", "0.6470423", "0.644021", "0.6320836", "0.6303521", "0.62766826", "0.6177034", "0.6162043", "0.60369563", "0.59143126", "0.58731526", "0.5861107", "0.5845614", "0.5826981", "0.5814791", "0.5806632", "0.57954484", "0.5747851", "0.57459027", "0.57432693", "0.5733705", "0.5731973", "0.57122666", "0.57118773", "0.5707658", "0.56975144", "0.5695963", "0.56872076", "0.5658925", "0.5656238", "0.56496763", "0.56475425", "0.5634013", "0.56295854", "0.5615502", "0.55966127", "0.55966127", "0.5592778", "0.5588199", "0.5579165", "0.5561836", "0.5559445", "0.5541958", "0.55418813", "0.55334216", "0.55297536", "0.55264497", "0.5513932", "0.551125", "0.549749", "0.5479053", "0.54738784", "0.5468327", "0.54625195", "0.5450839", "0.5439492", "0.54373914", "0.5424702", "0.5422553", "0.54224515", "0.54178464", "0.54097414", "0.5399767", "0.5386588", "0.53845614", "0.5355823", "0.53473115", "0.5346357", "0.53434503", "0.5342343", "0.53407973", "0.5335783", "0.5326719", "0.5324193", "0.5322624", "0.532224", "0.532224", "0.532224", "0.532224", "0.5319473", "0.53160405", "0.53146905", "0.5310632", "0.53106177", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5309487", "0.5301079", "0.5293907" ]
0.63759977
4
Create a new event instance.
public function __construct($shop, $metadata = []) { $this->shop = $shop; $this->metadata = $metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEvent()\n {\n return new Event();\n }", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }", "public static function createEvent(array $data)\n {\n $event = new \\echolibre\\google_wave\\Model\\Event;\n \n $event->type = $data['type'];\n $event->timestamp = $data['timestamp'];\n $event->modifiedBy = $data['modifiedBy'];\n $event->properties = new \\stdClass();\n \n if (isset($data['properties'])) {\n $event->properties = $data['properties'];\n }\n \n return $event;\n }", "public function newEvent()\n\t{\n $this->to = $this->domain;\n $this->email = $this->info_mail;\n $this->subject = 'Neue Messe gemeldet';\n $this->view = 'emails.user.new_event';\n\t\t\n\t\t$this->data = [\n\t\t\t'contact'\t\t=> \\Input::get('contact'),\n\t\t\t'email'\t\t\t=> \\Input::get('email'),\n\t\t\t'name'\t\t\t=> \\Input::get('name'),\n\t\t\t'location'\t\t=> \\Input::get('location'),\n\t\t\t'start_date'\t=> \\Input::get('start_date'),\n\t\t\t'end_date'\t\t=> \\Input::has('end_date') ? \\Input::get('end_date') : \\Input::get('start_date'),\n\t\t\t'region'\t\t=> \\Input::get('region'),\n\t\t\t'organizer'\t\t=> \\Input::get('organizer')\n\t\t];\n\n\t\treturn $this;\n\t}", "private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }", "private function event(): Event\n {\n if (!$this->event) {\n $this->event = new Event($this->eventMutex(), '');\n }\n\n return $this->event;\n }", "public function createEvent(string $name): Event\n {\n if (!$this->isEventIDValid($name)) {\n throw new RuntimeException('invalid event name: ' . $name);\n }\n\n $class = $this->validEventIDs[$name];\n /** @var \\CaptainHook\\App\\Event $event */\n $event = new $class($this->io, $this->config, $this->repository);\n return $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function createCustomevent(): self\n {\n $this->event_type = debug_backtrace()[1]['function'];\n $attr = $this->getAttributes();\n $dirty = $this->getDirty();\n $original = $this->getOriginal();\n // dd($attr, $dirty, $original);\n\n $details = [];\n foreach ($attr as $property => $value) {\n if (array_key_exists($property, $dirty) or !$dirty) {\n $details[] = [\n $property,\n $original[$property] ?? FALSE,\n $dirty[$property] ?? FALSE,\n ];\n }\n }\n\n Customevent::create([\n 'user_id' => auth()->user() ? auth()->user()->id : User::SYSUID,\n 'model' => $this->getTable(),\n 'model_id' => $this->id,\n 'model_name' => $this->name,\n 'type' => $this->event_type,\n 'description' => $this->event_description ?? FALSE,\n 'details' => serialize($details) ?? '',\n ]);\n return $this;\n }", "protected function _Build_Event($context) {\r\n $form_instance = $this->form_instance;\r\n // Retrieve the event class item\r\n $class = $context['class'];\r\n // Generate a new event class\r\n $event_instance = new $class();\r\n // Populate with the form instance\r\n $event_instance->form_instance = $form_instance;\r\n // Populate with the form instance\r\n $event_instance->type = $context['type'];\r\n // Populate with the form instance\r\n $event_instance->title = $context['title'];\r\n // Populate with the event context\r\n $event_instance->context = $context;\r\n // If the field has a sanitize method\r\n if (method_exists($event_instance,'On_Create')) { $event_instance->On_Create(); }\r\n // Fire any on create action\r\n $event_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_event_create',$event_instance);\r\n // Fire any on create action\r\n $event_instance->Do_Action('after_create');\r\n // Do a wordpress hook\r\n do_action('vcff_trigger_after_create',$event_instance);\r\n // Return the event instance\r\n return $event_instance;\r\n }", "protected function __construct()\n {\n parent::__construct(\n 'Event',\n array(\n TextField::create(\n 'title',\n array(\n 'mandatory' => true,\n )\n ),\n TextareaField::create(\n 'description',\n array(\n 'use_markdown' => true,\n )\n ),\n TextField::create(\n 'date',\n array()\n ),\n ReferenceField::create(\n 'guest_lists',\n array(\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\Guestlist\\\\GuestlistModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'title',\n ),\n ),\n )\n ),\n ReferenceField::create(\n 'assignee',\n array(\n 'max' => 1,\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\User\\\\UserModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'username',\n ),\n ),\n )\n ),\n KeyValueField::create(\n 'meta',\n array(\n 'constraints' => array(\n 'value_type' => 'dynamic',\n ),\n )\n ),\n AggregateField::create(\n 'workflowTicket',\n array(\n 'modules' => array(\n '\\\\Honeybee\\\\Domain\\\\Event\\\\WorkflowTicketModule',\n ),\n )\n ),\n ),\n array(\n 'prefix' => 'event',\n 'identifier_field' => 'identifier',\n 'slugPattern' => 'event-{shortId}',\n )\n );\n }", "public function create()\n {\n return view ('event.create');\n }", "public function create()\n {\n return view(\"Event::create\");\n }", "public function create_event( $eventname )\n\t{\n\t\tCmsEvents::create_event($this->get_name(), $eventname);\n\t}", "public function createNewEvent($copyLastEvent = true, $data = array())\n\t{\n\t\t$event = new App_Model_Event();\n\n\t\t// pokud $copyLastEvent == true, vezmu data z minule udalosti a nastavim\n\t\t// je teto\n\t\tif ($copyLastEvent) {\n\t\t\t// TODO: vzit nastaveni posledni udalosti u teto akce\n\t\t}\n\n\t\t// pokud byla zaslana nejaka inicializacni data, nastavim je\n\t\tif (is_array($data) && count($data)) {\n\t\t\t$event->setPropsFromArray($data);\n\t\t}\n\n\t\t$event->setActionId($this->_actionId);\n\t\t$event->setEventNo(count($this->getAllEvents()) + 1);\n\n\t\t$event->insert();\n\n\t\t// vytvorim take prvni navrh terminu, pokud byl zaslan\n\t\tif (isset($data['dates']) && $data['dates'] != '') {\n\t\t\t$event->createNewProposal($data['dates']);\n\t\t}\n\n\t\treturn $event;\n\t}", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }", "public function createCustomevent(): self\n {\n $this->event_type = debug_backtrace()[1]['function'];\n if ($this->isDirty('status') and $this->status === User::STATUS_ACTIVE) {\n $this->event_type = 'verify';\n }\n $attr = $this->getAttributes();\n $dirty = $this->getDirty();\n $original = $this->getOriginal();\n // dd($attr, $dirty, $original);\n\n $details = [];\n foreach ($attr as $property => $value) {\n if (array_key_exists($property, $dirty) or !$dirty) {\n $details[] = [\n $property,\n $original[$property] ?? FALSE,\n $dirty[$property] ?? FALSE,\n ];\n }\n }\n\n Customevent::create([\n 'user_id' => auth()->user() ? auth()->user()->id : self::URUID, // unregistered user id\n 'model' => $this->getTable(),\n 'model_id' => $this->id,\n 'model_name' => $this->name,\n 'type' => $this->event_type,\n 'description' => $this->event_description ?? FALSE,\n 'details' => serialize($details) ?? '',\n ]);\n return $this;\n }", "public function create()\n {\n return view('events::create_event');\n }", "protected function create(array $data)\n {\n $user = Auth::user();\n $article = new Article($data);\n $article->userID = $user->userID;\n $article->ctgID = $data['category'];\n $article->updated_at = Carbon::now();\n $article->save();\n\n if (array_key_exists('image', $data)) {\n $path = $data['image']->store('articles/'.$article->artID, 'images');\n $article->image = $path;\n $article->save();\n }\n \n $event = new Event($data);\n if ($data['place'] !== 'none') {\n $event->placeID = $data['place'];\n }\n $event->artID = $article->artID;\n $event->save();\n \n return $event;\n }", "public function create()\n {\n return view('events.createevent');\n }", "public static function get_instance() \n {\n if ( ! isset(self::$instance)) \n {\n self::$instance = new Event();\n }\n\n return self::$instance;\n }", "public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }", "public function createEvent(Event $event)\n {\n $this->setCalendarId($event->calendar_id);\n\n /*\n * Create new google event object\n */\n $googleEvent = new \\Google_Service_Calendar_Event();\n\n /*\n * Set Details\n */\n $googleEvent->setSummary($event->title);\n $googleEvent->setDescription($event->description);\n $googleEvent->setLocation($event->location);\n\n /*\n * Set Start Date\n */\n $start = $this->createDateTime($event->start, $event->timeZone, $event->all_day);\n $googleEvent->setStart($start);\n\n /*\n * Set End Date\n */\n $end = $this->createDateTime($event->end, $event->timeZone, $event->all_day);\n $googleEvent->setEnd($end);\n\n /*\n * Set Recurrence Rule, make sure it's not empty\n */\n if ($event->rrule) {\n $googleEvent->setRecurrence([$event->rrule]);\n }\n\n /*\n * Create the event\n */\n $newGoogleEvent = $this->service->events->insert($this->calendarId, $googleEvent);\n\n return $this->createEventObject($newGoogleEvent);\n }", "public function construct(CakeEvent $event) {\n\t\t$this->__startTime = time();\n\t}", "public function create()\n {\n return view('admin.adminevent.create_event');\n }", "protected function createEvent(DateTime $dateStart, DateTime $dateEnd)\n {\n $event = new Event();\n $event->setTitle($this->title);\n $event->setDescription($this->description);\n $event->setDateStart($dateStart);\n $event->setDateEnd($dateEnd);\n\n return $event;\n }", "public function __construct(array $event = array())\n {\n $this\n ->setEvent($event);\n }", "public function create(Request $request)\n {\n $data = $request->all();\n $event = Event::make($data);\n $event->user_id = Auth::user()->id;\n $event->save();\n }", "public function create()\n {\n\n $event = new Event;\n return view('events.create',compact('event'));\n }", "public function create()\n {\n return view('event');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "protected function getRandomInstance()\n {\n $eventLine = new EventTag();\n $this->fillThing($eventLine);\n\n return $eventLine;\n }", "function create_event( $options=array() ){\n\t\t\t//length = 255, present\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'title_unique' => 1\n\t\t\t), $options\n\t\t);\n\t\t\n\t\tif( empty( $options['title'] ) or empty( $options['description'] ) or empty( $options['date'] ) ){\n\t\t\t$error = Core::error($this->errors, 1);\n\t\t\t$error['error_msg'] .= $error_append;\n\t\t\treturn $error;\n\t\t}\n\t\t\n\t\t$values['title'] = $this->validate_title( array('title' => $options['title']) );\n\t\tif(Core::has_error( $values['title'] )){\n\t\t\treturn $values['title'] ;\n\t\t}\n\t\t\n\t\t$values['description'] = $this->validate_description( array('description' => $options['description']) );\n\t\tif(Core::has_error( $values['description'] )){\n\t\t\treturn $values['description'];\n\t\t}\n\t\t\n\t\t$values['date_time'] = $this->validate_event_date( array('date' => $options['date']) );\n\t\tif(Core::has_error( $values['date_time'] )){\n\t\t\treturn $values['date_time'];\n\t\t}\n\t\t\n\t\tif($options['title_unique']){\n\t\t\t//TODO:Check if the title unique\n\t\t\tif( Core::db_count( array(\n\t\t\t\t'table' => CORE_DB.\".\".self::$table_name,\n\t\t\t\t'values' => array(\n\t\t\t\t\t'title' => $values['title']\n\t\t\t\t)\n\t\t\t))){\n\t\t\t\t$error = Core::error($this->errors, 7);\n\t\t\t\t$error['error_msg'] .= 'Event title must be unique. ';\n\t\t\t\t$error['error_msg'] .= $error_append;\n\t\t\t\treturn $error;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$result = Core::db_insert( array(\n\t\t\t\t'table' => CORE_DB.\".\".self::$table_name,\n\t\t\t\t'values' => $values\n\t\t));\n\t\t\n\t\tif( Core::has_error($result) or empty($result) ){\n\t\t\t$result['error_msg'] .= $error_append;\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function createEvent(Actions $emailAction){\n $event = new Events();\n $event->type = self::$typeMap[$emailAction->type];\n $event->subtype = 'email';\n $event->associationId = $emailAction->associationId;\n $event->associationType = X2Model::getModelName($emailAction->associationType);\n $event->timestamp = time();\n $event->lastUpdated = $event->timestamp;\n $event->user = $emailAction->assignedTo;\n if($event->save())\n $this->log(Yii::t('app','Created activity feed event for the email.'));\n return $event;\n }", "function __construct($event) {\n $this->init($event);\n }", "public function actionCreate()\n {\n $model = new Event();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\treturn view('events.create');\n\t}", "protected function initEvent()\n {\n $locales = $this->container->getParameter('event.locales');\n $event = $this->getRepository('EventEventBundle:Event')->getEvent();\n $now = new \\DateTime();\n\n if (!$event) {\n $event = new Event();\n $event\n ->setTitle('My Event')\n ->setDescription('My another awesome event!')\n ->setStartDate($now)\n ->setEndDate($now->modify('+1 day'))\n ->setVenue('Burj Khalifa Tower')\n ->setEmail('[email protected]')\n ;\n\n $speaker = new Speaker();\n $speaker\n ->setFirstName('Phill')\n ->setLastName('Pilow')\n ->setCompany('Reseach Supplier')\n ;\n\n if ($locales) {\n foreach ($locales as $locale => $title) {\n $eventTranslation = new EventTranslation();\n $eventTranslation->setEvent($event);\n $eventTranslation->setlocale($locale);\n\n $this->getManager()->persist($eventTranslation);\n\n $speakerTranslation = new SpeakerTranslation();\n $speakerTranslation->setSpeaker($speaker);\n $speakerTranslation->setlocale($locale);\n\n $this->getManager()->persist($speakerTranslation);\n }\n }\n\n $this->getManager()->persist($event);\n $this->getManager()->persist($speaker);\n $this->getManager()->flush();\n }\n }", "public function __construct($data)\n {\n $this->event = $data;\n }", "public function create()\n {\n return view('admin.event.create');\n }", "public function create()\n {\n return view('admin.event.create');\n }", "public function create()\n {\n return view('event::create');\n }", "public function actionCreate()\n\t{\n\t\t$model=new Event;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Event']))\n\t\t{\t\n\t\t\t$model->attributes=$_POST['Event'];\n\t\t\t\n\t\t\t$model->created_on = new CDbExpression('NOW()');\n\t\t\t$model->created_by=Yii::app()->user->id;\n\t\t\tif($model->save()){\n\t\t\t\t\n\t\t\t\t$this->redirect(array('view', 'id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n\t ->getStateMachine()\n ->getTransition()\n ->abortTransition()\n ->isTransitionAborted()\n // EventInterface\n ->getName()\n ->setName()\n ->getTarget()\n ->setTarget()\n ->getParams()\n ->setParams()\n ->getParam()\n ->setParam()\n ->stopPropagation()\n ->isPropagationStopped();\n\n return $mock->new();\n }", "protected function newEventLogger()\n {\n return new EventLogger(static::getLogger());\n }", "public function create()\n\t{\n\t\treturn View::make('events.create');\n\t}", "public function __construct(?EventConfig $cfg = null) {}", "public function create()\n {\n $programEvent = new ProgramEvent();\n return view('program-event.create', compact('programEvent'));\n }", "public function create()\n {\n return view(\"admin.event_create\")->with([\n\n ]);\n }", "public function createEvent(Request $request)\n {\n $this->validator($request->all())->validate();\n\n $event = $this->create($request->all());\n \n return redirect('/cms/events');\n }", "public function __construct($name, $event)\n {\n $this->name = $name;\n $this->event = $event;\n }", "final private static function makeEvent(Sincronizacao $sincronizacao)\n {\n $endpoint = self::getEventEndpoint($sincronizacao->sym_table, $sincronizacao->sym_action);\n\n $dependencies = self::getDependencies($sincronizacao);\n $eventClass = self::getEventClass($endpoint);\n\n return new $eventClass($dependencies['entry'], $dependencies['extra']);\n }", "public static function create(Client $client, $data) {\n if ($data == null || is_array($data)) {\n $d = new Event($data == null ? array() : $data);\n $data = $d->jsonSerialize();\n }\n $req = $client->newRequest(\"POST\", \"/{accountname}/events\");\n $req->setBody($data, \"json\");\n\n $result = $req->run(\"json\");\n return Event::fromJson($result);\n }", "public function __construct()\n {\n parent::__construct('BaseEvent');\n }", "public function actionCreate()\n\t{\n\t\tYii::import('ext.multimodelform.MultiModelForm');\n\n\t\t$model=new Event;\n\t\t$eventType=new EventType;\n\t\t$member=new EventAttribute;\n\t\t$validatedMembers = array(); // ensure an empty array\n\t\t$attr = array(); \n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Event']))\n\t\t{\n\t\t if(isset($_POST['Event']['attributes']))\n\t\t {\n\t\t $attr = $_POST['Event']['attributes'];\n\t\t }\n\t\t\t$model->attributes=$_POST['Event'];\n\t\t\tif($model->save()) {\n\t\t\t\t$this->addAttributes($attr, $model);\n\t\t\t\t$this->redirect(array('view','id'=>$model->idEvent));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('create',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'eventType'=>$eventType,\n\t\t\t\t'member'=>$member,\n\t\t\t\t'validatedMembers'=>$validatedMembers,\n\t\t\t));\n\t\t}\n\t}", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "public function create(){}", "function event(): EventEmitter\n{\n return EventEmitter::getInstance();\n}", "public function create() {}", "public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStore->event = $this->event;\n\t\t$eventStore->status = \"published\";\n\t\t$eventStore->created_at = now();\n\t\t$eventStore->updated_at = now();\n\n\n\t\t$eventStore->save();\n }", "public function create()\n {}", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "private function __construct() {\n\t\t$action = isset($_GET['action']) ? sanitize_key($_GET['action']) : '';\n\t\t$copy = isset($_GET['copy']) ? intval($_GET['copy']) : 0;\n\t\tif(!empty($copy)) {\n\t\t\t$this->copy_event = new EL_Event($copy);\n\t\t\tadd_filter('get_object_terms', array(&$this, 'set_copied_categories'));\n\t\t}\n\n\t\t$this->options = &EL_Options::get_instance();\n\t\t$this->is_new = 'edit' !== $action;\n\n\t\tadd_action('add_meta_boxes', array(&$this, 'add_eventdata_metabox'));\n\t\tadd_action('edit_form_top', array(&$this, 'form_top_content'));\n\t\tadd_action('edit_form_after_title', array(&$this, 'form_after_title_content'));\n\t\tadd_action('admin_print_scripts', array(&$this, 'embed_scripts'));\n\t\tadd_action('save_post_el_events', array(&$this, 'save_eventdata'), 10, 3);\n\t\tadd_filter('enter_title_here', array(&$this, 'change_default_title'));\n\t\tadd_filter('post_updated_messages', array(&$this, 'updated_messages'));\n\t}", "public static function create() {\n\t\t$entry = new GuestbookEntry();\n\t\t$entry->Date = SS_DateTime::now()->getValue();\n\t\t$entry->IpAddress = $_SERVER['REMOTE_ADDR'];\n\t\t$entry->Host = gethostbyaddr($entry->IpAddress);\n\t\treturn $entry;\n\t}", "public function create()\n {\n //\n return view('events.create');\n }", "public function create()\n\t{ \n\t\t# Return if just the countoff is needed\n\t\tif ($this->countoff<2) return;\n\t\t\n\t\t# Add a note on and note off for each beat in the click track\n\t\tfor($i=0; $i<$this->beatsTotal; $i++) { \n\t\t\t$vol = (($i%$this->timeSig)==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t}", "public function create()\n {\n return view('adm.events.create');\n }", "public function create()\n\t{\n\t\treturn View::make('administrator.events.create')->with('page_title','Create New Event');\n\t\t\n\t}", "public function run()\n {\n factory(TechnoEvent::class,10)->create();\n }", "protected function manageEvent()\n {\n // Manage the incoming session\n $this->manageSession();\n\n // Get the event data from the incoming request\n $eventData = $this->eventRequest->getEvent();\n\n // Get the entity data from the event\n $entityData = $eventData->get('entity');\n\n if (!is_array($entityData)) $entityData = [];\n\n // Hydrate the event entity\n $this->eventEntity = $this->hydrateEntity($entityData);\n\n // Create the event object\n $this->event = new WebsiteEvent();\n\n // Format the action\n $action = $eventData->get('action');\n $this->setDefaultAction($action);\n\n $this->event->setAction($action);\n $this->event->setEntity($this->eventEntity);\n $this->event->setCreatedAt(time());\n\n if (!is_null($eventData->get('data'))) {\n $this->event->setData($eventData->get('data'));\n }\n\n // Set any related entities to the event\n $relatedEntityData = $eventData->get('relatedEntities');\n if (is_array($relatedEntityData) && !empty($relatedEntityData)) {\n foreach ($relatedEntityData as $relatedEntity) {\n $relEntityObj = $this->hydrateEntity($relatedEntity);\n $this->event->addRelatedEntity($relEntityObj);\n\n }\n }\n // Set the session to the event\n $this->event->setSession($this->session);\n }", "public function create(Event $event)\n {\n if ($this->shouldUseLocks($this->cache->store($this->store)->getStore())) {\n return $this->cache->store($this->store)->getStore()\n ->lock($event->mutexName(), $event->expiresAt * 60)\n ->acquire();\n }\n\n return $this->cache->store($this->store)->add(\n $event->mutexName(), true, $event->expiresAt * 60\n );\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public function create() {\n\t \n }", "public function actionCreate()\n\t{\n\t\t$model=new Events;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Events']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Events'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->event_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "function add_new_event($eventName, $eventColor){\n\t\tif( isset($_POST[$eventName]) ){\n\t\t\tglobal $base;\n\t\t\t\n\t\t\t$title \t= $_POST[$eventName];\n\t\t\t$color \t= $_POST[$eventColor];\n\n\t\t\t$full_calendar_notifications = new full_calendar_notification();\n\n\t\t\t$full_calendar_notifications->user_id = $base->clear_string($_SESSION['user_id']);\n\t\t\t$full_calendar_notifications->notification_title = $title;\n\t\t\t$full_calendar_notifications->notification_color = $color;\n\n\t\t\t$full_calendar_notifications->create();\n\t\t}\n\t}", "public function initialize()\n {\n // attributes\n $this->setName('event');\n $this->setPhpName('Event');\n $this->setClassname('ArtRequestORM\\\\Event');\n $this->setPackage('ArtRequest');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('EVENT_ID', 'EventId', 'INTEGER', true, null, null);\n $this->addColumn('EVENT_TITLE', 'EventTitle', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_DESCRIPTION', 'EventDescription', 'LONGVARCHAR', true, null, null);\n $this->addColumn('EVENT_LOCATION', 'EventLocation', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_SPONSOR_NAME', 'EventSponsorName', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_START_TIME', 'EventStartTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_END_TIME', 'EventEndTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_START_DATE', 'EventStartDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_END_DATE', 'EventEndDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_PRICING_MEMBER', 'EventPricingMember', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STAFF', 'EventPricingStaff', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STUDENT', 'EventPricingStudent', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_PUBLIC', 'EventPricingPublic', 'DECIMAL', true, null, null);\n // validators\n }", "public static function create_event($pid, $event) \n\t\t{\t\n\t\t\t$mysqli = MysqlInterface::get_connection();\n\t\t\t\n\t\t\t// insert event\n\t\t\t$stmt = $mysqli->stmt_init();\n\t\t\t$stmt->prepare('INSERT INTO event (title, owner, gowner, start_time, end_time, location, logo, description, category, size, tag, price) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);');\n\t\t\t$stmt->bind_param('siisssssiisd', $event['title'], $pid, $gid, $event['start_time'], $event['end_time'], $event['location'], $event['logo'], $event['description'], $event['category'], $event['size'], $event['tag'], $event['price']);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t// get auto generated id\n\t\t\t$eid = $mysqli->insert_id;\n\t\t\t\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\t// grant user host role\n\t\t\tPeopleDAO::set_event_role_pid($pid, $eid, Role::Owner);\n\t\t\treturn $eid;\n\t\t}", "public static function create_event( $module_name, $event_name )\n\t{\n\t\t$event = cms_orm('CmsDatabaseEvent')->find_by_module_name_and_event_name($module_name, $event_name);\n\t\tif ($event == null)\n\t\t{\n\t\t\t$event = new CmsDatabaseEvent();\n\t\t\t$event->module_name = $module_name;\n\t\t\t$event->event_name = $event_name;\n\t\t\treturn $event->save();\n\t\t}\n\t}", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }" ]
[ "0.8178475", "0.73455495", "0.67515916", "0.6665345", "0.66544545", "0.66479546", "0.6640835", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6543442", "0.64682955", "0.645909", "0.64520663", "0.6441302", "0.6438299", "0.63917476", "0.6371641", "0.6371641", "0.63478637", "0.63475716", "0.63285524", "0.6319918", "0.63108855", "0.6275116", "0.6206908", "0.6195245", "0.6193101", "0.61870754", "0.61810726", "0.61807376", "0.612506", "0.612064", "0.61166775", "0.6116489", "0.6116489", "0.6116489", "0.6116489", "0.6111236", "0.6099429", "0.6076598", "0.6072973", "0.6068453", "0.60566765", "0.6056391", "0.6041123", "0.6033919", "0.60277027", "0.60277027", "0.60181046", "0.6014412", "0.6007521", "0.6007521", "0.6007521", "0.5998441", "0.59855086", "0.5971869", "0.5971259", "0.59670085", "0.5959153", "0.59413785", "0.59338146", "0.5930427", "0.5917219", "0.5907522", "0.59049624", "0.58941996", "0.58838826", "0.5868322", "0.58614963", "0.58599705", "0.5856868", "0.58510625", "0.5838314", "0.58332664", "0.5826795", "0.58255696", "0.58250695", "0.5822382", "0.58223313", "0.58191884", "0.58166337", "0.5807514", "0.5798503", "0.57970744", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.579301", "0.5784509", "0.5783719", "0.5780148", "0.57786983", "0.57786983", "0.57786983", "0.57786983" ]
0.0
-1
Get the channels the event should broadcast on.
public function broadcastOn() { return new PrivateChannel('channel-name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChannels()\n {\n return $this->channels;\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function getChannels();", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "public function get_channels()\n {\n }", "public function broadcastOn()\n {\n return ['channel-status'];\n }", "public function getChannels()\n {\n return $this->Channels;\n }", "public function all(): array\n {\n return $this->channels;\n }", "public function channels()\n {\n return $this->send('channels');\n }", "public function getAllChannels()\n {\n return $this->_channel;\n }", "public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }", "public function onChannels(): ?array\n {\n return null;\n }", "public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }", "public function broadcastOn()\n {\n return [\n new Channel('sanityDeployment.' . $this->sanityDeployment->id),\n new Channel('sanityMainRepo.' . $this->sanityDeployment->sanityMainRepo->id),\n ];\n }", "public function getNotificationChannels()\n {\n if (array_key_exists(\"notificationChannels\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannels\"];\n } else {\n return null;\n }\n }", "public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }", "public function broadcastOn()\n {\n return [new Channel('abinachess_move.' . $this->uid)];\n }", "public function getSupplyChannels();", "public function getDistributionChannels();", "public function broadcastOn()\n {\n return ['laravue-channel'];\n }", "public function getAllChannels()\n {\n return Channel::all();\n }", "public static function getChannels($aspect)\n {\n return self::getMetaProperty($aspect, 'channel');\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function broadcastOn()\n {\n return [];\n }", "public function getChannels()\n\t{\n\t\t$channels = App::make('ChannelRepository')->getChannels();\n\t\t\n\t\treturn App::make('Apiv1\\Transformers\\ChannelTransformer')->transformCollection($channels, $this->user);\n\t}", "public function broadcastOn()\n {\n\n return [];\n }", "public function getDistributionChannels()\n {\n return $this->distributionChannels;\n }", "public function getIncludeChannels()\n {\n return $this->include_channels;\n }", "public function broadcastOn()\n {\n return [\n new PrivateChannel('private-chat-channel.' . $this->message->receiver),\n new PrivateChannel('private-chat-channel.' . $this->message->sender)\n ];\n }", "public function broadcastOn()\n {\n return [config('messenger.redis_channel', 'notification')];\n }", "public function getChannels()\n {\n $size = $this->getImageSize();\n\n return $size['channels'];\n }", "public function broadcastOn()\n {\n\n return new Channel('channels-broadcasts');\n\n //return new PrivateChannel('channel-name');\n }", "public function getWallChannels()\n {\n return $this->wallChannels;\n }", "public function getOrderChannels()\n\t{\n\t\t$request = $this->request('order_channels');\n\n\t\tif (!$request) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$decoded = $request->asArray();\n\t\treturn $decoded['data'];\n\t}", "public function broadcastOn()\n {\n // Have no idea about this\n // return new PrivateChannel('channel-name');\n }", "function getActiveChannels() {\n global $debug, $logdir, $logfile, $app;\n\n $channels = null;\n $model = $app->bootstrap->getModel('channels');\n\n $now = date(\"Y-m-d H:i:s\");\n $query = \"SELECT\"\n .\" ch.id,\"\n .\" ch.starttimestamp,\"\n .\" ch.endtimestamp,\"\n .\" ch.title,\"\n .\" ch.isliveevent,\"\n .\" lf.id AS locationid,\"\n .\" lf.name AS locationname,\"\n .\" lf.issecurestreamingforced,\"\n .\" lf.indexphotofilename,\"\n .\" lfs.id AS livefeedstreamid,\"\n .\" lfs.qualitytag AS streamname,\"\n .\" lfs.keycode AS streamid,\"\n .\" lfs.contentkeycode AS contentstreamid\"\n .\" FROM\"\n .\" channels AS ch,\"\n .\" livefeeds AS lf,\"\n .\" livefeed_streams AS lfs\"\n .\" WHERE\"\n .\" ch.starttimestamp <= '\" . $now . \"' AND\"\n .\" ch.endtimestamp >= '\" . $now . \"' AND\"\n .\" ch.id = lf.channelid AND\"\n .\" lf.id = lfs.livefeedid AND\"\n .\" lf.issecurestreamingforced = 0\"\n .\" ORDER BY\"\n .\" ch.id\";\n\n try {\n $rs_channels = $model->safeExecute($query);\n $channels = $rs_channels->GetArray();\n } catch (Exception $err) {\n $debug->log($logdir, $logfile, \"[ERROR] SQL query failed (\". $err->getTraceAsString() .\")\\nSQL QUERY:\\n'\". trim($query) .\"'\", false);\n return false;\n }\n\n // Check if any record returned\n if (count($channels) < 1) { return false; }\n\n return $channels;\n}", "public function channels()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'merchant/payment-channel', $payloads);\n }", "public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }", "public function getAllChannels()\n {\n return Channel::with('subChannel.display')->active()->alive()->get()->toArray();\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('news-action');\n// return ['news-action'];\n return new Channel('news-action.');\n }", "public function broadcastOn() {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n return ['channel-name-'.$this->inputBy, 'channel-name-'.$this->kodeOrganisasi, 'channel-name-main-admin'];\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function getAudioChannels() {}", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function getSupplyChannels()\n {\n return $this->supplyChannels;\n }", "public function broadcastOn()\n {\n return new Channel('chess');\n }", "public function broadcastOn()\n {\n return ['CFSite'];\n }", "public function broadcastOn()\n {\n return new Channel('countries');\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'rocket_buffer' => [\r\n\t\t\t\t[ 'extract_ie_conditionals', 1 ],\r\n\t\t\t\t[ 'inject_ie_conditionals', 34 ],\r\n\t\t\t],\r\n\t\t];\r\n\t}", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "public function broadcastOn()\n {\n // return new PrivateChannel('channel-name');\n return new Channel('messages');\n }", "public function getJoinDefaultChannels()\n {\n return $this->joinDefaultChannels;\n }", "public function broadcastOn() {\n return ['convertVideoAction'];\n }", "public function via($notifiable)\n {\n $channels = [];\n if ($notifiable->setting->is_bid_cancelled_notification_enabled) {\n $channels = ['database']; // note: no Messenger yet like the other one's. App is still not approved, and there's the business registration requirement so..\n \n if ($notifiable->fcm_token) {\n $channels[] = FcmChannel::class;\n }\n }\n return $channels;\n }", "public function broadcastOn() {\n return new Channel('Everyone');\n }", "public function broadcastOn() {\n return new Channel('Everyone');\n }", "public static function get_subscribed_events() {\r\n\t\t$current_theme = wp_get_theme();\r\n\r\n\t\tif ( 'Bridge' !== $current_theme->get( 'Name' ) ) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn [\r\n\t\t\t'rocket_lazyload_background_images' => 'disable_lazyload_background_images',\r\n\t\t\t'update_option_qode_options_proya' => [ 'maybe_clear_cache', 10, 2 ],\r\n\t\t];\r\n\t}", "public function broadcastOn()\n {\n return [$this->reciever_id];\n }", "public function list_channels($exclude_archived=true) {\n\n $method=\"channels.list\";\n $payload['exclude_archived'] = $exclude_archived;\n\n $result = $this->apicall($method, $payload);\n if (isset($result['channels'])) {\n return $result['channels'];\n } else {\n return false;\n }\n }" ]
[ "0.7364031", "0.73157305", "0.73157305", "0.728789", "0.71595526", "0.71306884", "0.7081815", "0.70280844", "0.6982028", "0.69789195", "0.69637734", "0.69507897", "0.69274014", "0.6869513", "0.67492", "0.6735461", "0.67240244", "0.6688548", "0.6659049", "0.6614447", "0.65380543", "0.6504633", "0.64648736", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.64447355", "0.6440479", "0.64177257", "0.63979524", "0.63916475", "0.6374949", "0.63406885", "0.6271074", "0.6266129", "0.6263482", "0.61715937", "0.61616474", "0.6151404", "0.61477613", "0.6146072", "0.61450917", "0.61175346", "0.60950595", "0.60902643", "0.6084748", "0.6084748", "0.6079985", "0.6062983", "0.6062983", "0.6062983", "0.6062983", "0.6060638", "0.6058138", "0.6003972", "0.5982921", "0.59719485", "0.59650266", "0.5955422", "0.59461534", "0.5943915", "0.5921539", "0.5915895", "0.5915895", "0.5915161", "0.5912561", "0.5893242" ]
0.0
-1
Retrieve the currencyName property
public function getCurrencyName() { return $this->currencyName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function currencyName()\n {\n \treturn $this->currencyName = Currency::getCurrencyCode($this->sellPrices->CurrencyNo)->CurrencyName;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency(): string;", "public function getCurrency(): string;", "public function getCurrency(){\n return $this->currency;\n }", "public static function currency() {\n\t\treturn self::$currency;\n\t}", "public function getCurrency();", "public function getCurrency();", "protected function get_currency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "public static function getCurrency(): string\n {\n return static::$currency ?: Config::get('bazar.currencies.default', 'usd');\n }", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return isset($this->Currency) ? $this->Currency : null;\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyAttribute()\n\t{\n\t\t\n\t\treturn self::getCurrencies()[$this->currency_id] ?? \"-\";\n\t\t\n\t}", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "protected function getCurrency() : ?string\n {\n return $this->currencySymbol;\n }", "static function fetchLocaleCurrencyCode()\n {\n $locale = eZLocale::instance();\n $currencyCode = $locale->currencyShortName();\n return $currencyCode;\n }", "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "public function getCurrencyId()\n {\n return $this->currency_id;\n }", "public function currencySymbol()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencySymbol();\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getStoreCurrencyCode();", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "public function getCurrencySymbol()\n {\n return $this->currencySymbol;\n }", "public function getCartName()\n {\n return $this->name;\n }", "public function getSourceCurrency();", "public function getCurrency(): Currency;", "public function getPriceCurrency(): ?string\n {\n return $this->priceCurrency;\n }", "public function getOrderCurrencyCode();", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "public function getCurrencyCode() \n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getNameCard()\n {\n return $this->get(self::_NAME_CARD);\n }", "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function getCurrency()\n {\n if (is_null($this->currency)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY);\n if (is_null($data)) {\n return null;\n }\n $this->currency = (string) $data;\n }\n\n return $this->currency;\n }", "public function getCurrentCurrencyCode()\n {\n if ($this->currentCurrencyCode === null) {\n $this->currentCurrencyCode = strtoupper(\n $this->getStore()->getCurrentCurrencyCode()\n );\n }\n\n return $this->currentCurrencyCode;\n }", "public function getNameOnCard()\n {\n return $this->name_on_card;\n }", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function cardName()\n {\n return $this->bean->card()->name;\n }", "function acadp_get_currency() {\n\n\t$currency_settings = get_option( 'acadp_currency_settings' );\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\n\treturn strtoupper( $currency );\n\n}", "public function getMarket_name () {\n\t$preValue = $this->preGetValue(\"market_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->market_name;\n\treturn $data;\n}", "public function getGlobalCurrencyCode();", "public function getCurrencySymbolAttribute()\n {\n return Arr::get(Currency::getCurrency($this->currency), 'symbol');\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "public function getName()\n {\n return $this->quoteItem->getName();\n }", "public function getCurrentCurrencySymbol() {\n $currencyCurrencyCode = $this->objectManager->get ( '\\Magento\\Framework\\Pricing\\PriceCurrencyInterface' );\n\n return $currencyCurrencyCode->getCurrency ()->getCurrencySymbol ();\n }", "protected function getCurrency()\n {\n return $this->checkoutSession->getLastRealOrder()->getOrderCurrencyCode();\n }", "public function getCurrency()\r\n\t{\r\n\t\treturn $this->getTransaction()->getCurrency();\r\n\t}", "public function getBaseCurrencyCode()\n {\n if ($this->baseCurrencyCode === null) {\n $this->baseCurrencyCode = strtoupper(\n $this->getStore()->getBaseCurrencyCode()\n );\n }\n\n return $this->baseCurrencyCode;\n }", "private function getBaseCurrencyCode()\n {\n return $this->scopeConfig->getValue($this->xmlPathBaseCurrency, $this->defaultCurrencyCodeValue);\n }", "public function getName()\n {\n return self::PAYMENT_UPC;\n }", "public function getCurrentCurrencySymbol() {\r\n\t\treturn $this->_currency->getCurrencySymbol();\r\n\t}", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "public static function getSymbol()\n {\n return Currency::get('symbol', '');\n }", "public function getCountryName();", "public function getCurrencyDisplay( $currencyId = 0 ){\r\n\r\n\t\tif(empty($currencyId)){\r\n // $this->_currency_id заполняется в getInstance\r\n $currencyId = $this->_currency_id;\r\n\t\t\tif(empty($currencyId)){\r\n\t\t\t\t$currencyId = $this->_vendorCurrency;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $currencyId;\r\n\t}", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getId() {\r\n\t\treturn($this->_currency_id);\r\n\t}", "public function getCurrencySymbolAttribute()\n {\n $trips= Trips::where('request_id',$this->attributes['id']);\n if($trips->count())\n {\n $code = @$trips->get()->first()->currency_code;\n\n return Currency::where('code',$code)->first()->symbol;\n }\n else\n {\n return \"$\";\n }\n }", "function acadp_get_payment_currency() {\n\n\t$currency_settings = acadp_get_payment_currency_settings();\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\n\treturn strtoupper( $currency );\n\n}", "public function getDisplayNameInCheckout()\n {\n return $this->displayNameInCheckout;\n }", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getOriginalCurrency()\n {\n return $this->originalCurrency;\n }", "public function getName()\n {\n return 'European Central Bank';\n }", "public function getChargeNameAttribute()\n {\n return $this->laboratory->name;\n }", "public function getNameWithQuantityAttribute()\n {\n return $this->currency->name . ' [Owned: ' . $this->quantity . ']';\n }", "public function getBaseCurrencySymbol(){\n return $this->_storeManager->getStore()->getBaseCurrency()->getCurrencySymbol();\n }", "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "public function getName()\n {\n return $this->getLocales()[$this->getCurrent()]->name;\n }", "public function getCurrencyAttribute(?string $value = null): string;", "public function getTargetCurrency();", "public function getName()\n {\n return Language::_(\"TpayPayments.name\", true);\n }", "public function getBaseCurrencyCode();", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }" ]
[ "0.8412517", "0.7305462", "0.7305462", "0.72835076", "0.72835076", "0.6910954", "0.6910597", "0.69101375", "0.69101375", "0.679487", "0.67792076", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67703825", "0.67687756", "0.67664695", "0.6690035", "0.6690035", "0.6690035", "0.66525644", "0.6639715", "0.6639715", "0.6639715", "0.6623813", "0.6588697", "0.65723675", "0.6556207", "0.64810073", "0.64543873", "0.64391035", "0.6424048", "0.64048666", "0.64048666", "0.64048666", "0.64048666", "0.64048666", "0.6403053", "0.6400962", "0.63906556", "0.638744", "0.6380634", "0.6370655", "0.6365355", "0.63412416", "0.63326806", "0.63252354", "0.63154376", "0.6302625", "0.629051", "0.6275183", "0.62709117", "0.62675244", "0.62511355", "0.624798", "0.622527", "0.6191436", "0.61768913", "0.6174175", "0.61470026", "0.6139363", "0.61373943", "0.6134834", "0.61313105", "0.6120155", "0.6100688", "0.6099926", "0.6080558", "0.60734564", "0.60691404", "0.60674137", "0.6055309", "0.6047715", "0.6043707", "0.6042638", "0.60369563", "0.6034745", "0.60338634", "0.601889", "0.6009598", "0.6008498", "0.6008498", "0.6008498", "0.6007861", "0.6006564", "0.60060745", "0.60001343", "0.59991944", "0.5998221", "0.5994122", "0.59906363", "0.5965249", "0.5956849", "0.59509015", "0.5940752" ]
0.8499477
0
Retrieve the currencyCode property
public function getCurrencyCode() { return $this->currencyCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getCurrencyCode() \n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public static function getCode()\n {\n return Currency::get('code', false);\n }", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function getOrderCurrencyCode();", "public function getStoreCurrencyCode();", "public function getInvoiceCurrencyCode()\n {\n return $this->invoiceCurrencyCode;\n }", "public function getOrderCurrencyCode()\n {\n return $this->orderCurrencyCode;\n }", "public function getBaseCurrencyCode();", "public function getCurrentCurrencyCode()\n {\n if ($this->currentCurrencyCode === null) {\n $this->currentCurrencyCode = strtoupper(\n $this->getStore()->getCurrentCurrencyCode()\n );\n }\n\n return $this->currentCurrencyCode;\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "public function getCurrencyId()\n {\n return $this->currency_id;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "private function getBaseCurrencyCode()\n {\n return $this->scopeConfig->getValue($this->xmlPathBaseCurrency, $this->defaultCurrencyCodeValue);\n }", "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "static function fetchLocaleCurrencyCode()\n {\n $locale = eZLocale::instance();\n $currencyCode = $locale->currencyShortName();\n return $currencyCode;\n }", "public function getCurrency(){\n return $this->currency;\n }", "private function get_currency_code() : string {\n\t\tpreg_match( '/runParams\\.baseCurrencyCode=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 'USD';\n\t\t}\n\t\treturn sanitize_text_field( $matches[1] );\n\t}", "protected function get_currency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency(): string;", "public function getCurrency(): string;", "public function getCurrency()\n {\n return isset($this->Currency) ? $this->Currency : null;\n }", "public function getCurrency();", "public function getCurrency();", "public function getBaseCurrencyCode()\n {\n if ($this->baseCurrencyCode === null) {\n $this->baseCurrencyCode = strtoupper(\n $this->getStore()->getBaseCurrencyCode()\n );\n }\n\n return $this->baseCurrencyCode;\n }", "public function getBaseCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getBaseCurrencyCode();\r\n\t}", "public static function currency() {\n\t\treturn self::$currency;\n\t}", "public function get($code) {\n\t\t$code = strtoupper($code);\n\t\t$this->assertCurrency($code);\n\t\treturn $this->currencies[$code];\n\t}", "public function getGlobalCurrencyCode();", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "function currencyCode( $collection = false )\n {\n if ( is_string( $collection ) and $collection != '' )\n {\n $currencyCode = $collection;\n }\n else\n {\n if ( ( $collection instanceof eZProductCollection ) === false )\n {\n $collection = eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );\n }\n $currencyCode = $collection->attribute( 'currency_code' );\n }\n\n // Backwards compability for orders done with the price datatype.\n if ( $currencyCode == '' )\n {\n $currencyCode = eZOrder::fetchLocaleCurrencyCode();\n }\n return $currencyCode;\n }", "protected function getCurrency()\n {\n return $this->checkoutSession->getLastRealOrder()->getOrderCurrencyCode();\n }", "public function getCurrencyName()\n {\n return $this->currencyName;\n }", "public function getCurrency()\n {\n if (is_null($this->currency)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY);\n if (is_null($data)) {\n return null;\n }\n $this->currency = (string) $data;\n }\n\n return $this->currency;\n }", "public static function getCurrencyForCode($code)\r\n {\r\n\treturn self::getCurrencySource()->getCurrencyForCode($code);\r\n }", "public function getCurrency()\r\n\t{\r\n\t\treturn $this->getTransaction()->getCurrency();\r\n\t}", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getSourceCurrency();", "public function getCurrency(): Currency;", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function getCurrencyAttribute()\n\t{\n\t\t\n\t\treturn self::getCurrencies()[$this->currency_id] ?? \"-\";\n\t\t\n\t}", "public function getCode()\n {\n return $this->values[\"code\"];\n }", "public function currencyName()\n {\n \treturn $this->currencyName = Currency::getCurrencyCode($this->sellPrices->CurrencyNo)->CurrencyName;\n }", "public function getPricecode()\n {\n return $this->pricecode;\n }", "public function preferredCurrencyCode()\n {\n return CulqiCashier::usesCurrency();\n }", "public function getCode()\n {\n return $this->getValueObject('code');\n }", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "public function getTaxCurrencyCode()\n {\n return $this->taxCurrencyCode;\n }", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "public function CurrencyCode()\n {\n return [\n 'AUD' => ' Australia Dollar',\n 'BND' => 'Bruneian Dollar',\n 'CAD' => 'Canadian Dollar',\n 'CHF' => 'Francs',\n 'CNY' => 'China Yuan',\n 'DKK' => 'Danish Krone',\n 'EUR' => 'Euro',\n 'GBP' => 'Great Britain Poundsterling',\n 'HKD' => 'Hongkong Dollar',\n 'JPY' => 'Japan Yen',\n 'KRW' => 'Korea Won',\n 'NOK' => 'Norwegian Krone',\n 'NZD' => 'New Zealand Dollar',\n 'PHP' => 'Phillipine Peso',\n 'SAR' => 'Saudi Riyal',\n 'SEK' => 'Swedish Krona',\n 'SGD' => 'Singapore Dollar',\n 'THB' => 'Thailand Baht',\n 'TWD' => 'Taiwan Dollar',\n 'USD' => 'US Dollar',\n ];\n }", "public function getPriceCurrency(): ?string\n {\n return $this->priceCurrency;\n }", "public function getCurrencyByIsoCode($iso_code);", "public function getCode() {\n return $this->get(self::CODE);\n }", "public function getCode()\n {\n return $this->get(self::CODE);\n }", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getCurrency()\n {\n try {\n $currencyCode = $this->store->getCurrentCurrencyCode();\n $currencyObj = $this->locale->currency($currencyCode);\n $currency = array(\n 'isoCode' => $currencyCode,\n 'isoCodeNum' => null,\n 'name' => $currencyObj->getName(),\n 'sign' => $currencyObj->getSymbol()\n );\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n\n $currency = array(\n 'isoCode' => null,\n 'isoCodeNum' => null,\n 'name' => null,\n 'sign' => null\n );\n }\n\n return $currency;\n }", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }", "public static function getCurrency(): string\n {\n return static::$currency ?: Config::get('bazar.currencies.default', 'usd');\n }", "public function getCode()\r\n {\r\n return $this->code;\r\n }", "public function getCode()\n {\n return $this->__get(\"code\");\n }", "public function getCode() {\n return $this->code;\n }", "public function getCode() {\n return $this->code;\n }", "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function getCode() {\n return $this->code;\n }", "public function getCodSecion()\n {\n return $this->codSecion;\n }", "public function getDefaultCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getDefaultCurrencyCode();\r\n\t}", "public function getAccountingCostCode()\n {\n return $this->accountingCostCode;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }" ]
[ "0.8643299", "0.86354387", "0.84310305", "0.8402414", "0.8402414", "0.8402414", "0.82547116", "0.8153313", "0.81021637", "0.80292046", "0.79311454", "0.78772753", "0.765885", "0.75992906", "0.758271", "0.7559017", "0.7526303", "0.74324435", "0.74324435", "0.74308074", "0.74203146", "0.73721445", "0.73721445", "0.73721445", "0.73721445", "0.73721445", "0.73721445", "0.73721445", "0.73721445", "0.7366988", "0.7359528", "0.733139", "0.72865033", "0.72850853", "0.7281597", "0.7278336", "0.72511435", "0.72511435", "0.7238923", "0.7231332", "0.7231332", "0.7222245", "0.7183707", "0.7178444", "0.7177895", "0.7171634", "0.7165303", "0.71091634", "0.7037895", "0.70355225", "0.7028276", "0.7008062", "0.6975883", "0.6950473", "0.6937156", "0.6937156", "0.6937156", "0.6923034", "0.6901088", "0.6888124", "0.68177587", "0.6813696", "0.68069005", "0.67956454", "0.6775724", "0.6742858", "0.6723387", "0.67021376", "0.669731", "0.6683334", "0.66701365", "0.66440606", "0.66347754", "0.6634719", "0.6627974", "0.66233295", "0.6621303", "0.6619376", "0.6577963", "0.6575922", "0.6566622", "0.6566622", "0.6559724", "0.65593296", "0.65589285", "0.65583974", "0.6555502", "0.6549868", "0.65494573", "0.65494573", "0.65494573", "0.65494573", "0.65494573", "0.65494573", "0.65494573", "0.65494573" ]
0.84799874
6
Retrieve the discount property
public function getDiscount() { return $this->discount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDiscount()\r\n {\r\n return $this->discount;\r\n }", "public function getDiscount()\n\t{\n\t\treturn $this->getKeyValue('Discount'); \n\n\t}", "public function getDiscount(): int\n {\n return $this->discount;\n }", "public function getDiscountInvoiced();", "public function getTotaldiscount()\n {\n return $this->totaldiscount;\n }", "public function getDiscountDescription();", "public function getDiscount()\n {\n if ($this->hasDiscount() === false) {\n return false;\n }\n\n $time = new \\DateTime('now');\n $today = $time->format('Y-m-d');\n\n $discount = \\common\\models\\Discounts::find()\n ->where(['iid' => $this->id])\n ->andWhere(['<=', 'start_at', $today])\n ->andWhere(['>', 'stop_at', $today])\n ->one();\n\n return $discount->discount;\n }", "public function getDiscountPriceInfo()\n {\n return $this->discountPriceInfo;\n }", "public function getPriceDiscount()\n\t{\n\t\treturn $this->priceDiscount;\n\t}", "public function getDiscountAmount();", "public function getDiscountPriceAttribute(){\n\n if (!empty($this->discount)) {\n\n if ($this->discount->type == 'percentage') {\n $discount = ($this->price * $this->discount->discount) / 100;\n\n return round($this->price - $discount, 2);\n\n }else {\n\n return round($this->price - $this->discount->discount, 2);\n\n }\n\n }\n }", "public function getDocumentProductDiscount()\n {\n return (string) $this->document_product_discount;\n }", "public function getDiscountCode()\n {\n return $this->discountCode;\n }", "public function getDiscountAttribute() {\n return $this->cartItems->map(function ($item, $key) {\n return $item->subtotal;\n })->sum() * (1 - ($this->userPromotion->promotion->discount / 100));\n }", "public function getTonicDiscount()\n {\n }", "public function getDiscounted()\n {\n if (is_null($this->discounted)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISCOUNTED);\n if (is_null($data)) {\n return null;\n }\n\n $this->discounted = DiscountedPriceModel::of($data);\n }\n\n return $this->discounted;\n }", "public function getDiscountRefunded();", "public function getSubtotalDiscount()\n {\n $this->initializeSubtotals();\n\n return $this->getIfSet('discount', $this->data->amount->subtotals);\n }", "public function getDiscountId()\n\t{\n\t\treturn $this->discountId;\n\t}", "public function getDiscountAmount(){\n return $this->getParameter('discount_amount');\n }", "public function getTotalWithDiscount()\n {\n return $this->totalWithDiscount;\n }", "public function getPromotionalShippingDiscountDetails()\n {\n return $this->promotionalShippingDiscountDetails;\n }", "public function getDiscountCode()\n {\n return $this->discountCode;\n }", "public function getDiscountCode()\n {\n return $this->discountCode;\n }", "public function getDiscountInvoiced() {\n return $this->item->getDiscountInvoiced();\n }", "function getDiscountedPrice()\n {\n if (!$this->hasDiscount()) return null;\n $price = $this->price;\n if ($this->discount_active) {\n $price = $this->discountprice;\n }\n// NOTE: Add more conditions and rules as desired, i.e.\n// if ($this->testFlag('Outlet')) {\n// $discountRate = $this->getOutletDiscountRate();\n// $price = number_format(\n// $price * (100 - $discountRate) / 100,\n// 2, '.', '');\n// }\n return $price;\n }", "public function getDiscountAmount()\n\t{\n\t\treturn $this->discount_amount;\n\t}", "public function getDiscountRate(){\n return $this->getParameter('discount_rate');\n }", "public function getDiscountType()\n {\n return $this->discountType;\n }", "function get_order_discount_total() {\n\t\t\treturn $this->discount_total;\n\t\t}", "public function getDiscountAttribute()\n {\n if (isset($this->attributes['discount'])) {\n return $this->attributes['discount'];\n }\n return (int)$this->vouchers()->sum('discount');\n }", "public function getDiscountPercent()\n\t{\n\t\treturn $this->discount_percent;\n\t}", "public function getTotalDiscount(): float;", "function get_cart_discount_total() {\n\t\t\treturn $this->discount_cart;\n\t\t}", "public function getItemDiscountAmount()\n {\n return $this->itemDiscountAmount;\n }", "public function getDiscount(): ?float\n {\n return $this->discount;\n }", "public function getDiscountPercent() {\n return $this->item->getDiscountPercent();\n }", "public function getDiscounted()\n {\n if (is_null($this->discounted)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISCOUNTED);\n if (is_null($data)) {\n return null;\n }\n\n $this->discounted = DiscountedPriceDraftModel::of($data);\n }\n\n return $this->discounted;\n }", "public function getDiscounted()\n {\n return $this->discounted instanceof DiscountedPriceDraftBuilder ? $this->discounted->build() : $this->discounted;\n }", "public function getDiscountAmount() {\n return $this->item->getDiscountAmount();\n }", "public function getNoDiscount() {\n return $this->item->getNoDiscount();\n }", "public function getTotalDiscountAmount();", "function getDiscountFor($product) {\n\t\treturn 30;\n\t}", "function customerDiscount()\r\n\t{\r\n\t\t$sql = $GLOBALS['db']->Query(\"SELECT Wert FROM \" . PREFIX . \"_modul_shop_kundenrabatte WHERE GruppenId = '\".UGROUP.\"' LIMIT 1\");\r\n\t\t$row = $sql->fetchrow();\r\n\t\t$sql->close();\r\n\t\tif(is_object($row))\r\n\t\t\treturn $row->Wert;\r\n\t}", "public function discount()\n {\n return $this->belongsTo(Discount::class);\n }", "public function getDisplayTotalDiscountAttribute() {\n return Shop::format($this->totalDiscount);\n }", "public function getDiscounts()\n {\n return $this->discounts;\n }", "public function discountOrChargeValue()\n {\n return $this->discountOrChargeValueBoleta();\n }", "public function getDiscounts()\r\n {\r\n return $this->_discounts;\r\n }", "public function getValue()\n {\n return $this->value instanceof CartDiscountValueBuilder ? $this->value->build() : $this->value;\n }", "public function getValue()\n {\n return $this->value instanceof CartDiscountValueBuilder ? $this->value->build() : $this->value;\n }", "public function getDiscountRefunded() {\n return $this->item->getDiscountRefunded();\n }", "public function getShippingDiscountAmount();", "public function getCalculatedHandlingDiscount()\n {\n return $this->calculatedHandlingDiscount;\n }", "public function getBaseDiscountInvoiced();", "public function getAttributes_discounted() {\n\t\treturn $this->attributes_discounted;\n\t}", "public function getDiscount()\n {\n $currency = $this->currency();\n\n return array_reduce(\n $this->tickets(),\n function ($carry, Category $ticket) {\n return $ticket->getDiscount()->plus($carry);\n },\n Money::fromCent($currency, 0)\n );\n }", "public function getDiscountData() {\n return array(\n 'discValue' => $this->discValue,\n 'discValueCode' => $this->discValueCode,\n 'minPurchaseVal' => $this->minPurchaseVal,\n 'receiptDisc' => $this->receiptDisc,\n 'maxreceDisc' => $this->maxreceDisc\n );\n }", "function discount_rate($discount_rate=null)\n {\n if (isset($discount_rate)) $this->discount_rate = $discount_rate;\n return $this->discount_rate;\n }", "function discount_amount($discount_amount=null)\n {\n if (isset($discount_amount)) $this->discount_amount = $discount_amount;\n return $this->discount_amount;\n }", "public function getBaseDiscountAmount();", "public function getCalculatedShippingDiscount()\n {\n return $this->calculatedShippingDiscount;\n }", "public function getDiscountCanceled();", "public function getBaseDiscountInvoiced() {\n return $this->item->getBaseDiscountInvoiced();\n }", "public function discountOrChargeValueBoleta()\n {\n if($this->discount_or_charge_value > 0)\n return $this->discount_or_charge_value;\n else if ($this->discount_or_charge_percentage > 0)\n return (int) round( ($this->discount_or_charge_percentage / 100) * ($this->price * $this->quantity));\n else //pos sale without discount\n return 0;\n }", "public function getDiscount($uuid) {\n return $this->_discounts[$uuid]??null;\n }", "public function getCouponDiscountType()\n {\n $processReaction = $this->couponEngine\n ->prepareDiscountType();\n\n // get engine reaction\n return __processResponse($processReaction, [], $processReaction['data']);\n }", "public function getBaseDiscountRefunded();", "public function getDiscounts() {\n return $this->_discounts;\n }", "public function getPropertyRental()\n {\n return $this->propertyRental;\n }", "private function get_discount_percentage() : float {\n\t\tpreg_match( '/runParams\\.discount=\"(.*?)\";/si', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn floatval( $matches[1] );\n\t}", "public function get()\n {\n return $this->coupon->get();\n }", "public function getPercentageDiscountPrice()\n {\n return $this->percentage_discount_price . ' %';\n }", "public function setDiscount($discount)\r\n {\r\n $this->discount = $discount;\r\n\r\n return $this;\r\n }", "public function testSetGetDiscount()\n {\n $this->item->setPrice(85.00);\n $this->item->setQuantity(1);\n $this->item->addDiscount(\n (new FlatDiscount())\n ->setFigure(15.00)\n );\n\n $this->assertEquals($this->item->getPriceTotal(), 85.00);\n $this->assertEquals($this->item->getNetTotal(), 70.00);\n $this->assertEquals($this->item->getDiscount(), 15.00);\n }", "function course_discounted_amount($price, $coupon)\n{\n $return_val = $price;\n if (!empty($coupon)) {\n $coupon_details = CourseCoupon::where('code', $coupon)->first();\n if (!empty($coupon_details)) {\n if ($coupon_details->discount_type === 'percentage') {\n $discount_bal = ($price / 100) * (int)$coupon_details->discount;\n $return_val = $price - $discount_bal;\n } elseif ($coupon_details->discount_type === 'amount') {\n $return_val = $price - (int)$coupon_details->discount;\n }\n }\n }\n\n return $return_val;\n}", "public function getDiscountTaxCompensationInvoiced();", "function get_total_discount() {\n\t\t\tif ($this->discount_total || $this->discount_cart) :\n\t\t\t\treturn cmdeals_price($this->discount_total + $this->discount_cart); \n\t\t\tendif;\n\t\t\treturn false;\n\t\t}", "function getDiscountDetailByReferenceNo($reference_no) {\n $qry = $this->db->query(\"select * from tbl_discount_applied where reference_no=$reference_no\");\n if($qry->num_rows()){\n $result = current($qry->result_array());\n $result['original_total_price'] = number_format($result['original_total_price'],2,'.','');\n $result['discount'] = number_format($result['discount'],2,'.','');\n $result['total_price'] = number_format($result['total_price'],2,'.','');\n return $result;\n }\n return false;\n }", "public function get_total_discount() {\n\t\treturn apply_filters( 'woocommerce_cart_total_discount', $this->get_discount_total() ? wc_price( $this->get_discount_total() ) : false, $this );\n\t}", "public function getCoupon()\n\t {\n\t $discount = $this->carObj->addSeasonDiscount();\n\t $discount = $this->carObj->addStockDiscount();\n\t \n\t return $coupon = \"Get {$discount}% off the price of your new car.\";\n\t }", "public function getTotalDiscountAttribute() {\n if (empty($this->shopCalculations)) $this->runCalculations();\n return round($this->shopCalculations->totalDiscount, 2);\n }", "public function getPromotion(){\n return $this->promotion;\n }", "public function getDiscountedAmount()\n\t{\n\t\t$amount = $this->getAmount();\n\n\t\treturn $amount - ($amount * $this->discount);\n\t}", "private function calcDiscountPercent()\n\t{\n\t if( $this->db->table_exists($this->c_table)) $record = $this->db->query(\"select * from {$this->c_table} where products_count<=? and order_amount<=? order by discount_percent desc\",array($this->products_count,$this->order_amount))->row_array();\n\t if(!@$record) return 0;\n\t return $record['discount_percent'];\n\t}", "public function getValue()\n {\n return $this->value instanceof ProductDiscountValueDraftBuilder ? $this->value->build() : $this->value;\n }", "public function getDiscountAmount()\n {\n $total = 0;\n $discount = 0;\n \n foreach ($this->items as $item) {\n if ($item->Price) {\n $total += ($item->Price * $item->Quantity);\n }\n \n if ($item->Discount) {\n $discount += ($item->TotalDiscount);\n }\n }\n \n if ($discount > $total) {\n $discount = $total;\n }\n\n return $discount;\n }", "public function getShippingDiscountAmount()\n {\n return $this->shippingDiscountAmount;\n }", "public function hasDiscount(){\n return $this->_has(9);\n }", "public function getBaseShippingDiscountAmount();", "public function discountType()\n {\n return $this->belongsTo(DiscountType::class);\n }", "public function listDiscounts()\n {\n return $this->correct(Discount::orderBy('created_at','desc')->get());\n }", "public function isDiscounted()\n\t{\n\t\treturn $this->discounted;\n\t}", "public function getDiscounts()\n {\n return $this->hasMany(Discount::class, ['discount_unit_id' => 'id']);\n }", "public function getBaseDiscountRefunded() {\n return $this->item->getBaseDiscountRefunded();\n }" ]
[ "0.79896754", "0.7841338", "0.74055165", "0.74027413", "0.7321588", "0.72975737", "0.72875565", "0.72236073", "0.72219896", "0.72046924", "0.7162116", "0.71152353", "0.7111353", "0.71105886", "0.7058027", "0.6991039", "0.69812125", "0.69605565", "0.69508463", "0.6922817", "0.6891487", "0.6882114", "0.6878861", "0.6878861", "0.68531525", "0.68508637", "0.6826051", "0.68237793", "0.6730671", "0.6713959", "0.6675269", "0.6667495", "0.66637945", "0.66636515", "0.6635627", "0.66254085", "0.66223663", "0.6604682", "0.6583043", "0.655642", "0.65458274", "0.6536576", "0.65296084", "0.6514711", "0.649706", "0.64846134", "0.6457652", "0.64559764", "0.6440515", "0.6433931", "0.6433931", "0.64334255", "0.64286596", "0.64237505", "0.63853836", "0.6358957", "0.635612", "0.6346107", "0.632169", "0.6254559", "0.6246669", "0.6228698", "0.6215637", "0.62110627", "0.6206788", "0.6202765", "0.61966324", "0.61945236", "0.6178687", "0.61698854", "0.61619496", "0.61181676", "0.61178243", "0.6079313", "0.607192", "0.6066638", "0.6065849", "0.60656834", "0.6042592", "0.6039381", "0.6038162", "0.60327804", "0.6021084", "0.6013008", "0.6011675", "0.59940493", "0.5993737", "0.59923995", "0.598926", "0.5969339", "0.5969332", "0.5949665", "0.5936364", "0.593194", "0.593106" ]
0.7977441
5
Retrieve the base property
public function getBase() { return $this->base; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBase() {\n return $this->base;\n }", "public function getBase() {\n return $this->base;\n }", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase()\n\t{\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\n return $this->base;\n }", "public function base()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function get_base_object() {\n\t\treturn $this->_base_obj;\n\t}", "public function getBaseValue()\r\n {\r\n return $this->baseValue;\r\n }", "public function getBase() {}", "function inheritance_field() {\n\t\treturn $this->inheritance_field;\n\t}", "protected function getPropertyValue() {}", "public function getProperty();", "public function __get($prop) {}", "public function getBase(): string\n {\n return $this->base;\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getReferencedProperty(): string;", "public function getCommonPropertyType(?ELContext $context, $base): ?string\n {\n $result = null;\n foreach ($this->resolvers as $resolver) {\n $type = $resolver->getCommonPropertyType($context, $base);\n if ($type !== null) {\n if ($result === null || gettype($result) == $type) {\n $result = $type;\n } elseif (gettype($result) != $type) {\n $result = gettype(new \\stdClass());\n }\n }\n }\n return $result;\n }", "public function getProperty() {\n return $this->property;\n }", "protected function _getBase ()\n {\n global $config;\n return $config->current['BASE'];\n }", "public function getProperty(): string;", "public function base()\n {\n return $this->string;\n }", "abstract protected function propertyGet($name);", "public function __get($prop){\n\t\treturn $this->$prop;\n\t}", "public function __get($property) {}", "public function __get($prop)\r\n {\r\n return $this->$prop;\r\n }", "public function getParentPrivateRawProperty()\n {\n return $this->privateRawProperty;\n }", "function prop($prop)\n {\n \treturn $this->get_property($prop);\n }", "public function base()\n {\n return $this->baseEvent;\n }", "public function getMainProperty()\n {\n return $this->__get(\"main_property\");\n }", "public function getBase() {\n\t\t\t\n\t\t\treturn $this->tag;\n\t\t\t\n\t\t}", "function __get($name) {\n if(array_key_exists($name, $this->_prop)) return $this->_prop[$name];\n switch($name) {\n case 'size':\n return $this->strlen();\n\n case 'baseURI':\n return $this->baseURI();\n\n case 'base_url':\n return @$this->_prop['baseURL'];\n\n case 'location':\n case 'href':\n return $this->location();\n\n case 'charset':\n if($this->html) {\n $this->_prop['charset'] =\n $c = self::detect_charset($this->html);\n return $c;\n }\n break;\n }\n }", "function __get($property)\n {\n return $this->value;\n }", "public function childProperty(): string\n {\n return $this->childProperty;\n }", "abstract public function getObjectDefinitionProperty();", "public function getBaseAmount() {\r\n return $this->baseAmount;\r\n }", "public function propertyInfo() {\n return entity_get_property_info($this->entityType);\n }", "public function getp($property){\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "abstract protected function get_properties();", "abstract public function getProperties();", "public function getResourceProperty()\r\n {\r\n return $this->_resourceProperty;\r\n }", "public function __get($propertyName){\n if(array_key_exists($propertyName, $this->properties)){\n\n return $this->properties[$propertyName];\n }\n \n }", "public function base()\n {\n if (!$this->base) {\n $this->base = monsters::find($this->id);\n }\n return $this->base;\n }", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "function get_default_property($name)\r\n {\r\n return $this->defaultProperties[$name];\r\n }", "public function getProperty()\n\t{\n\t\treturn empty($this->property) ? strtolower($this->getName()) : $this->property;\n\t}", "function entity_type_inherited_properties($entity_type) {\n}", "abstract public function get_property( $slug, $child_slug = '' );", "public function __get($property){\n /*if(method_exists($this,'get'.ucfirst($property))){\n\n }*/\n return $this->$property;\n }", "abstract protected function getProperties();", "public static function getBaseEndpoint()\n {\n return self::$base_endpoint;\n }", "public function __get($prop)\n {\n return $this->assignee[$prop];\n }", "public function getValue(?ELContext $context, $base, $property)\n {\n $context->setPropertyResolved(false);\n foreach ($this->resolvers as $resolver) {\n $value = $resolver->getValue($context, $base, $property);\n if ($context->isPropertyResolved()) {\n return $value;\n }\n }\n return null;\n }", "public function get_superficie(){ return $this->_superficie;}", "public function __get($property) {\n\n if (property_exists($this, $property)){\n return $this->$property;\n }\n\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) {\n\t\tif ($this->is_property_cached($property)) {\n\t\t\treturn $this->get_cached_property($property);\n\t\t}\n\t\t\n\t\t$object = $this->get_base_object();\n\t\t\n\t\tif (!property_exists($object, $property))\n\t\t\tthrow new zek_get_exception(\"Property '\" . $property . \"' does not exist in base object\");\n\n\t\t$this->set_cached_property($property, $object->$property);\n\t\treturn $object->$property;\n\t}", "public function __get($property){\n\t\tif (property_exists($this, $property)) {\n\t \treturn $this->$property;\n\t }\n\t}", "public function getBaseAmount()\n {\n return $this->amount;\n }", "public function baseFile()\n\t{\n\t\treturn $this->baseFile;\n\t}", "public function getEndpointBase()\n {\n return $this->getParameter('endpointBase');\n }", "public function __get( $property ) {\n\t\t\tif ( property_exists( $this, $property ) ) {\n\t\t\t\treturn $this->$property;\n\t\t\t}\n\t\t\tif (\n\t\t\t\t$this->slplus->database->has_extended_data() &&\n\t\t\t\tisset( $this->exdata[ $property ] )\n\t\t\t) {\n\t\t\t\treturn $this->exdata[ $property ];\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->temporary[ $property ] ) ) {\n\t\t\t\treturn $this->temporary[ $property ];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function getBaseAssetPath()\n {\n if( isset( $this->getProperty()->baseAssetPath ) )\n return $this->getProperty()->baseAssetPath;\n return NULL;\n }", "public function getLocationbase()\n {\n return $this->locationbase;\n }", "public function __get($prop)\r\n {\r\n return $this->wrappedObj->$prop;\r\n }", "function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }", "public function __get($name){\n\t\treturn ( !empty($this->properties[$name]) ? $this->properties[$name] : null );\n\t}", "public function __get($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\treturn $this->getSourceInstance();\n\t\t\t} else {\n\t\t\t\t$sourceInstance = $this->getSourceInstance();\n\t\t\t\t$sourceServer = $this->getSourceServer();\n\t\t\t\tif ($sourceInstance !== null && isset($sourceInstance->$property)) {\n\t\t\t\t\treturn $sourceInstance->$property;\n\t\t\t\t} elseif ($sourceServer !== null && isset($sourceServer->$property)) {\n\t\t\t\t\treturn $sourceServer->$property;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\treturn $this->getTargetInstance();\n\t\t\t} else {\n\t\t\t\t$targetInstance = $this->getTargetInstance();\n\t\t\t\t$targetServer = $this->getTargetServer();\n\t\t\t\tif ($targetInstance !== null && isset($targetInstance->$property)) {\n\t\t\t\t\treturn $targetInstance->$property;\n\t\t\t\t} elseif ($targetServer !== null && isset($targetServer->$property)) {\n\t\t\t\t\treturn $targetServer->$property;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tif (isset($this->tempProperties[$property])) {\n\t\t\t\treturn $this->tempProperties[$property];\n\t\t\t}\n\t\t} elseif (isset($this->bean->$property)) {\n\t\t\treturn $this->bean->$property;\n\t\t} else{\n\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t$this->loadProperties();\n\t\t\t}\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\treturn $this->properties[$property];\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "public function __get($property) {\n\t\tswitch($property) {\n\t\t\tcase 'sectionTag':\n\t\t\t\treturn $this->stepSection->tag;\n\n\t\t\tcase 'stepSection':\n\t\t\t\treturn $this->stepSection;\n\n\t\t\tdefault:\n\t\t\t\treturn parent::__get($property);\n\t\t}\n\t}", "public function getProperty()\n {\n if (!$this->property) {\n $this->property = Inflector::underscore($this->alias);\n }\n\n return $this->property;\n }", "public function __get($property){\n\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "abstract public function getRawAdditionalProperties();", "function __get ($name)\n\t{\n\t\tswitch ($name) {\n\t\t\tcase \"codeBase\":\n\t\t\t\treturn $this->_getProperty($name, \"path\");\n\t\t\tbreak;\n\t\t\tcase \"name\":\n\t\t\tcase \"alt\":\n\t\t\tcase \"align\":\n\t\t\tcase \"archive\":\n\t\t\tcase \"code\":\n\t\t\tcase \"object\":\n\t\t\t\treturn $this->_getProperty($name);\n\t\t\tbreak;\n\t\t\tcase \"width\":\n\t\t\tcase \"height\":\n\t\t\t\treturn $this->_getProperty($name, \"intperc\");\n\t\t\tbreak;\n\t\t\tcase \"hspace\":\n\t\t\tcase \"vspace\":\n\t\t\t\treturn (int) $this->_getProperty($name, \"int\", - 1);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn parent::__get($name);\n\t\t\tbreak;\n\t\t}\n\t}", "public function getProperties()\n {\n return $this->getProperty();\n }", "public function getBaseClass()\n {\n if ($this->entity) {\n return '\\\\TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractEntity';\n } else {\n return '\\\\TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractValueObject';\n }\n }", "public function __get( $name )\n {\n if ( array_key_exists( $name, $this->properties ) )\n {\n return $this->properties[$name];\n }\n return parent::__get( $name );\n }", "public function __get( $name )\n {\n if ( array_key_exists( $name, $this->properties ) )\n {\n return $this->properties[$name];\n }\n return parent::__get( $name );\n }", "public function getPropertyValue() {\n\t\t$propertyValue = parent::getPropertyValue();\n\t\tif ($propertyValue === NULL)\n\t\t\treturn FALSE;\n\t\treturn $propertyValue;\n\t}", "function __get($property)\n {\n return $this->$property;\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getIsBase()\n\t{\n\t\treturn $this->isBase; \n\n\t}", "public function getBaseModifier()\n {\n return $this->getRequest()->getBaseModifier();\n }", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public function __get( $name )\n {\n switch ( $name )\n {\n case \"magic\":\n case \"version\":\n case \"userName\":\n case \"groupName\":\n case \"deviceMajorNumber\":\n case \"deviceMinorNumber\":\n case \"filePrefix\":\n return $this->properties[ $name ];\n }\n\n return parent::__get( $name );\n }", "public function getMyProperties(){\n return new PersonProperties($this->getContext(),$this->getResourcePath(),\"getmyproperties\");\n }", "public function __get($property) {\n\t\tif(property_exists($this, $property))\n\t\t\treturn $this->$property;\n\t}", "function entity_type_inheritable_properties($entity_type) {\n}" ]
[ "0.729941", "0.729941", "0.7256318", "0.7256318", "0.7256318", "0.7256318", "0.7256318", "0.72374195", "0.7206527", "0.71509206", "0.6984356", "0.6984356", "0.6984356", "0.68858105", "0.68435097", "0.6785851", "0.6619723", "0.6601237", "0.65846527", "0.64889735", "0.6462431", "0.6412292", "0.6412292", "0.6383792", "0.6360272", "0.62665826", "0.6234889", "0.622949", "0.61954176", "0.6188006", "0.6105615", "0.608647", "0.60803854", "0.60785836", "0.6063617", "0.60341734", "0.6033633", "0.60263413", "0.60027885", "0.5960845", "0.5949979", "0.5889582", "0.5887117", "0.5885112", "0.5884225", "0.58813894", "0.5878969", "0.5876791", "0.58705187", "0.5848397", "0.5833659", "0.58274496", "0.5817813", "0.58177334", "0.5814697", "0.5809789", "0.58002764", "0.579476", "0.5790714", "0.57894295", "0.5783558", "0.57802135", "0.5774902", "0.5774902", "0.5774902", "0.5774902", "0.5774902", "0.57550764", "0.57530814", "0.57449806", "0.5741583", "0.57333994", "0.57300186", "0.5713568", "0.57134765", "0.5705546", "0.5701369", "0.5695521", "0.5693501", "0.56855005", "0.56845146", "0.5683403", "0.56825584", "0.5680264", "0.56774366", "0.5674074", "0.56537104", "0.56537104", "0.56505364", "0.5641671", "0.5640305", "0.5638913", "0.56312436", "0.5628709", "0.5624598", "0.5620527", "0.56205034", "0.5620377" ]
0.7299403
4
Retrieve the base property
public function getValue() { return $this->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBase() {\n return $this->base;\n }", "public function getBase() {\n return $this->base;\n }", "public function getBase()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->base;\n }", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\t\treturn $this->base;\n\t}", "public function getBase()\n\t{\n\t\treturn $this->base;\n\t}", "public function getBase() {\n\n return $this->base;\n }", "public function base()\n {\n return $this->base;\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function getBase()\n {\n return $this->get(self::_BASE);\n }", "public function get_base_object() {\n\t\treturn $this->_base_obj;\n\t}", "public function getBaseValue()\r\n {\r\n return $this->baseValue;\r\n }", "public function getBase() {}", "function inheritance_field() {\n\t\treturn $this->inheritance_field;\n\t}", "protected function getPropertyValue() {}", "public function getProperty();", "public function __get($prop) {}", "public function getBase(): string\n {\n return $this->base;\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getReferencedProperty(): string;", "public function getCommonPropertyType(?ELContext $context, $base): ?string\n {\n $result = null;\n foreach ($this->resolvers as $resolver) {\n $type = $resolver->getCommonPropertyType($context, $base);\n if ($type !== null) {\n if ($result === null || gettype($result) == $type) {\n $result = $type;\n } elseif (gettype($result) != $type) {\n $result = gettype(new \\stdClass());\n }\n }\n }\n return $result;\n }", "public function getProperty() {\n return $this->property;\n }", "protected function _getBase ()\n {\n global $config;\n return $config->current['BASE'];\n }", "public function getProperty(): string;", "public function base()\n {\n return $this->string;\n }", "abstract protected function propertyGet($name);", "public function __get($prop){\n\t\treturn $this->$prop;\n\t}", "public function __get($property) {}", "public function __get($prop)\r\n {\r\n return $this->$prop;\r\n }", "public function getParentPrivateRawProperty()\n {\n return $this->privateRawProperty;\n }", "function prop($prop)\n {\n \treturn $this->get_property($prop);\n }", "public function base()\n {\n return $this->baseEvent;\n }", "public function getMainProperty()\n {\n return $this->__get(\"main_property\");\n }", "public function getBase() {\n\t\t\t\n\t\t\treturn $this->tag;\n\t\t\t\n\t\t}", "function __get($name) {\n if(array_key_exists($name, $this->_prop)) return $this->_prop[$name];\n switch($name) {\n case 'size':\n return $this->strlen();\n\n case 'baseURI':\n return $this->baseURI();\n\n case 'base_url':\n return @$this->_prop['baseURL'];\n\n case 'location':\n case 'href':\n return $this->location();\n\n case 'charset':\n if($this->html) {\n $this->_prop['charset'] =\n $c = self::detect_charset($this->html);\n return $c;\n }\n break;\n }\n }", "function __get($property)\n {\n return $this->value;\n }", "public function childProperty(): string\n {\n return $this->childProperty;\n }", "abstract public function getObjectDefinitionProperty();", "public function getBaseAmount() {\r\n return $this->baseAmount;\r\n }", "public function propertyInfo() {\n return entity_get_property_info($this->entityType);\n }", "public function getp($property){\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "abstract protected function get_properties();", "abstract public function getProperties();", "public function getResourceProperty()\r\n {\r\n return $this->_resourceProperty;\r\n }", "public function __get($propertyName){\n if(array_key_exists($propertyName, $this->properties)){\n\n return $this->properties[$propertyName];\n }\n \n }", "public function base()\n {\n if (!$this->base) {\n $this->base = monsters::find($this->id);\n }\n return $this->base;\n }", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "function get_default_property($name)\r\n {\r\n return $this->defaultProperties[$name];\r\n }", "public function getProperty()\n\t{\n\t\treturn empty($this->property) ? strtolower($this->getName()) : $this->property;\n\t}", "function entity_type_inherited_properties($entity_type) {\n}", "abstract public function get_property( $slug, $child_slug = '' );", "public function __get($property){\n /*if(method_exists($this,'get'.ucfirst($property))){\n\n }*/\n return $this->$property;\n }", "abstract protected function getProperties();", "public static function getBaseEndpoint()\n {\n return self::$base_endpoint;\n }", "public function __get($prop)\n {\n return $this->assignee[$prop];\n }", "public function getValue(?ELContext $context, $base, $property)\n {\n $context->setPropertyResolved(false);\n foreach ($this->resolvers as $resolver) {\n $value = $resolver->getValue($context, $base, $property);\n if ($context->isPropertyResolved()) {\n return $value;\n }\n }\n return null;\n }", "public function get_superficie(){ return $this->_superficie;}", "public function __get($property) {\n\n if (property_exists($this, $property)){\n return $this->$property;\n }\n\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) {\n\t\tif ($this->is_property_cached($property)) {\n\t\t\treturn $this->get_cached_property($property);\n\t\t}\n\t\t\n\t\t$object = $this->get_base_object();\n\t\t\n\t\tif (!property_exists($object, $property))\n\t\t\tthrow new zek_get_exception(\"Property '\" . $property . \"' does not exist in base object\");\n\n\t\t$this->set_cached_property($property, $object->$property);\n\t\treturn $object->$property;\n\t}", "public function __get($property){\n\t\tif (property_exists($this, $property)) {\n\t \treturn $this->$property;\n\t }\n\t}", "public function getBaseAmount()\n {\n return $this->amount;\n }", "public function baseFile()\n\t{\n\t\treturn $this->baseFile;\n\t}", "public function getEndpointBase()\n {\n return $this->getParameter('endpointBase');\n }", "public function __get( $property ) {\n\t\t\tif ( property_exists( $this, $property ) ) {\n\t\t\t\treturn $this->$property;\n\t\t\t}\n\t\t\tif (\n\t\t\t\t$this->slplus->database->has_extended_data() &&\n\t\t\t\tisset( $this->exdata[ $property ] )\n\t\t\t) {\n\t\t\t\treturn $this->exdata[ $property ];\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->temporary[ $property ] ) ) {\n\t\t\t\treturn $this->temporary[ $property ];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function getBaseAssetPath()\n {\n if( isset( $this->getProperty()->baseAssetPath ) )\n return $this->getProperty()->baseAssetPath;\n return NULL;\n }", "public function getLocationbase()\n {\n return $this->locationbase;\n }", "public function __get($prop)\r\n {\r\n return $this->wrappedObj->$prop;\r\n }", "function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }", "public function __get($name){\n\t\treturn ( !empty($this->properties[$name]) ? $this->properties[$name] : null );\n\t}", "public function __get($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\treturn $this->getSourceInstance();\n\t\t\t} else {\n\t\t\t\t$sourceInstance = $this->getSourceInstance();\n\t\t\t\t$sourceServer = $this->getSourceServer();\n\t\t\t\tif ($sourceInstance !== null && isset($sourceInstance->$property)) {\n\t\t\t\t\treturn $sourceInstance->$property;\n\t\t\t\t} elseif ($sourceServer !== null && isset($sourceServer->$property)) {\n\t\t\t\t\treturn $sourceServer->$property;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\treturn $this->getTargetInstance();\n\t\t\t} else {\n\t\t\t\t$targetInstance = $this->getTargetInstance();\n\t\t\t\t$targetServer = $this->getTargetServer();\n\t\t\t\tif ($targetInstance !== null && isset($targetInstance->$property)) {\n\t\t\t\t\treturn $targetInstance->$property;\n\t\t\t\t} elseif ($targetServer !== null && isset($targetServer->$property)) {\n\t\t\t\t\treturn $targetServer->$property;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tif (isset($this->tempProperties[$property])) {\n\t\t\t\treturn $this->tempProperties[$property];\n\t\t\t}\n\t\t} elseif (isset($this->bean->$property)) {\n\t\t\treturn $this->bean->$property;\n\t\t} else{\n\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t$this->loadProperties();\n\t\t\t}\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\treturn $this->properties[$property];\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "public function __get($property) {\n\t\tswitch($property) {\n\t\t\tcase 'sectionTag':\n\t\t\t\treturn $this->stepSection->tag;\n\n\t\t\tcase 'stepSection':\n\t\t\t\treturn $this->stepSection;\n\n\t\t\tdefault:\n\t\t\t\treturn parent::__get($property);\n\t\t}\n\t}", "public function getProperty()\n {\n if (!$this->property) {\n $this->property = Inflector::underscore($this->alias);\n }\n\n return $this->property;\n }", "public function __get($property){\n\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "abstract public function getRawAdditionalProperties();", "function __get ($name)\n\t{\n\t\tswitch ($name) {\n\t\t\tcase \"codeBase\":\n\t\t\t\treturn $this->_getProperty($name, \"path\");\n\t\t\tbreak;\n\t\t\tcase \"name\":\n\t\t\tcase \"alt\":\n\t\t\tcase \"align\":\n\t\t\tcase \"archive\":\n\t\t\tcase \"code\":\n\t\t\tcase \"object\":\n\t\t\t\treturn $this->_getProperty($name);\n\t\t\tbreak;\n\t\t\tcase \"width\":\n\t\t\tcase \"height\":\n\t\t\t\treturn $this->_getProperty($name, \"intperc\");\n\t\t\tbreak;\n\t\t\tcase \"hspace\":\n\t\t\tcase \"vspace\":\n\t\t\t\treturn (int) $this->_getProperty($name, \"int\", - 1);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn parent::__get($name);\n\t\t\tbreak;\n\t\t}\n\t}", "public function getProperties()\n {\n return $this->getProperty();\n }", "public function getBaseClass()\n {\n if ($this->entity) {\n return '\\\\TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractEntity';\n } else {\n return '\\\\TYPO3\\\\CMS\\\\Extbase\\\\DomainObject\\\\AbstractValueObject';\n }\n }", "public function __get( $name )\n {\n if ( array_key_exists( $name, $this->properties ) )\n {\n return $this->properties[$name];\n }\n return parent::__get( $name );\n }", "public function __get( $name )\n {\n if ( array_key_exists( $name, $this->properties ) )\n {\n return $this->properties[$name];\n }\n return parent::__get( $name );\n }", "public function getPropertyValue() {\n\t\t$propertyValue = parent::getPropertyValue();\n\t\tif ($propertyValue === NULL)\n\t\t\treturn FALSE;\n\t\treturn $propertyValue;\n\t}", "function __get($property)\n {\n return $this->$property;\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getIsBase()\n\t{\n\t\treturn $this->isBase; \n\n\t}", "public function getBaseModifier()\n {\n return $this->getRequest()->getBaseModifier();\n }", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public function __get( $name )\n {\n switch ( $name )\n {\n case \"magic\":\n case \"version\":\n case \"userName\":\n case \"groupName\":\n case \"deviceMajorNumber\":\n case \"deviceMinorNumber\":\n case \"filePrefix\":\n return $this->properties[ $name ];\n }\n\n return parent::__get( $name );\n }", "public function getMyProperties(){\n return new PersonProperties($this->getContext(),$this->getResourcePath(),\"getmyproperties\");\n }", "public function __get($property) {\n\t\tif(property_exists($this, $property))\n\t\t\treturn $this->$property;\n\t}", "function entity_type_inheritable_properties($entity_type) {\n}" ]
[ "0.729941", "0.729941", "0.7299403", "0.7299403", "0.7299403", "0.7256318", "0.7256318", "0.7256318", "0.7256318", "0.7256318", "0.72374195", "0.7206527", "0.71509206", "0.6984356", "0.6984356", "0.6984356", "0.68858105", "0.68435097", "0.6785851", "0.6619723", "0.6601237", "0.65846527", "0.64889735", "0.6462431", "0.6412292", "0.6412292", "0.6383792", "0.6360272", "0.62665826", "0.6234889", "0.622949", "0.61954176", "0.6188006", "0.6105615", "0.608647", "0.60803854", "0.60785836", "0.6063617", "0.60341734", "0.6033633", "0.60263413", "0.60027885", "0.5960845", "0.5949979", "0.5889582", "0.5887117", "0.5885112", "0.5884225", "0.58813894", "0.5878969", "0.5876791", "0.58705187", "0.5848397", "0.5833659", "0.58274496", "0.5817813", "0.58177334", "0.5814697", "0.5809789", "0.58002764", "0.579476", "0.5790714", "0.57894295", "0.5783558", "0.57802135", "0.5774902", "0.5774902", "0.5774902", "0.5774902", "0.5774902", "0.57550764", "0.57530814", "0.57449806", "0.5741583", "0.57333994", "0.57300186", "0.5713568", "0.57134765", "0.5705546", "0.5701369", "0.5695521", "0.5693501", "0.56855005", "0.56845146", "0.5683403", "0.56825584", "0.5680264", "0.56774366", "0.5674074", "0.56537104", "0.56537104", "0.56505364", "0.5641671", "0.5640305", "0.5638913", "0.56312436", "0.5628709", "0.5624598", "0.5620527", "0.56205034", "0.5620377" ]
0.0
-1
Configuration Form: Save Settings
private function _postProcess() { if (Tools::isSubmit('btnSubmit')) { Configuration::updateValue('MONDIDO_CHECKOUT_MERCHANTID', Tools::getValue('merchant_id')); Configuration::updateValue('MONDIDO_CHECKOUT_SECRET', Tools::getValue('secret_code')); Configuration::updateValue('MONDIDO_CHECKOUT_PASSWORD', Tools::getValue('password')); Configuration::updateValue('MONDIDO_CHECKOUT_TEST_MODE', Tools::getValue('test_mode')); Configuration::updateValue('MONDIDO_CHECKOUT_ACTIVE', Tools::getValue('is_active')); } $this->_html .= '<div class="conf confirm"> ' . $this->l('Settings updated') . '</div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\t\n\t\t$pl = $this->getPluginObject();\n\t\t\n\t\t$form = $this->initConfigurationForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$set1 = $form->getInput(\"setting_1\");\n\t\t\t$set2 = $form->getInput(\"setting_2\");\n\t\n\t\t\t// @todo: implement saving to db\n\t\t\t\n\t\t\tilUtil::sendSuccess($pl->txt(\"saving_invoked\"), true);\n\t\t\t$ilCtrl->redirect($this, \"configure\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "function savesettings()\r\n {\r\n\t\t$this->_savesettings();\r\n $this->setRedirect('index.php?option=com_jfusionconnect&view=cpanel');\r\n }", "public function saveSettings() {\n\t\t\tif ( isset( $_POST['muut_settings_save'] )\n\t\t\t\t&& $_POST['muut_settings_save'] == 'true'\n\t\t\t\t&& check_admin_referer( 'muut_settings_save', 'muut_settings_nonce' )\n\t\t\t) {\n\t\t\t\t$this->submittedSettings = $_POST['setting'];\n\n\t\t\t\t$settings = $this->settingsValidate( $this->getSubmittedSettings() );\n\n\t\t\t\t// Save all the options by passing an array into setOption.\n\t\t\t\tif ( muut()->setOption( $settings ) ) {\n\t\t\t\t\tif ( !empty( $this->errorQueue ) ) {\n\t\t\t\t\t\t// Display partial success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved, other than the errors listed.', 'muut' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Display success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved.', 'muut' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Display error if the settings failed to save.\n\t\t\t\t\tmuut()->queueAdminNotice( 'error', __( 'Failed to save settings.', 'muut' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update-settings');\n\n $data = array();\n\n foreach ($_POST['swpm-settings'] as $key => $val) {\n $data[$key] = esc_html($val);\n }\n\n update_option('swpm-settings', $data);\n }", "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}", "public function save_settings()\n {\n if(isset($_POST) && isset($_POST['api_settings'])) {\n $data = $_POST['api_settings'];\n update_option('api_settings', json_encode($data));\n }\n }", "private function __saveConfiguration()\n {\n //Check is submit the form\n if (Tools::isSubmit(BECOPAY_PREFIX . 'submit')) {\n\n //clear errors messages\n $this->_errors = array();\n\n //validate is set configuration field\n foreach ($this->config['configuration'] as $config) {\n if ($config['isRequired'] && Tools::getValue(BECOPAY_PREFIX . $config['name']) == NULL)\n $this->_errors[] = $this->l($config['title'] . ' is require');\n }\n\n //if has no errors check with PaymentGateway Constructor validation\n if (empty($this->_errors)) {\n try {\n new PaymentGateway(\n Tools::getValue(BECOPAY_PREFIX . 'apiBaseUrl'),\n Tools::getValue(BECOPAY_PREFIX . 'apiKey'),\n Tools::getValue(BECOPAY_PREFIX . 'mobile')\n );\n } catch (\\Exception $e) {\n $this->_errors[] = $e->getMessage();\n }\n }\n\n //Display error messages if has error\n if (!empty($this->_errors)) {\n $this->_html = $this->displayError(implode('<br>', $this->_errors));\n } else {\n\n //save configuration form fields\n foreach ($this->config['configuration'] as $config)\n if (Tools::getValue(BECOPAY_PREFIX . $config['name']) != NULL)\n Configuration::updateValue(BECOPAY_PREFIX . $config['name'], trim(Tools::getValue(BECOPAY_PREFIX . $config['name'])));\n\n\n //display confirmation message\n $this->_html = $this->displayConfirmation($this->l('Settings updated'));\n }\n }\n }", "public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "private function saveConfig(){\n\t\tif(!isset($_POST['services_ipsec_settings_enabled'])){\n\t\t\t$this->data['enable'] = 'false';\n\t\t}\n\t\telseif($_POST['services_ipsec_settings_enabled'] == 'true'){\n\t\t\t$this->data['enable'] = 'true';\n\t\t}\n\t\t\n\t\t$this->config->saveConfig();\n\t\t$this->returnConfig();\n\t}", "public function site_settings()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$data['form_submit_message'] = '';\n\t\t\t$this->load->model('settings_model', 'sm');\n\t\t\t\n\t\t\tif(count($_POST) > 0)\n\t\t\t{\n\t\t\t\tforeach($_POST as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$settings_data['value'] = $value;\n\t\t\t\t\t$this->sm->update($key, $settings_data);\n\t\t\t\t}\n\t\t\t\t$data['form_submit_message'] = '<div style=\"font-weight:bold;color:#0000FF;\">'.lang('msg_settings_saved') .'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t$settings_raw_data = $this->sm->get_all();\n\t\t\t$settings_data = array();\n\t\t\tforeach($settings_raw_data as $raw_settings)\n\t\t\t\t$settings_data[$raw_settings->name] = $raw_settings->value;\n\t\t\t$data['settings'] = $settings_data;\n\t\t\t$this->load->view('settings-admin', $data);\n\t\t}", "public function config_save() {\n }", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "public function save_settings() {\n\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "public function saveSettings()\n\t{\n\t\t$this->ensureAuthed();\n\t\t$input = Input::getInstance();\n\t\t$settings = $input->getInput('settings');\n\t\t$settingsManager = Settings::getInstance();\n\t\t$settingsManager->setSettings($this->username, $settings);\n\t\treturn true;\n\t}", "function saveGeneralPageSettingsObject()\n\t{\n\t\tglobal $ilCtrl, $lng, $tpl;\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$aset = new ilSetting(\"adve\");\n\t\t\t$aset->set(\"use_physical\", $_POST[\"use_physical\"]);\n\t\t\tif ($_POST[\"block_mode_act\"])\n\t\t\t{\n\t\t\t\t$aset->set(\"block_mode_minutes\", (int) $_POST[\"block_mode_minutes\"]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$aset->set(\"block_mode_minutes\", 0);\n\t\t\t}\n\t\t\t\n\t\t\tilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t\t$ilCtrl->redirect($this, \"showGeneralPageEditorSettings\");\n\t\t}\n\t\t\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function saveSettings(){\n\n $vars = $this->getAllSubmittedVariablesByName();\n\n $vars['email'] = $this->email;\n $vars['firstname'] = $this->firstname;\n $vars['lastname'] = $this->lastname;\n $vars['real_name'] = $this->firstname .' ' .$this->lastname;\n $vars['phone'] = $this->phone;\n\n $vars['name'] = $this->firstname;\n $vars['surname'] = $this->lastname;\n $vars['screen_name'] = $this->firstname;\n\n\n $vars['about_my_artwork'] = $this->getSubmittedVariableByName('about_my_artwork');\n $vars['what_i_like_to_do'] = $this->getSubmittedVariableByName('what_i_like_to_do');\n $vars['experience'] = $this->getSubmittedVariableByName('experience');\n $vars['instructions'] = $this->getSubmittedVariableByName('instructions');\n $vars['aftercare'] = $this->getSubmittedVariableByName('aftercare');\n $vars['apprenticeship'] = $this->getSubmittedVariableByName('apprenticeship');\n\n $this->saveNamedVariables($vars);\n }", "function applysettings()\r\n {\r\n\t\t$this->_savesettings();\r\n $this->setRedirect('index.php?option=com_jfusionconnect&view=settings');\r\n }", "private function saveSettings()\n {\n $this->form_validation->set_rules('title', 'lang:bf_site_name', 'required|trim');\n $this->form_validation->set_rules('system_email', 'lang:bf_site_email', 'required|trim|valid_email');\n $this->form_validation->set_rules('offline_reason', 'lang:settings_offline_reason', 'trim');\n $this->form_validation->set_rules('list_limit', 'lang:settings_list_limit', 'required|trim|numeric');\n $this->form_validation->set_rules('password_min_length', 'lang:bf_password_length', 'required|trim|numeric');\n $this->form_validation->set_rules('password_force_numbers', 'lang:bf_password_force_numbers', 'trim|numeric');\n $this->form_validation->set_rules('password_force_symbols', 'lang:bf_password_force_symbols', 'trim|numeric');\n $this->form_validation->set_rules('password_force_mixed_case', 'lang:bf_password_force_mixed_case', 'trim|numeric');\n $this->form_validation->set_rules('password_show_labels', 'lang:bf_password_show_labels', 'trim|numeric');\n $this->form_validation->set_rules('language', 'lang:bf_language', 'required|trim');\n\n if ($this->form_validation->run() === false) {\n return false;\n }\n\n $data = array(\n array('name' => 'site.title', 'value' => $this->input->post('title')),\n array('name' => 'site.system_email', 'value' => $this->input->post('system_email')),\n array('name' => 'site.status', 'value' => $this->input->post('status')),\n array('name' => 'site.offline_reason', 'value' => $this->input->post('offline_reason')),\n array('name' => 'site.list_limit', 'value' => $this->input->post('list_limit')),\n\n array('name' => 'auth.allow_register', 'value' => $this->input->post('allow_register') ? 1 : 0),\n array('name' => 'auth.user_activation_method', 'value' => $this->input->post('user_activation_method') ?: 0),\n array('name' => 'auth.login_type', 'value' => $this->input->post('login_type')),\n array('name' => 'auth.allow_remember', 'value' => $this->input->post('allow_remember') ? 1 : 0),\n array('name' => 'auth.remember_length', 'value' => (int) $this->input->post('remember_length')),\n array('name' => 'auth.password_min_length', 'value' => $this->input->post('password_min_length')),\n array('name' => 'auth.password_force_numbers', 'value' => $this->input->post('password_force_numbers') ? 1 : 0),\n array('name' => 'auth.password_force_symbols', 'value' => $this->input->post('password_force_symbols') ? 1 : 0),\n array('name' => 'auth.password_force_mixed_case', 'value' => $this->input->post('password_force_mixed_case') ? 1 : 0),\n array('name' => 'auth.password_show_labels', 'value' => $this->input->post('password_show_labels') ? 1 : 0),\n array('name' => 'password_iterations', 'value' => $this->input->post('password_iterations')),\n\n\t\t\tarray('name' => 'tips.allow_post', 'value' => $this->input->post('allow_post') ? 1 : 0),\n\t\t\tarray('name' => 'tips.rules', 'value' => $this->input->post('tips_rules')),\n\t\t\t\n array(\n 'name' => 'site.default_language',\n 'value' => $this->input->post('language') ? $this->input->post('language') : ''\n ),\t\t\t\n );\n\n log_activity(\n $this->auth->user_id(),\n lang('bf_act_settings_saved') . ': ' . $this->input->ip_address(),\n 'core'\n );\n\n // Save the settings to the DB.\n $updated = $this->settings_lib->update_batch($data);\n\n return $updated;\n }", "public function save_settings()\n\t{\n\t\tif ( $_POST && wp_verify_nonce( $_POST['save-confirm-user-registration-settings-nonce'], 'save-confirm-user-registration-settings' ) ) :\n\t\t\t$options = array(\n\t\t\t\t'error' => $_POST['error'],\n\t\t\t\t'from' => $_POST['from'],\n\t\t\t\t'subject' => $_POST['subject'],\n\t\t\t\t'message' => $_POST['message']\n\t\t\t);\n\n\t\t\t$options = apply_filters( 'confirm-user-registration-save-options', $options );\n\t\t\tupdate_site_option( 'confirm-user-registration', $options);\n\n\t\t\t?>\n\t\t\t<div class=\"updated message\">\n\t\t\t\t<p><?php _e( 'Saved' ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t}", "public function action_article_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t// These are very likely to come in handy! (i.e. without them we're doomed!)\n\t\trequire_once(ADMINDIR . '/ManagePermissions.controller.php');\n\t\trequire_once(ADMINDIR . '/ManageServer.controller.php');\n\t\trequire_once(SUBSDIR . '/SettingsForm.class.php');\n\n\t\t// Initialize the form\n\t\t$this->_initArticleSettingsForm();\n\n\t\t// Save away\n\t\tif (isset($_GET['save']))\n\t\t{\n\t\t\tcheckSession();\n\n\t\t\t$this->_articleSettingsForm->setConfigValues($_POST);\n\t\t\t$this->_articleSettingsForm->save();\n\t\t\tredirectexit('action=admin;area=portalconfig;sa=articlesettings');\n\t\t}\n\n\t\t// Show the form\n\t\t$context['post_url'] = $scripturl . '?action=admin;area=portalconfig;sa=articlesettings;save';\n\t\t$context['settings_title'] = $txt['sp-adminArticleSettingsName'];\n\t\t$context['page_title'] = $txt['sp-adminArticleSettingsName'];\n\t\t$context['sub_template'] = 'show_settings';\n\n\t\t$this->_articleSettingsForm->prepare();\n\t}", "public function save_settings($settings)\n {\n }", "public function settingsAction ()\n {\n $this->_pageTitle = ['Healthcheck', 'Settings'];\n $this->_navigation->setActiveStep(HealthCheckStepsModel::STEP_SETTINGS);\n\n if ($this->getRequest()->isPost())\n {\n $postData = $this->getRequest()->getPost();\n\n if (!isset($postData['goBack']))\n {\n $this->saveClientSettingsForm($postData);\n $this->saveHealthcheck();\n\n if (isset($postData['saveAndContinue']))\n {\n $this->updateHealthcheckStepName();\n $this->saveHealthcheck();\n $this->gotoNextNavigationStep($this->_navigation);\n }\n }\n else\n {\n $this->gotoPreviousNavigationStep($this->_navigation);\n }\n }\n else\n {\n $this->showClientSettingsForm();\n }\n }", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "function save()\r\n\t {\r\n\t \t$model = $this->getModel('qrcode');\r\n\t \tif($model->saveSettings() && $this->createPrintSettingsConfFile())\r\n\t \t{\r\n\t \t\t$msg = JText::_('COM_QRCODE_SETTINGS_SAVE');\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t$msg = JText::_('COM_QRCODE_SETTINGS_SAVE_ERROR');\r\n\t \t}\r\n\t \t$link = JRoute::_('index.php?option=com_qrcode', false);\r\n\t $this->setRedirect($link, $msg);\r\n\t }", "public function settings()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['save']) && $_POST['save'] == 'Save Settings')\n\t\t\t{\n\t\t\t\tPlugin::setAllSettings($_POST['setting'], 'mbblog');\n\t\t\t\tFlash::setNow('success', __('Settings have been saved!'));\t\t \t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->display('mbblog/views/admin/settings', array('settings' => Plugin::getAllSettings('mbblog')));\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "public function saveBasicSettings()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\n\t\t$this->initBasicSettingsForm(true);\n\n\t\tif ($this->form->checkInput())\n\t\t{\n\t\t\t// correct paths on windows\n\t\t\tif (ilUtil::isWindows())\n\t\t\t{\n\t\t\t\t$fs = array(\"datadir_path\", \"log_path\", \"convert_path\", \"zip_path\",\n\t\t\t\t\t\"unzip_path\", \"ghostscript_path\", \"java_path\", \"htmldoc_path\", \"ffmpeg_path\");\n\t\t\t\tforeach ($fs as $f)\n\t\t\t\t{\n\t\t\t\t\t$_POST[$f] = str_replace(\"\\\\\", \"/\", $_POST[$f]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_POST[\"setup_pass\"] = $_POST[\"password\"];\n\t\t\t$_POST[\"setup_pass2\"] = $_POST[\"password_retype\"];\n\t\t\tif (!$this->setup->checkDataDirSetup($_POST))\n\t\t\t{\n\t\t\t\t$i = $this->form->getItemByPostVar(\"datadir_path\");\n\t\t\t\t$i->setAlert($this->lng->txt($this->setup->getError()));\n\t\t\t\tilUtil::sendFailure($this->lng->txt(\"form_input_not_valid\"),true);\n\t\t\t}\n\t\t\telse if (!$this->setup->checkLogSetup($_POST))\n\t\t\t{\n\t\t\t\t$i = $this->form->getItemByPostVar(\"log_path\");\n\t\t\t\t$i->setAlert($this->lng->txt($this->setup->getError()));\n\t\t\t\tilUtil::sendFailure($this->lng->txt(\"form_input_not_valid\"),true);\n\t\t\t}\n\t\t\telse if (!$this->setup->checkPasswordSetup($_POST))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);\n\t\t\t}\n\t\t\telse if (!$this->setup->saveMasterSetup($_POST))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tilUtil::sendSuccess($this->lng->txt(\"settings_saved\"),true);\n\t\t\t\tilUtil::redirect(\"setup.php?cmd=mastersettings\");\n\t\t\t}\n\t\t}\n\n\t\t$this->form->setValuesByPost();\n\t\t$this->displayMasterSetup(true);\n\t}", "public function postProcess()\n {\n if (Tools::isSubmit('saveSettings')) {\n ConfPPM::setConf(\n 'paysto_merchant_id',\n Tools::getValue(ConfPPM::formatConfName('paysto_merchant_id'))\n );\n ConfPPM::setConf(\n 'paysto_secret',\n Tools::getValue(ConfPPM::formatConfName('paysto_secret'))\n );\n ConfPPM::setConf('server_list', Tools::getValue(ConfPPM::formatConfName('server_list')));\n ConfPPM::setConf('ip_only_from_server_list',\n Tools::getValue(ConfPPM::formatConfName('ip_only_from_server_list')));\n ConfPPM::setConf('disable_tax_shop',\n Tools::getValue(ConfPPM::formatConfName('disable_tax_shop')));\n ConfPPM::setConf('tax_delivery', Tools::getValue(ConfPPM::formatConfName('tax_delivery')));\n Tools::redirectAdmin(ToolsModulePPM::getModuleTabAdminLink() . '&conf=6');\n }\n }", "private function save_config()\n\t{\n\t\tif (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate())\n\t\t{\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago', $this->request->post);\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago_spei', $this->request->post);\n\t\t\t$this->session->data['success'] = $this->language->get('text_success');\n\n\t\t\t$this->register_webhook(\n\t\t\t\t$this->request->post['payment_compropago_publickey'],\n\t\t\t\t$this->request->post['payment_compropago_privatekey'],\n\t\t\t\t$this->request->post['payment_compropago_mode'] === '1'\n\t\t\t);\n\n\t\t\t$linkParams = 'user_token=' . $this->session->data['user_token'] . '&type=payment';\n\t\t\t$this->response->redirect($this->url->link('marketplace/extension', $linkParams, true));\n\t\t}\n\t}", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function savesettingsview() {\r\n\r\n $this->logger->info(\"Action Save Settings View \");\r\n $this->fields['combotype'] = $_POST[\"combotype\"];\r\n $this->fields['Combovalue'] = $_POST[\"Combovalue\"];\r\n\r\n if(!empty($_POST[\"timedetails\"])){\r\n $this->fields['timedetails'] = $_POST[\"timedetails\"];\r\n }\r\n\r\n if ($_POST[\"isactive\"] == 'on') {\r\n $this->fields['isactive'] = 1;\r\n } else {\r\n $this->fields['isactive'] = 0;\r\n }\r\n\r\n $validResult = $this->settingsModel->savecombovalue($this->fields);\r\n\r\n if ($validResult == 0) {\r\n $this->type = $this->settingsModel->getcombotypevalues($this->fields['combotype']);\r\n foreach ($this->type as $value) {\r\n $this->fields['combotype'] = $value['type'];\r\n }\r\n $this->template->display('viewsetting', $this->fields, 'settings');\r\n } else {\r\n $error = $this->settingsModel->geterror();\r\n $data = $this->settingsModel->populatetypeValues();\r\n $this->template->display_data('listsettings', $data, 'settings', $this->fields, '', $error);\r\n }\r\n }", "function storeConfigForm()\r\n\t{\r\n\t\t/*\tAdd the field for the store configuration\t*/\r\n\t\tadd_settings_field('wpklikandpay_store_tpe', __('Num&eacute;ro de TPE de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeTpe'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_rang', __('Num&eacute;ro de rang de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeRang'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_id', __('Identifiant de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeIdentifier'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\tadd_settings_field('wpklikandpay_environnement', __('Environnement de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'environnement'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t}", "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "function saveConfiguration() {\n//\t\t$field_value = DevblocksPlatform::importGPC($_POST['field_value']);\n//\t\t$this->params['field_name'] = $field_value;\n\t}", "public function saveConfigOptions() {}", "public function save()\n {\n return update_option($this->optionName, $this->settings);\n }", "function notification_user_settings_save() {\n\tglobal $CONFIG;\n\t//@todo Wha??\n\tinclude($CONFIG->path . \"actions/notifications/settings/usersettings/save.php\");\n}", "public function saveAction()\n {\n $pageCode = $this->getRequest()->getParam('page_code');\n\n $config = $this->initConfig($pageCode);\n\n\n $session = Mage::getSingleton('adminhtml/session');\n\n try {\n\n $section = $config->getData('codes/section');\n $website = $this->getRequest()->getParam('website');\n $store = $this->getRequest()->getParam('store');\n $groups = $this->getRequest()->getPost('groups');\n $configData = Mage::getModel('adminhtml/config_data');\n $configData->setSection($section)\n ->setWebsite($website)\n ->setStore($store)\n ->setGroups($groups)\n ->save();\n\n $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));\n } catch (Mage_Core_Exception $e) {\n foreach (explode(\"\\n\", $e->getMessage()) as $message) {\n $session->addError($message);\n }\n } catch (Exception $e) {\n $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();\n $session->addException($e, $msg);\n }\n\n $this->_redirectByPageConfig();\n }", "function settingsObject()\n\t{\n\t\tglobal $tpl, $ilCtrl, $lng;\n\t\t\n\t\t$editor = $this->object->_getRichTextEditor();\n\t\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t\t$this->form->setTitle($lng->txt(\"adve_activation\"));\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_use_tiny_mce\"), \"use_tiny\");\n\t\tif ($editor == \"tinymce\")\n\t\t{\n\t\t\t$cb->setChecked(true);\n\t\t}\n\t\t$this->form->addItem($cb);\n\t\t$this->form->addCommandButton(\"saveSettings\", $lng->txt(\"save\"));\n\t\t\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "public function save_settings( $settings ) {\n\t\t$settings['_multiwidget'] = 1;\n\t\tupdate_option( $this->option_name, $settings );\n\t}", "public function action_block_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t// These are very likely to come in handy! (i.e. without them we're doomed!)\n\t\trequire_once(ADMINDIR . '/ManagePermissions.controller.php');\n\t\trequire_once(ADMINDIR . '/ManageServer.controller.php');\n\t\trequire_once(SUBSDIR . '/SettingsForm.class.php');\n\n\t\t// Initialize the form\n\t\t$this->_initBlockSettingsForm();\n\t\t$config_vars = $this->_blockSettingsForm->getConfigVars();\n\n\t\tif (isset($_GET['save']))\n\t\t{\n\t\t\tcheckSession();\n\n\t\t\t$width_checkup = array('left', 'right');\n\t\t\tforeach ($width_checkup as $pos)\n\t\t\t{\n\t\t\t\tif (!empty($_POST[$pos . 'width']))\n\t\t\t\t{\n\t\t\t\t\t$suffix = 'px';\n\t\t\t\t\tif (strpos($_POST[$pos . 'width'], '%') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$suffix = '%';\n\t\t\t\t\t}\n\n\t\t\t\t\tpreg_match_all('/(?:(\\d+)|.)/', $_POST[$pos . 'width'], $matches);\n\n\t\t\t\t\t$number = (int) implode('', $matches[1]);\n\t\t\t\t\tif (!empty($number) && $number > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_POST[$pos . 'width'] = $number . $suffix;\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$_POST[$pos . 'width'] = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_POST[$pos . 'width'] = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($config_vars[7]);\n\t\t\t$config_vars = array_merge(\n\t\t\t\t$config_vars, array(\n\t\t\t\t\tarray('check', 'sp_adminIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_profileIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_pmIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_mlistIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_searchIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_calendarIntegrationHide'),\n\t\t\t\t\tarray('check', 'sp_moderateIntegrationHide'),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->_blockSettingsForm->setConfigVars($config_vars);\n\t\t\t$this->_blockSettingsForm->setConfigValues($_POST);\n\t\t\t$this->_blockSettingsForm->save();\n\t\t\tredirectexit('action=admin;area=portalconfig;sa=blocksettings');\n\t\t}\n\n\t\t$context['post_url'] = $scripturl . '?action=admin;area=portalconfig;sa=blocksettings;save';\n\t\t$context['settings_title'] = $txt['sp-adminBlockSettingsName'];\n\t\t$context['page_title'] = $txt['sp-adminBlockSettingsName'];\n\t\t$context['sub_template'] = 'show_settings';\n\n\t\t$this->_blockSettingsForm->prepare();\n\t}", "function saveSettings()\n {\n\t if ( wfReadOnly() ) {\n\t\treturn;\n\t }\n\t if ( 0 == $this->mCedarId ) {\n\t\treturn;\n\t }\n\t \n\t $dbw =& wfGetDB( DB_MASTER );\n\t $dbw->update( 'cedar_user_info',\n\t\t array( /* SET */\n\t\t\t 'user_id' => $this->mId,\n\t\t\t 'organization' => $this->mOrg,\n\t\t\t 'address1' => $this->mAddress1,\n\t\t\t 'address2' => $this->mAddress2,\n\t\t\t 'city' => $this->mCity,\n\t\t\t 'state' => $this->mState,\n\t\t\t 'country' => $this->mCountry,\n\t\t\t 'postal_code' => $this->mPostalCode,\n\t\t\t 'phone' => $this->mPhone,\n\t\t\t 'mobile_phone' => $this->mMobilePhone,\n\t\t\t 'fax' => $this->mFax,\n\t\t\t 'supervisor_name' => $this->mSupervisorName,\n\t\t\t 'supervisor_email' => $this->mSupervisorEmail\n\t\t ), array( /* WHERE */\n\t\t\t 'user_info_id' => $this->mCedarId\n\t\t ), __METHOD__\n\t );\n\t $this->clearSharedCache();\n }", "public function save()\n {\n $config_content = file_get_contents($this->config_path);\n\n foreach ($this->fields as $configuration => $value) {\n $config_content = str_replace(str_replace('\\\\', '\\\\\\\\', $value['default']), str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration]), $config_content);\n config([$value['config'] => str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration])]); //Reset the config value\n }\n\n file_put_contents($this->config_path, $config_content);\n }", "public function settingsAction()\n {\n $meta = $this->getServiceLocator()->get(Meta::class);\n /* @var $meta Meta */\n\n /*$cc = $meta->getObjectValue($this->identity(), 'user.exampleSetting');\n\n $form = $this->getServiceLocator()->get('FormElementManager')\n ->get('Sambeso\\Form\\User\\Settings');\n $form->setData(['exampleSetting' => $cc]);\n\n $viewModel = $this->createViewModel([\n 'form' => $form,\n ]);\n\n if (!$this->request->isPost()) {\n return $viewModel;\n }\n\n $isValid = $form->setData($this->request->getPost())->isValid();\n if (!$isValid) {\n return $viewModel;\n }\n\n $data = $form->getData();\n $meta->setObjectValue($this->identity(), 'user.exampleSetting',\n $data['costCenter']);\n $meta->getEntityManager()->flush();\n\n $this->flashMessenger()\n ->addSuccessMessage('message.account.settings.edited');\n */\n\n return $this->redirect()->toRoute('account');\n }", "protected function processForm(){\n if(Tools::isSubmit('saveBtn')){ // save data\n $settings = array(\n 'user' => Tools::getValue('user'),\n 'widget_id' => Tools::getValue('widget_id'),\n 'tweets_limit' => Tools::getValue('tweets_limit'),\n 'follow_btn' => Tools::getValue('follow_btn')\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n \n // display success message\n return $this->displayConfirmation($this->l('The settings have been successfully saved!'));\n }\n \n return '';\n }", "function _savesettings()\r\n {\r\n\t\t$settings = JRequest::getVar('settings');\r\n\r\n\t\tjimport('joomla.registry.registry');\r\n\t\t$reg = new JRegistry();\r\n\t\t$reg->loadArray($settings);\r\n\t\t\t\t\r\n\t\tif(JFusionConnect::isJoomlaVersion('1.6')) {\r\n\t\t\t$component =& JTable::getInstance('extension');\r\n\t\t\t$componentid = $component->find(array('type' => 'component','element' => 'com_jfusionconnect'));\r\n\t\t\t$component->load($componentid);\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('extension');\r\n\t\t\t$pluginid = $plugin->find(array('type' => 'plugin','element' => 'jfusionconnect'));\r\n\t\t\t$plugin->load($pluginid);\r\n\t\t\t$key='enabled';\r\n\t\t} else {\r\n\t\t\t$component =& JTable::getInstance('component');\r\n\t\t\t$component->loadByOption('com_jfusionconnect');\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('plugin');\r\n\t\t\t$plugin->_tbl_key = 'element';\r\n\t\t\t$plugin->load('jfusionconnect');\r\n\t\t\t$key='published';\r\n\t\t}\r\n\t\t$component->params = $reg->toString();\r\n\t\t$component->store();\r\n \tif ($settings['enabled']) {\r\n\t\t\t$plugin->$key = 1;\r\n\t\t} else {\r\n\t\t\t$plugin->$key = 0;\r\n\t\t}\r\n\t\t$plugin->store();\r\n }", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "public static function Save()\r\n {\r\n return update_option(self::OPT_SETTINGS, self::$Data);\r\n }", "function buildSettingsForm() {}", "public function updated_config( FormUI $ui ) {\n \n Session::notice( _t( 'Trac options saved.', 'tracdashmodule' ) );\n \n $ui->save();\n \n }", "public function saveSettings()\n {\n return $this->config->saveFile();\n }", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "public function save()\n {\n $values = array('company_name', 'website_name', 'website_description');\n foreach ($values as $value) \n ConfigHelper::save($value, Input::get($value));\n ConfigHelper::save_file('favicon');\n ConfigHelper::save_file('logo');\n ConfigHelper::save_file('login-logo');\n\n return Redirect::route('view_config')->with('message_title', 'Successful!')->with('message', 'Successfully updated the config!');\n }", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "function saveConfiguration() {\r\n foreach($_POST as $configuration_key=>$configuration_value){\r\n\t\t\t\tif(stripos($configuration_key, \"haendlerbund\")!==false) {\r\n\t\t\t\t\t$sql = xtc_db_query(\"SELECT * FROM configuration WHERE configuration_key='\".$configuration_key.\"' LIMIT 1\");\r\n\t\t\t\t\tif(xtc_db_num_rows($sql)) {\r\n\t\t\t\t\t\txtc_db_query(\"UPDATE configuration SET configuration_value='\".$configuration_value.\"' WHERE configuration_key='\".$configuration_key.\"' LIMIT 1\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}", "function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}", "function save_settings(){\r\n if(isset($_POST['SKWPSB_IN_SUBMIT'])){\r\n $this->message = '';\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_IN_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['set_options'];\r\n if(function_exists($foo)){\r\n if($foo(stripslashes($_POST['SKWPSB_IN_CODE']))){\r\n $this->message = 'Settings successfully imported.';\r\n } else {\r\n $this->errorMessage = 'The plugin returned an error, make sure you copied the code correctly.';\r\n }\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n @$data = unserialize(stripslashes($_POST['SKWPSB_IN_CODE']));\r\n if(!$data || empty($data)){\r\n $this->errorMessage = 'Wrong code, make sure you copied it correctly.'.$_POST['SKWPSB_IN_CODE'];\r\n return;\r\n } else {\r\n update_option($key, $data);\r\n $this->message = 'Settings successfully imported.';\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any destination plugin.';\r\n }\r\n else if(isset($_POST['SKWPSB_EX_SUBMIT'])){\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_EX_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['get_options'];\r\n if(function_exists($foo)){\r\n $this->exportedSettings = $foo();\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n $this->exportedSettings = $val;\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any source plugin.';\r\n }\r\n }", "public function save_smtp_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $smtp_settings_val = $this->input->post(\"smtp\");\n $config = '<?php ';\n foreach ($smtp_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_smtp_settings.php';\n\t\t\t\t file_put_contents($file, $config);\n $this->setErrorMessage('success', 'SMTP settings updated successfully','admin_adminlogin_smtp_settings_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_smtp_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "function settings() {\n\t\tglobal $core, $db, $lang;\n\t\t$result = NULL;\n\n\t\tif(isset($_POST['save'])) {\n\t\t\t$error = 0;\n\t\t\tforeach($_POST as $key => $value) {\n\t\t\t\tif($key != 'save') {\n\t\t\t\t\t$query = $db->select('shoutbox_settings', array('field'=>$key));\n\t\t\t\t\t$record = $query[0];\n\t\t\t\t\tif(!$db->update('shoutbox_settings', array('field'=>$key), array($record['id'],$key,stripslashes($value)))) $error++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($error) $core->notify($lang['shoutbox']['update fail'],2);\n\t\t\telse $core->notify($lang['shoutbox']['update success'],1);\n\t\t}\n\n\t\t//Get settings from DB\n\t\tif($query = $db->select('shoutbox_settings')) {\n\t\t\tforeach((array)$query as $record) $settings[$record['field']] = $record['value'];\n\t\t\t//Define all inputs\n\t\t\t$form['top'] = '<form name=\"settings\" method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\">';\n\t\t\t\n\t\t\t$form['nick_min_chars'] = '<label>'.$lang['shoutbox']['nick min chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"nick_min_chars\" value=\"'.$settings['nick_min_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['nick_max_chars'] = '<label>'.$lang['shoutbox']['nick max chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"nick_max_chars\" value=\"'.$settings['nick_max_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['post_max_chars'] = '<label>'.$lang['shoutbox']['post max chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"post_max_chars\" value=\"'.$settings['post_max_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['posts_refresh_time'] = '<label>'.$lang['shoutbox']['posts reflash time'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"posts_refresh_time\" value=\"'.$settings['posts_refresh_time'].'\" />';\n\t\t\t\t\n\t\t\t$form['posts_limit'] = '<label>'.$lang['shoutbox']['posts limit'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"posts_limit\" value=\"'.$settings['posts_limit'].'\" />';\n\n\t\t\t$form['time_anti_flood'] = '<label>'.$lang['shoutbox']['time_anti_flood'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"time_anti_flood\" value=\"'.$settings['time_anti_flood'].'\" />';\n\t\t\t\n\t\t\t$form['save'] = '<button type=\"submit\" name=\"save\" value=\"save\">'.$lang['shoutbox']['save'].'</button>';\n\t\t\t\n\t\t\t$form['bottom'] = '</form>';\n\t\t\t\n\t\t\t//Return form\n\t\t\tforeach($form as $input) $result .= $input.\"\\n\";\n\t\t\treturn $result;\n\t\t}\n\t}", "public function save_settings_fields() {\n\n\t\t\tif ( isset( $_POST[ $this->setting_field_prefix ] ) ) {\n\t\t\t\tif ( ( isset( $_POST[ $this->setting_field_prefix ]['nonce'] ) ) && ( wp_verify_nonce( $_POST[ $this->setting_field_prefix ]['nonce'], 'learndash_permalinks_nonce' ) ) ) {\n\n\t\t\t\t\t$post_fields = $_POST[ $this->setting_field_prefix ];\n\n\t\t\t\t\tif ( ( isset( $post_fields['courses'] ) ) && ( ! empty( $post_fields['courses'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['courses'] = $this->esc_url( $post_fields['courses'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['lessons'] ) ) && ( ! empty( $post_fields['lessons'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['lessons'] = $this->esc_url( $post_fields['lessons'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['topics'] ) ) && ( ! empty( $post_fields['topics'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['topics'] = $this->esc_url( $post_fields['topics'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['quizzes'] ) ) && ( ! empty( $post_fields['quizzes'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['quizzes'] = $this->esc_url( $post_fields['quizzes'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['nested_urls'] ) ) && ( ! empty( $post_fields['nested_urls'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = $this->esc_url( $post_fields['nested_urls'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We check the Course Options > Course Builder setting. If this is set to 'yes' then we MUST keep the nested URLs set to true.\n\t\t\t\t\t\tif ( ! isset( $this->setting_option_values['nested_urls'] ) ) {\n\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'no';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'yes' !== $this->setting_option_values['nested_urls'] ) {\n\t\t\t\t\t\t\t$learndash_settings_courses_builder = get_option( 'learndash_settings_courses_management_display', array() );\n\t\t\t\t\t\t\tif ( ! isset( $learndash_settings_courses_builder['course_builder_shared_steps'] ) ) {\n\t\t\t\t\t\t\t\t$learndash_settings_courses_builder['course_builder_shared_steps'] = 'no';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'yes' === $learndash_settings_courses_builder['course_builder_shared_steps'] ) {\n\t\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'yes';\n\n\t\t\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function ca_services_admin_settings_form_submit($form, &$form_state) {\n variable_set('ca_services_list_template', $form_state['values']['ca_services_list']);\n variable_set('ca_services_node_template', $form_state['values']['ca_services_node']);\n drupal_set_message('Configuration has been saved.');\n}", "public function save_settings() {\n\t\tcheck_admin_referer( 'mylisting_update_mapservices' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\tdie;\n\t\t}\n\n\t\t$config = [];\n\t\t$config['provider'] = ! empty( $_POST['provider'] ) ? sanitize_text_field( $_POST['provider'] ) : 'google-maps';\n\n\t\t// google maps\n\t\t$config['gmaps_api_key'] = ! empty( $_POST['gmaps_api_key'] ) ? sanitize_text_field( $_POST['gmaps_api_key'] ) : '';\n\t\t$config['gmaps_lang'] = ! empty( $_POST['gmaps_lang'] ) ? sanitize_text_field( $_POST['gmaps_lang'] ) : 'default';\n\t\t$config['gmaps_types'] = ! empty( $_POST['gmaps_types'] ) ? sanitize_text_field( $_POST['gmaps_types'] ) : 'geocode';\n\t\t$config['gmaps_locations'] = ! empty( $_POST['gmaps_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['gmaps_locations'] )\n\t\t\t\t: [];\n\n\t\t// google maps skins\n\t\t$config['gmaps_skins'] = [];\n\t\tif ( ! empty( $_POST['gmaps_skins'] ) && ! empty( $_POST['gmaps_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['gmaps_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['gmaps_skinkeys'][$i] ) && ( $skinval = json_decode( stripslashes( $skin ) ) ) ) {\n\t\t\t\t\t$config['gmaps_skins'][ sanitize_text_field( $_POST['gmaps_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// mapbox\n\t\t$config['mapbox_api_key'] = ! empty( $_POST['mapbox_api_key'] ) ? sanitize_text_field( $_POST['mapbox_api_key'] ) : '';\n\t\t$config['mapbox_lang'] = ! empty( $_POST['mapbox_lang'] ) ? sanitize_text_field( $_POST['mapbox_lang'] ) : 'default';\n\t\t$config['mapbox_types'] = ! empty( $_POST['mapbox_types'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_types'] )\n\t\t\t\t: [];\n\t\t$config['mapbox_locations'] = ! empty( $_POST['mapbox_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_locations'] )\n\t\t\t\t: [];\n\n\t\t// mapbox skins\n\t\t$config['mapbox_skins'] = [];\n\t\tif ( ! empty( $_POST['mapbox_skins'] ) && ! empty( $_POST['mapbox_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['mapbox_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['mapbox_skinkeys'][$i] ) ) {\n\t\t\t\t\tif ( $skinval = json_decode( stripslashes( $skin ) ) ) {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = $skin;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n \t$this->set_config( $config );\n\n\t\treturn wp_safe_redirect( admin_url( 'admin.php?page=theme-mapservice-settings&success=1' ) );\n\t}", "public function save()\n {\n parent::save();\n\n $myConfig = $this->getConfig();\n $soxId = $this->getEditObjectId();\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n\n\n // #918 S\n // checkbox handling\n $aParams['oxshops__oxactive'] = (isset($aParams['oxshops__oxactive']) && $aParams['oxshops__oxactive'] == true) ? 1 : 0;\n $aParams['oxshops__oxproductive'] = (isset($aParams['oxshops__oxproductive']) && $aParams['oxshops__oxproductive'] == true) ? 1 : 0;\n\n $isubjlang = oxRegistry::getConfig()->getRequestParameter(\"subjlang\");\n $iLang = ($isubjlang && $isubjlang > 0) ? $isubjlang : 0;\n\n /** @var oxShop $oShop */\n $oShop = oxNew(\"oxshop\");\n if ($soxId != \"-1\") {\n $oShop->loadInLang($iLang, $soxId);\n } else {\n $aParams['oxshops__oxid'] = null;\n }\n\n if ($aParams['oxshops__oxsmtp']) {\n $aParams['oxshops__oxsmtp'] = trim($aParams['oxshops__oxsmtp']);\n }\n\n $oShop->setLanguage(0);\n $oShop->assign($aParams);\n $oShop->setLanguage($iLang);\n\n if (($sNewSMPTPass = oxRegistry::getConfig()->getRequestParameter(\"oxsmtppwd\"))) {\n $oShop->oxshops__oxsmtppwd->setValue($sNewSMPTPass == '-' ? \"\" : $sNewSMPTPass);\n }\n\n\n try {\n $oShop->save();\n } catch (oxException $e) {\n\n return;\n }\n\n $this->_aViewData[\"updatelist\"] = \"1\";\n\n\n oxRegistry::getSession()->setVariable(\"actshop\", $soxId);\n }", "function saveConfigurationSettings() {\n\t$dbhost=$_POST['db_host'];\n\t$dbname=$_POST['db_name'];\n\t$dbuser=$_POST['db_user'];\n\t$dbpasswd=$_POST['db_passwd'];\n\t\n\t\n\t$dbprefix=($_POST['db_prefix']!=\"\"?$_POST['db_prefix']:\"V0_\");\n\t\n\tglobal $cmsFolder;\n\t$configFileText = '';\n\trequire_once('config-prototype.inc.php');\n\t$writeHandle = @fopen(\"../config.inc.php\", 'w');\n\tif (!$writeHandle)\n\t{\n\t\tdisplayError('Could not write to config.inc.php. Please make sure that the file is writable.');\n\t\treturn false;\n\t}\n\tfwrite($writeHandle, $configFileText);\n\tfclose($writeHandle);\n\tdisplayInfo(\"Configuration Successfully Saved!\");\n\n\tdefine(\"MYSQL_SERVER\",$dbhost);\n\tdefine(\"MYSQL_DATABASE\",$dbname);\n\tdefine(\"MYSQL_USERNAME\",$dbuser);\n\tdefine(\"MYSQL_PASSWORD\",$dbpasswd);\n\tdefine(\"MYSQL_DATABASE_PREFIX\",$dbprefix);\n\t\n\t\n\treturn true;\n}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "public function save_currency_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $currency_settings_val = $this->input->post(\"currency\");\n $config = '<?php ';\n foreach ($currency_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_currency_settings.php';\n file_put_contents($file, $config);\n $this->setErrorMessage('success', 'Currency settings updated successfully','admin_adminlogin_currency_setting_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_currency_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "public function save_banner_settings() {\n\t\t$this->banner_settings = get_option( 'cookieproCCPASettingsPreview' );\n\t\tif ( isset( $_REQUEST['Submit'] ) ) {\n\t\t\tif ( ! isset( $_REQUEST[ $this->plugin->name . '_nonce' ] ) ) {\n\t\t\t\tadd_settings_error( 'cookieproccpa_settings_notice', esc_attr( 'settings-draft' ), __( 'An error has occurred. Changes have not been saved.' ), 'error' );\n\t\t\t} elseif ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST[ $this->plugin->name . '_nonce' ] ) ), wp_unslash( $this->plugin->name ) ) ) {\n\t\t\t\tadd_settings_error( 'cookieproccpa_settings_notice', esc_attr( 'settings-draft' ), __( 'An error has occurred. Changes have not been saved.' ), 'error' );\n\t\t\t} else {\n\t\t\t\t\tupdate_option( 'CookieProCCPAButtonFloatings', array() );\n\t\t\t\t\t$this->set_banner_settings_form_data( $_REQUEST );\n\t\t\t\t\t$this->set_publish_status( 'Draft', $this->banner_settings );\n\t\t\t\t\tupdate_option( 'cookieproCCPASettingsPreview', $this->get_banner_setting_data_as_array() );\n\t\t\t\t\t// display success message in admin.\n\t\t\t\t\tadd_settings_error( 'cookieproccpa_settings_notice', esc_attr( 'settings-draft' ), __( 'Settings saved. Please click publish below to publish to your site.' ), 'updated' );\n\t\t\t}\n\t\t} elseif ( isset( $_REQUEST['RevertToDefault'] ) ) {\n\t\t\tif ( ! isset( $_REQUEST[ $this->plugin->name . '_nonce' ] ) ) {\n\t\t\t\t$this->error_message = __( 'An error has occurred. Changes have not been saved.' );\n\t\t\t} elseif ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST[ $this->plugin->name . '_nonce' ] ) ), wp_unslash( $this->plugin->name ) ) ) {\n\t\t\t\t$this->error_message = __( 'An error has occurred. Changes have not been saved.' );\n\t\t\t} else {\n\t\t\t\tupdate_option( 'CookieProCCPAButtonFloatings', array() );\n\t\t\t\t$this->set_default_data();\n\t\t\t\tadd_settings_error( 'cookieproccpa_settings_notice', esc_attr( 'settings-published' ), __( 'Reset to Default Settings. Please click save button to save the settings.' ), 'updated' );\n\t\t\t}\n\t\t} elseif ( $this->banner_settings ) {\n\t\t\t$this->set_banner_setting_data( $this->banner_settings );\n\t\t} else {\n\t\t\t$this->set_default_data();\n\t\t}\n\t}", "public abstract function settingsSave(array &$pluginInfo);", "public function save_builder_settings() {\n\t\t_deprecated_function( 'save_builder_settings', '1.6', 'save_builder' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforminator_validate_ajax( \"forminator_save_builder_fields\" );\n\n\t\t$submitted_data = $this->get_post_data();\n\t\t$fields = array();\n\t\t$id = isset( $submitted_data['form_id'] ) ? $submitted_data['form_id'] : null;\n\t\t$id = intval( $id );\n\t\t$title = sanitize_text_field( $submitted_data['formName'] );\n\t\t$status = isset( $submitted_data['status'] ) ? sanitize_text_field( $submitted_data['status'] ) : '';\n\t\t$version = isset( $submitted_data['version'] ) ? sanitize_text_field( $submitted_data['version'] ) : '1.0';\n\n\t\tif ( is_null( $id ) || $id <= 0 ) {\n\t\t\t$form_model = new Forminator_Custom_Form_Model();\n\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = Forminator_Custom_Form_Model::STATUS_PUBLISH;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$form_model = Forminator_Custom_Form_Model::model()->load( $id );\n\n\t\t\tif ( ! is_object( $form_model ) ) {\n\t\t\t\twp_send_json_error( __( \"Form model doesn't exist\", Forminator::DOMAIN ) );\n\t\t\t}\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = $form_model->status;\n\t\t\t}\n\t\t}\n\t\t$form_model->set_var_in_array( 'name', 'formName', $submitted_data, 'forminator_sanitize_field' );\n\n\t\t// Sanitize settings\n\t\t$settings = forminator_sanitize_field( $submitted_data['data'] );\n\n\t\t// Sanitize custom css\n\t\tif ( isset( $submitted_data['data']['custom_css'] ) ) {\n\t\t\t$settings['custom_css'] = sanitize_textarea_field( $submitted_data['data']['custom_css'] );\n\t\t}\n\n\t\t// Sanitize thank you message\n\t\tif ( isset( $submitted_data['data']['thankyou-message'] ) ) {\n\t\t\t$settings['thankyou-message'] = $submitted_data['data']['thankyou-message'];\n\t\t}\n\n\t\t// Sanitize user email message\n\t\tif ( isset( $submitted_data['data']['user-email-editor'] ) ) {\n\t\t\t$settings['user-email-editor'] = $submitted_data['data']['user-email-editor'];\n\t\t}\n\n\t\t// Sanitize admin email message\n\t\tif ( isset( $submitted_data['data']['admin-email-editor'] ) ) {\n\t\t\t$settings['admin-email-editor'] = $submitted_data['data']['admin-email-editor'];\n\t\t}\n\n\t\t$settings['formName'] = $title;\n\t\t$settings['version'] = $version;\n\t\t$form_model->settings = $settings;\n\n\t\t// status\n\t\t$form_model->status = $status;\n\n\t\t// Save data\n\t\t$id = $form_model->save();\n\n\t\t// add privacy settings to global option\n\t\t$override_privacy = false;\n\t\tif ( isset( $settings['enable-submissions-retention'] ) ) {\n\t\t\t$override_privacy = filter_var( $settings['enable-submissions-retention'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\t\t$retention_number = null;\n\t\t$retention_unit = null;\n\t\tif ( $override_privacy ) {\n\t\t\t$retention_number = 0;\n\t\t\t$retention_unit = 'days';\n\t\t\tif ( isset( $settings['submissions-retention-number'] ) ) {\n\t\t\t\t$retention_number = (int) $settings['submissions-retention-number'];\n\t\t\t}\n\t\t\tif ( isset( $settings['submissions-retention-unit'] ) ) {\n\t\t\t\t$retention_unit = $settings['submissions-retention-unit'];\n\t\t\t}\n\t\t}\n\n\t\tforminator_update_form_submissions_retention( $id, $retention_number, $retention_unit );\n\n\t\twp_send_json_success( $id );\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user\"></i>',\n 'desc' => $this->l('Ingrese la llave pública'),\n 'name' => 'KUSHKIPAGOS_PUBLIC_KEY',\n 'label' => $this->l('Public key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user-secret\"></i>',\n 'desc' => $this->l('Ingrese la llave privada'),\n 'name' => 'KUSHKIPAGOS_PRIVATE_KEY',\n 'label' => $this->l('Private key'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Entorno de pruebas'),\n 'name' => 'KUSHKIPAGOS_DEV',\n 'is_bool' => true,\n 'desc' => $this->l('Usar este módulo en entorno de pruebas'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function saveCharSelectorSettingsObject()\n\t{\n\t\tglobal $ilSetting, $ilCtrl, $lng, $tpl;\n\t\t\n\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_ADMIN);\n\t\t$form = $this->initCharSelectorSettingsForm($char_selector);\n if ($form->checkInput())\n {\n\t\t $char_selector->getFormValues($form);\n\n\t\t $ilSetting->set('char_selector_availability', $char_selector->getConfig()->getAvailability());\n\t\t $ilSetting->set('char_selector_definition', $char_selector->getConfig()->getDefinition());\n\t\t\t\n\t\t ilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t $ilCtrl->redirect($this, \"showCharSelectorSettings\");\n }\n $form->setValuesByPost();\n $tpl->setContent($form->getHTML());\n\t}", "public function settings_screen() {\n\t\tglobal ${class_name};\n\t\tdo_action( ${class_name}->token . '_before_settings' );\n\t\tdo_action( $this->token . '_before_settings' );\n\t\tsettings_fields( $this->token );\n\t\tdo_settings_sections( $this->token );\n\t\tdo_action( $this->token . '_after_settings' );\n\t\tdo_action( ${class_name}->token . '_after_settings' );\n\t\tsubmit_button();\n\t}", "function gigya_share_bar_pane_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "function apply()\r\n\t {\r\n\t \t$model = $this->getModel('qrcode');\r\n\t \tif($model->saveSettings() && $this->createPrintSettingsConfFile())\r\n\t \t{\r\n\t \t$msg = JText::_('COM_QRCODE_SETTINGS_SAVE');\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t$msg = JText::_('COM_QRCODE_SETTINGS_SAVE_ERROR');\r\n\t \t}\r\n\t \t$link = JRoute::_('index.php?option=com_qrcode&layout=settings', false);\r\n\t $this->setRedirect($link, $msg);\r\n\t \t\r\n\t }", "function sevone_persona_admin_config_submit(&$form, &$form_state) {\n $values = $form_state['values'];\n \n foreach ($values['analytics'] as $name => $value) {\n $analytics[$name] = $value;\n }\n \n variable_set('sevone_persona_analytics', $analytics); \n \n drupal_set_message('Configuration saved.');\n}", "function settings()\n\t{\n\t\tif($this->session->userdata('admin_login') != 1)redirect(base_url() , 'refresh');\n\t\t\n\t\tif($_POST)\n\t\t{\n\t\t\t$data['institute_name']\t\t=\t$this->input->post('institute_name');\n\t\t\t$data['address']\t\t\t=\t$this->input->post('address');\n\t\t\t$data['phone_number']\t\t=\t$this->input->post('phone_number');\n\t\t\t$data['page_title']\t\t\t=\t$this->input->post('page_title');\n\t\t\t$data['page_meta_tag']\t\t=\t$this->input->post('page_meta_tag');\n\t\t\t\n\t\t\t$this->db->update('settings' , $data);\n\t\t\tmove_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/logo.png');\n\t\t\t$this->session->set_flashdata('settings_message', 'Settings Updated');\n\t\t\tredirect(base_url().'index.php/admin/settings/' , 'refresh');\t\t\t\n\t\t}\n\t\t$page_data['page_info']\t=\t'System settings';\n\t\t$page_data['page_name']\t=\t'admin/settings';\n\t\t$page_data['page_title']=\t'Manage system settings';\n\t\t$this->load->view('index' , $page_data);\n\t}", "function dynamik_theme_settings_save()\r\n{\r\n\tcheck_ajax_referer( 'theme-settings', 'security' );\r\n\t\r\n\t$update = $_POST['dynamik'];\r\n\tupdate_option( 'dynamik_gen_theme_settings', $update );\r\n\t\r\n\tdynamik_write_files( $css = true, $ez = false, $custom = false );\r\n\tdynamik_protect_folders();\r\n\t\r\n\techo 'Saved!';\r\n\texit();\r\n}", "public function saveConfVars()\n {\n if ($this->getEditObjectId() === 'findologic_module') {\n $this->_saveConfVars();\n } else {\n parent::saveConfVars();\n }\n }", "public abstract function settingsForm(array $pluginInfo);", "public function savePageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl, $ilSetting;\n\t\n\t\t$this->initPageEditorForm();\n\t\tif ($this->form->checkInput())\n\t\t{\n\t\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t\tinclude_once(\"./Services/COPage/classes/class.ilPageContentGUI.php\");\n\t\t\t$buttons = ilPageContentGUI::_getCommonBBButtons();\n\t\t\tforeach ($buttons as $b => $t)\n\t\t\t{\n\t\t\t\tilPageEditorSettings::writeSetting($_GET[\"grp\"], \"active_\".$b,\n\t\t\t\t\t$this->form->getInput(\"active_\".$b));\n\t\t\t}\n\t\t\t\n\t\t\tif ($_GET[\"grp\"] == \"test\")\n\t\t\t{\n\t\t\t\t$ilSetting->set(\"enable_tst_page_edit\", (int) $_POST[\"tst_page_edit\"]);\n\t\t\t}\n\t\t\telseif ($_GET[\"grp\"] == \"rep\")\n\t\t\t{\n\t\t\t\t$ilSetting->set(\"enable_cat_page_edit\", (int) $_POST[\"cat_page_edit\"]);\n\t\t\t}\n\t\t\t\n\t\t\tilUtil::sendInfo($lng->txt(\"msg_obj_modified\"), true);\n\t\t}\n\t\t\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t\t$ilCtrl->redirect($this, \"showPageEditorSettings\");\n\t}", "public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }", "public function test_save() {\n global $DB;\n\n $this->resetAfterTest();\n\n // Create data object for default assignment settings.\n $data = new stdClass();\n $data->turnitinenabled = 1;\n $data->reportgenoptions['reportgeneration'] = TURNITINSIM_REPORT_GEN_DUEDATE;\n $data->queuedrafts = 1;\n $data->indexoptions['addtoindex'] = 0;\n $data->excludeoptions['excludequotes'] = 0;\n $data->excludeoptions['excludebiblio'] = 1;\n $data->accessoptions['accessstudents'] = 1;\n\n // Save Module Settings.\n $form = new plagiarism_turnitinsim_defaults_form();\n $form->save($data);\n\n // Check settings have been saved.\n $settings = $DB->get_record('plagiarism_turnitinsim_mod', array('cm' => 0));\n\n $this->assertEquals(1, $settings->turnitinenabled);\n $this->assertEquals(TURNITINSIM_REPORT_GEN_DUEDATE, $settings->reportgeneration);\n $this->assertEquals(1, $settings->queuedrafts);\n $this->assertEquals(0, $settings->addtoindex);\n $this->assertEquals(0, $settings->excludequotes);\n $this->assertEquals(1, $settings->excludebiblio);\n $this->assertEquals(1, $settings->accessstudents);\n }", "function save_settings()\n\t{\n\t\t// --------------------------------------\n\t\t// Get channel and field ids\n\t\t// --------------------------------------\n\n\t\t$channel_id = $this->EE->input->post('channel_id');\n\t\t$field_id = $this->EE->input->post('field_id');\n\n\t\t// no channel or field id -> invalid request\n\t\tif ( ! $channel_id || ! $field_id )\n\t\t{\n\t\t\treturn $this->_show_error('invalid_request');\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Init settings array\n\t\t// --------------------------------------\n\n\t\t$settings = array();\n\n\t\t// --------------------------------------\n\t\t// Do what with categories?\n\t\t// --------------------------------------\n\n\t\tif ( in_array($this->EE->input->post('category_options'), array('all', 'one')) )\n\t\t{\n\t\t\t$settings['categories'] = $this->EE->input->post('category_options');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$settings['categories'] = $this->EE->input->post('categories') ? implode('|', $this->EE->input->post('categories')) : '';\n\t\t}\n\n\t\t// Check input\n\t\t$settings['statuses'] = $this->EE->input->post('statuses') ? implode('|', $this->EE->input->post('statuses')) : '';\n\t\t$settings['show_expired'] = $this->EE->input->post('show_expired') ? 'y' : 'n';\n\t\t$settings['show_future'] = $this->EE->input->post('show_future') ? 'y' : 'n';\n\t\t$settings['sort_order'] = $this->EE->input->post('sort_order');\n\t\t$settings['clear_cache'] = $this->EE->input->post('clear_cache') ? 'y' : 'n';\n\t\t$settings['permissions'] = $this->EE->input->post('permissions');\n\n\t\t// Data to put into the DB\n\t\t$data = array(\n\t\t\t'channel_id' => $channel_id,\n\t\t\t'field_id' => $field_id,\n\t\t\t'settings' => encode_reorder_settings($settings)\n\t\t);\n\n\t\t// I want to use REPLACE INTO, to replace existing settings and insert if not exists\n\t\t// That means no active record!\n\t\t$sql = \"REPLACE INTO exp_low_reorder_settings (\".implode(',', array_keys($data)).\") VALUES ('\".implode(\"','\", $this->EE->db->escape_str(array_values($data))).\"')\";\n\t\t$this->EE->db->query($sql);\n\n\t\t$this->EE->session->set_flashdata('reorder_msg', $this->EE->lang->line('settings_saved'));\n\t\t$this->EE->functions->redirect($this->base_url);\n\t\texit;\n\t}", "public function saveForm()\n\t{\n\t\tparent::saveForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "public function action_settings()\n\t{\n\t\t// Ambil data dari tabel\n\t\t$setting = Model_Setting::find(1);\n\n\t\t// Hasilkan form berdasarkan Model_Setting\n\t\t$fieldset = Fieldset::forge()->add_model($setting)->populate($setting);\n\t\t$form = $fieldset->form();\n\t\t$form->add('submit', '&nbsp;', array('type' => 'submit', 'value' => 'Simpan Perubahan', 'class' => 'btn btn-lg btn-success pull-right'));\n\n\t\t// Validasi masukan\n\t\tif ($fieldset->validation()->run() == true)\n\t\t{\n\t\t\t$fields = $fieldset->validated();\n\n\t\t\t$setting->core = $fields['core'];\n\t\t\t$setting->secondary = $fields['secondary'];\n\t\t\t$setting->raport = $fields['raport'];\n\t\t\t$setting->un = $fields['un'];\n\t\t\t$setting->umum = $fields['umum'];\n\n\t\t\t// Simpan perubahan\n\t\t\tif ($setting->save())\n\t\t\t{\n\t\t\t\tSession::set_flash('success', 'Perubahan telah disimpan.');\n\t\t\t\tResponse::redirect('settings');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->template->messages = $fieldset->validation()->error();\n\t\t}\n\n\t\t$data['settings'] = $form->build();\n\t\t$this->template->title = 'Pengaturan Profile Matching';\n\t\t$this->template->content = View::forge('welcome/settings', $data, false);\n\t}", "function ting_visual_relation_app_settings_form_submit($form, &$form_state) {\n // Update each slides position in the slideshow\n foreach ($form_state['values']['slides_table'] as $slide_id => $slide) {\n db_update('ting_visual_relation_slides')\n ->condition('slide_id', $slide_id)\n ->fields(array('position' => $slide['position']))\n ->execute();\n }\n variable_set('ting_visual_relation_slideshow_interval', $form_state['values']['interval']);\n drupal_set_message(t('Your settings have been saved'));\n}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 2,\n 'type' => 'text',\n 'suffix' => '<i class=\"icon icon-euro\"></i>',\n 'required' => true,\n 'label' => $this->l('Customer must spent'),\n 'desc' => $this->l('Enter the amount which your customers have to sepent to receibe the coupon.'),\n 'name' => 'WI_SPENT_AMOUNT',\n ),\n array(\n 'col' => 2,\n 'type' => 'text',\n 'suffix' => '<i class=\"icon icon-euro\"></i>',\n 'required' => true,\n 'label' => $this->l('Amount of the coupon'),\n 'desc' => $this->l('Enter the amount of the coupon for gift to your customers.'),\n 'name' => 'WI_SPENT_COUPON',\n ),\n array(\n 'col' => 1,\n 'type' => 'text',\n 'required' => true,\n 'label' => $this->l('Coupon validity in days'),\n 'desc' => $this->l('Enter the number of days while the coupon will be valid.'),\n 'name' => 'WI_SPENT_DAYS',\n ),\n array(\n 'col' => 6,\n 'type' => 'switch',\n 'label' => $this->l('Enabled'),\n 'name' => 'WI_SPENT_ENABLED',\n 'desc' => $this->l('Enable or disable this feature.'),\n 'values' => array(\n array('value' => 1, 'name' => $this->l('Yes')),\n array('value' => 0, 'name' => $this->l('No')),\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function getConfigForm()\n {\n $config_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Equivalence surcharge'),\n 'name' => 'PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED',\n 'is_bool' => true,\n 'desc' => $this->l('Enable equivalence surcharge when calculating profit'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n\n\n $available_taxes = $this->getAvailableTaxes();\n foreach ($available_taxes as $tax) {\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\",\n 'label' => $this->l($tax['name']),\n 'desc' => $this->l('Equivalence surcharge'),\n 'suffix' => '%', \n 'col' => 1,\n );\n }\n\n $config_form['form']['input'][] = array( // @TODO: Default shipping cost for each carrier\n 'type' => 'text',\n 'name' => 'PROFITMARGIN_DEFAULT_SHIPPING_COST',\n 'label' => $this->l('Default shipping cost'),\n 'suffix' => '€', \n 'col' => 1,\n );\n\n $config_form['form']['input'][] = array(\n 'type' => 'radio',\n 'name' => 'PROFITMARGIN_SHIPPING_COST_TAX',\n 'label' => $this->l('Shipping cost tax'),\n 'values' => array()\n );\n \n foreach ($available_taxes as $tax) {\n $shipping_cost_tax = &$config_form['form']['input'];\n $shipping_cost_tax[array_key_last($shipping_cost_tax)]['values'][] = array(\n 'id' => \"tax_{$tax['id_tax']}\",\n 'value' => $tax['id_tax'],\n 'label' => $this->l($tax['name'])\n );\n }\n \n foreach ($this->getAvailablePaymentModules() as $payment_module) {\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\",\n 'label' => $this->l($payment_module['name']),\n 'desc' => $this->l('Base fee'),\n 'suffix' => '€', \n 'col' => 1,\n );\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\",\n 'desc' => $this->l('Percentage fee'),\n 'suffix' => '%',\n 'col' => 1,\n );\n }\n\n return $config_form;\n }", "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "public function index()\n {\n\n if (isset($_POST['save'])) {\n\t\t\n\t\t\t//Only for Demo mode disabled function\n\t\t\tif(constant(\"ENVIRONMENT\")=='demo')\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('bf_demo_mode'), 'info');\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\t\t\n\t\t\t\tif ($this->saveSettings()) {\n\t\t\t\t\tTemplate::set_message(lang('settings_saved_success'), 'success');\n\t\t\t\t} else {\n\t\t\t\t\tTemplate::set_message(lang('settings_error_success'), 'error');\n\t\t\t\t\t$settingsError = $this->settings_lib->getError();\n\t\t\t\t\tif ($settingsError) {\n\t\t\t\t\t\tTemplate::set_message($settingsError, 'error');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tredirect(SITE_AREA . '/settings/settings');\n\t\t\t}\t\n }\n\n // Read the current settings\n $settings = $this->settings_lib->find_all();\n\n // Get the available languages\n $this->load->helper('translate/languages');\n\t\tAssets::add_module_js('settings', 'settings.js');\n\n\t\tAssets::add_css('plugins/ckeditor/contents.css');\n\t\tAssets::add_js('plugins/ckeditor/ckeditor.js');\n\n Template::set_view('settings/settings/index');\n Template::set('languages', list_languages());\n Template::set('settings', $settings);\n\n \n\n Template::render();\n }", "public function settings( &$form )\n\t{\n\t\t$settings = json_decode( $this->settings, TRUE );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'zarinpal_merchant_id', $this->id ?$settings['merchant_id']:'', TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'zarinpal_zarin_gate', $this->id ?$settings['zarin_gate']:'', TRUE ) );\n\t}", "function DisplaySettings()\n {\n $this->DisplayBreadcrumb();\n PrintPluginSettings($this->pluginid, array('form_wizard_settings','form_export_settings'), $this->_page);\n }", "public function hookConfigForm() {\n }", "public function saveExportSetting($settings)\r\n {\r\n\r\n }", "public function action_general_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t$context['SPortal']['themes'] = sp_general_load_themes();\n\n\t\t// These are very likely to come in handy! (i.e. without them we're doomed!)\n\t\trequire_once(ADMINDIR . '/ManagePermissions.controller.php');\n\t\trequire_once(ADMINDIR . '/ManageServer.controller.php');\n\t\trequire_once(SUBSDIR . '/SettingsForm.class.php');\n\n\t\t// Initialize the form\n\t\t$this->_initGeneralSettingsForm();\n\n\t\tif (isset($_GET['save']))\n\t\t{\n\t\t\tcheckSession();\n\n\t\t\tif (!empty($_POST['sp_portal_mode']))\n\t\t\t{\n\t\t\t\tupdateSettings(array('front_page' => 'PortalMain_Controller'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupdateSettings(array('front_page' => 'MessageIndex_Controller'));\n\t\t\t}\n\n\t\t\t$this->_generalSettingsForm->setConfigValues($_POST);\n\t\t\t$this->_generalSettingsForm->save();\n\t\t\tredirectexit('action=admin;area=portalconfig;sa=generalsettings');\n\t\t}\n\n\t\t$context['post_url'] = $scripturl . '?action=admin;area=portalconfig;sa=generalsettings;save';\n\t\t$context['settings_title'] = $txt['sp-adminGeneralSettingsName'];\n\t\t$context['page_title'] = $txt['sp-adminGeneralSettingsName'];\n\t\t$context['sub_template'] = 'show_settings';\n\n\t\t$this->_generalSettingsForm->prepare();\n\t}", "public function settings(&$form)\n {\n $settings = json_decode($this->settings, TRUE);\n\n $form->add(new \\IPS\\Helpers\\Form\\Text('paymentwall_project_key', $settings['project_key'], TRUE));\n $form->add(new \\IPS\\Helpers\\Form\\Text('paymentwall_secret_key', $settings['secret_key'], TRUE));\n $form->add(new \\IPS\\Helpers\\Form\\Text('paymentwall_widget_code', $settings['widget_code'], TRUE));\n $form->add(new \\IPS\\Helpers\\Form\\Text('paymentwall_success_url', $settings['success_url'], FALSE));\n $form->add(new \\IPS\\Helpers\\Form\\YesNo('paymentwall_test_mode', $settings['test_mode'], FALSE, array(), NULL, NULL, NULL, 'paymentwall_test_mode'));\n $form->add(new \\IPS\\Helpers\\Form\\YesNo('paymentwall_delivery', $settings['delivery'], FALSE, array(), NULL, NULL, NULL, 'paymentwall_delivery'));\n }", "public function settings_page() {\n if (isset($_POST['rsfa_hostname']) && isset($_POST['rsfa_username']) && isset($_POST['rsfa_password']) && isset($_POST['rsfa_client_secret']) && isset($_POST['rsfa_client_id'])) {\n $_POST = filter_var_array($_POST, FILTER_SANITIZE_STRING);\n $this->settings->hostname = $_POST['rsfa_hostname'];\n $this->settings->username = $_POST['rsfa_username'];\n $this->settings->password = $_POST['rsfa_password'];\n $this->settings->client_id = $_POST['rsfa_client_id'];\n $this->settings->client_secret = $_POST['rsfa_client_secret'];\n update_option('rsfa_settings', json_encode($this->settings));\n }\n ?>\n <style type=\"text/css\">\n .rsfa-container label {\n display: block;\n margin-bottom: 10px;\n }\n .rsfa-container input {\n display: block;\n }\n .rsfa-container button {\n margin-top: 10px;\n }\n </style>\n <div class=\"rsfa-container\">\n <h1>ShareFile API Settings</h1>\n <form method=\"POST\" enctype=\"multipart/form-data\">\n <label>\n Hostname\n <input type=\"text\" name=\"rsfa_hostname\" value=\"<?php echo $this->settings->hostname; ?>\" />\n </label>\n <label>\n Username\n <input type=\"text\" name=\"rsfa_username\" value=\"<?php echo $this->settings->username; ?>\" />\n </label>\n <label>\n Password\n <input type=\"password\" name=\"rsfa_password\" value=\"<?php echo $this->settings->password; ?>\" />\n </label>\n <label>\n Client ID\n <input type=\"text\" name=\"rsfa_client_id\" value=\"<?php echo $this->settings->client_id; ?>\" />\n </label>\n <label>\n Client Secret\n <input type=\"text\" name=\"rsfa_client_secret\" value=\"<?php echo $this->settings->client_secret; ?>\" />\n </label>\n <button type=\"submit\">Save Settings</button>\n </form>\n </div>\n <?php\n }" ]
[ "0.8579223", "0.7864438", "0.77129227", "0.75914377", "0.75671697", "0.7562504", "0.7553984", "0.746205", "0.7448072", "0.7381766", "0.7375146", "0.7370173", "0.7280842", "0.72025746", "0.7160819", "0.71488124", "0.7139524", "0.71130687", "0.71094084", "0.7075805", "0.7033824", "0.7026297", "0.70170724", "0.701597", "0.7007422", "0.70068717", "0.69635266", "0.6948658", "0.6939584", "0.69321495", "0.6930541", "0.6919866", "0.6918408", "0.6908668", "0.6908208", "0.6895512", "0.6892515", "0.6887218", "0.68749696", "0.6854717", "0.6852072", "0.68463856", "0.6806918", "0.68028426", "0.6791892", "0.6779252", "0.67684954", "0.6757267", "0.6747489", "0.67469233", "0.6744882", "0.67290306", "0.67237306", "0.67152476", "0.67135817", "0.66856176", "0.66797173", "0.6674283", "0.66722035", "0.66585904", "0.6630792", "0.66061413", "0.65990436", "0.6595343", "0.6584246", "0.65829295", "0.65779483", "0.6563139", "0.6555355", "0.65527105", "0.6551536", "0.6550949", "0.6548589", "0.6533933", "0.65310806", "0.6530883", "0.6529015", "0.6524683", "0.65237254", "0.6517032", "0.6503662", "0.65032434", "0.65012527", "0.64973027", "0.6493707", "0.64935374", "0.6488365", "0.6484873", "0.64767146", "0.64723253", "0.6467266", "0.64666814", "0.64609617", "0.64573413", "0.6439103", "0.6418154", "0.64169115", "0.6415413", "0.6414913", "0.6407939", "0.64008343" ]
0.0
-1
Hook: Payment Render payment method in payment methods list
public function hookPayment($params) { if (!$this->active) { return; } $this->smarty->assign(array( 'payment_url' => $this->context->link->getModuleLink($this->name, 'checkout', array(), Tools::usingSecureMode()), 'this_path' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $this->name . '/', )); return $this->display(__FILE__, 'payment.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_account_payment_methods( ){\n\t\tif( $this->is_page_visible( \"payment_methods\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_payment_methods.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_payment_methods.php' );\n\t\t\telse if( file_exists( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_payment_methods.php' ) )\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_payment_methods.php' );\n\t\t}\n\t}", "public function hookDisplayPayment()\n\t{\n\t\tif (!$this->active)\n\t\t\treturn;\n $titlel = Configuration::get(\n 'WIPEI_TITLEL',\n $this->context->language->id\n );\n $descl = Configuration::get(\n 'WIPEI_DESCL',\n $this->context->language->id\n );\n\t\t$this->smarty->assign(array(\n\t\t\t//'nombre' => Configuration::get($this->getPrefijo('PREFIJO_CONFIG').'_FRONTEND_NAME'),//nombre que se muestra al momento de elegir los metodos de pago\n 'this_path' => $this->_path,\n 'titlel' => $titlel,\n 'descl' => $descl,\n\t\t\t'this_path_ejemplo' => $this->_path,\n\t\t\t'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/',\n\t\t\t'module_path' => strtolower(__PS_BASE_URI__.'modules/'.$this->name.'/views/img/logo.png'),\n\n\t\t));\n\t\treturn $this->display(__FILE__, 'payment.tpl');//asigno el template que quiero usar\n }", "public function hookDisplayPayment()\n {\n if (!$this->active)\n {\n\t\t\treturn;\n }\n\n return $this->display(__FILE__, 'payment.tpl');\n }", "public function _getPaymentMethodsHtml() {\r\n\t\t//$this->_cleanLayoutCache();\r\n\t\t$layout = $this->getLayout();\t\t\r\n\t\t$update = $layout->getUpdate();\r\n\t\t$update->load('onestepcheckout_onestepcheckout_paymentmethod');\r\n\t\t$layout->generateXml();\r\n\t\t$layout->generateBlocks();\r\n\t\t$output = $layout->getOutput();\r\n\t\treturn $output;\r\n\t}", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "protected function _getPaymentMethodsHtml()\n {\n return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');\n }", "public function payment_fields() {\n echo '<p><strong>Pay securely using your credit card</strong> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/visa.svg\" alt=\"Visa\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/mastercard.svg\" alt=\"Mastercard\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/discover.svg\" alt=\"Discover\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/amex.svg\" alt=\"Amex\" class=\"card-img\" width=\"32\"></p>';\n // Trying render payment form\n // Call orginal payment the Woocommerce\n $this->form();\n }", "public function payment_fields() {\r\n\t\tif (!empty($this->description)) {\r\n\t\t\techo $this->add_next_line($this->description . '<br /><br />');\r\n\t\t}\r\n\t\techo __('Payment Method', 'ecpay') . ' : ';\r\n\t\techo $this->add_next_line('<select name=\"ecpay_choose_payment\">');\r\n\t\tforeach ($this->ecpay_payment_methods as $payment_method) {\r\n\t\t\techo $this->add_next_line(' <option value=\"' . $payment_method . '\">');\r\n\t\t\techo $this->add_next_line(' ' . $this->get_payment_desc($payment_method));\r\n\t\t\techo $this->add_next_line(' </option>');\r\n\t\t}\r\n\t\techo $this->add_next_line('</select>');\r\n\t}", "public function display_account_payment_method_details( ){\n\t\tif( $this->is_page_visible( \"payment_method_details\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_payment_method_details.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_payment_method_details.php' );\n\t\t\telse if( file_exists( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_payment_method_details.php' ) )\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_payment_method_details.php' );\n\t\t}\n\t}", "public function displayPaymentSelection()\n\t{\n\t\t$content = $this->renderTemplate('Project/1_Website/Design/Applications/Commerce/Controllers/paymentInfo/paymentInfo.phtml');\n\t\tresponse::getInstance()->addContentToTree(array('APPLICATION_CONTENT'=>$content));\n\t}", "function plgVmOnShowOrderBEPayment($virtuemart_order_id, $payment_method_id) {\n\n\tif (!$this->selectedThisByMethodId($payment_method_id)) {\n\t return null; // Another method was selected, do nothing\n\t}\n\n\t$db = JFactory::getDBO();\n\t$q = 'SELECT * FROM `' . $this->_tablename . '` '\n\t\t. 'WHERE `virtuemart_order_id` = ' . $virtuemart_order_id;\n\t$db->setQuery($q);\n\tif (!($paymentTable = $db->loadObject())) {\n\t // JError::raiseWarning(500, $db->getErrorMsg());\n\t return '';\n\t}\n\t$this->getPaymentCurrency($paymentTable);\n\t$q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`=\"' . $paymentTable->payment_currency . '\" ';\n\t$db = &JFactory::getDBO();\n\t$db->setQuery($q);\n\t$currency_code_3 = $db->loadResult();\n\t$html = '<table class=\"adminlist\">' . \"\\n\";\n\t$html .=$this->getHtmlHeaderBE();\n\t$html .= $this->getHtmlRowBE('COMMBANK_PAYMENT_NAME', $paymentTable->payment_name);\n\t//$html .= $this->getHtmlRowBE('COMMBANK_PAYMENT_TOTAL_CURRENCY', $paymentTable->payment_order_total.' '.$currency_code_3);\n\t$code = \"commbank_response_\";\n\tforeach ($paymentTable as $key => $value) {\n\t if (substr($key, 0, strlen($code)) == $code) {\n\t\t$html .= $this->getHtmlRowBE($key, $value);\n\t }\n\t}\n\t$html .= '</table>' . \"\\n\";\n\treturn $html;\n }", "abstract public function getPaymentMethod();", "public function hookDisplayPaymentReturn()\n {\n\t\tif (!$this->active)\n {\n\t\t\treturn;\n }\n\n\t\treturn $this->display(__FILE__, 'payment_return.tpl');\n\n }", "public function getPaymentAction()\n {\n $builder = Shopware()->Models()->createQueryBuilder();\n $builder->select(['payment'])\n ->from('Shopware\\Models\\Payment\\Payment', 'payment');\n\n $paymentMethods = $builder->getQuery()->getArrayResult();\n\n $languageId = $this->getBackendLanguage();\n\n foreach ($paymentMethods as &$paymentMethod) {\n $paymentMethod = $this->translatePayment($paymentMethod, $languageId);\n }\n\n $total = count($paymentMethods);\n\n $this->view->assign(\n [\n 'data' => $paymentMethods,\n 'total' => $total,\n 'success' => true\n ]\n );\n }", "public function paymentMethodPage()\n {\n $offer = PaymentMethodDiscount::where('payment_method','like','%poli%')->first();\n \n if(isset($offer)){\n $discount = $offer->discount;\n }else {\n $discount = 0;\n }\n \n \n return view('frontEnd.usersPanel.paymentMethod',compact('discount'));\n }", "public function hookDisplayPayment($params)\n {\n if (!$this->active || !self::getKeysInfo()) {\n return;\n }\n\n $this->smarty->assign(\n $this->getPaymentVars($params)\n );\n\n $this->smarty->assign(array(\n 'logos_folder' => _PS_BASE_URL_SSL_.__PS_BASE_URI__.'modules/'.$this->name.'/views/img/',\n ));\n\n $this->smarty->assign(array(\n 'isIframe' => Configuration::get('TWISPAY_IFRAME_FORM'),\n 'iframeScriptUrl' => $this->getPaymentFormActionUrl() . '/assets/script'\n ));\n\n return $this->display(__FILE__, 'views/templates/hook/payment.tpl');\n }", "function templ_payment_gateway(){\r\n\t\t$modules_array = array();\r\n\t\t$modules_array = array('templatic-custom_taxonomy','templatic-custom_fields','templatic-registration','templatic-monetization','templatic-claim_ownership');\r\n\t\trequire_once(TEMPL_MONETIZE_FOLDER_PATH.'templ_header_section.php' );\r\n\t\t?>\r\n <p class=\"tevolution_desc\"><?php echo __('The payment gateways below will help you maximize the earning potential of your site. Offering more payment options to your users will help encourage more people, who perhaps might not find the built-in PayPal suitable, to submit a listing on your directory.','templatic-admin');?></p>\r\n <?php\r\n\t\t\r\n\t\techo '\r\n\t\t<div id=\"tevolution_bundled\" class=\"metabox-holder wrapper widgets-holder-wrap\"><table cellspacing=\"0\" class=\"wp-list-tev-table postbox fixed pages \">\r\n\t\t\t<tbody style=\"background:white; padding:40px;\">\r\n\t\t\t<tr><td>\r\n\t\t\t';\r\n\t\t/* This is the correct way to loop over the directory. */\r\n\t\tdo_action('tevolution_payment_gateway');\r\n\t\techo '</td><td ><a style=\"width:150px;text-align:center;\" href=\"https://templatic.com/wordpress-plugins/\" class=\"button-primary\">'.__('View All','templatic-admin').'</a>';\r\n\t\t/* to get t plugins */\t\t\t\r\n\t\techo '</td></tr>\r\n\t\t</tbody></table>\r\n\t\t</div>\r\n\t\t';\r\n\t\r\n\t\trequire_once(TEMPL_MONETIZE_FOLDER_PATH.'templ_footer_section.php' );\r\n\t}", "public function payment_fields() {\n\t\tparent::payment_fields();\n\t\t?>\n\t\t<?php if ( $this->mode === 'SELECT' ): ?>\n\t\t\t<label for=\"factoring-menu\"></label>\n\t\t\t<label for=\"social-security-number\"><?php echo __( 'Please select payment method:', 'woocommerce-gateway-payex-payment' ); ?></label>\n\t\t\t<select name=\"factoring-menu\" id=\"factoring-menu\" class=\"required-entry\">\n\t\t\t\t<option selected value=\"FINANCING\"><?php echo __( 'Financing Invoice', 'woocommerce-gateway-payex-payment' ); ?></option>\n\t\t\t\t<option value=\"CREDITACCOUNT\"><?php echo __( 'Part Payment', 'woocommerce-gateway-payex-payment' ); ?></option>\n\t\t\t</select>\n\t\t\t<div class=\"clear\"></div>\n\t\t<?php endif; ?>\n\n\t\t<?php if ( $this->checkout_field !== 'yes' ): ?>\n\t\t\t<label for=\"social-security-number\"><?php echo __( 'Social Security Number:', 'woocommerce-gateway-payex-payment' ); ?></label>\n\t\t\t<input type=\"text\" name=\"social-security-number\" id=\"social-security-number\" value=\"\" autocomplete=\"off\">\n\t\t<?php endif; ?>\n\n\t\t<div class=\"clear\"></div>\n\t\t<?php\n\t}", "function commerce_marketplace_payment_methods_overview($store) {\n $payment_methods = commerce_marketplace_payment_enabled_methods();\n\n // Get payment methods which are enabled for this store.\n $store_enabled_methods = (!empty($store->data['payment_methods']['enabled'])) ? $store->data['payment_methods']['enabled'] : array();\n\n $output = '<p>' . t('Disabled payment methods can be enabled in the <em>Payment methods</em> section on the <a href=\"@url\">store edit page</a>.', array(\n '%title' => $store->title,\n '@url' => url('store/' . $store->store_id . '/edit', array(\n 'fragment' => 'edit-payment-methods',\n 'query' => drupal_get_destination(),\n )),\n )) . '</p>';\n $class = 'admin-list';\n if ($compact = system_admin_compact_mode()) {\n $class .= ' compact';\n }\n $output .= '<ul class=\"' . $class . '\">';\n foreach ($payment_methods as $method_id => $payment_method) {\n // List only those payment methods which are enabled for this store.\n $method = !empty($store_enabled_methods[$method_id]) ? l($payment_method['title'], 'store/' . $store->store_id . '/payment-methods/' . $method_id) : $payment_method['title'];\n $output .= '<li class=\"leaf\">' . $method;\n if (!$compact && isset($payment_method['description'])) {\n $output .= '<div class=\"description\">' . filter_xss_admin($payment_method['description']) . '</div>';\n }\n $output .= '</li>';\n }\n $output .= '</ul>';\n\n return $output;\n}", "function idealpay() {\r\n\r\n return theme('idealpay', array('gojira_idealpay_form'=>drupal_get_form('gojira_idealpay_form'), 'paymentinfo'=>Subscriptions::getNewPaymentInfo()));\r\n}", "public function hookPaymentOptions()\n {\n $payseraOption = new PaymentOption();\n\n $payseraOption->setCallToActionText($this->l('Pay by Paysera'));\n $payseraOption->setAction($this->context->link->getModuleLink($this->name, 'redirect'));\n\n $displayPaymentMethods = (bool) Configuration::get('PAYSERA_DISPLAY_PAYMENT_METHODS');\n if ($displayPaymentMethods) {\n $projectID = Configuration::get('PAYSERA_PROJECT_ID');\n $defaultCountry = Configuration::get('PAYSERA_DEFAULT_COUNTRY');\n\n $currencyISO = $this->context->currency->iso_code;\n $amount = $this->context->cart->getOrderTotal() * 100;\n $langISO = strtolower($this->context->language->iso_code);\n $langISO = in_array($langISO, ['lt', 'en', 'ru', 'lv', 'ee', 'et', 'pl', 'bg']) ? $langISO : 'en';\n\n $methods = WebToPay::getPaymentMethodList($projectID, $currencyISO)\n ->filterForAmount($amount, $currencyISO)\n ->setDefaultLanguage($langISO)\n ->getCountries();\n\n $this->context->smarty->assign([\n 'defaultCountry' => $defaultCountry,\n 'payMethods' => $methods,\n ]);\n\n $additionalInfo = $this->context->smarty->fetch('module:paysera/views/templates/hook/payment-options.tpl');\n $payseraOption->setAdditionalInformation($additionalInfo);\n $payseraOption->setInputs([\n 'paysera_payment_method' => [\n 'name' => 'paysera_payment_method',\n 'type' => 'hidden',\n 'value' => '',\n ],\n ]);\n }\n\n return [$payseraOption];\n }", "public function hookdisplayPayment($params)\r\n\t{\r\n\t\r\n\t\treturn $this->hookPayment($params);\r\n\t}", "function cfc_edd_choose_payment() { ?>\n\t<p class=\"secure-payment\"><i class=\"fa fa-lock\"></i> <?php _e('Please choose one of our <strong>secure</strong> payment methods below.', 'cfctranslation'); ?>\t</p>\n<?php }", "public function getPaymentMethod()\n {\n \n //Fill POST fields array\n $ipPostFields = [\n 'InvoiceAmount' => session()->get('total_price'),\n 'CurrencyIso' => 'KWD'\n ];\n \n //Call endpoint\n $paymentMethods = $this->initiatePayment($this->apiURL, $this->apiKey, $ipPostFields);\n \n \n return view('site.payment.checkout', compact('paymentMethods')); // redirect to the pay method in the service classe with the paymentmedthod id\n \n \n }", "function commerce_marketplace_payment_method_form_wrapper($store, $payment_method_id) {\n if (empty($store->data['payment_methods']['enabled'][$payment_method_id])) {\n return t('This payment method is not enabled for %title store. You can enable it in the <em>Payment methods</em> section on the <a href=\"@url\">store edit page</a>.', array(\n '%title' => $store->title,\n '@url' => url('store/' . $store->store_id . '/edit', array(\n 'fragment' => 'edit-payment-methods',\n 'query' => drupal_get_destination(),\n )),\n ));\n }\n return drupal_get_form('commerce_marketplace_payment_method_form', $store, $payment_method_id);\n}", "protected function _beforeToHtml()\n {\n $methodInstance = $this->_quote->getPayment()->getMethodInstance();\n $this->setPaymentMethodTitle($methodInstance->getTitle());\n\n $this->setShippingRateRequired(true);\n if ($this->_quote->getIsVirtual()) {\n $this->setShippingRateRequired(false);\n } else {\n // prepare shipping rates\n $this->_address = $this->_quote->getShippingAddress();\n $groups = $this->_address->getGroupedAllShippingRates();\n if ($groups && $this->_address) {\n $this->setShippingRateGroups($groups);\n // determine current selected code & name\n foreach ($groups as $code => $rates) {\n foreach ($rates as $rate) {\n if ($this->_address->getShippingMethod() == $rate->getCode()) {\n $this->_currentShippingRate = $rate;\n break(2);\n }\n }\n }\n }\n\n $parcelas = $this->_quote->getPayment()->getAdditionalInformation('plots');\n $valorParcela = $this->_quote->getPayment()->getAdditionalInformation('plots_val');\n $this->setParcelas($parcelas);\n $this->setValorParcela($valorParcela);\n\n $canEditShippingAddress = $this->_quote->getMayEditShippingAddress() && $this->_quote->getPayment()\n ->getAdditionalInformation(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON) == 1;\n // misc shipping parameters\n $this->setShippingMethodSubmitUrl($this->getUrl(\"{$this->_paypalActionPrefix}/express/saveShippingMethod\"))\n ->setCanEditShippingAddress($canEditShippingAddress)\n ->setCanEditShippingMethod($this->_quote->getMayEditShippingMethod())\n ;\n }\n\n $this->setEditUrl($this->getUrl(\"{$this->_paypalActionPrefix}/express/edit\"))\n ->setPlaceOrderUrl($this->getUrl(\"{$this->_paypalActionPrefix}/express/placeOrder\"));\n\n return parent::_beforeToHtml();\n }", "public function action_payments() {\n $package = Model::factory('package');\n $postvalue = $errors = array();\n $postvalue = $this->request->post();\n $payment_gateway_id= isset($postvalue['payment_gateway_type'])?$postvalue['payment_gateway_type']:0;\n \n $payment_settings = $package->get_payment_details($payment_gateway_id);\n $paypal_payment_settings=$package->get_paypal_payment_details();\n //echo \"<pre>\"; print_r($payment_settings); exit;\n $this->template->meta_description = CLOUD_SITENAME . \" | Payments \";\n $this->template->meta_keywords = CLOUD_SITENAME . \" | Payments \";\n $this->template->title = CLOUD_SITENAME . \" | \" . __('Payments');\n $this->template->page_title = __('Payments');\n \n if (class_exists('Paymentgateway')) { \n $payment_gateway_list = Paymentgateway::payment_auth_credentials_view();\n \n } else {\n trigger_error(\"Unable to load class: Paymentgateway\", E_USER_WARNING);\n }\n \n $form_top_fields= isset($payment_gateway_list[1])?$payment_gateway_list[1]:[];\n $form_fields= isset($payment_gateway_list[2])?$payment_gateway_list[2]:[];\n $form_live_fields= isset($payment_gateway_list[3])?$payment_gateway_list[3]:[];\n $form_bottom_fields= isset($payment_gateway_list[4])?$payment_gateway_list[4]:[];\n\n $this->template->content = View::factory(\"admin/package_plan/payments\")\n ->bind('payment_settings', $payment_settings)\n ->bind('paypal_payment_settings',$paypal_payment_settings)\n ->bind('form_top_fields', $form_top_fields)\n ->bind('form_fields', $form_fields)\n ->bind('form_live_fields', $form_live_fields)\n ->bind('form_bottom_fields', $form_bottom_fields)\n ->bind('payment_gateway_list',$payment_gateway_list[0])\n ->bind('postvalue', $postvalue)\n ->bind('errors', $errors);\n }", "public function show(PaymentMethod $paymentMethod)\n {\n //\n }", "public function show(PaymentMethod $paymentMethod)\n {\n //\n }", "public function show(PaymentMethod $paymentMethod)\n {\n //\n }", "public function show(PaymentMethod $paymentMethod)\n {\n //\n }", "function payment_fields() {\n\t\t\tif ( $this->description ) echo wpautop( wptexturize( $this->description ) );\n\t\t\tdo_action( 'tgm_jigoshop_payment_fields' ); // allow for insertion of custom code if needed\n\t\t}", "function ofa_camptix_payment_buttons ( $payment_output, $total, $payment_methods, $selected_payment_method ) {\n // Since we aren't blowing away the original system anyway, let's use it. Only modify the output here if\n // we have a total > 0 ... otherwise the default solution works fine for us:\n if ( $total > 0 ) {\n $output = '';\n foreach ( $payment_methods as $payment_method_key => $payment_method ) {\n $key = esc_attr( $payment_method_key );\n $checkout = esc_attr__( 'Checkout with', 'camptix' );\n $method = esc_html( $payment_method['name'] );\n $output .= <<<EOHTML\n <button id=\"tix-pm-{$key}\" type=\"submit\" name=\"tix_payment_method\" value=\"{$key}\">\n {$checkout} {$method}\n </button>\nEOHTML;\n }\n return '<p class=\"tix-submit\">'.$output.'<br class=\"tix-clear\" /></p>';\n }\n\n // Else just return the original:\n return $payment_output;\n}", "public function hookDisplayPaymentEU()\n {\n if (!Currency::exists('EUR', 0)) {\n return null;\n }\n\n try {\n $methods = $this->api->methods->all();\n } catch (Mollie_API_Exception $e) {\n if (Configuration::get(Mollie::MOLLIE_DEBUG_LOG) == Mollie::DEBUG_LOG_ERRORS) {\n Logger::addLog(__METHOD__.' said: '.$e->getMessage(), Mollie::ERROR);\n }\n\n return null;\n }\n\n $paymentOptions = array();\n foreach ($methods as $method) {\n $paymentOptions[] = array(\n 'cta_text' => $this->lang[$method->description],\n 'logo' => $method->image->normal,\n 'action' => $this->context->link->getModuleLink(\n 'mollie', 'payment',\n array('method' => $method->id), true\n ),\n );\n }\n\n return $paymentOptions;\n }", "protected function _getPaymentHtml()\n\t{\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onestep_payment');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$output = $layout->getOutput();\n\t\tMage::getSingleton('core/translate_inline')->processResponseBody($output);\n\t\treturn $output;\n\t}", "function PricerrTheme_payment_methods()\n{\n $id_icon = 'icon-options-general4';\n $ttl_of_stuff = 'PricerrTheme - Payment Methods';\n global $menu_admin_PricerrTheme_theme_bull;\n $arr = array(\"yes\" => __(\"Yes\", 'PricerrTheme'), \"no\" => __(\"No\", 'PricerrTheme'));\n\n $arr1 = array(\"parallel\" => \"Parallel Payments\", \"chained\" => \"Chained Payments\");\n //------------------------------------------------------\n\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"' . $id_icon . '\"><br/></div>';\n echo '<h2 class=\"my_title_class_sitemile\">' . $ttl_of_stuff . '</h2>';\n\n //--------------------------\n\n do_action('PricerrTheme_payment_methods_action');\n if (isset($_POST['PricerrTheme_save1'])) {\n update_option('PricerrTheme_paypal_enable', trim($_POST['PricerrTheme_paypal_enable']));\n update_option('PricerrTheme_paypal_email', trim($_POST['PricerrTheme_paypal_email']));\n update_option('PricerrTheme_paypal_enable_sdbx', trim($_POST['PricerrTheme_paypal_enable_sdbx']));\n\n update_option('PricerrTheme_enable_paypal_ad', trim($_POST['PricerrTheme_enable_paypal_ad']));\n update_option('pricerr_theme_signature', trim($_POST['pricerr_theme_signature']));\n update_option('pricerr_theme_apipass', trim($_POST['pricerr_theme_apipass']));\n update_option('pricerr_theme_apiuser', trim($_POST['pricerr_theme_apiuser']));\n update_option('pricerr_theme_appid', trim($_POST['pricerr_theme_appid']));\n update_option('PricerrTheme_paypal_ad_model', trim($_POST['PricerrTheme_paypal_ad_model']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save2'])) {\n update_option('PricerrTheme_alertpay_enable', trim($_POST['PricerrTheme_alertpay_enable']));\n update_option('PricerrTheme_alertpay_email', trim($_POST['PricerrTheme_alertpay_email']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save3'])) {\n update_option('PricerrTheme_moneybookers_enable', trim($_POST['PricerrTheme_moneybookers_enable']));\n update_option('PricerrTheme_moneybookers_email', trim($_POST['PricerrTheme_moneybookers_email']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save4'])) {\n update_option('PricerrTheme_ideal_enable', trim($_POST['PricerrTheme_ideal_enable']));\n update_option('PricerrTheme_ideal_email', trim($_POST['PricerrTheme_ideal_email']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save7'])) {\n update_option('PricerrTheme_bank_details', trim($_POST['PricerrTheme_bank_details']));\n update_option('PricerrTheme_bank_enable', trim($_POST['PricerrTheme_bank_enable']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n ?>\n\n\n<div id=\"usual2\" class=\"usual\">\n <ul>\n <li><a href=\"#tabs1\">PayPal</a></li>\n <li><a href=\"#tabs2\">Payza/AlertPay</a></li>\n <li><a href=\"#tabs3\">Moneybookers/Skrill</a></li>\n <li><a href=\"#tabs4\">iDeal</a></li>\n\n <li><a href=\"#tabs_offline\"><?php _e('Bank Payment(offline)', 'PricerrTheme'); ?></a></li>\n <?php do_action('PricerrTheme_payment_methods_tabs'); ?>\n\n </ul>\n <div id=\"tabs1\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=payment-methods&active_tab=tabs1\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_paypal_enable'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('PayPal Enable Sandbox:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_paypal_enable_sdbx'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('PayPal Email Address:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"45\" name=\"PricerrTheme_paypal_email\" value=\"<?php echo get_option('PricerrTheme_paypal_email'); ?>\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Enable PayPal Adaptive:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_paypal_ad'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Payment Model:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr1, 'PricerrTheme_paypal_ad_model'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Signature:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" name=\"pricerr_theme_signature\" value=\"<?php echo get_option('pricerr_theme_signature'); ?>\" size=\"85\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('API Password:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" name=\"pricerr_theme_apipass\" value=\"<?php echo get_option('pricerr_theme_apipass'); ?>\" size=\"55\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('API User:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" name=\"pricerr_theme_apiuser\" value=\"<?php echo get_option('pricerr_theme_apiuser'); ?>\" size=\"55\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Application ID:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" name=\"pricerr_theme_appid\" value=\"<?php echo get_option('pricerr_theme_appid'); ?>\" size=\"55\"/></td>\n </tr>\n\n <tr>\n <td></td>\n <td></td>\n <td><input type=\"submit\" name=\"PricerrTheme_save1\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/></td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs2\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=payment-methods&active_tab=tabs2\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_alertpay_enable'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Payza/Alertpay Email:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"45\" name=\"PricerrTheme_alertpay_email\" value=\"<?php echo get_option('PricerrTheme_alertpay_email'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save2\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs3\">\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=payment-methods&active_tab=tabs3\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_moneybookers_enable'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('MoneyBookers Email:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"45\" name=\"PricerrTheme_moneybookers_email\" value=\"<?php echo get_option('PricerrTheme_moneybookers_email'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save3\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs4\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=payment-methods&active_tab=tabs4\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_ideal_enable'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('iDeal Partner ID:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"45\" name=\"PricerrTheme_ideal_email\" value=\"<?php echo get_option('PricerrTheme_ideal_email'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save4\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n\n\n\n\n<?php do_action('PricerrTheme_payment_methods_content_divs'); ?>\n\n\n <div id=\"tabs_offline\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=payment-methods&active_tab=tabs_offline\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_bank_enable'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Bank Details:', 'PricerrTheme'); ?></td>\n <td>\n <textarea rows=\"5\" name=\"PricerrTheme_bank_details\" cols=\"40\"><?php echo get_option('PricerrTheme_bank_details'); ?></textarea>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save7\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n\n\n <?php\n echo '</div>';\n\n\n}", "abstract protected function handlePayment();", "function plgVmOnShowOrderBEPayment($virtuemart_order_id, $payment_method_id) {\r\n\r\n\t\tif (!$this->selectedThisByMethodId($payment_method_id)) {\r\n\t\t\treturn null; // Another method was selected, do nothing\r\n\t\t}\r\n\r\n\t\tif (!($paymentTable = $this->_getHellaspayInternalData($virtuemart_order_id) )) {\r\n\t\t\t// JError::raiseWarning(500, $db->getErrorMsg());\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$this->getPaymentCurrency($paymentTable);\r\n\t\t$q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`=\"' . $paymentTable->payment_currency . '\" ';\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$db->setQuery($q);\r\n\t\t$currency_code_3 = $db->loadResult();\r\n\t\t$html = '<table class=\"adminlist table\">' . \"\\n\";\r\n\t\t$html .=$this->getHtmlHeaderBE();\r\n\t\t$html .= $this->getHtmlRowBE('HELLASPAY_PAYMENT_NAME', $paymentTable->payment_name);\r\n\t\t//$html .= $this->getHtmlRowBE('PAYPAL_PAYMENT_TOTAL_CURRENCY', $paymentTable->payment_order_total.' '.$currency_code_3);\r\n\t\t$code = \"hellaspay_response_\";\r\n\t\tforeach ($paymentTable as $key => $value) {\r\n\t\t\tif (substr($key, 0, strlen($code)) == $code) {\r\n\t\t\t\t$html .= $this->getHtmlRowBE($key, $value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$html .= '</table>' . \"\\n\";\r\n\t\treturn $html;\r\n\t}", "public function addPaymentMethod()\n {\n return view('admin.delivery-and-payment-method', [\n 'delivery_and_payment_method' => new PaymentMethod,\n 'type' => 'payment_method',\n 'action' => route('admin.payment_method.create')\n ]);\n }", "public function render() {\n\n\t\t$this->clear_session_data();\n\n\t\t// if there are subscriptions or pre-orders in the cart and the user\n\t\t// already has some stored tokens, then we can halt the cart checkout\n\t\t// feature since the customer will likely have a better experience\n\t\t// choosing a stored payment method using our standard checkout flow.\n\t\tif ( ! $this->is_single_use() && ( ! $this->get_gateway()->tokenization_enabled() || $this->user_has_tokens() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->render_button();\n\n\t\t$this->render_js();\n\t}", "abstract protected function getPaymentMethodCode();", "public function paymentAction()\n {\n\n $this->initUnipagosPaymentStep();\n $this->loadLayout(); \n $this->getLayout()->getBlock(\"head\")->setTitle($this->__(\"Unipagos Payment\"));\n $this->renderLayout(); \n }", "public function show(BusinessPaymentMethod $businessPaymentMethod)\n {\n //\n }", "function colabs_list_gateway_dropdown( $input_name = 'payment_gateway' ) {\n\n $available_gateways = array();\n\n if ( $available_gateways = Colabs_Gateway_Registry::get_active_gateways() ) {\n ?>\n <ul class=\"payment_methods methods\">\n <?php foreach ( $available_gateways as $gateway ) {?>\n <li class=\"payment_method_<?php echo $gateway->identifier(); ?>\">\n <input id=\"payment_method_<?php echo $gateway->identifier(); ?>\" type=\"radio\" class=\"input-radio\" name=\"colabs_payment_method\" value=\"<?php echo esc_attr( $gateway->identifier() ); ?>\" data-order_button_text=\"<?php echo esc_attr( $gateway->display_name( 'dropdown' ) ); ?>\" />\n <label for=\"payment_method_<?php echo $gateway->identifier(); ?>\"><?php echo $gateway->display_name( 'dropdown' ); ?></label>\n <?php\n if ( $gateway->has_fields() || $gateway->get_description() ) {\n echo '<div class=\"payment_box payment_method_' . $gateway->identifier() . '\" style=\"display:none;\">';\n $gateway->payment_fields();\n echo '</div>';\n }\n ?>\n </li>\n <?php }?>\n </ul>\n <?php \n }else{\n echo '<p>'.__( 'No Gateways are currently available', 'colabsthemes' ).'</p>';\n }\n\n}", "public function processPayment();", "function payment_fields() {\n?>\n\t\t<?php if ($this->tran_mode=='sandbox') : ?><p><?php _e('TEST MODE/SANDBOX ENABLED', WC_Authorize_SIM::TEXT_DOMAIN); ?></p><?php endif; ?>\n\t\t<?php if ($this->description) : ?><p><?php echo wpautop(wptexturize($this->description)); ?></p><?php endif; ?>\n<?php\n\n\t}", "public function getSelectPaymentHtml()\n\t{\n\t\treturn '<img src=\"modules/shop/plugins_payment/two_checkout/paymentlogoshorizontal.png\"\n align=\"left\"\n style=\"margin-right:7px;\">';\n\t}", "public function display_custom_payment_heading() {\n\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div class=\"ast-payment-option-heading\">\n\t\t\t\t<h3 id=\"ast-payment_options_heading\"><?php esc_html_e( 'Payment', 'astra-addon' ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\techo ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "function admin_display_payment_gateways()\n {\n $return = array (\n 'name' => $this->name,\n 'title' => 'CC - Manual Payment',\n );\n\n return $return;\n }", "public function getPage() {\n return $this->render('payment_info.phtml');\n }", "function rsm_sc_payment_types() {\n\n\tob_start();\n\trsm_get_template( 'rsm-payment-types.php' );\n\treturn ob_get_clean();\n\n}", "public function payment_fields() {\n \n\t\t\n \n\t\t}", "public function payment_fields() {\n\t\t$user = wp_get_current_user();\n\t\t$display_tokenization = $this->supports( 'tokenization' ) && is_checkout();\n\t\t$total = WC()->cart->total;\n\n\t\tif ( $user->ID ) {\n\t\t\t$user_email = get_user_meta( $user->ID, 'billing_email', true );\n\t\t\t$user_email = $user_email ? $user_email : $user->user_email;\n\t\t} else {\n\t\t\t$user_email = '';\n\t\t}\n\n\t\techo '<div\n\t\t\tid=\"xendit-payment-data\"\n\t\t\tdata-description=\"\"\n\t\t\tdata-email=\"' . esc_attr( $user_email ) . '\"\n\t\t\tdata-amount=\"' . esc_attr( $this->get_xendit_amount( $total ) ) . '\"\n\t\t\tdata-name=\"' . esc_attr( $this->statement_descriptor ) . '\"\n\t\t\tdata-currency=\"' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '\"\n\t\t\tdata-locale=\"' . esc_attr( 'en' ) . '\"\n\t\t\tdata-image=\"' . esc_attr( $this->xendit_checkout_image ) . '\"\n\t\t\tdata-allow-remember-me=\"' . esc_attr( $this->saved_cards ? 'true' : 'false' ) . '\">';\n\n\t\tif ( $this->description ) {\n\t\t\techo apply_filters( 'wc_xendit_description', wpautop( wp_kses_post( $this->description ) ) );\n\t\t}\n\n\t\tif ( $display_tokenization ) {\n\t\t\t$this->tokenization_script();\n\t\t}\n\n\t\t$this->form();\n\t\techo '</div>';\n\t}", "public function payee_payments()\n\t{\n\t\t//permittedArea();\n\n\t\ttheme('payee_payments');\n\t}", "public function plgVmDisplayListFEPayment(VirtueMartCart $cart, $selected = 0, &$htmlIn) {\r\n\tJHTML::_('behavior.tooltip');\r\n\r\n\tif ($this->getPluginMethods($cart->vendorId) === 0) {\r\n\t if (empty($this->_name)) {\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_NO_' . strtoupper($this->_psType)));\r\n\t\treturn false;\r\n\t } else {\r\n\t\treturn false;\r\n\t }\r\n\t}\r\n\t\r\n\t\t$lang = JFactory::getLanguage();\r\n\t\t$this->lang_tag = $lang->getTag();\r\n\t\tif(strtolower($this->lang_tag) == 'el-gr'){\r\n\t\t$hellaspay_lang = 'GR';\r\n\t\t} else {\r\n\t\t$hellaspay_lang = 'EN';\r\n\t\t}\r\n\t\t\r\n\t$html = array();\r\n\t$method_name = $this->_psType . '_name';\r\n\r\n\tJHTML::script('vmcreditcard.js', 'components/com_virtuemart/assets/js/', false);\r\n\tJFactory::getLanguage()->load('com_virtuemart');\r\n\tvmJsApi::jCreditCard();\r\n\t$this->_getHellaspayIntoSession(); //get session vars\r\n\t$htmla = '';\r\n\t$html = array();\r\n\tforeach ($this->methods as $this->_currentMethod) {\r\n\t\t\tif ($this->checkConditions($cart, $this->_currentMethod, $cart->cartPrices)) {\r\n\t\t\t\t$methodSalesPrice = $this->setCartPrices($cart, $cart->cartPrices, $this->_currentMethod);\r\n\t\t\t\t$this->_currentMethod->$method_name = $this->renderPluginName($this->_currentMethod);\r\n\r\n\t\t\r\n\t\t$this->getPaymentCurrency($this->_currentMethod);\r\n\t\t$q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`=\"' . $this->_currentMethod->payment_currency . '\" ';\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$db->setQuery($q);\r\n\t\t$currency_code_3 = $db->loadResult();\r\n\r\n\t\t$paymentCurrency = CurrencyDisplay::getInstance($this->_currentMethod->payment_currency);\r\n\t\t$totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($this->_currentMethod->payment_currency, $cart->cartPrices['billTotal'], false), 2);\r\n\t\t\r\n\t\t$html = $this->getPluginHtml($this->_currentMethod, $selected, $methodSalesPrice);\r\n\t\tif ($selected == $this->_currentMethod->virtuemart_paymentmethod_id) {\r\n\t\t if (!empty($hellaspaySession->vivinstalments))\r\n\t\t\t$this->_vivinstalments = $hellaspaySession->vivinstalments;\r\n\t\t\t$this->_vivinstalmentsamount = $totalInPaymentCurrency;\r\n\t\t\t} else {\r\n\t\t $this->_vivinstalments = '';\r\n\t\t\t$this->_vivinstalmentsamount = $totalInPaymentCurrency;\r\n\t\t}\r\n\r\n\t\t$instalmentoptions = $this->_getInstalmentOptions($this->_currentMethod);\r\n\r\n\t\tif(isset($instalmentoptions) && $instalmentoptions!=''){\r\n\t\t\r\n\t\t$html .= '<br /><table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">\r\n\t\t <tr>\r\n\t\t <td nowrap width=\"10%\" align=\"right\">' . vmText::_('VMPAYMENT_HELLASPAY_INSTALMENTS_CHECKOUT') . '</td>\r\n\t\t <td> ';\r\n\t\t$html .= $this->listInstalments('vivinstalments', $this->_vivinstalments, '', $this->_currentMethod, $cart);\r\n\t\t$html .= '<input type=\"hidden\" name=\"vivinstalmentsamount\" value=\"'.$this->_vivinstalmentsamount.'\"></td></tr></table></span>';\r\n\t\t\r\n\t\t}//end if instalment options are set\r\n\r\n\r\n\t\t$htmla[] = $html;\r\n\t }\r\n\t}\r\n\t$htmlIn[] = $htmla;\r\n\r\n\treturn true;\r\n\r\n\t}", "public function getPaymentAction()\n\t{\n\t\t$this->_ajaxValidation();\n\t\t$response['content']=$this->_getPaymentHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "public function onRsformBackendAfterShowComponents(): void\n\t{\n\t\t// Load the RO Payments stylesheet\n\t\tHTMLHelper::stylesheet(\n\t\t\t'com_jdidealgateway/jdidealgateway.css',\n\t\t\t['relative' => true, 'version' => 'auto']\n\t\t);\n\n\t\t?>\n\t\t<li class=\"rsform_navtitle\"><?php\n\t\t\techo Text::_('PLG_RSFP_JDIDEAL_LABEL'); ?></li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5575');return false;\" id=\"rsfpc5575\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_SPRODUCT'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5576');return false;\" id=\"rsfpc5576\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_MPRODUCT'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5578');return false;\" id=\"rsfpc5578\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_INPUTBOX'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5580');return false;\" id=\"rsfpc5580\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_DISCOUNT'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5577');return false;\" id=\"rsfpc5577\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_TOTAL'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href=\"javascript: void(0);\"\n\t\t\t onclick=\"displayTemplate('5579');return false;\" id=\"rsfpc5579\">\n\t\t\t\t<span class=\"rsficon jdicon-jdideal\"></span>\n\t\t\t\t<span class=\"inner-text\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo Text::_('PLG_RSFP_JDIDEAL_BUTTON'); ?>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t\t<?php\n\t}", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function show(Payment $payment)\n {\n //\n }", "public function payment_fields() {\n\t\t\tif (true === $this->description) {\n\t\t\t\techo esc_html($this->description);\n\t\t\t}\n\n\t\t}", "public function payment(){\n\n\t}", "function storefront_footer_payment_delivery_methods()\n { \n include('footer_payment_delivery_methods.php');\n }", "public function payment_fields() {\n\t\t$description = $this->get_description();\n\n\t\tif ( 'yes' == $this->sandbox ) {\n\t\t\t$description .= ' ' . sprintf( __( 'TEST MODE ENABLED. Use a test card: %s', 'woocommerce' ), '<a href=\"https://www.simplify.com/commerce/docs/tutorial/index#testing\">https://www.simplify.com/commerce/docs/tutorial/index#testing</a>' );\n\t\t}\n\n\t\tif ( $description ) {\n\t\t\techo wpautop( wptexturize( trim( $description ) ) );\n\t\t}\n\t}", "public function payment_fields() {\n\t\t$message = $this->get_sandbox_form_message( $this->get_transaction_address( 'country' ) );\n\t\twc_get_template(\n\t\t\t'sandbox-checkout-alert.php',\n\t\t\tarray(\n\t\t\t\t'is_sandbox_mode' => $this->is_sandbox_mode,\n\t\t\t\t'message' => $message,\n\t\t\t),\n\t\t\t'woocommerce/ebanx/',\n\t\t\tWC_EBANX::get_templates_path()\n\t\t);\n\n\t\t$description = $this->get_description();\n\t\tif ( isset( $description ) ) {\n\t\t\techo wp_kses_post( wpautop( wptexturize( $description ) ) );\n\t\t}\n\n\t\twc_get_template(\n\t\t\t'tef/payment-form.php',\n\t\t\tarray(\n\t\t\t\t'title' => $this->title,\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'id' => $this->id,\n\t\t\t),\n\t\t\t'woocommerce/ebanx/',\n\t\t\tWC_EBANX::get_templates_path()\n\t\t);\n\n\t\tparent::checkout_rate_conversion( WC_EBANX_Constants::CURRENCY_CODE_BRL );\n\t}", "public function hookPayment($params) {\n\n if (!$this->active) {\n return;\n }\n\n // Check if configuration is valid\n if (!$this->config->isValid()) {\n return;\n }\n\n $this->smarty->assign(array(\n 'this_path' => $this->_path,\n 'this_path_bw' => $this->_path,\n 'moduleUrl' => $this->getModuleUrl()\n ));\n\n return $this->display(__FILE__, 'seqr_payment_option.tpl');\n }", "public function payment_options_form() {\n \n // Do not proceed if deposit feature is disabled\n if (get_option( 'woo_payment_option' ) == 'disabled') {\n return false;\n }\n \n if ( get_option( 'woo_payment_option' ) == 'allowed' ) {\n ?>\n \n <div id='deposit-options-form'>\n \n <h3><?php echo 'Deposit Option'; ?></h3>\n \n <ul class=\"deposit_options\">\n \n <li id='deposit-option-full' class=\"deposit_option deposit_option_full\">\n \t\t\t\t<input id='pay-full-amount' name='deposit-radio' type='radio' checked='checked' class='input-radio'>\n \t\t\t\t<label for='pay-full-amount'>Pay full amount</label>\n \t\t\t</li>\t\n \t\t\t\n <li id='deposit-option-partial' class=\"deposit_option deposit_option_partial\">\n \t\t\t\t<input id='pay-deposit' name='deposit-radio' type='radio' class='input-radio'>\n \t\t\t\t<label for='pay-deposit'>Pay deposit</label>\n \t\t\t</li>\n \t\t\t\n </ul>\n \n </div>\n \n <?php\n } else if ( get_option( 'woo_payment_option' ) == 'forced' ) {\n ?>\n \n <div id='deposit-options-form'>\n \n <div id='deposit-option-full' hidden>\n \t\t\t\t<input id='pay-full-amount' name='deposit-radio' type='radio' class='input-radio'>\n \t\t\t\t<label for='pay-full-amount'>Pay full amount</label>\n \t\t\t</div>\t\n \t\t\t\n <div id='deposit-option-partial'>\n \t\t\t\t<input id='pay-deposit' name='deposit-radio' type='radio' checked='checked' class='input-radio'>\n \t\t\t\t<label for='pay-deposit'>Pay deposit</label>\n \t\t\t</div>\n \n </div>\n \n <?php\n }\n }", "public function payment_fields() {\n\n\t\t$this->log( 'Show Payment fields on the checkout page' );\n\n\t\t$referer = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : \"\";\n\n\t\t$this->log( 'Received GET data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_GET, true ) );\n\n\t\t$this->log( 'Received POST data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_POST, true ) );\n\n\t\tif ( $this->description ) {\n\t\t\techo wpautop( wp_kses_post( $this->description ) );\n\t\t}\n\t}", "public function hookPayment($params)\r\n\t{\r\n\t\t$html = '';\r\n\t\t$paypal_usa_express_checkout_no_token = (!isset($this->context->cookie->paypal_express_checkout_token) || empty($this->context->cookie->paypal_express_checkout_token));\r\n\r\n\t\t/* PayPal Express Checkout */\r\n\t\tif (Configuration::get('PAYPAL_USA_EXPRESS_CHECKOUT'))\r\n\t\t{\r\n\t\t\t/* Display the PayPal Express Checkout button to confirm the payment */\r\n\t\t\t$this->context->smarty->assign(array('paypal_usa_express_checkout_hook_payment' => true,\r\n\t\t\t\t'paypal_usa_merchant_country_is_mx' => (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX'),\r\n\t\t\t\t'paypal_usa_express_checkout_no_token' => $paypal_usa_express_checkout_no_token,\r\n\t\t\t\t'paypal_usa_action' => $this->context->link->getModuleLink('paypalusa', 'expresscheckout', ($paypal_usa_express_checkout_no_token) ? array('pp_exp_initial' => 1) : array('pp_exp_payment' => 1))));\r\n\t\t\t$html .= $this->display(__FILE__, 'views/templates/hooks/express-checkout.tpl');\r\n\t\t}\r\n\r\n\t\t/* PayPal Payments Standard */\r\n\t\tif (Configuration::get('PAYPAL_USA_PAYMENT_STANDARD') && (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code != 'MX') && $paypal_usa_express_checkout_no_token)\r\n\t\t{\r\n\t\t\t/* Display a form/button that will be sent to PayPal with the customer details */\r\n\t\t\t$billing_address = new Address((int)$this->context->cart->id_address_invoice);\r\n\t\t\t$billing_address->country = new Country((int)$billing_address->id_country);\r\n\t\t\t$billing_address->state = new State((int)$billing_address->id_state);\r\n\r\n\t\t\t$this->context->smarty->assign(array(\r\n\t\t\t\t'paypal_usa_action' => 'https://www'.(Configuration::get('PAYPAL_USA_SANDBOX') ? '.sandbox' : '').'.paypal.com/cgi-bin/webscr',\r\n\t\t\t\t'paypal_usa_customer' => $this->context->customer,\r\n\t\t\t\t'paypal_usa_business_account' => Configuration::get('PAYPAL_USA_ACCOUNT'),\r\n\t\t\t\t'paypal_usa_billing_address' => $billing_address,\r\n\t\t\t\t'paypal_usa_cancel_url' => $this->context->link->getPageLink('order.php'),\r\n\t\t\t\t'paypal_usa_notify_url' => $this->context->link->getModuleLink('paypalusa', 'validation', array('pps' => 1)), /* IPN URL */\r\n\t\t\t\t'paypal_usa_return_url' => $this->context->link->getPageLink('order-confirmation.php')));\r\n\r\n\t\t\t$html .= $this->display(__FILE__, 'views/templates/hooks/standard.tpl');\r\n\t\t}\r\n\r\n\t\t/* PayPal Payments Advanced or PayPal Payflow link */\r\n\t\tif ((Configuration::get('PAYPAL_USA_PAYFLOW_LINK') || Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED')) && (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code != 'MX') && $paypal_usa_express_checkout_no_token)\r\n\t\t{\r\n\t\t\t/* Create a unique token and a PayPal payment request to display an <iframe> loading the marchant Hosted Checkout page (see PayPal Manager website) */\r\n\t\t\t$token = Tools::passwdGen(36);\r\n\t\t\t$amount = $this->context->cart->getOrderTotal(true);\r\n\t\t\t$taxes = $amount - $this->context->cart->getOrderTotal(false);\r\n\t\t\t$i = 0;\r\n\t\t\tif ($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS) == 0)\r\n\t\t\t{\r\n\t\t\t\tforeach ($this->context->cart->getProducts() as $product)\r\n\t\t\t\t{\r\n\t\t\t\t\t$nvp_request .= '&L_NAME'.$i.'['.strlen(urlencode($product['name'])).']='.urlencode($product['name']).\r\n\t\t\t\t\t\t\t'&L_SKU'.$i.'['.strlen(urlencode((int)$product['id_product'])).']='.urlencode((int)$product['id_product']).\r\n\t\t\t\t\t\t\t'&L_DESC'.$i.'['.strlen(urlencode(strip_tags(Tools::truncate($product['description_short'], 80)))).']='.urlencode(strip_tags(Tools::truncate($product['description_short'], 80))).\r\n\t\t\t\t\t\t\t'&L_COST'.$i.'['.strlen(urlencode((float)$product['price'])).']='.urlencode((float)$product['price']).\r\n\t\t\t\t\t\t\t'&L_QTY'.$i.'['.strlen(urlencode((int)$product['cart_quantity'])).']='.urlencode((int)$product['cart_quantity']);\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t\t$nvp_request .= '&FREIGHTAMT['.strlen(urlencode((float)$this->context->cart->getTotalShippingCost())).']='.urlencode((float)$this->context->cart->getTotalShippingCost()).\r\n\t\t\t\t\t\t'&TAXAMT['.strlen(urlencode((float)$taxes)).']='.urlencode((float)$taxes);\r\n\t\t\t}\r\n\t\t\t$currency = new Currency((int)$this->context->cart->id_currency);\r\n\t\t\t$result = $this->postToPayFlow('&TRXTYPE[1]=S&AMT['.strlen($amount).']='.$amount.$nvp_request.'&CREATESECURETOKEN[1]=Y&DISABLERECEIPT=TRUE&SECURETOKENID[36]='.$token.\r\n\t\t\t\t\t'&CURRENCY['.strlen(urlencode($currency->iso_code)).']='.urlencode($currency->iso_code).'&TEMPLATE[9]=MINLAYOUT&ERRORURL['.strlen($this->context->link->getModuleLink('paypalusa', 'validation')).']='.$this->context->link->getModuleLink('paypalusa', 'validation').\r\n\t\t\t\t\t'&CANCELURL='.$this->context->link->getPageLink('order.php').\r\n\t\t\t\t\t'&RETURNURL['.strlen($this->context->link->getModuleLink('paypalusa', 'validation')).']='.$this->context->link->getModuleLink('paypalusa', 'validation'), Configuration::get('PAYPAL_USA_PAYFLOW_LINK') ? 'link' : 'pro');\r\n\t\t\tif ($result['RESULT'] == 0 && !empty($result['SECURETOKEN']) && $result['SECURETOKENID'] == $token && strtoupper($result['RESPMSG']) == 'APPROVED')\r\n\t\t\t{\r\n\t\t\t\t/* Store the PayPal response token in the customer cookie for later use (payment confirmation) */\r\n\t\t\t\tContext::getContext()->cookie->paypal_advanced_token = $result['SECURETOKEN'];\r\n\r\n\t\t\t\t$this->context->smarty->assign('paypal_usa_advanced_iframe_url', 'https://'.(Configuration::get('PAYPAL_USA_SANDBOX_ADVANCED') ? 'pilot-' : '').'payflowlink.paypal.com/payflowlink.do?SECURETOKEN='.$result['SECURETOKEN'].'&SECURETOKENID='.$result['SECURETOKENID'].(Configuration::get('PAYPAL_USA_SANDBOX_ADVANCED') ? '&MODE=TEST' : ''));\r\n\r\n\t\t\t\t$html .= $this->display(__FILE__, 'views/templates/hooks/payment-advanced.tpl');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "function get_payment_view() {\n\n // Verify if view exists\n if ( md_the_component_variable('payment_content_view') ) {\n\n // Display view\n echo md_the_component_variable('payment_content_view');\n\n }\n \n }", "public function add_payment_method() {\n\t\t$this->log('add_payment_method called in Xendit');\n\t\tif ( empty( $_POST['xendit_token'] ) || ! is_user_logged_in() ) {\n\t\t\twc_add_notice( __( 'There was a problem adding the card.', 'xendit-woocommerce-gateway' ), 'error' );\n\t\t\treturn;\n\t\t}\n\n\n\t\tif ( is_wp_error( $card ) ) {\n\t\t\t$localized_messages = $this->get_localized_messages();\n\t\t\t$error_msg = __( 'There was a problem adding the card.', 'xendit-woocommerce-gateway' );\n\n\t\t\twc_add_notice( $error_msg, 'error' );\n\t\t\treturn;\n\t\t}\n\n\t\treturn array(\n\t\t\t'result' => 'success',\n\t\t\t'redirect' => wc_get_endpoint_url( 'payment-methods' ),\n\t\t);\n\t}", "public function process_payment() {\n\n // Saves a suggestions group\n (new MidrubBasePaymentsCollectionBraintreeHelpers\\Process)->prepare();\n\n }", "public function payment_fields() {\n\t\tparent::payment_fields();\n\t\t?>\n\t\t<p class=\"form-row form-row-wide\">\n\t\t\t<label for=\"social-security-number\">\n\t\t\t\t<?php echo __( 'Social Security Number', 'payex-woocommerce-payments' ); ?>\n\t\t\t\t<abbr class=\"required\">*</abbr>\n\t\t\t</label>\n\t\t\t<input type=\"text\" class=\"input-text required-entry\" name=\"social-security-number\"\n\t\t\t\t id=\"social-security-number\" value=\"\" autocomplete=\"off\">\n\t\t</p>\n\t\t<?php\n\t}", "public function ride_payment()\r\n\t{\r\n\t\tif (!empty($_SESSION['olouserid'])) {\r\n\t\t\t$ordercode = $_SESSION['order_code'];\r\n\t\t\t$this->load->library('zyk/OrderLib', 'orderlib');\r\n\t\t\t$data = $this->orderlib->getOrderDetails($ordercode);\r\n\t\t\t$this->template->set('ordercode',$ordercode);\r\n\t\t\t$this->template->set('userdata',$data[0]);\r\n\t\t\t$this->template->set ( 'page', 'Ride Payment' );\r\n\t\t $this->template->set ( 'description', '' );\r\n\t\t $this->template->set ( 'keywords', '' );\r\n\t\t $this->template->set_theme('default_theme');\r\n\t\t $this->template->set_layout ('default')\r\n\t\t ->title ( 'ServiceOn' )\r\n\t\t ->set_partial ( 'header', 'partials/header' )\r\n\t\t ->set_partial ( 'footer', 'partials/footer' );\r\n\t\t\t$this->template->build ('rider-payment-view');\r\n\t\t} else {\r\n\t\t\tredirect(base_url().\"login\");\r\n\t\t}\r\n\t}", "public function selectPaymentAction()\n {\n /* @var $fetcher \\SclZfCartPayment\\Method\\MethodFetcherInterface */\n $fetcher = $this->getServiceLocator()->get('SclZfCartPayment\\Method\\MethodFetcherInterface');\n\n /* @var $selector \\SclZfCartPayment\\Method\\MethodSelectorInterface */\n $selector = $this->getServiceLocator()->get('SclZfCartPayment\\Method\\MethodSelectorInterface');\n\n /* @var $form \\SclZfCartPayment\\Form\\PaymentMethods */\n $form = $this->getServiceLocator()->get('SclZfCartPayment\\Form\\PaymentMethods');\n\n $form->setAttribute('action', $this->url()->fromRoute('payment/select-payment'));\n\n $form->addMethods($fetcher->listMethods());\n\n if ($this->formSubmitted($form)) {\n $selector->setSelectedMethod($form->get($form::ELEMENT_METHOD)->getValue());\n return $this->redirect()->toRoute('cart/checkout');\n }\n\n return array('form' => $form);\n }", "public function index()\n\t\t{\n\t\t\t$payment_methods = DB::table('payment_methods')\n\t\t\t\t\t\t\t\t->orderBy('payment_methods.ordering', 'desc')\n\t \t->paginate(10);\n\n\t\t\treturn View::make('admin.payment_methods.payment-methods')\n\t\t\t\t\t\t\t\t->with('payment_methods', $payment_methods);\n\t\t}", "public function getPaymentType(){\n return $this->payment_type;\n }", "public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ];\n }", "function edd_render_gateway_choice( $post_id ) {\r\n $post_gate = get_post_meta( $post_id, '_edd_gateway', true );\r\n $gateways = edd_get_payment_gateways();\r\n $gateway_options = array();\r\n foreach($gateways as $key => $arr){\r\n\t $gateway_options[$key] = $arr['admin_label'];\r\n }\r\n $fiat_fee = get_post_meta( $post_id, '_edd_fiat_fee') ? get_post_meta( $post_id, '_edd_fiat_fee', true ) : '0';\r\n $fair_fee = get_post_meta( $post_id, '_edd_faircoin_fee') ? get_post_meta( $post_id, '_edd_faircoin_fee', true ) : '1';\r\n $gateway_order = get_post_meta( $post_id, '_edd_order') ? get_post_meta( $post_id, '_edd_order', true) : '0';\r\n?>\r\n\t<p><strong><?php _e( 'Gateway Options:', 'edd-getfaircoin' ); ?></strong></p>\r\n\t<p>\r\n\t\t<label for=\"_edd_gateway\">\r\n\t\t\t<?php echo EDD()->html->select( array(\r\n\t\t\t\t'name' => '_edd_gateway',\r\n\t\t\t\t'options' => $gateway_options,\r\n\t\t\t\t'show_option_all' => null,\r\n\t\t\t\t'show_option_none' => null,\r\n\t\t\t\t'selected' => $post_gate\r\n\t\t\t) ); ?>\r\n\t\t\t<?php _e( 'Specific gateway', 'edd-getfaircoin' ); ?>\r\n\t\t</label>\r\n </p>\r\n <p>\r\n <label for=\"_edd_order\">\r\n\t\t\t<?php echo EDD()->html->text( array(\r\n\t\t\t\t'name' => '_edd_order',\r\n\t\t\t\t'value' => $gateway_order,\r\n\t\t\t\t'placeholder' => '0',\r\n\t\t\t\t'class' => 'small-text'\r\n\t\t\t) ); ?>\r\n\t\t\t<?php _e( 'Order', 'edd-getfaircoin' ); ?>\r\n\t\t</label>\r\n\t</p>\r\n <p>\r\n <label for=\"_edd_fiat_fee\">\r\n <?php echo EDD()->html->text( array(\r\n\t\t\t 'name' => '_edd_fiat_fee',\r\n\t\t\t 'value' => $fiat_fee,\r\n\t\t\t 'placeholder' => '0',\r\n\t\t\t 'class' => 'small-text'\r\n\t ) ); ?>\r\n <?php _e( '% Fiat Fee', 'edd' ); ?>\r\n </label>\r\n <label for=\"_edd_faircoin_fee\">\r\n <?php echo EDD()->html->text( array(\r\n 'name' => '_edd_faircoin_fee',\r\n 'value' => $fair_fee,\r\n 'placeholder' => '1',\r\n 'class' => 'small-text'\r\n ) ); ?>\r\n <?php _e( '% Fairc. Fee', 'edd-getfaircoin' ); ?>\r\n </label>\r\n </p>\r\n<?php\r\n}", "function replace_pay_button( $actions, $order ) {\n $payment_method = $order->payment_method;\n\n if ( WC()->payment_gateways() ) {\n $payment_gateways = WC()->payment_gateways->payment_gateways();\n } else {\n $payment_gateways = array();\n }\n\n if ( $payment_method ) {\n if ( isset( $payment_gateways[ $payment_method ] ) ) {\n $bill_url = $payment_gateways[ $payment_method ]->get_transaction_url( $order );\n }\n }\n\n if ( array_key_exists( 'pay', $actions ) && !empty( $bill_url ) ) {\n $actions['change_pay_method'] = array(\n 'url' => $actions['pay']['url'],\n 'name' => __( 'Change Payment', 'exn-wc-billplz' )\n );\n\n $actions['pay']['url'] = $bill_url;\n }\n\n if ( array_key_exists( 'cancel', $actions ) ) {\n $temp = $actions['cancel'];\n unset( $actions['cancel'] );\n\n $actions['cancel'] = array(\n 'url' => $temp['url'],\n 'name' => '&times;'\n );\n }\n\n return $actions;\n}", "public function after_payment_method_details() {\n\n\t\t$key = isset( $_GET['order'] ) ? $_GET['order'] : '';\n\n\t\t$order = llms_get_order_by_key( $key );\n\t\tif ( ! $order ) {\n\t\t\treturn;\n\t\t} elseif ( 'paypal' !== $order->get( 'payment_gateway' ) ) {\n\t\t\tif ( ! isset( $_GET['confirm-switch'] ) || 'paypal' !== $_GET['confirm-switch'] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$req = new LLMS_PayPal_Request( $this );\n\t\t$r = $req->get_express_checkout_details( $_GET['token'] );\n\n\t\techo '<input name=\"llms_paypal_token\" type=\"hidden\" value=\"' . $_GET['token'] . '\">';\n\t\techo '<input name=\"llms_paypal_payer_id\" type=\"hidden\" value=\"' . $_GET['PayerID'] . '\">';\n\n\t\tif ( isset( $r['EMAIL'] ) ) {\n\t\t\techo '<div class=\"\"><span class=\"llms-label\">' . __( 'PayPal Email:', 'lifterlms-paypal' ) . '</span> ' . $r['EMAIL'] . '</div>';\n\t\t}\n\n\t}", "public function getAvailablePaymentMethods ();", "private function registerPaymentMethods()\n {\n $pPosition = 0;\n foreach ($this->paymentMethods as $pValue => $pSub) {\n if ($this->isAboveShopwareVersion52()) {\n $action = 'payment_processor_csrf/process';\n } else {\n $action = 'payment_processor/process';\n }\n $this->createPayment(array(\n 'name' => $pValue,\n 'description' => $pSub['description'],\n 'action' => $action,\n 'active' => 0,\n 'position' => $pPosition,\n 'additionalDescription' => ''\n ));\n $pPosition++;\n }\n }", "public function paymentMethodData()\n {\n \t$result = DB::table('mobile_payment_method')->get();\n \t$view = array( 'content' => View::make('platformapi.payment.paymentMethodShow',\n \t\t\t\t\tarray('data' => $result))\n \t\t\t\t );\n \treturn View::make('main',$view);\n }", "public function savePaymentAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n try {\n if (!$this->getRequest()->isPost()) {\n $this->_ajaxRedirectResponse();\n return;\n }\n\n // set payment to quote\n $result = array();\n $data = $this->getRequest()->getPost('payment', array());\n\n $paymentMethod = Payiteasy_Onlinepayment_Model_Method_Abstract::factory($data['method']);\n if (null !== $paymentMethod) {\n $data['onlinepayment_action_mode'] = $paymentMethod->getActionMode();\n }\n\n if ($data['method'] == Payiteasy_Onlinepayment_Model_Method_Creditcard::METHOD_CODE) {\n $data['cc_number_enc'] = Mage::getModel('onlinepayment/method_creditcard')->buildRequestCreatePanalias($data);\n } elseif ($data['method'] == Payiteasy_Onlinepayment_Model_Method_Debit::METHOD_CODE) {\n Mage::getSingleton('checkout/session')->paymentData = $data;\n }\n $result = $this->getOnepage()->savePayment($data);\n\n // get section and redirect data\n $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();\n if (empty($result['error']) && !$redirectUrl) {\n $this->loadLayout('checkout_onepage_review');\n $result['goto_section'] = 'review';\n $result['update_section'] = array(\n 'name' => 'review',\n 'html' => $this->_getReviewHtml()\n );\n }\n if ($redirectUrl) {\n $result['redirect'] = $redirectUrl;\n }\n } catch (Mage_Payment_Exception $e) {\n if ($e->getFields()) {\n $result['fields'] = $e->getFields();\n }\n $result['error'] = $e->getMessage();\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $result['error'] = $this->__('Unable to set Payment Method.');\n }\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }", "public function render()\n {\n parent::render();\n\n $this->_aViewData[\"sOxid\"] = $this->getEditObjectId();\n if ($this->isNewPayPalOrder()) {\n $this->_aViewData['oOrder'] = $this->getEditObject();\n } else {\n $this->_aViewData['sMessage'] = $this->isPayPalOrder() ? oxRegistry::getLang()->translateString(\"OEPAYPAL_ONLY_FOR_NEW_PAYPAL_PAYMENT\") :\n oxRegistry::getLang()->translateString(\"OEPAYPAL_ONLY_FOR_PAYPAL_PAYMENT\");\n }\n\n return \"order_paypal.tpl\";\n }", "public function hookPaymentReturn()\n {\n }", "public function woocommerce_checkout_payment() {\n\t\t$js_url = WC()->session->get( 'swedbank_pay_checkout_js_url' );\n\n\t\twc_get_template(\n\t\t\t'checkout/swedbank-pay/instant-checkout/payment.php',\n\t\t\tarray(\n\t\t\t\t//'checkout' => WC()->checkout()\n\t\t\t\t'js_url' => $js_url,\n\t\t\t),\n\t\t\t'',\n\t\t\tdirname( __FILE__ ) . '/../templates/'\n\t\t);\n\t}", "function onPaymentInfo() {\n\t\tif (empty($this->_info)) {\n\t\t\t$this->_info = array(\n\t\t\t\t'code'\t\t=> 'jahanpay',\t\t\t\t\t\t\t// Code to separate payment plugin\n\t\t\t\t'name'\t\t=> JText::_('Jahanpay'),\t\t\t\t\t// Name to display of payment method\n\t\t\t\t'image'\t\t=> $this->params->get('payment_image'),\t// Image to display of payment method\n\t\t\t\t'use_cc'\t=> 0,\t\t\t\t\t\t\t\t\t// Use credit card or not?\n\t\t\t);\n\t\t}\n\n\t\treturn $this->_info;\n\t}", "public function paymentsAction(Application $app){\n\t \treturn $app['twig']->render('payments.html.twig');\n\t}", "public function payment(){\n\t\t$_POST['reference'] = date('NWHis');\n\t\techo json_encode($this->pagseguro->doPayment($_POST));\n\t}", "public function render($attrs=array())\n\t{\n\t\t// make webpage language\n\t\t$data = $this->build($attrs);\n\t\treturn $this->_makeFormPayment($data);\n\t}", "function payment_fields() {\n if ($this->description) echo wpautop(wptexturize($this->description));\n ?>\n <ol class=\"my-list\">\n <li>Entrez votre numéro MTN Mobile Money dans le champ de formulaire ci-dessous</li>\n <li>Vous recevrez un message vous demandant de composer *126# et d'entrer votre code PIN</li>\n <li>Composez *126# et entrez votre code PIN pour confirmer votre paiement</li>\n <li>Si le paiement est effectué, votre commande sera automatiquement validé</li>\n </ol>\n\n <label for=\"\">Entrez votre numéro MTN Mobile Money</label>\n\n <input type=\"text\" name=\"gt_user_momo_number\" value=\"\"\n style=\"background-color: #fff; border-radius: 0px; color: #222;\"required class=\"form-controll\"\n placeholder=\"Enter your phone number\">\n <?php\n }", "public function payment_fields(){\r\n if($this->description) echo wpautop(wptexturize($this->description));\r\n }" ]
[ "0.74459106", "0.7410864", "0.71232545", "0.70911014", "0.70579696", "0.70579696", "0.70546895", "0.6988752", "0.67763597", "0.66885835", "0.66784054", "0.6645982", "0.6528183", "0.6514302", "0.6503996", "0.6502306", "0.6499516", "0.6450459", "0.64264995", "0.6419287", "0.6407911", "0.6398601", "0.63903403", "0.6362975", "0.63567084", "0.6353359", "0.63530165", "0.6327461", "0.6307405", "0.6307405", "0.6307405", "0.6307405", "0.62829775", "0.62735695", "0.6242765", "0.6240033", "0.6220384", "0.620695", "0.6202325", "0.6194054", "0.6173677", "0.6154537", "0.6143982", "0.6133998", "0.6105292", "0.60736877", "0.60726994", "0.60656935", "0.6056537", "0.6054537", "0.604747", "0.6045527", "0.60429543", "0.60338545", "0.60080177", "0.60013753", "0.59915316", "0.5977182", "0.5967541", "0.5967541", "0.5967541", "0.5967541", "0.5967541", "0.5967541", "0.5967541", "0.5967541", "0.5965313", "0.5961156", "0.59527373", "0.5946919", "0.59422994", "0.59354806", "0.591691", "0.5907528", "0.5881223", "0.5879748", "0.5878028", "0.5872304", "0.5866979", "0.58658797", "0.58581257", "0.5854839", "0.58397245", "0.58255464", "0.5823568", "0.5821527", "0.5817817", "0.58156216", "0.5809463", "0.5807321", "0.5806134", "0.580427", "0.57980114", "0.5797568", "0.5787555", "0.5785171", "0.5777711", "0.5770909", "0.57706046", "0.57657474" ]
0.5799847
92
Get an order by its cart id
public function getOrderByCartId($id_cart) { $sql = 'SELECT `id_order` FROM `' . _DB_PREFIX_ . 'orders` WHERE `id_cart` = ' . (int)($id_cart) . (_PS_VERSION_ < '1.5' ? '' : Shop::addSqlRestriction()); $result = Db::getInstance()->getRow($sql, false); return isset($result['id_order']) ? $result['id_order'] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($cartId);", "static public function getOrderById($id) {\n $rq = \"SELECT * FROM \" . PREFIX . \"sales.`order` \n WHERE `id` =\" . $id . \" LIMIT 1;\";\n\n $aItem = Sql::Get($rq, 1);\n \n return $aItem[0];\n }", "public function getOrder($id) {\n return Order::fetch($id);\n }", "public function findCartBySessionId($id)\n {\n \t$cart = $this->model->whereSessionId($id)->first();\n \n \treturn $cart;\n }", "public function getOrder($id)\n {\n $db = new Mysqli();\n $db->connect('localhost', 'root', 111111, 'nn_pay');\n $data = $db->query(\"select * from nns_pay_order where nns_id = '{$id}' limit 1\");\n Register::set('nn_pay_db', $db);\n\n return $data[0];\n }", "public function getOrderById($id){\n $this->db->query(\"SELECT * FROM orders WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n \n $row = $this->db->single();\n\n return $row;\n }", "public function get_order_by_id($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/orders/$id.json\");\n }", "public function getCart($id)\n {\n $url = $id;\n $user = Auth::id();\n// $explode = explode('/', $url);\n if ($url == \"purchase\") {\n $type = 1;\n } else {\n $type = 2;\n }\n $cart = Cart::where('user_id', $user)->where('type', $type)->get();\n return response()->json($cart);\n }", "public function getOrder(string $order_id): \\GDAX\\Types\\Response\\Authenticated\\Order;", "public function findCartByUserId($id)\n {\n \t$cart = $this->model->whereUserId($id)->first();\n \n \treturn $cart;\n }", "public function getOrderById($id_order)\n {\n return $this->orderRepository->getOrderById($id_order);\n }", "public function get_order( $order_id ) {\n\t\treturn $this->request( \"orders/{$order_id}\" );\n\t}", "function get ($id) {\n // PARAM $id : order ID\n\n $order = $this->fetch(\n \"SELECT * FROM `orders` WHERE `order_id`=?\", [$id]\n );\n $order['items'] = $this->fetch(\n \"SELECT * FROM `orders_items` LEFT JOIN `products` USING (`product_id`) WHERE `orders_items`.order_id=?\", \n [$id], \"product_id\"\n );\n return $order;\n }", "static public function getOrderById($order_id) {\n $order = DB::table('orders')->where('id', $order_id)->get();\n return $order;\n }", "function get( $id=\"\" )\n {\n $this->dbInit();\n $ret = false;\n \n if ( $id != \"\" )\n {\n $this->Database->array_query( $cart_array, \"SELECT * FROM eZTrade_OrderItem WHERE ID='$id'\" );\n if ( count( $cart_array ) > 1 )\n {\n die( \"Error: Cart's with the same ID was found in the database. This shouldent happen.\" );\n }\n else if( count( $cart_array ) == 1 )\n {\n $this->ID =& $cart_array[0][ \"ID\" ];\n $this->OrderID =& $cart_array[0][ \"OrderID\" ];\n $this->Count =& $cart_array[0][ \"Count\" ];\n $this->Price =& $cart_array[0][ \"Price\" ];\n $this->ProductID =& $cart_array[0][ \"ProductID\" ];\n\n $this->State_ = \"Coherent\";\n $ret = true;\n }\n }\n else\n {\n $this->State_ = \"Dirty\";\n }\n return $ret;\n }", "public function getCartItems($cart_id);", "public function find(int $id): Order\n {\n return Order::find($id);\n }", "public function get($id)\n {\n header('Access-Control-Allow-Origin: *'); \n $order = Order::find($id);\n \n return $order;\n }", "public function getCart($account_id);", "public function getDetails($id){\n return $this->slc(\"*\", \"orders\", array(\"order_id\" => $id), TRUE)[0];\n }", "public function getCartId()\n {\n return $this->id;\n }", "public function show($id)\n {\n return OrderService::getOrderById($id);\n }", "private function checkOrder($cart_id)\n\t{\n\t\t$order = Order::getOrderByCartId($cart_id);\n\t\tif (!$order)\n\t\t{\n\t\t\tsleep(1);\n\t\t\t$this->checkOrder($cart_id);\n\t\t}\n\t\telse\n\t\t\treturn $order;\n\t}", "public function getOrderProduct($id)\n\t {\n\t\t $this->db->select(\"COP.*\");\n\t\t $this->db->from(\"client_order_prodcts AS COP\");\n\t\t $this->db->where(\"COP.id\", $id);\n\t\t $this->db->limit(1);\n\t\t $query_order_prod_row = $this->db->get();\n\t\t\t\n\t\t\tif($query_order_prod_row->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_order_prod_row->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t }", "public function getOrderById($orderId)\n {\n }", "private function getQuoteById():?CartInterface\n {\n $quote = null;\n try {\n $quote = $this->quoteRepository->get($this->quoteId);\n } catch (\\Exception $e) {\n $this->logger->info('getQuoteById Exception : ', [$e->getMessage()]);\n }\n return $quote;\n }", "function getOrderDetails($id)\n {\n }", "public function retrieve($id) {\n SCA::$logger->log(\"retrieve resource $id\");\n return $this->orders_service->retrieve($id);\n }", "public function show($id)\n {\n return Order::find($id);\n }", "public function show($id)\n {\n return Order::find($id);\n }", "public function getOrderCart( $map ) {\r\n\t\t \t$params = array('a.session_cookie'=>$map['session_cookie']);\r\n\t\t \t$this->db->select('a.itemid,a.option_id,a.quantity,a.size', FALSE)\r\n\t\t \t\t\t ->from(TABLES::$ORDER_CART.' AS a')\r\n\t\t \t\t\t ->where($params);\r\n\t\t \t\t\t //->order_by('c.name','asc');\r\n\t\t \t$query = $this->db->get();\r\n\t\t \t//echo $this->db->last_query();\r\n\t\t\t$result = $query->result_array();\r\n\t\t\treturn $result;\r\n\t\t}", "function findById($id)\n {\n $dataService = new OrderDataService();\n\n return $dataService->findById($id);\n }", "protected function searchOrderById($id)\n {\n return $this->_rootElement->find(sprintf($this->itemOrder, $id), Locator::SELECTOR_XPATH);\n }", "public function getOrderId();", "public function getCart();", "private function fetchCart($id, $id_type = 'user_id') {\n\t\t$conditions = array(\n\t\t\t\"Cart.$id_type\" => $id, \n\t\t\t'OR' => array (\n\t\t\t\tarray('Cart.state' => CART_STATE),\n\t\t\t\tarray('Cart.state' => CHECKOUT_STATE)\n\t\t\t));\n\t\ttry {\n\t\t\t$cart = $this->find('first', array('conditions' => $conditions, 'contain' => array('CartItem')));\n\t\t} catch (Exception $exc) {\n\t\t\techo $exc->getFile() . ' Line: ' . $exc->getLine();\n\t\t\techo $exc->getMessage();\n\t\t\techo $exc->getTraceAsString();\n\t\t}\n\t\treturn $cart;\n\t}", "function getOrderbyId($order_id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `order`\n\t\t\t\t\t\t\t\t\t\tWHERE `id` = ? ');\n\t\t$sth \t-> execute(array($order_id));\n\t\treturn \t$sth;\n\t}", "public function getCart($cart_id)\n {\n $products = ShoppingCart::with('product')->where('cart_id', $cart_id)->get();\n return response()->json($products->transform(function($product) {\n return [\n 'item_id' => $product->item_id,\n 'card_id' => $product->card_id,\n 'name' => $product->product->name,\n 'attributes' => $product->attributes,\n 'product_id' => $product->product->product_id,\n 'image' => $product->product->image,\n 'price' => $product->product->price,\n 'discounted_price'=> $product->product->discounted_price,\n 'quantity' => $product->quantity,\n 'subtotal' => ($product->product->price * $product->quantity),\n ];\n }));\n }", "function get_order_data_by_id($token,$id){\r\n\r\n $ch = curl_init(\"https://your-domain/index.php/rest/V1/orders/\".(int)$id);\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json; charset=utf-8\", \"Authorization: Bearer \" . $token));\r\n \r\n $result = curl_exec($ch);\r\n \r\n $order = json_decode($result);\r\n \r\n return $order;\r\n \r\n }", "public function getById(string $id): ?CartItem\n {\n return $this->items->get($id);\n }", "public function show($id)\n {\n $order=Order::findorfail($id);\n //dd($order);\n\n $cart=unserialize($order->cart);\nreturn response()->json($cart) ;\n }", "private function getOrder($order_id){\r\n\r\n if($this->flow_woocommerce_version_check()){\r\n return new WC_Order($order_id);\r\n }\r\n else{\r\n return wc_get_order($order_id);\r\n }\r\n }", "public function show($id)\n {\n return Order::findOrFail($id);\n }", "public function getOrderById($order_id)\n {\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.\"orders/$order_id/detail/\");\n $client->setMethod(\\Zend_Http_Client::GET);\n $client->setHeaders([\n 'Content-Type: application/json', \n 'Accept: application/json',\n \"Authorization: Token $this->token\"\n ]);\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $order_data=json_decode($string);\n \n return $order_data;\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos order save helper', [\"Get order error\"=>$e->getMessage()]);\n return false;\n }\n }", "function getOrderDetails($id)\n {\n $dataService = new OrderDataService();\n\n return $dataService->getOrderDetails($id);\n }", "public function getExistingOrder($orderid = '') {\n $orderid = isset($orderid) ? $orderid : '';\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($orderid);\n\n // if no order found\n if (!$order->getId())\n return FALSE;\n else\n return $order;\n}", "public function getCartBySessionId($sessionId)\n {\n \t$cart = $this->findCartBySessionId($sessionId); \n \treturn $cart;\n }", "public function getorderitembyid($orderid){\n\t\t$this->db->where('OrdId', $orderid);\n\t\t$this->db->select('LintItemId,OrdId,ItemId,ItemName,ItemEdition,ItemAuther,ItemQuantity,ItemRetailPrice,ItemSellingPrice,ItemDiscount,ProductThumbImage,ProductLanguage');\n\t\t$this->db->from('tbl_order_lineitems');\n\t\t$this->db->join('tbl_products', 'tbl_products.ProductId = tbl_order_lineitems.ItemId', 'inner');\n\t\t$query=$this->db->get();\n\t\treturn $query->result();\n\t\t// $query=$this->db->get('tbl_order_lineitems');\n\t\t// return $query->result();\n\t}", "public function getCurrentCart(): Order\n {\n $user = $this->security->getUser();\n\n\n $cart = $this->cartSessionStorage->getCart();\n\n if (!$cart) {\n $cart = $this->cartFactory->create($user);\n }\n\n return $cart;\n }", "public function getByReceiptId() {\n\t\t$data = Request::inputs();\n\t\t$validator = new Validator;\n\t\t$validation = $validator->make( $data, [\n\t\t\t'id' => 'required|max:20',\n\t\t] );\n\t\t// validate\n\t\t$validation->validate();\n\t\tif ( $validation->fails() ) {\n\t\t\t$errors = $validation->errors();;\n\n\t\t\treturn responseJson( [ 'data' => $errors->firstOfAll() ] );\n\t\t}\n\t\t$order = new Order();\n\n\t\treturn responseJson( $order->where( 'receipt_id', '=', $data['id'] )->get() );\n\n\t}", "public function getById($orderlineId);", "function findById($orderId);", "public function testShoppingCartCanBeRetrievedById()\n {\n $id1 = new UUID();\n $cart1 = new ShoppingCart($id1);\n $this->gateway->insert($id1, $cart1);\n\n $id2 = new UUID();\n $cart2 = new ShoppingCart($id2);\n $this->gateway->insert($id2, $cart2);\n\n $query = $this->db->query('SELECT * FROM shoppingCart');\n $result = $query->fetchAll(PDO::FETCH_COLUMN);\n\n $cart = $this->gateway->findById($id1);\n\n $this->assertEquals(2, count($result));\n $this->assertInstanceOf('ShoppingCart', $cart);\n $this->assertEquals($id1, $cart->getId());\n }", "public function order($id)\n {\n\n \t $order = DB::table('orders')\n \t \t\t\t->join('customers', 'orders.customer_id', 'customers.id')\n \t \t\t\t->where('orders.id', $id)\n \t \t\t\t->select('customers.name', 'customers.phone', 'customers.address', 'orders.*')\n \t \t\t\t->first();\n \t \treturn response()->json($order);\n }", "private function getOrderById(int $orderId): OrderInterface\n {\n return $this->orderRepository->get($orderId);\n }", "public static function getOrderByCartId($id_cart)\n\t{\n\t\t$result = Db::getInstance()->getRow('\n\t\tSELECT `id_order`\n\t\tFROM `'._DB_PREFIX_.'orders`\n\t\tWHERE `id_cart` = '.(int)($id_cart));\n\n\t\treturn isset($result['id_order']) ? $result['id_order'] : false;\n\t}", "public function getById(int $order_id): array;", "public function getOneOrder($orderId) {\n\n $this->load->model('account/order');\n return $this->model_account_order->getOrder($orderId);\n }", "function getSelectedOrder($orderId) {\n try {\n // get DB connection\n $db = new DbOperation();\n $orders = $db->getSelectedOrder ($orderId);\n if ( $orders != null ) {\n echo '{\"gotOrder\":' . json_encode ( $orders ) . '}';\n } else {\n echo '{\"error\":{\"text\":' . \"Failed to get orders data\" . '}}';\n }\n } catch ( Exception $e ) {\n echo '{\"error\":{\"text\":' . $e->getMessage () . '}}';\n }\n}", "public function get($quoteId);", "public static function getProduct($cart,$product_id)\n\t{\n\t\tforeach($cart->cart_contents as $item)\n\t\t{\n\t\t\tif($item[\"data\"]->get_id() === $product_id)\n\t\t\t{\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function find_deals_in_cart( $cart_id = false ) {\n\t if ($cart_id !== false) foreach ($this->cart_contents as $cart_item_key => $cart_item) if ($cart_item_key == $cart_id) return $cart_item_key;\n\t }", "public function getOrder()\n {\n echo json_encode($this->Inventory_model->getProductById($_POST['idJson']));\n }", "public function addItemToCart($id)\n {\n\n //$this->db->query(\"insert into koszyk (id_produktu, id_klienta, ilosc)\");\n\n return $this->getProductById($id);\n }", "public function getCart()\n {\n return $this->getParam('cart');\n }", "public function returnCart() {\n return $this->cart_id;\n }", "public function getOrderByID($order_id)\n {\n $order = $this->db->prepare(<<<SQL\nSELECT orders.order_id, orders.order_date, orders.arrival_date, orders.student_number\nFROM orders\nWHERE orders.order_id = :order_id\nORDER BY orders.order_date;\nSQL\n );\n $order->execute(array(':order_id' => $order_id));\n return $order->fetch(\\PDO::FETCH_OBJ);\n }", "public function addCart($id) {\n $product = Product::where('id', $id)->first();\n $Cart = Product::addToCart($product->id);\n return response()->json($Cart);\n }", "public static function getOrderPurchase($id)\n {\n $orders = DB::query(\"SELECT orderproducts.*, products.strName, products.strDescription, products.strFeatures, products.price, products.category_id, products.status_id, orders.totalAmount, orders.date, inventoryproducts.name AS inventoryproductsname\n FROM orderproducts\n LEFT JOIN orders ON orderproducts.orderId=orders.id\n LEFT JOIN products ON orderproducts.productId=products.id\n LEFT JOIN inventoryproducts ON products.inventoryproductsId=inventoryproducts.id\n WHERE orderproducts.orderId=\".$id);\n //if no id given\n if($orders == \"\"){\n $ordersArray =(object) array(\n \"id\" => \"0\",\n \"userId\" => \"0\",\n \"orderId\" => \"0\",\n 'productId' => '0',\n 'quantity' => \"0\",\n 'total' => \"0\",\n 'strName' => 'No patch',\n 'strDescription' => '',\n 'strFeatures' => '',\n 'price' => '',\n 'countryId' => '',\n 'category_id' => '',\n 'status_id' => '',\n 'totalAmount' => '',\n 'date' => '',\n 'inventoryproductsname'=>'',\n );\n return $ordersArray;\n }\n\n // acting as a factory\n // empty array to avoid errors when nothing was found\n $ordersArray = array();\n foreach($orders as $order)\n {\n // create an instance / object for this SPECIFIC \n $ordersArray[] = new OrdersAdmin($order); // put this object onto the array\n }\n // return the list of objects\n return $ordersArray;\n }", "public function fetchInvoicingOrderInList($id) {\n $list = $this->find('list', array(\n 'conditions' => array(\n 'Order.user_customer_id' => $id,\n 'Order.transaction' => 1,\n 'Order.status' => 'Shipped'\n ),\n 'fields' => array('order_number', 'id')\n ));\n return $list;\n }", "public function get($id = '')\n {\n $this->db->select('tblpurchaseorders.order_number');\n $this->db->from('tblitems_in');\n $this->db->join('tblpurchaseorders', 'tblpurchaseorders.id = tblitems_in.rel_id', 'left');\n $this->db->where('tblitems_in.id', $id);\n $tx = $this->db->get()->row();\n\n return $tx;\n }", "public function getOrderByID($id)\n {\n $this->request = ['method' => 'GET', 'path' => \"%2Fmerchant%2Forder%2F{$id}\"];\n $this->header = $this->setHeader(false);\n $api = $this->callApi(\"merchant/order/{$id}\", $this->request['method'], false);\n\n return $api;\n }", "public function getCartId()\n {\n return $this->getSingleOperationParameter('CartId');\n }", "protected function getOrder($orderId) {\n $order = Order::with('items.catalog.product')->where('id', '=', $orderId)->where('status', '=', Order::PENDING)->first();\n return $order;\n }", "public function getCart()\n {\n return $this->cart;\n }", "public function getCart()\n {\n return $this->cart;\n }", "public function getCart()\n {\n return $this->cart;\n }", "public static function find($id){\n return Purchase::find($id);\n }", "public function getCartItem() {\n\n if (!$this->cartItem) {\n $this->cartItem = $this->cartItemRepository->getbyId($this->route('item'));\n }\n return $this->cartItem;\n }", "private function findCartBySessionId()\n {\n $sessionId = $this->session->getId();\n $cartsArray = $this->orderRepository->findBy(\n array(\n 'sessionId' => $sessionId,\n 'status' => OrderStatus::STATUS_IN_CART\n ),\n array(\n 'created' => 'DESC'\n )\n );\n\n return $cartsArray;\n }", "private function getCart()\n {\n $session = $this->app->make('session');\n $events = $this->app->make('events');\n\n $cart = new Cart($session, $events);\n\n return $cart;\n }", "public static function getMessageByCartId($id_cart)\n {\n }", "public function getCartId()\n {\n // Get the session ID from cookie\n $cart_id = request()->cookie('cart_id');\n\n $cart = Cart::where('id', '=', $cart_id)->first();\n\n // Create the cart\n if(!$cart) {\n $cart = Cart::create();\n cookie()->queue('cart_id', $cart->id, config('shop.cartCookieTime'));\n }\n\n // Return the ID\n return $cart->id;\n }", "public function getCartProduct(){\n $sId = session_id();\n $squery = \"SELECT * FROM tbl_cart WHERE sId='$sId'\";\n $result = $this->db->select($squery);\n if ($result) {\n return $result;\n }else {\n return false;\n }\n }", "public function show(int $id)\n {\n $order = Order::find($id);\n\n if (null === $order) {\n return response()\n ->noContent();\n }\n\n return $order;\n }", "function getCart(){\n \treturn $this->myCart->getList();\n }", "public function getDetailById($id)\r\n {\r\n $condition = [\r\n 'orderId' => $id\r\n ];\r\n return $this->getDetail($condition);\r\n }", "public function getCartProductById($product_id)\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_product');\t\t\t\r\n\t\t$this->db->where('product_id',$product_id); \t\t\t\r\n\t\t$query = $this->db->get();\t\r\n\t\treturn $query->result();\r\n\t}", "public static function order($orderId) {\n //Return an object with the information about $orderId\n\t\t\treturn self::get(self::order_index() . '/' . $orderId);\n\t\t}", "public static function getByOrderId($idOrder) {\n\n Tools::displayAsDeprecated();\n $order = new Order($idOrder);\n\n return OrderPayment::getByOrderReference($order->reference);\n }", "private function getActiveCart(): Cart\n {\n $cartRepository = $this->getCartRepository();\n\n if (!$cartHash = $this->cookie->get('cart_hash')) {\n $cartHash = Uuid::uuid4();\n $this->cookie->set(\n 'cart_hash',\n $cartHash,\n 2592000,\n '/',\n null,\n null,\n true,\n false,\n SymfonyCookie::SAMESITE_NONE\n );\n }\n\n return $cartRepository->findBySessionId($cartHash, $this->getRequest()->getClientIp());\n }", "function pewc_get_cart_item_by_extras( $product_id, $variation_id, $cart_item_data ) {\n\n\t$cart = WC()->cart->cart_contents;\n\tif( $cart ) {\n\n\t\tforeach( $cart as $id=>$cart_item ) {\n\n\t\t\t// Check if our parameters exactly match the cart item\n\t\t\tif( ( isset( $cart_item['product_id'] ) && $cart_item['product_id'] == $product_id ) && ( isset( $cart_item['variation_id'] ) && $cart_item['variation_id'] == $variation_id ) ) {\n\t\t\t\treturn $cart_item;\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn false;\n\n}", "public static function getInfo( $id )\n {\n return OrderInfoGetter :: get( $id );\n }", "function getOrder($orderId) {\n\techo \"Getting Order: \" . $orderId . \"</br>\";\n\t$response = getRequest('/api/order/' . $orderId);\n\tprintInfo($response);\n}", "function fetch_cart_id ($external_cart_id) {\n $db = getDb();\n $statement = $db->prepare(\"\n SELECT\n cart_id\n FROM\n cart\n WHERE\n external_cart_id = :external_cart_id\n \");\n $statement->execute([\"external_cart_id\"=>$external_cart_id]);\n $cart = $statement->fetchObject();\n if (!$cart) {\n throw new RowNotFoundException(\"Cart not found\");\n }\n return $cart->cart_id;\n}", "public function getById($id)\n {\n return $this->product->find($id);\n \n }", "private function getOrder($orderoid){\n $rs = selectQuery('select * from WTSORDER where KOID=\"'.$orderoid.'\"');\n if ($rs->rowcount() == 1){\n $ors = $rs->fetch();\n foreach($ors as $k=>$v){\n\t$order->{$k} = $v;\n }\n } else {\n $order = null;\n XLogs::critical(get_class($this), 'Impossible de trouver la commande ayant pour KOID : '.$orderoid);\n }\n return $order;\n }", "public function read($order_id) {\n\n global $user;\n\n //watchdog('musth_restws', 'W7D001 5DXS OrderResourceController start read (!i) (!p) ',\n // array('!i' => print_r($order_id, true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n $order_as_array = entity_load('commerce_order', array($order_id));\n $order = $order_as_array[$order_id];\n\n // The order total, which is in the field commerce_order_total, is calculated\n // automatically when the order is refreshed, which happens at least when we\n // call the line item api to get all the line items of an order\n\n // Refreshing the order in case any product changed its price or there are other\n // changes to take care of\n\n // Since we refresh the order here, there is no need to do it when we load\n // line items. Just call the order query api first and then the line item query api\n\n if ($order->status == 'cart')\n commerce_cart_order_refresh($order);\n\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n\n //watchdog('musth_restws', 'W7D001 71788 kkk OrderResourceController read (!i) (!p) ',\n // array('!i' => print_r('', true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n if (isset($order->commerce_customer_billing[LANGUAGE_NONE]))\n $customer_profile_id = $order->commerce_customer_billing[LANGUAGE_NONE][0]['profile_id'];\n else\n $customer_profile_id = 0;\n\n if ($user->uid) {\n // For logged-in users we can send back the email address\n\n $user_email = $order->mail;\n\n } else {\n // For anonymous users we can't\n\n $user_email = 'Cant send you the email address for privacy';\n }\n\n $order_to_return = new Order($order->order_id,\n $order->order_number,\n $order->uid,\n $user_email,\n $customer_profile_id,\n $order->status,\n $order_wrapper->commerce_order_total->amount->value(),\n $order_wrapper->commerce_order_total->currency_code->value(),\n $order->created,\n $order->changed\n );\n\n //watchdog('musth_restws', 'W7D001 7171 OrderResourceController read (!i) (!p) ',\n // array('!i' => print_r('', true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n // Sending back the Order object\n\n return $order_to_return;\n }", "public function getCurrentCartIdentifier();", "function getCartProductsByCartIds() {\n\n if (func_num_args() > 0) {\n $carts = func_get_arg(0);\n $result = array();\n if ($carts) {\n foreach ($carts as $value) {\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(array('cr' => 'addtocart'))\n ->joinLeft(array('pr' => 'products'), 'pr.product_id=cr.product_id')\n ->where('cr.id=?', $value)\n ->where('pr.prod_status=?', 1);\n $result[] = $this->getAdapter()->fetchRow($select);\n }\n if ($result) {\n return $result;\n } else {\n return null;\n }\n }\n } else {\n return null;\n }\n }" ]
[ "0.7578764", "0.71992123", "0.717771", "0.7114212", "0.70521253", "0.7019818", "0.691222", "0.6855303", "0.6855296", "0.67590135", "0.6753686", "0.6731708", "0.6729356", "0.6727092", "0.6715189", "0.6682351", "0.667848", "0.6677805", "0.66730183", "0.66716117", "0.66622025", "0.6649865", "0.66335773", "0.6624903", "0.65648896", "0.6559906", "0.6552475", "0.65426713", "0.65031916", "0.65031916", "0.64985025", "0.64526695", "0.63832027", "0.6374913", "0.6348201", "0.63210887", "0.63160527", "0.6310181", "0.63027203", "0.6279187", "0.6238467", "0.62199545", "0.6217151", "0.62107426", "0.62026936", "0.6197465", "0.6187678", "0.6179784", "0.6165235", "0.61629164", "0.61591506", "0.61367416", "0.61316234", "0.6127663", "0.6107815", "0.6101333", "0.60829306", "0.608034", "0.60512096", "0.6043768", "0.6043532", "0.60383433", "0.6035863", "0.6034737", "0.6034414", "0.6029966", "0.6024517", "0.60230124", "0.60148865", "0.6012564", "0.601017", "0.60094273", "0.60063976", "0.6003347", "0.6002895", "0.6002895", "0.6002895", "0.5989819", "0.5977719", "0.59755814", "0.59681803", "0.59678674", "0.59671223", "0.596638", "0.5955741", "0.59498435", "0.5944377", "0.5942283", "0.59342897", "0.59330636", "0.59252036", "0.5919613", "0.59167343", "0.59155077", "0.59153795", "0.59136486", "0.5906769", "0.58951247", "0.58876324", "0.58855367" ]
0.62919873
39
Get URL for Redirect
public function getRedirectUrl($url) { return $this->context->link->getModuleLink($this->name, 'redirect', array('goto' => $url), Tools::usingSecureMode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl(): string;", "public function getRedirectUrl()\n {\n }", "public function getRedirectUri();", "public function getRedirectUri();", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "public function getRedirectUrl() {\n return (string) $this->getValue('redirect_url');\n }", "private function getRedirectUrl()\n {\n return $this->getConfigData('url');\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "protected function getRedirectUrl(): string\n\t{\n\t\tif($this->input === null)\n\t\t{\n\t\t\treturn $this->urlBuilder->current();\n\t\t}\n\n\t\treturn $this->input->getRedirectUrl();\n\t}", "public function getRedirectUrl(): string\n {\n return $this->redirectUrl;\n }", "abstract protected function getRedirectUrl(): Url;", "public function getRedirectURL()\n {\n return $this->redirectURL;\n }", "public function getRedirectUri(): string;", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "public function getRedirectUrl() {\n return $this->redirectUrl;\n }", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getSiteRedirectUrl()\n {\n return $this->siteRedirectLink;\n }", "private static function createRedirectUrl() {\n\t\t$path = \\explode('?', $_SERVER['REQUEST_URI'], 2)[0];\n\n\t\treturn $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $path;\n\t}", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "protected function getRedirectUrl()\n\t{\n if ($customURL = $this->input->getBase64('returnurl', ''))\n {\n $customURL = base64_decode($customURL);\n }\n\n $url = !empty($customURL) ? $customURL : 'index.php?option='\n . $this->container->componentName\n . '&view='\n . $this->container->inflector->pluralize($this->view)\n . $this->getItemidURLSuffix(); // e.g. '&Itemid=123' or an empty string if no Itemid\n\n return $url;\n }", "protected function getRedirectUrl()\n {\n return null;\n }", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUrl() : string\n {\n return '';\n }", "public function get_redirect() {\n return new \\moodle_url('/');\n }", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "public function getRedirectUrl()\n {\n return $this->getUrl(self::ION_CONFIG_URL);\n }", "public function GetRedirect ();", "protected function getRedirectUrl()\n\t{\n\t\treturn app('Illuminate\\Routing\\UrlGenerator')->previous();\n\t}", "public function redirectUrl($redirectTo = null) : string;", "public function getRedirect()\n {\n $url = null;\n $campaigns = $this->getCampaigns();\n\n if (!empty($campaigns) && $campaigns->hasRedirect()) {\n $url = $campaigns->getRedirectUrl();\n }\n\n return $url;\n }", "function getRedirectLink()\n {\n global $wgRequest;\n if($this->user->isTemporary)\n {\n // User is viewing this from liveshow, means we have to redirect back to ViewSurvey page,\n // and not the wiki page.\n // In this case 'returnto' value does not mean anything, we know where to return.\n $t = Title::newFromText('Special:ViewSurvey');\n\n $url = $t->getLocalURL('liveshow='.$this->user->getTemporaryKey($this->page_id)\n .'&id='.$this->page_id\n .'&userID='.$this->user->userID).'#survey_id_'.$this->page_id;\n return $url;\n }\n else\n {\n $title = Title::newFromText($wgRequest->getVal('returnto'));\n return $title->getLocalURL();\n }\n }", "public function getReturnUrl()\n {\n return $this->_getUrl(self::URL_REDIRECT);\n }", "public function getRedirectUri()\n {\n return $this->redirect_uri;\n }", "public function getRedirectUri()\n {\n return $this->redirect_uri;\n }", "public function getRedirectUri()\n {\n return $this->redirect_uri;\n }", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "public function get_redirect()\n {\n return $this->redirect;\n }", "public function getRedirectUrl(): ?string\n {\n return $this->_redirectUrl;\n }", "function redirectURL()\n{\n\t$redirect = '';\n\t$loc = Configuration::get('LoginRadius_redirect');\n\tif ($loc == 'profile')\n\t\t$redirect = 'my-account.php';\n\telseif ($loc == 'url')\n\t{\n\t\t$custom_url = Configuration::get('redirecturl');\n\t\t$redirect = !empty($custom_url) ? $custom_url : 'my-account.php';\n\t}\n\telse\n\t{\n\t\tif (Tools::getValue('back'))\n\t\t{\n\t\t\tif (_PS_VERSION_ >= 1.6)\n\t\t\t{\n\t\t\t\t$loc = $_SERVER['REQUEST_URI'];\n\t\t\t\t$redirect_location = explode('back=', $loc);\n\t\t\t\t$redirect = $redirect_location['1'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$redirect = Tools::getValue('back');\n\t\t}\n\t\telseif (empty($redirect))\n\t\t{\n\t\t\t$http = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'Off' && !empty($_SERVER['HTTPS'])) ? 'https://' : 'http://');\n\t\t\t$redirect = urldecode($http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t\t}\n\t}\n\treturn $redirect;\n}", "public function getRedirectURI() {\n return $this->request->query->get(\"redirect_uri\") != NULL ? $this->request->query->get(\"redirect_uri\") : ($this->request->query->get(\"state\") != NULL ? $this->request->query->get(\"state\") : \"\");\n }", "public function get_redirect_to() {\n\t\treturn empty( $this->data['redirect_to'] ) ? '' : $this->data['redirect_to'];\n\t}", "public function get_redirect_uri() {\n\t\treturn $this->redirect_uri;\n\t}", "public function getRedirect() {\n\t\treturn $this->redirect;\n\t}", "public function GetRedirect () {\n\t\treturn $this->redirect;\n\t}", "protected function getRedirectUrl()\n {\n $url = $this->redirector->getUrlGenerator();\n $params = ['domain' => $this->domain];\n\n return $url->route(\n 'tenant.employee.profile.edit',\n array_merge($params, $this->query())\n );\n }", "public function getRedirect()\n {\n return $this->secureInput($_GET['redirect']);\n }", "function getRedirectUri(){\n\n\t//Building Redirect URI\n\t$url = $_SERVER['REQUEST_URI']; //returns the current URL\n\tif(strrpos($url, '?') > 0)\n\t\t$url = substr($url, 0, strrpos($url, '?') ); // Removing any parameters.\n\t$folder = substr($url, 0, strrpos($url, '/') ); // Removeing current file.\n\treturn (isset($_SERVER['HTTPS']) ? \"https\" : \"http\") . '://' . $_SERVER['HTTP_HOST'] . $folder. '/oauth2callback.php';\n}", "function get_redirect_url($url){\n\t\t$redirect_url = null; \n\t \n\t\t$url_parts = @parse_url($url);\n\t\tif (!$url_parts) return false;\n\t\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\t\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n\t \n\t\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\t\tif (!$sock) return false;\n\t \n\t\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\t\tfwrite($sock, $request);\n\t\t$response = '';\n\t\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\t\tfclose($sock);\n\t \n\t\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\t\telse\n\t\t\t\treturn trim($matches[1]);\n\t \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t \n\t}", "public function getSuccessUrl();", "public function getOrderPlaceRedirectUrl()\n {\n $info = $this->getInfoInstance();\n\n return $info->getAdditionalInformation(self::REDIRECT_URL_KEY);\n }", "abstract protected function get_redirect_page();", "public function getRedirectRoute()\n {\n return $this->afterSendRouteUrl;\n }", "private function getURL(){\n if(!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'],'/');\n }\n }", "protected function redirectTo()\n {\n //generate URL dynamicaly .\n return '/login'; // return dynamicaly generated URL.\n }", "public static function getRedirectUri()\n {\n return sprintf(self::WX_AUTH_URI, self::WX_APPID, self::WX_SNSAPI_BASE_SCOPE);\n }", "function getRedirect() {\n\t\treturn $this->_Redirect;\n\t}", "protected function getRequestedUrl()\n {\n $scheme = $this->getScheme();\n\n return $scheme . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }", "public function getConnectUrl() {\n return $this->redirect_url;\n }", "public function getRedirect(){\n return $this->redirect;\n }", "public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getRedirectPath()\n {\n return $this->redirectPath;\n }", "protected function redirectTo()\n {\n\n return '/'; // return dynamicaly generated URL.\n }", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "public function get_url();", "public static function getRequestedURL()\n {\n return self::getInstance()->requestedUrl;\n }", "function getRedirectPath() {\n return $this->redirectPath;\n }", "function get_redirect_url($url){\n global $cookie;\n\t$redirect_url = null; \n \n\t$url_parts = @parse_url($url);\n\tif (!$url_parts) return false;\n\tif (!isset($url_parts['host'])) return false; //can't process relative URLs\n\tif (!isset($url_parts['path'])) $url_parts['path'] = '/';\n \n\t$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);\n\tif (!$sock) return false;\n \n\t$request = \"HEAD \" . $url_parts['path'] . (isset($url_parts['query']) ? '?'.$url_parts['query'] : '') . \" HTTP/1.1\\r\\n\"; \n\t$request .= 'Host: ' . $url_parts['host'] . \"\\r\\n\"; \n\t$request .= 'Cookie: ' . $cookie . \"\\r\\n\"; \n\t$request .= \"Connection: Close\\r\\n\\r\\n\"; \n\tfwrite($sock, $request);\n\t$response = '';\n\twhile(!feof($sock)) $response .= fread($sock, 8192);\n\tfclose($sock);\n\n\tif (preg_match('/^Location: (.+?)$/m', $response, $matches)){\n\t\tif ( substr($matches[1], 0, 1) == \"/\" )\n\t\t\treturn $url_parts['scheme'] . \"://\" . $url_parts['host'] . trim($matches[1]);\n\t\telse\n\t\t\treturn trim($matches[1]);\n \n\t} else {\n\t\treturn $url;\n\t}\n \n}", "public function getUnauthenticatedRedirectUrl(ServerRequestInterface $request): ?string;", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "public function getUrl() {\r\n\r\n // removing GET parameters from URL.\r\n return strtolower(rtrim(explode('?', $_SERVER['REQUEST_URI'], 2)[0], '/'));\r\n \r\n }", "public function getURLLogin() {\r\n $this->initGoogleClient();\r\n $url = $this->client->createAuthUrl();\r\n Log::message(Language::getMessage('log', 'debug_google_get_url', array('url' => $url)), 2);\r\n return $url;\r\n }", "public function redirectTo();", "public function get_redirect_uri() {\n\n\t\treturn admin_url( 'admin.php?page=gf_settings&subview=gravityformsdropbox', 'https' );\n\n\t}", "public function getUrl() {\n\t\t//$url = \"https://www.facebook.com/dialog/oauth?client_id=\".$this->appId.\"&redirect_uri=\".$this->redirectUrl.\"&scope=\".$this->permission.\"&state=\".$_SESSION['state'];\n\t\treturn $this->redirectUrl;\n\t}", "public function get_url():string\n {\n return strtok($_SERVER[\"REQUEST_URI\"],'?');\n }", "public function getFrontPageUrl();", "function thrive_get_redirect_page_url() {\n\n\t$selected_login_post_id = intval( get_option( 'thrive_login_page' ) );\n\n\tif ( $selected_login_post_id === 0 ) {\n\n\t\treturn;\n\n\t}\n\n\t$login_post = get_post( $selected_login_post_id );\n\n\tif ( ! empty( $login_post ) ) {\n\n\t\treturn get_permalink( $login_post->ID );\n\n\t}\n\n\treturn false;\n\n}", "public function getURL();", "public function getURL();", "public function getURL ();", "public function redirecturl()\n\t\t\t{\n\t\t\t\tif($this->fields_arr['pcakey'])\n\t\t\t\t Redirect2URL($_SESSION['pcakey'][$this->fields_arr['pcakey']]);\n\t\t\t}", "protected function getRedirectUri($client_id) {\n\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return $this->getConfig()->getPaymentRedirectUrl();\n }", "protected function _getUrl()\n {\n $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\n $protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\n $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'.$_SERVER['SERVER_PORT']);\n\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n }", "public function redirectPath()\n\t{\n\t\tif (property_exists($this, 'redirectPath'))\n\t\t{\n\t\t\treturn $this->redirectPath;\n\t\t}\n\n\t\treturn property_exists($this, 'redirectTo') ? $this->redirectTo : '/';\n\t}", "protected function _redirectUrl($default = null) {\n\t\t$url = $default;\n\t\t$request = $this->_request();\n\t\tif (!empty($request->data['redirect_url'])) {\n\t\t\t$url = $request->data['redirect_url'];\n\t\t} elseif (!empty($request->query['redirect_url'])) {\n\t\t\t$url = $request->query['redirect_url'];\n\t\t}\n\n\t\treturn $url;\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }" ]
[ "0.8936267", "0.8936267", "0.8936267", "0.8936267", "0.8936267", "0.8646268", "0.84654593", "0.82455164", "0.82455164", "0.82384086", "0.823203", "0.82047397", "0.8165673", "0.81578547", "0.8140219", "0.81255764", "0.81108624", "0.8102142", "0.80761844", "0.80761844", "0.8025657", "0.80226135", "0.80226135", "0.80226135", "0.7985228", "0.7950049", "0.7948506", "0.79360723", "0.78375685", "0.78216916", "0.78133345", "0.7800817", "0.76772714", "0.7650431", "0.764121", "0.7622344", "0.76155484", "0.7611904", "0.7595269", "0.7587057", "0.7559424", "0.7491498", "0.7435777", "0.74182445", "0.74182445", "0.74182445", "0.7367144", "0.7350513", "0.7349403", "0.7335088", "0.7325719", "0.7319001", "0.7312673", "0.7297278", "0.7284912", "0.728287", "0.7224247", "0.7213068", "0.7154754", "0.71410465", "0.7131901", "0.71195924", "0.71050555", "0.7098175", "0.7084793", "0.7061852", "0.7055173", "0.7039989", "0.70333904", "0.70221263", "0.7002374", "0.69951785", "0.69900525", "0.69517016", "0.69440275", "0.6939988", "0.69005084", "0.6888885", "0.6880803", "0.687192", "0.6870546", "0.6869134", "0.6866364", "0.68071514", "0.678836", "0.67832184", "0.6777816", "0.67774767", "0.67755204", "0.6759671", "0.6746743", "0.6746743", "0.6744509", "0.6741471", "0.6728288", "0.67276645", "0.6721341", "0.67198396", "0.671861", "0.6714194" ]
0.6804969
84
Place Order with Custom Checkout
public function placeOrder($id_cart, $status, $transaction_data) { $cart = new Cart($id_cart); $payment_details = $transaction_data['payment_details']; $email = $payment_details['email']; $first_name = $payment_details['first_name']; $last_name = $payment_details['last_name']; $address_1 = $payment_details['address_1']; $address_2 = $payment_details['address_2']; $city = $payment_details['city']; $postcode = $payment_details['zip']; $country_code = (new League\ISO3166\ISO3166)->alpha3($payment_details['country_code'])['alpha2']; $phone = $payment_details['phone']; // Get Customer if ($cart->id_customer > 0) { $customer = new Customer($cart->id_customer); } else { // Check Customer by E-Mail $id_customer = (int)Customer::customerExists($email, true, true); if ($id_customer > 0) { $customer = new Customer($id_customer); } else { // Create Customer $password = Tools::passwdGen(8); $customer = new Customer(); $customer->firstname = $first_name; $customer->lastname = $last_name; $customer->email = $email; $customer->passwd = Tools::encrypt($password); $customer->is_guest = 0; $customer->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP', null, $cart->id_shop); $customer->newsletter = 1; $customer->optin = 0; $customer->active = 1; $customer->id_gender = 9; $customer->add(); $this->sendConfirmationMail($customer, $cart->id_lang, $password); } } // Check existing address $id_country = (string)Country::getByIso($country_code); foreach ($customer->getAddresses($cart->id_lang) as $address) { if ($address['firstname'] === $first_name && $address['lastname'] === $last_name && $address['city'] === $city && $address['address1'] === $address_1 && $address['address2'] === $address_2 && $address['postcode'] === $postcode && $address['phone_mobile'] === $phone && $address['id_country'] === $id_country) { // Set Address $cart->id_address_invoice = $address['id_address']; $cart->id_address_delivery = $address['id_address']; break; } } // Save Address if don't exists if (!$cart->id_address_invoice) { $address = new Address(); $address->firstname = $first_name; $address->lastname = $last_name; $address->address1 = $address_1; $address->address2 = $address_2; $address->postcode = $postcode; $address->phone_mobile = $phone; $address->city = $city; $address->id_country = $id_country; $address->id_customer = $customer->id; $address->alias = $this->l('My address'); $address->add(); // Set Address $cart->id_address_invoice = $address->id; $cart->id_address_delivery = $address->id; } // Update cart $cart->getPackageList(true); $cart->getDeliveryOptionList(null, true); $cart->id_customer = $customer->id; $cart->secure_key = $customer->secure_key; $cart->delivery_option = ''; $cart->save(); $cart = new Cart($cart->id); $this->validateOrder( $cart->id, $status, $cart->getOrderTotal(true, 3), $this->displayName, null, array(), $cart->id_currency, false, $customer->secure_key ); return $this->currentOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customcheckout($userid,$email,$name,$street,$city,$country_id,$postcode,$telephone,$shipping,$payment,$quoteId)\n\t {\n\t\t/* $parts = explode(\" \", $name);\n\t\t $lastname = array_pop($parts);\n\t\tif($lastname=='')\n\t\t{\n\t\t\t$lastname='@';\n\t\t}\n $firstname = implode(\" \", $parts);\n\t\tif($firstname=='')\n\t\t{\n\t\t\t$firstname='@';\n\t\t} */\n\t\t\n\t\tif(strpos($name, ' ') > 0)\n\t\t{\n\t\t\t$parts = explode(\" \", $name);\n\t\t $lastname = array_pop($parts);\n\t\t $firstname = implode(\" \", $parts);\n\t\t\n\t\t}\n else\n {\n\t\t $lastname = $name;\n\t\t $firstname = $name;\n\t}\n\t\t\n\t\t//exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t $orderData=[\n\t\t\t\t 'currency_id' => 'USD',\n\t\t\t\t 'email' => $email, //buyer email id\n\t\t\t\t 'shipping_address' =>[\n\t\t\t\t\t\t'firstname' => $firstname, //address Details\n\t\t\t\t\t\t'lastname' => $lastname,\n\t\t\t\t\t\t\t\t'street' => $street,\n\t\t\t\t\t\t\t\t'city' => $city,\n\t\t\t\t\t\t//'country_id' => 'IN',\n\t\t\t\t\t\t'country_id' => $country_id,\n\t\t\t\t\t\t'region' => '',\n\t\t\t\t\t\t'postcode' => $postcode,\n\t\t\t\t\t\t'telephone' => $telephone,\n\t\t\t\t\t\t'fax' => '',\n\t\t\t\t\t\t'save_in_address_book' => 1\n\t\t\t\t\t\t\t ],\n\t\t\t 'items'=> [ //array of product which order you want to create\n\t\t\t\t\t\t ['product_id'=>'5','qty'=>1,'price'=>'50'],\n\t\t\t\t\t\t ['product_id'=>'6','qty'=>2,'price'=>'100']\n\t\t\t\t\t\t] \n\t\t\t\t\t\t\n\t\t\t];\n\n /*for sote 4 */\t\t\t\n\t\t /* $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t $helper = $objectManager->get('Webkul\\Marketplace\\Helper\\Data');\n\t\t $helper->setCurrentStore(4); */\n\t\t /* end for sote 4 */\n\t\t\n\t\t\n\t\t$store=$this->storeManager->getStore();\n $websiteId = $this->storeManager->getStore()->getWebsiteId();\n $customer=$this->customerFactory->create();\n $customer->setWebsiteId($websiteId);\n //$customer->loadByEmail($orderData['email']);// load customet by email address\n\t\t$customer->load($userid);\n\t\t $customer->getId();\n\t\t $customer->getEntityId();\n /* if(!$customer->getEntityId()){\n //If not avilable then create this customer \n $customer->setWebsiteId($websiteId)\n ->setStore($store)\n ->setFirstname($orderData['shipping_address']['firstname'])\n ->setLastname($orderData['shipping_address']['lastname'])\n ->setEmail($orderData['email']) \n ->setPassword($orderData['email']);\n $customer->save();\n } */\n\t\t\t\n\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t$connection = $resource->getConnection();\n\t\t\n\t\t//$quote_sql_latest = \"Select * FROM quote where customer_id=$userid and store_id=4 and is_active=1 order by entity_id ASC limit 1\";\n\t\t$quote_sql_latest = \"Select * FROM quote where customer_id=$userid and store_id=1 and is_active=1 order by entity_id ASC limit 1\";\n\t \n\n\t\t$result_result_cart = $connection->fetchAll($quote_sql_latest);\n\t\t // print_r($result_result_cart); \n\t\t\n\t\t\n\t\t$quote_sql = \"Select * FROM quote where customer_id=$userid and store_id=1 and entity_id='$quoteId' and is_active=1\";\n\t\t//$quote_sql = \"Select * FROM quote where customer_id=$userid and store_id=4 and entity_id='$quoteId' and is_active=1\";\n\t\t\n\t\t\n\t\t$result_result = $connection->fetchAll($quote_sql);\t\n\t\tif(!empty($result_result))\n\t\t{\n\t\t\n\t\t\t $quoteId2=$result_result[0]['entity_id'];\n\t\t\t $quote = $this->quote->create()->load($quoteId2);\n\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $checkoutSession =$objectManager->get('Magento\\Checkout\\Model\\Session');\n\t\t $checkoutSession->setQuoteId($quoteId2);\n\t\t \n\t\t \n\t\t //Set Address to quote\n $quote->getBillingAddress()->addData($orderData['shipping_address']);\n $quote->getShippingAddress()->addData($orderData['shipping_address']);\n \n // Collect Rates and Set Shipping & Payment Method\n \n $shippingAddress=$quote->getShippingAddress(); \n $shippingAddress->setCollectShippingRates(true)\n ->collectShippingRates()\n //->setShippingMethod('freeshipping_freeshipping'); //shipping method\n\t\t\t\t\t\t->setShippingMethod($shipping); //shipping method\n\t\t\t\t\t\t\n //$quote->setPaymentMethod('cashondelivery'); //payment method\n\t\t$quote->setPaymentMethod($payment);\n $quote->setInventoryProcessed(false); //not effetc inventory\n $quote->save(); //Now Save quote and your quote is ready\n \n // Set Sales Order Payment\n //$quote->getPayment()->importData(['method' => 'cashondelivery']);\n $quote->getPayment()->importData(['method' => $payment]);\n // Collect Totals & Save Quote\n $quote->collectTotals()->save();\n $quote->getId();\n // Create Order From Quote\n $order = $this->quoteManagement->submit($quote);\n \n $order->setEmailSent(0);\n\t //$order->setEmailSent(1);\n $increment_id = $order->getRealOrderId();\n\t $lastOrderId = $increment_id;\n\t\t\n\t\t$helper = $objectManager->get(\n 'Webkul\\Marketplace\\Helper\\Data'\n );\n\t\t\n\t\t$getProductSalesCalculation = $objectManager->get(\n 'Webkul\\Marketplace\\Observer\\SalesOrderPlaceAfterObserver'\n );\n $getProductSalesCalculation->getProductSalesCalculation($order);\n\n /*send placed order mail notification to seller*/\n\n $salesOrder = $objectManager->create(\n 'Webkul\\Marketplace\\Model\\ResourceModel\\Seller\\Collection'\n )->getTable('sales_order');\n $salesOrderItem = $objectManager->create(\n 'Webkul\\Marketplace\\Model\\ResourceModel\\Seller\\Collection'\n )->getTable('sales_order_item');\n\t\t\n\t\t\n\t\t\n\t\t $paymentCode = '';\n if ($order->getPayment()) {\n $paymentCode = $order->getPayment()->getMethod();\n }\n\n $shippingInfo = '';\n $shippingDes = '';\n\n $billingId = $order->getBillingAddress()->getId();\n\n $billaddress = $objectManager->create(\n 'Magento\\Sales\\Model\\Order\\Address'\n )->load($billingId);\n $billinginfo = $billaddress['firstname'].'<br/>'.\n $billaddress['street'].'<br/>'.\n $billaddress['city'].' '.\n $billaddress['region'].' '.\n $billaddress['postcode'].'<br/>'.\n $objectManager->create(\n 'Magento\\Directory\\Model\\Country'\n )->load($billaddress['country_id'])->getName().'<br/>T:'.\n $billaddress['telephone'];\n\n $payment = $order->getPayment()->getMethodInstance()->getTitle();\n\n\t\t\n\t\t\n\t\t if ($order->getShippingAddress()) {\n $shippingId = $order->getShippingAddress()->getId();\n $address = $objectManager->create(\n 'Magento\\Sales\\Model\\Order\\Address'\n )->load($shippingId);\n $shippingInfo = $address['firstname'].'<br/>'.\n $address['street'].'<br/>'.\n $address['city'].' '.\n $address['region'].' '.\n $address['postcode'].'<br/>'.\n $objectManager->create(\n 'Magento\\Directory\\Model\\Country'\n )->load($address['country_id'])->getName().'<br/>T:'.\n $address['telephone'];\n $shippingDes = $order->getShippingDescription();\n }\n\t\t\n\t\t\n\t\t$adminStoremail = $helper->getAdminEmailId();\n $adminEmail = $adminStoremail ? $adminStoremail : $helper->getDefaultTransEmailId();\n $adminUsername = 'Admin';\n\n $customerModel = $objectManager->create(\n 'Magento\\Customer\\Model\\Customer'\n );\n\n $sellerOrder = $objectManager->create(\n 'Webkul\\Marketplace\\Model\\Orders'\n )\n ->getCollection()\n ->addFieldToFilter('order_id', $lastOrderId)\n ->addFieldToFilter('seller_id', ['neq' => 0]);\n\t\t\n\t \n\t foreach ($sellerOrder as $info) {\n $userdata = $customerModel->load($info['seller_id']);\n $username = $userdata['firstname'];\n $useremail = $userdata['email'];\n\n $senderInfo = [];\n $receiverInfo = [];\n\n $receiverInfo = [\n 'name' => $username,\n 'email' => $useremail,\n ];\n $senderInfo = [\n 'name' => $adminUsername,\n 'email' => $adminEmail,\n ];\n $totalprice = '';\n $totalTaxAmount = 0;\n $codCharges = 0;\n $shippingCharges = 0;\n $orderinfo = '';\n\n $saleslistIds = [];\n $collection1 = $objectManager->create(\n 'Webkul\\Marketplace\\Model\\Saleslist'\n )->getCollection()\n ->addFieldToFilter('order_id', $lastOrderId)\n ->addFieldToFilter('seller_id', $info['seller_id'])\n ->addFieldToFilter('parent_item_id', ['null' => 'true'])\n ->addFieldToFilter('magerealorder_id', ['neq' => 0])\n ->addFieldToSelect('entity_id');\n\n $saleslistIds = $collection1->getData();\n\n $fetchsale = $objectManager->create(\n 'Webkul\\Marketplace\\Model\\Saleslist'\n )\n ->getCollection()\n ->addFieldToFilter(\n 'entity_id', \n ['in' => $saleslistIds]\n );\n $fetchsale->getSelect()->join(\n $salesOrder.' as so', \n 'main_table.order_id = so.entity_id', \n ['status' => 'status']\n );\n\n $fetchsale->getSelect()->join(\n $salesOrderItem.' as soi', \n 'main_table.order_item_id = soi.item_id AND main_table.order_id = soi.order_id', \n [\n 'item_id' => 'item_id', \n 'qty_canceled' => 'qty_canceled', \n 'qty_invoiced' => 'qty_invoiced', \n 'qty_ordered' => 'qty_ordered', \n 'qty_refunded' => 'qty_refunded', \n 'qty_shipped' => 'qty_shipped', \n 'product_options' => 'product_options', \n 'mage_parent_item_id' => 'parent_item_id'\n ]\n );\n foreach ($fetchsale as $res) {\n $product = $objectManager->create(\n 'Magento\\Catalog\\Model\\Product'\n )->load($res['mageproduct_id']);\n\n /* product name */\n $productName = $res->getMageproName();\n $result = [];\n if ($options = unserialize($res->getProductOptions())) {\n if (isset($options['options'])) {\n $result = array_merge($result, $options['options']);\n }\n if (isset($options['additional_options'])) {\n $result = array_merge($result, $options['additional_options']);\n }\n if (isset($options['attributes_info'])) {\n $result = array_merge($result, $options['attributes_info']);\n }\n }\n if ($_options = $result) {\n $proOptionData = '<dl class=\"item-options\">';\n foreach ($_options as $_option) {\n $proOptionData .= '<dt>'.$_option['label'].'</dt>';\n\n $proOptionData .= '<dd>'.$_option['value'];\n $proOptionData .= '</dd>';\n }\n $proOptionData .= '</dl>';\n $productName = $productName.'<br/>'.$proOptionData;\n } else {\n $productName = $productName.'<br/>';\n }\n /* end */\n\n $sku = $product->getSku();\n $orderinfo = $orderinfo.\"<tbody><tr>\n <td class='item-info'>\".$productName.\"</td>\n <td class='item-info'>\".$sku.\"</td>\n <td class='item-qty'>\".($res['magequantity'] * 1).\"</td>\n <td class='item-price'>\".\n $order->formatPrice(\n $res['magepro_price'] * $res['magequantity']\n ).\n '</td>\n </tr></tbody>';\n $totalTaxAmount = $totalTaxAmount + $res['total_tax'];\n $totalprice = $totalprice + ($res['magepro_price'] * $res['magequantity']);\n\n /*\n * Low Stock Notification mail to seller\n */\n if ($helper->getlowStockNotification()) {\n $stockItemQty = $product['quantity_and_stock_status']['qty'];\n if ($stockItemQty <= $helper->getlowStockQty()) {\n $orderProductInfo = \"<tbody><tr>\n <td class='item-info'>\".$productName.\"</td>\n <td class='item-info'>\".$sku.\"</td>\n <td class='item-qty'>\".($res['magequantity'] * 1).'</td>\n </tr></tbody>';\n\n $emailTemplateVariables = [];\n $emailTempVariables['myvar1'] = $orderProductInfo;\n $emailTempVariables['myvar2'] = $username;\n\n $this->_objectManager->get(\n 'Webkul\\Marketplace\\Helper\\Email'\n )->sendLowStockNotificationMail(\n $emailTemplateVariables,\n $senderInfo,\n $receiverInfo\n );\n }\n }\n }\n $shippingCharges = $info->getShippingCharges();\n $totalCod = 0;\n\n if ($paymentCode == 'mpcashondelivery') {\n $totalCod = $info->getCodCharges();\n $codRow = \"<tr class='subtotal'>\n <th colspan='3'>\".__('Cash On Delivery Charges').\"</th>\n <td colspan='3'><span>\".\n $order->formatPrice($totalCod).\n '</span></td>\n </tr>';\n } else {\n $codRow = '';\n }\n\n $orderinfo = $orderinfo.\"<tfoot class='order-totals'>\n <tr class='subtotal'>\n <th colspan='3'>\".__('Shipping & Handling Charges').\"</th>\n <td colspan='3'><span>\".\n $order->formatPrice($shippingCharges).\"</span></td>\n </tr>\n <tr class='subtotal'>\n <th colspan='3'>\".__('Tax Amount').\"</th>\n <td colspan='3'><span>\".\n $order->formatPrice($totalTaxAmount).'</span></td>\n </tr>'.$codRow.\"\n <tr class='subtotal'>\n <th colspan='3'>\".__('Grandtotal').\"</th>\n <td colspan='3'><span>\".\n $order->formatPrice(\n $totalprice + \n $totalTaxAmount + \n $shippingCharges + \n $totalCod\n ).'</span></td>\n </tr></tfoot>';\n\n $emailTemplateVariables = [];\n if ($shippingInfo != '') {\n $isNotVirtual = 1;\n } else {\n $isNotVirtual = 0;\n }\n $emailTempVariables['myvar1'] = $order->getRealOrderId();\n $emailTempVariables['myvar2'] = $order['created_at'];\n $emailTempVariables['myvar4'] = $billinginfo;\n $emailTempVariables['myvar5'] = $payment;\n $emailTempVariables['myvar6'] = $shippingInfo;\n $emailTempVariables['isNotVirtual'] = $isNotVirtual;\n $emailTempVariables['myvar9'] = $shippingDes;\n $emailTempVariables['myvar8'] = $orderinfo;\n $emailTempVariables['myvar3'] = $username;\n\n $objectManager->get(\n 'Webkul\\Marketplace\\Helper\\Email'\n )->sendPlacedOrderEmail(\n $emailTempVariables,\n $senderInfo,\n $receiverInfo\n );\n }\n\t \n\t \n if($order->getEntityId())\n\t\t {\n // $result['order_id']= $order->getRealOrderId();\n\t\t \n\t\t \n/* \t\t $quote_sql = \"Select * FROM quote where customer_id=$userid and store_id=1 and is_active=1 order by entity_id ASC limit 1\";\n\t $result_result = $connection->fetchAll($quote_sql);\n\t\t print_r($result_result); */\n\t\t\t\tif(!empty($result_result_cart))\n\t\t\t\t{\n\t\t\t\t\t $quoteId3=$result_result_cart[0]['entity_id'];\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($quoteId3==$quoteId)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $quote_sql3 = \"Select * FROM quote where customer_id=$userid and store_id=1 and is_active=1 and entity_id !=$quoteId3\";\n\t\t\t\t\t\t\t\t $result_result3 = $connection->fetchAll($quote_sql3);\n\t\t\t\t\t\t\t\t if(!empty($result_result3))\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t foreach ($result_result3 as $qt)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t$qtid=$qt['entity_id'];\n\t\t\t\t\t\t\t\t\t\t $quote_sql = \"delete FROM quote where entity_id=$qtid \";\n\t\t\t\t\t\t\t\t\t\t $connection->rawQuery($quote_sql); \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 $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'order_id'=> $order->getRealOrderId());\n\t\t\t\t\t\t\t\t \n\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\t\t$quote_sql2 = \"Select * FROM quote_item where quote_id=$quoteId limit 1\";\n\t\t\t\t\t\t\t\t $result_result2 = $connection->fetchAll($quote_sql2);\n\t\t\t\t\t\t\t\t\t//print_r($result_result2);\n\t\t\t\t\t\t\t\t\tif(!empty($result_result2))\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\t\t$checkoutSession =$objectManager->get('Magento\\Checkout\\Model\\Session');\n\t\t\t\t\t\t\t\t\t$checkoutSession->setQuoteId($quoteId3);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t$quote_item_id=$result_result2[0]['item_id'];\n\t\t\t\t\t\t\t\t\t\t$quote_item_productid=$result_result2[0]['product_id'];\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$quote_sql24 = \"Select * FROM quote_item where quote_id=$quoteId3 and product_id=$quote_item_productid\";\n\t\t\t\t\t\t\t\t $result_result24 = $connection->fetchAll($quote_sql24);\n\t\t\t\t\t\t\t\t\t\tif(!empty($result_result24))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$quote_item_id=$result_result24[0]['item_id'];\n\t\t\t\t\t\t\t\t\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();//instance of object manager\n\t\t\t\t\t\t\t\t\t\t\t$itemModel = $objectManager->create('Magento\\Quote\\Model\\Quote\\Item');//Quote item mode\n\t\t\t\t\t\t\t\t\t\t\t$quoteItem=$itemModel->load($quote_item_id);//load particular item which you want to delete by his item id\n\t\t\t\t\t\t\t\t\t\t\t$quoteItem->delete();//deletes the item\n\t\t\t\t\t\t\t\t\t\t\t$this->cart->removeItem($quote_item_id);\n\t\t\t\t\t\t\t\t\t\t $this->cart->save();\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$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'order_id'=> $order->getRealOrderId());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"error\"));\n\t\t\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\t \n\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\t \n\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\t \n\t\t\t\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\t\n }else{\n $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n } \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t // $result[]=array('satus'=>'error');\n\t\t \n\t\t \n\t\t \n\t\t}\t\t\t\n\t\telse\n\t\t{\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t}\t\t\t\n\t\t\n \t\t\t\n\t return $result; \n\t\n\t }", "public function placeOrderAction() {\n\t\tif ($this->_checkPk ()) {\n\t\t\t$this->_redirect ( \"checkout/cart\" );\n\t\t\treturn $this;\n\t\t}\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t$post = $this->getRequest ()->getPost ();\n\t\t\tMage::getSingleton ( 'customer/session' )->setExprsFormData ( $post );\n\t\t\t\n\t\t\t$translate = Mage::getSingleton ( 'core/translate' );\n\t\t\t/* @var $translate Mage_Core_Model_Translate */\n\t\t\t$translate->setTranslateInline ( false );\n\t\t\ttry {\n\t\t\t\t$quote = $this->getQuote ();\n\t\t\t\t$postObject = new Varien_Object ();\n\t\t\t\t$postObject->setData ( $post );\n\t\t\t\t\n\t\t\t\t$error = false;\n\t\t\t\t\n\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['longaccesstoken'] ), 'NotEmpty' )) {\n\t\t\t\t\t$error = true;\n\t\t\t\t}\n\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['cards'] ), 'NotEmpty' )) {\n\t\t\t\t\t$error = true;\n\t\t\t\t}\n\t\t\t\tif (! $quote->getIsVirtual ()) {\n\t\t\t\t\t\n\t\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['address'] ), 'NotEmpty' ) && ! $post ['shipping']) {\n\t\t\t\t\t\t$error = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($error) {\n\t\t\t\t\tthrow new Exception ();\n\t\t\t\t} else {\n\t\t\t\t\t$precheckoutData = Mage::helper ( 'masterpass' )->postExpressCheckoutData ( $post );\n\t\t\t\t\t$precheckoutData = json_decode ( json_encode ( ( array ) $precheckoutData ), 1 );\n\t\t\t\t\tif (empty ( $precheckoutData )) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// remove longaccesstoken\n\t\t\t\t\t\t// save long access token\n\t\t\t\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t\t\t\t$longAccessToken = null;\n\t\t\t\t\t\t$customerData->setData ( 'longtoken', $longAccessToken );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$customerData->save ();\n\t\t\t\t\t\tMage::getSingleton ( 'core/session' )->addError ( Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' ) );\n\t\t\t\t\t\t$this->_redirect ( 'checkout/cart' );\n\t\t\t\t\t\treturn $this;\n\t\t\t\t\t}\n\t\t\t\t\tif (! empty ( $precheckoutData ['Checkout'] )) {\n\t\t\t\t\t\t$this->savePrecheckoutData ( $precheckoutData );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t\t\t\t$customerData->save ();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset ( $precheckoutData ['Errors'] ['Error'] ['Source'] )) {\n\t\t\t\t\t\t\tif ($precheckoutData ['Errors'] ['Error'] ['Source'] == \"3DS Needed\") {\n\t\t\t\t\t\t\t\tthrow new Mage_Core_Exception ( \"3DS Needed\" );\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} catch ( Mage_Core_Exception $e ) {\n\t\t\t\tif ($e->getMessage () == \"3DS Needed\") {\n\t\t\t\t\tMage::getSingleton ( 'core/session' )->setExpSecure ( true );\n\t\t\t\t} else {\n\t\t\t\t\tMage::getSingleton ( 'core/session' )->setExpSecure ( false );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset ( $postback_data )) {\n\t\t\t\t\t$TransactionStatus = 'Failure';\n\t\t\t\t\tMage::helper ( 'masterpass' )->postTransaction ( $postback_data, $TransactionStatus, self::APPROVAL_CODE );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_redirect ( 'masterpass/masterpasspairing/precheckout' );\n\t\t\t}\n\t\t} else {\n\t\t\t$generic_error_message = Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' );\n\t\t\tMage::getSingleton ( 'core/session' )->addError ( $generic_error_message );\n\t\t\t$this->_redirect ( 'masterpass/masterpasspairing/precheckout' );\n\t\t}\n\t}", "public function bookingcustomcheckout($userid,$email,$name,$street,$city,$country_id,$postcode,$telephone,$shipping,$payment,$quoteId)\n\t {\n\t\t/* $parts = explode(\" \", $name);\n\t\t $lastname = array_pop($parts);\n\t\tif($lastname=='')\n\t\t{\n\t\t\t$lastname='@';\n\t\t}\n $firstname = implode(\" \", $parts);\n\t\tif($firstname=='')\n\t\t{\n\t\t\t$firstname='@';\n\t\t} */\n\t\t\n\t\tif(strpos($name, ' ') > 0)\n\t\t{\n\t\t\t$parts = explode(\" \", $name);\n\t\t $lastname = array_pop($parts);\n\t\t $firstname = implode(\" \", $parts);\n\t\t\n\t\t}\n else\n {\n\t\t $lastname = $name;\n\t\t $firstname = $name;\n\t}\n\t\t\n\t\t//exit;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t $orderData=[\n\t\t\t\t 'currency_id' => 'USD',\n\t\t\t\t 'email' => $email, //buyer email id\n\t\t\t\t 'shipping_address' =>[\n\t\t\t\t\t\t'firstname' => $firstname, //address Details\n\t\t\t\t\t\t'lastname' => $lastname,\n\t\t\t\t\t\t\t\t'street' => $street,\n\t\t\t\t\t\t\t\t'city' => $city,\n\t\t\t\t\t\t//'country_id' => 'IN',\n\t\t\t\t\t\t'country_id' => $country_id,\n\t\t\t\t\t\t'region' => '',\n\t\t\t\t\t\t'postcode' => $postcode,\n\t\t\t\t\t\t'telephone' => $telephone,\n\t\t\t\t\t\t'fax' => '',\n\t\t\t\t\t\t'save_in_address_book' => 1\n\t\t\t\t\t\t\t ],\n\t\t\t 'items'=> [ //array of product which order you want to create\n\t\t\t\t\t\t ['product_id'=>'5','qty'=>1,'price'=>'50'],\n\t\t\t\t\t\t ['product_id'=>'6','qty'=>2,'price'=>'100']\n\t\t\t\t\t\t] \n\t\t\t\t\t\t\n\t\t\t];\n\n /*for sote 4 */\t\t\t\n\t\t $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t $helper = $objectManager->get('Webkul\\Marketplace\\Helper\\Data');\n\t\t $helper->setCurrentStore(4); \n\t\t /* end for sote 4 */\n\t\t\n\t\t\n\t\t$store=$this->storeManager->getStore();\n $websiteId = $this->storeManager->getStore()->getWebsiteId();\n $customer=$this->customerFactory->create();\n $customer->setWebsiteId($websiteId);\n //$customer->loadByEmail($orderData['email']);// load customet by email address\n\t\t$customer->load($userid);\n\t\t $customer->getId();\n\t\t $customer->getEntityId();\n /* if(!$customer->getEntityId()){\n //If not avilable then create this customer \n $customer->setWebsiteId($websiteId)\n ->setStore($store)\n ->setFirstname($orderData['shipping_address']['firstname'])\n ->setLastname($orderData['shipping_address']['lastname'])\n ->setEmail($orderData['email']) \n ->setPassword($orderData['email']);\n $customer->save();\n } */\n\t\t\t\n\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t$connection = $resource->getConnection();\n\t\t\n\t\t/* $quote_sql_latest = \"Select * FROM quote where customer_id=$userid and store_id=4 and is_active=1 order by entity_id ASC limit 1\";\n\t\t$result_result_cart = $connection->fetchAll($quote_sql_latest); */\n\t\t // print_r($result_result_cart); \n\t\t\n\t\t\n\t\t$quote_sql = \"Select * FROM quote where customer_id=$userid and store_id=4 and entity_id='$quoteId' and is_active=1\";\n\t\t\n\t\t\n\t\t$result_result = $connection->fetchAll($quote_sql);\t\n\t\tif(!empty($result_result))\n\t\t{\n\t\t\n\t\t\t $quoteId2=$result_result[0]['entity_id'];\n\t\t\t $quote = $this->quote->create()->load($quoteId2);\n\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $checkoutSession =$objectManager->get('Magento\\Checkout\\Model\\Session');\n\t\t $checkoutSession->setQuoteId($quoteId2);\n\t\t \n\t\t \n\t\t //Set Address to quote\n $quote->getBillingAddress()->addData($orderData['shipping_address']);\n $quote->getShippingAddress()->addData($orderData['shipping_address']);\n \n // Collect Rates and Set Shipping & Payment Method\n \n $shippingAddress=$quote->getShippingAddress(); \n $shippingAddress->setCollectShippingRates(true)\n ->collectShippingRates()\n //->setShippingMethod('freeshipping_freeshipping'); //shipping method\n\t\t\t\t\t\t->setShippingMethod($shipping); //shipping method\n\t\t\t\t\t\t\n //$quote->setPaymentMethod('cashondelivery'); //payment method\n\t\t$quote->setPaymentMethod($payment);\n $quote->setInventoryProcessed(false); //not effetc inventory\n $quote->save(); //Now Save quote and your quote is ready\n \n // Set Sales Order Payment\n //$quote->getPayment()->importData(['method' => 'cashondelivery']);\n $quote->getPayment()->importData(['method' => $payment]);\n // Collect Totals & Save Quote\n $quote->collectTotals()->save();\n $quote->getId();\n // Create Order From Quote\n $order = $this->quoteManagement->submit($quote);\n \n $order->setEmailSent(0);\n\t //$order->setEmailSent(1);\n echo $increment_id = $order->getRealOrderId();\n\t $lastOrderId = $increment_id;\n\t\t\n\t\t$helper = $objectManager->get(\n 'Webkul\\Marketplace\\Helper\\Data'\n );\n\t\t\n\t\t$getProductSalesCalculation = $objectManager->get(\n 'Webkul\\Marketplace\\Observer\\SalesOrderPlaceAfterObserver'\n );\n $getProductSalesCalculation->getProductSalesCalculation($order); \n\t \n\t \n\t \n\t \n\t \n\t\t\t if($order->getEntityId())\n\t\t\t {\n\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>$lastOrderId));\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t\t} \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t}\t\t\t\n\t\telse\n\t\t{\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t}\t\t\t\n\t\t\n \t\t\t\n\t return $result; \n\t\n\t }", "public function customcheckoutdirect($userid,$productid,$price,$email,$name,$street,$city,$country_id,$postcode,$telephone,$shipping,$payment,$quoteid)\n\t {\n\t\tif(strpos($name, ' ') > 0)\n\t\t{\n\t\t\t$parts = explode(\" \", $name);\n\t\t $lastname = array_pop($parts);\n\t\t $firstname = implode(\" \", $parts);\n\t\t\n\t\t}\n else\n {\n\t\t $lastname = $name;\n\t\t $firstname = $name;\n\t}\n\t\t $orderData=[\n\t\t\t\t 'currency_id' => 'USD',\n\t\t\t\t 'email' => $email, //buyer email id\n\t\t\t\t 'shipping_address' =>[\n\t\t\t\t\t\t'firstname' => $firstname, //address Details\n\t\t\t\t\t\t'lastname' => $lastname,\n\t\t\t\t\t\t\t\t'street' => $street,\n\t\t\t\t\t\t\t\t'city' => $city,\n\t\t\t\t\t\t//'country_id' => 'IN',\n\t\t\t\t\t\t'country_id' => $country_id,\n\t\t\t\t\t\t'region' => '',\n\t\t\t\t\t\t'postcode' => $postcode,\n\t\t\t\t\t\t'telephone' => $telephone,\n\t\t\t\t\t\t'fax' => '',\n\t\t\t\t\t\t'save_in_address_book' => 1\n\t\t\t\t\t\t\t ],\n\t\t\t 'items'=> [ //array of product which order you want to create\n\t\t\t\t\t\t ['product_id'=>$productid,'qty'=>1,'price'=>$price]\n\t\t\t\t\t\t] \n\t\t\t\t\t\t\n\t\t\t];\t\n\t\t\t\n\t\t\t\n\t\t/* \t $store=$this->_storeManager->getStore();\n $websiteId = $this->_storeManager->getStore()->getWebsiteId();\n $customer=$this->customerFactory->create();\n $customer->setWebsiteId($websiteId);\n $customer->loadByEmail($orderData['email']);// load customet by email address\n if(!$customer->getEntityId()){\n //If not avilable then create this customer \n $customer->setWebsiteId($websiteId)\n ->setStore($store)\n ->setFirstname($orderData['shipping_address']['firstname'])\n ->setLastname($orderData['shipping_address']['lastname'])\n ->setEmail($orderData['email']) \n ->setPassword($orderData['email']);\n $customer->save();\n } */\n\t\t$store=$this->storeManager->getStore();\n $websiteId = $this->storeManager->getStore()->getWebsiteId();\n $customer=$this->customerFactory->create();\n $customer->setWebsiteId($websiteId);\n //$customer->loadByEmail($orderData['email']);// load customet by email address\n\t\t$customer->load($userid);\n\t\t $customer->getId();\n\t\t $customer->getEntityId();\n /* if(!$customer->getEntityId()){\n //If not avilable then create this customer \n $customer->setWebsiteId($websiteId)\n ->setStore($store)\n ->setFirstname($orderData['shipping_address']['firstname'])\n ->setLastname($orderData['shipping_address']['lastname'])\n ->setEmail($orderData['email']) \n ->setPassword($orderData['email']);\n $customer->save();\n } */\n\t\t\n\t $quote = $this->quote->create()->load($quoteid);\n $quote=$this->quote->create(); //Create object of quote\n $quote->setStore($store); //set store for which you create quote\n // if you have allready buyer id then you can load customer directly \n $customer= $this->customerRepository->getById($customer->getEntityId());\n $quote->setCurrency();\n $quote->assignCustomer($customer); //Assign quote to customer\n \n //add items in quote\n foreach($orderData['items'] as $item){\n $product=$this->_product->load($item['product_id']);\n $product->setPrice($item['price']);\n $quote->addProduct(\n $product,\n intval($item['qty'])\n );\n }\n \n //Set Address to quote\n $quote->getBillingAddress()->addData($orderData['shipping_address']);\n $quote->getShippingAddress()->addData($orderData['shipping_address']);\n \n // Collect Rates and Set Shipping & Payment Method\n \n $shippingAddress=$quote->getShippingAddress();\n $shippingAddress->setCollectShippingRates(true)\n ->collectShippingRates()\n ->setShippingMethod('freeshipping_freeshipping'); //shipping method\n $quote->setPaymentMethod('cashondelivery'); //payment method\n $quote->setInventoryProcessed(false); //not effetc inventory\n $quote->save(); //Now Save quote and your quote is ready\n \n // Set Sales Order Payment\n $quote->getPayment()->importData(['method' => 'cashondelivery']);\n \n // Collect Totals & Save Quote\n $quote->collectTotals()->save();\n //$quoteid=$quote->getId();\n\t\t // $result['quoteid']= $quoteid;\n\t\t $quoteid=$quote->getId();\n\t\t /* if($quoteid)\n\t\t {\n\t\t\t $result['quoteid']= $quoteid;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $result=['error'=>1,'msg'=>'Your custom message'];\n\t\t } */\n // Create Order From Quote\n $order = $this->quoteManagement->submit($quote);\n \n $order->setEmailSent(0);\n\t\t\n\t\t\n\t\t\n\t\t$increment_id = $order->getRealOrderId();\n \n\t\tif($order->getEntityId()){\n // $result['order_id']= $order->getRealOrderId();\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'order_id'=> $order->getRealOrderId());\n }else{\n $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n } \n return $result;\n\t\t\t \n\t\t\t\n\t\n\t }", "private function _getOrderCheckout(){\n\t\t$layout = $this->getCheckoutLayout();\n\t\t\n\t\t$mOrder = $this->getOrder();\n\t\t\n\t\t$checkout = new SnapOrder_Checkout();\n\t\t$checkout->return_url = Mage::getUrl('hostedpayments/processing/return', array('id' => $mOrder->getRealOrderId(), '_secure' => true));\n\t\t$checkout->cancel_url = $checkout->return_url;\n\t\t$checkout->auto_return = true;\n\t\t$checkout->checkout_layout = $layout;\n\t\t$checkout->create_token = $this->_isCardSaved();\n\t\t$checkout->language = EvoSnapTools::getLanguage(Mage::app()->getLocale()->getLocale()->getLanguage());\n\n\t\t$customer = new SnapCustomer();\n\t\t\n\t\t$customer->first_name = $mOrder->getCustomerFirstname();\n\t\t$customer->last_name = $mOrder->getCustomerLastname();\n\t\t$customer->email = $mOrder->getCustomerEmail();\n\t\t$customer->phone = $mOrder->getBillingAddress()->getTelephone();\n\t\t\n\t\t$checkout->customer = $customer;\n\t\t\n\t\t$checkout->order = $this->_getSnapOrder();\n\n\t\treturn $checkout;\n\t}", "function saveOrder()\n\t\t{\n\t\t\tglobal $current_user, $wpdb, $pmpro_checkout_id;\n\n\t\t\t//get a random code to use for the public ID\n\t\t\tif(empty($this->code))\n\t\t\t\t$this->code = $this->getRandomCode();\n\n\t\t\t//figure out how much we charged\n\t\t\tif(!empty($this->InitialPayment))\n\t\t\t\t$amount = $this->InitialPayment;\n\t\t\telseif(!empty($this->subtotal))\n\t\t\t\t$amount = $this->subtotal;\n\t\t\telse\n\t\t\t\t$amount = 0;\n\n\t\t\t//Todo: Tax?!, Coupons, Certificates, affiliates\n\t\t\tif(empty($this->subtotal))\n\t\t\t\t$this->subtotal = $amount;\n\t\t\tif(isset($this->tax))\n\t\t\t\t$tax = $this->tax;\n\t\t\telse\n\t\t\t\t$tax = $this->getTax(true);\n\t\t\t$this->certificate_id = \"\";\n\t\t\t$this->certificateamount = \"\";\n\n\t\t\t//calculate total\n\t\t\tif(!empty($this->total))\n\t\t\t\t$total = $this->total;\n\t\t\telse {\n\t\t\t\t$total = (float)$amount + (float)$tax;\n\t\t\t\t$this->total = $total;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t//these fix some warnings/notices\n\t\t\tif(empty($this->billing))\n\t\t\t{\n\t\t\t\t$this->billing = new stdClass();\n\t\t\t\t$this->billing->name = $this->billing->street = $this->billing->city = $this->billing->state = $this->billing->zip = $this->billing->country = $this->billing->phone = \"\";\n\t\t\t}\n\t\t\tif(empty($this->user_id))\n\t\t\t\t$this->user_id = 0;\n\t\t\tif(empty($this->paypal_token))\n\t\t\t\t$this->paypal_token = \"\";\n\t\t\tif(empty($this->couponamount))\n\t\t\t\t$this->couponamount = \"\";\n\t\t\tif(empty($this->payment_type))\n\t\t\t\t$this->payment_type = \"\";\n\t\t\tif(empty($this->payment_transaction_id))\n\t\t\t\t$this->payment_transaction_id = \"\";\n\t\t\tif(empty($this->subscription_transaction_id))\n\t\t\t\t$this->subscription_transaction_id = \"\";\n\t\t\tif(empty($this->affiliate_id))\n\t\t\t\t$this->affiliate_id = \"\";\n\t\t\tif(empty($this->affiliate_subid))\n\t\t\t\t$this->affiliate_subid = \"\";\n\t\t\tif(empty($this->session_id))\n\t\t\t\t$this->session_id = \"\";\n\t\t\tif(empty($this->accountnumber))\n\t\t\t\t$this->accountnumber = \"\";\n\t\t\tif(empty($this->cardtype))\n\t\t\t\t$this->cardtype = \"\";\n\t\t\tif(empty($this->expirationmonth))\n\t\t\t\t$this->expirationmonth = \"\";\n\t\t\tif(empty($this->expirationyear))\n\t\t\t\t$this->expirationyear = \"\";\n\t\t\tif(empty($this->ExpirationDate))\n\t\t\t\t$this->ExpirationDate = \"\";\n\t\t\tif (empty($this->status))\n\t\t\t\t$this->status = \"\";\n\n\t\t\tif(empty($this->gateway))\n\t\t\t\t$this->gateway = pmpro_getOption(\"gateway\");\n\t\t\tif(empty($this->gateway_environment))\n\t\t\t\t$this->gateway_environment = pmpro_getOption(\"gateway_environment\");\n\n\t\t\tif(empty($this->datetime) && empty($this->timestamp))\n\t\t\t\t$this->datetime = date(\"Y-m-d H:i:s\", time());\n\t\t\telseif(empty($this->datetime) && !empty($this->timestamp) && is_numeric($this->timestamp))\n\t\t\t\t$this->datetime = date(\"Y-m-d H:i:s\", $this->timestamp);\t//get datetime from timestamp\n\t\t\telseif(empty($this->datetime) && !empty($this->timestamp))\n\t\t\t\t$this->datetime = $this->timestamp;\t\t//must have a datetime in it\n\n\t\t\tif(empty($this->notes))\n\t\t\t\t$this->notes = \"\";\n\n\t\t\tif(empty($this->checkout_id) || intval($this->checkout_id)<1) {\n\t\t\t\t$highestval = $wpdb->get_var(\"SELECT MAX(checkout_id) FROM $wpdb->pmpro_membership_orders\");\n\t\t\t\t$this->checkout_id = intval($highestval)+1;\n\t\t\t\t$pmpro_checkout_id = $this->checkout_id;\n\t\t\t}\n\n\t\t\t//build query\n\t\t\tif(!empty($this->id))\n\t\t\t{\n\t\t\t\t//set up actions\n\t\t\t\t$before_action = \"pmpro_update_order\";\n\t\t\t\t$after_action = \"pmpro_updated_order\";\n\t\t\t\t//update\n\t\t\t\t$this->sqlQuery = \"UPDATE $wpdb->pmpro_membership_orders\n\t\t\t\t\t\t\t\t\tSET `code` = '\" . $this->code . \"',\n\t\t\t\t\t\t\t\t\t`session_id` = '\" . $this->session_id . \"',\n\t\t\t\t\t\t\t\t\t`user_id` = \" . intval($this->user_id) . \",\n\t\t\t\t\t\t\t\t\t`membership_id` = \" . intval($this->membership_id) . \",\n\t\t\t\t\t\t\t\t\t`paypal_token` = '\" . $this->paypal_token . \"',\n\t\t\t\t\t\t\t\t\t`billing_name` = '\" . esc_sql($this->billing->name) . \"',\n\t\t\t\t\t\t\t\t\t`billing_street` = '\" . esc_sql($this->billing->street) . \"',\n\t\t\t\t\t\t\t\t\t`billing_city` = '\" . esc_sql($this->billing->city) . \"',\n\t\t\t\t\t\t\t\t\t`billing_state` = '\" . esc_sql($this->billing->state) . \"',\n\t\t\t\t\t\t\t\t\t`billing_zip` = '\" . esc_sql($this->billing->zip) . \"',\n\t\t\t\t\t\t\t\t\t`billing_country` = '\" . esc_sql($this->billing->country) . \"',\n\t\t\t\t\t\t\t\t\t`billing_phone` = '\" . esc_sql($this->billing->phone) . \"',\n\t\t\t\t\t\t\t\t\t`subtotal` = '\" . $this->subtotal . \"',\n\t\t\t\t\t\t\t\t\t`tax` = '\" . $this->tax . \"',\n\t\t\t\t\t\t\t\t\t`couponamount` = '\" . $this->couponamount . \"',\n\t\t\t\t\t\t\t\t\t`certificate_id` = \" . intval($this->certificate_id) . \",\n\t\t\t\t\t\t\t\t\t`certificateamount` = '\" . $this->certificateamount . \"',\n\t\t\t\t\t\t\t\t\t`total` = '\" . $this->total . \"',\n\t\t\t\t\t\t\t\t\t`payment_type` = '\" . $this->payment_type . \"',\n\t\t\t\t\t\t\t\t\t`cardtype` = '\" . $this->cardtype . \"',\n\t\t\t\t\t\t\t\t\t`accountnumber` = '\" . $this->accountnumber . \"',\n\t\t\t\t\t\t\t\t\t`expirationmonth` = '\" . $this->expirationmonth . \"',\n\t\t\t\t\t\t\t\t\t`expirationyear` = '\" . $this->expirationyear . \"',\n\t\t\t\t\t\t\t\t\t`status` = '\" . esc_sql($this->status) . \"',\n\t\t\t\t\t\t\t\t\t`gateway` = '\" . $this->gateway . \"',\n\t\t\t\t\t\t\t\t\t`gateway_environment` = '\" . $this->gateway_environment . \"',\n\t\t\t\t\t\t\t\t\t`payment_transaction_id` = '\" . esc_sql($this->payment_transaction_id) . \"',\n\t\t\t\t\t\t\t\t\t`subscription_transaction_id` = '\" . esc_sql($this->subscription_transaction_id) . \"',\n\t\t\t\t\t\t\t\t\t`timestamp` = '\" . esc_sql($this->datetime) . \"',\n\t\t\t\t\t\t\t\t\t`affiliate_id` = '\" . esc_sql($this->affiliate_id) . \"',\n\t\t\t\t\t\t\t\t\t`affiliate_subid` = '\" . esc_sql($this->affiliate_subid) . \"',\n\t\t\t\t\t\t\t\t\t`notes` = '\" . esc_sql($this->notes) . \"',\n\t\t\t\t\t\t\t\t\t`checkout_id` = \" . intval($this->checkout_id) . \"\n\t\t\t\t\t\t\t\t\tWHERE id = '\" . $this->id . \"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//set up actions\n\t\t\t\t$before_action = \"pmpro_add_order\";\n\t\t\t\t$after_action = \"pmpro_added_order\";\n\t\t\t\t\n\t\t\t\t//only on inserts, we might want to set the expirationmonth and expirationyear from ExpirationDate\n\t\t\t\tif( (empty($this->expirationmonth) || empty($this->expirationyear)) && !empty($this->ExpirationDate)) {\n\t\t\t\t\t$this->expirationmonth = substr($this->ExpirationDate, 0, 2);\n\t\t\t\t\t$this->expirationyear = substr($this->ExpirationDate, 2, 4);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//insert\n\t\t\t\t$this->sqlQuery = \"INSERT INTO $wpdb->pmpro_membership_orders\n\t\t\t\t\t\t\t\t(`code`, `session_id`, `user_id`, `membership_id`, `paypal_token`, `billing_name`, `billing_street`, `billing_city`, `billing_state`, `billing_zip`, `billing_country`, `billing_phone`, `subtotal`, `tax`, `couponamount`, `certificate_id`, `certificateamount`, `total`, `payment_type`, `cardtype`, `accountnumber`, `expirationmonth`, `expirationyear`, `status`, `gateway`, `gateway_environment`, `payment_transaction_id`, `subscription_transaction_id`, `timestamp`, `affiliate_id`, `affiliate_subid`, `notes`, `checkout_id`)\n\t\t\t\t\t\t\t\tVALUES('\" . $this->code . \"',\n\t\t\t\t\t\t\t\t\t '\" . session_id() . \"',\n\t\t\t\t\t\t\t\t\t \" . intval($this->user_id) . \",\n\t\t\t\t\t\t\t\t\t \" . intval($this->membership_id) . \",\n\t\t\t\t\t\t\t\t\t '\" . $this->paypal_token . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql(trim($this->billing->name)) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql(trim($this->billing->street)) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->billing->city) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->billing->state) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->billing->zip) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->billing->country) . \"',\n\t\t\t\t\t\t\t\t\t '\" . cleanPhone($this->billing->phone) . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->subtotal . \"',\n\t\t\t\t\t\t\t\t\t '\" . $tax . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->couponamount. \"',\n\t\t\t\t\t\t\t\t\t \" . intval($this->certificate_id) . \",\n\t\t\t\t\t\t\t\t\t '\" . $this->certificateamount . \"',\n\t\t\t\t\t\t\t\t\t '\" . $total . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->payment_type . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->cardtype . \"',\n\t\t\t\t\t\t\t\t\t '\" . hideCardNumber($this->accountnumber, false) . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->expirationmonth . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->expirationyear . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->status) . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->gateway . \"',\n\t\t\t\t\t\t\t\t\t '\" . $this->gateway_environment . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->payment_transaction_id) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->subscription_transaction_id) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->datetime) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->affiliate_id) . \"',\n\t\t\t\t\t\t\t\t\t '\" . esc_sql($this->affiliate_subid) . \"',\n\t\t\t\t\t\t\t\t\t\t'\" . esc_sql($this->notes) . \"',\n\t\t\t\t\t\t\t\t\t \" . intval($this->checkout_id) . \"\n\t\t\t\t\t\t\t\t\t )\";\n\t\t\t}\n\n\t\t\tdo_action($before_action, $this);\n\t\t\tif($wpdb->query($this->sqlQuery) !== false)\n\t\t\t{\n\t\t\t\tif(empty($this->id))\n\t\t\t\t\t$this->id = $wpdb->insert_id;\n\t\t\t\tdo_action($after_action, $this);\n\t\t\t\treturn $this->getMemberOrderByID($this->id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function place()\n {\n $this->_eventManager->dispatch('sales_order_payment_place_start', ['payment' => $this]);\n $order = $this->getOrder();\n\n $this->setAmountOrdered($order->getTotalDue());\n $this->setBaseAmountOrdered($order->getBaseTotalDue());\n $this->setShippingAmount($order->getShippingAmount());\n $this->setBaseShippingAmount($order->getBaseShippingAmount());\n\n $methodInstance = $this->getMethodInstance();\n $methodInstance->setStore($order->getStoreId());\n\n $orderState = Order::STATE_NEW;\n $orderStatus = $methodInstance->getConfigData('order_status');\n $isCustomerNotified = $order->getCustomerNoteNotify();\n\n // Do order payment validation on payment method level\n $methodInstance->validate();\n $action = $methodInstance->getConfigPaymentAction();\n $payment = $order->getPayment();\n $paymentMethodCode = $payment->getMethodInstance()->getCode();\n \n if ($action) {\n if ($methodInstance->isInitializeNeeded()) {\n $stateObject = new DataObject();\n // For method initialization we have to use original config value for payment action\n $methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject);\n\n if ($paymentMethodCode !== Bitcoin::CODE) {\n $orderState = $stateObject->getData('state') ?: $orderState;\n $orderStatus = $stateObject->getData('status') ?: $orderStatus;\n }\n\n $isCustomerNotified = $stateObject->hasData('is_notified')\n ? $stateObject->getData('is_notified')\n : $isCustomerNotified;\n }\n else {\n $this->processAction($action, $order);\n\n if ($paymentMethodCode !== Bitcoin::CODE){\n $orderState = Order::STATE_PROCESSING;\n $orderState = $order->getState() ? $order->getState() : $orderState;\n $orderStatus = $order->getStatus() ? $order->getStatus() : $orderStatus;\n }\n \n }\n } else {\n $order->setState($orderState)->setStatus($orderStatus);\n }\n\n $isCustomerNotified = $isCustomerNotified ?: $order->getCustomerNoteNotify();\n\n if (!array_key_exists($orderStatus, $order->getConfig()->getStateStatuses($orderState))) {\n $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);\n }\n\n $this->updateOrder($order, $orderState, $orderStatus, $isCustomerNotified);\n\n $this->_eventManager->dispatch('sales_order_payment_place_end', ['payment' => $this]);\n\n return $this;\n }", "public function createExpressCheckoutOrder($tid){}", "public function placeorder(Request $request)\n {\n if(!Session::has('customerlogin'))\n {\n return redirect('customer/signup');\n }\n\n $order = new Order;\n $order->customer_id = Session::get('customerid');\n $order->total_quantity = $request->total_quantity;\n $order->total_price = $request->total_price;\n $order->shipping_cost = $request->shipping_cost;\n $order->payment_method = $request->payment_method;\n $order->transaction_no = $request->transaction_no;\n $order->total_amount = $request->total_amount;\n $order->order_billingaddress = Session::get('customer_billing_address');\n $order->order_status = 'pending';\n $order->save();\n\n $lastid = Order::where('order_status', 'pending')->orderBy('id','desc')->limit(1)->get()->toArray();\n $orderproducts = Cart::with(['product'])->get()->toArray();\n foreach ($orderproducts as $orderproduct) {\n $op = new Orderproduct;\n $op->order_id = $lastid[0]['id'];\n $op->product_id = $orderproduct['product_id'];\n $op->quantity = $orderproduct['quantity'];\n $op->price = $orderproduct['product']['sale_price'];\n $op->total_price = $orderproduct['quantity'] * $orderproduct['product']['sale_price'];\n $op->total_amount = $orderproduct['quantity'] * $orderproduct['product']['sale_price'];\n $op->size = 'XL'; //'not dynamic'\n $op->order_pro_status = 'pending';\n $op->save();\n }\n\n $orderdata = Order::where('customer_id',Session::get('customerid'))->orderBy('id','desc')->limit(1)->get()->toArray(); \n //Remove products from cart for specific session and user\n Cart::where('session_key',Session::getId())->delete(); \n Cart::where('customer_id',Session::get('customerid'))->delete(); \n return redirect('order/confirmation/'.$orderdata[0]['id']);\n }", "function CreateNewOrder($dom_response_obj)\n{\n global $insert_id, $customer_id, $cart, $sendto, $billto, $payment, $shipping, $order, $cc_id, $shipping_to_class, $languages_id, $currencies;\n $payment = 'googlecheckout';\n // Init all data\n $dom_data_root = $dom_response_obj->document_element();\n $gift_adjustment = $dom_data_root->get_elements_by_tagname(\"gift-certificate-adjustment\");\n $coupon_adjustment = $dom_data_root->get_elements_by_tagname(\"coupon-adjustment\");\n if ( count($coupon_adjustment)==0 ) $coupon_adjustment = $gift_adjustment;\n // coupons type \"free shipping\" pass as gift-certificate - GC feature - coupons apply before shipping & tax, gift - after\n // 2007.03.26 - coupons have type gift-certificate in any case. Module not allow enter gv used only coupons\n if ( count($coupon_adjustment)>0 ) {\n $code_node = $coupon_adjustment[0]->get_elements_by_tagname(\"code\");\n $coupon_code = $code_node[0]->get_content();\n $coupon_query=tep_db_query(\"select coupon_id from \" . TABLE_COUPONS . \" where coupon_type<>'G' AND coupon_code='\".tep_db_input($coupon_code).\"' and coupon_active='Y'\");\n if ( tep_db_num_rows($coupon_query) ) {\n $coupon_result=tep_db_fetch_array($coupon_query);\n if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');\n $cc_id = $coupon_result['coupon_id'];\n }\n }\n //\n $shipping_data = $dom_data_root->get_elements_by_tagname(\"shipping-name\");\n $xml_shipping = $shipping['title'] = $shipping_data[0]->get_content();\n $shipping_data = $dom_data_root->get_elements_by_tagname(\"shipping-cost\");\n $shipping['cost'] = $shipping_data[0]->get_content();\n $totaltax_data = $dom_data_root->get_elements_by_tagname(\"total-tax\");\n $xml_tax = $totaltax_data[0]->get_content();\n/*\n$shipping['title'] $shipping['cost'] for correct new order creation\n*/\n\n // get customers data and check them\n $ship = array();\n $customer_data = $dom_data_root->get_elements_by_tagname(\"buyer-shipping-address\");\n $shipping_root = $customer_data[0];\n\n $data = $customer_data[0]->get_elements_by_tagname(\"email\");\n $ship['email'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"address1\");\n $ship['address1'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"address2\");\n $ship['address2'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"company-name\");\n $ship['company-name'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"contact-name\");\n $ship['contact-name'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"phone\");\n $ship['phone'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"fax\");\n $ship['fax'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"country-code\");\n $ship['country-code'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"city\");\n $ship['city'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"region\");\n $ship['region'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"postal-code\");\n $ship['postal-code'] = $data[0]->get_content();\n $billing = array();\n unset($customer_data);\n $customer_data = $dom_data_root->get_elements_by_tagname(\"buyer-billing-address\");\n $billing_root = $customer_data[0];\n\n $data = $customer_data[0]->get_elements_by_tagname(\"email\");\n $billing['email'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"address1\");\n $billing['address1'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"address2\");\n $billing['address2'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"company-name\");\n $billing['company-name'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"contact-name\");\n $billing['contact-name'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"phone\");\n $billing['phone'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"fax\");\n $billing['fax'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"country-code\");\n $billing['country-code'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"city\");\n $billing['city'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"region\");\n $billing['region'] = $data[0]->get_content();\n $data = $customer_data[0]->get_elements_by_tagname(\"postal-code\");\n $billing['postal-code'] = $data[0]->get_content();\n // check customer\nif (defined('GOOGLE_FORCE_TO_USA')) {\n $ship['country-code'] = 'GB';\n $billing['country-code'] = 'GB';\n}\n $check = tep_db_query(\"select customers_id from \" . TABLE_CUSTOMERS . \" where customers_email_address='\" . $ship['email'] . \"' or customers_email_address='\" . $billing['email'] . \"'\");\n list($firstname_ship, $lastname_ship) = split(' ', $ship['contact-name'], 2);\n // get country id and state id for shipping\n $country = tep_db_fetch_array(tep_db_query(\"select countries_id from \" . TABLE_COUNTRIES . \" where countries_iso_code_2='\" . $ship['country-code'] . \"'\"));\n $state = tep_db_fetch_array(tep_db_query(\"select zone_id from \" . TABLE_ZONES . \" where zone_country_id='\" . $country['countries_id'] . \"' and zone_code='\" . $ship['region'] . \"'\"));\n $ship['countries_id'] = $country['countries_id'];\n $ship['zone_id'] = (int)$state['zone_id'];\n // get country id and state id for billing\n $country = tep_db_fetch_array(tep_db_query(\"select countries_id from \" . TABLE_COUNTRIES . \" where countries_iso_code_2='\" . $billing['country-code'] . \"'\"));\n $state = tep_db_fetch_array(tep_db_query(\"select zone_id from \" . TABLE_ZONES . \" where zone_country_id='\" . $country['countries_id'] . \"' and zone_code='\" . $billing['region'] . \"'\"));\n $billing['countries_id'] = $country['countries_id'];\n $billing['zone_id'] = (int)$state['zone_id'];\n\n list($firstname_bill, $lastname_bill) = split(' ', $billing['contact-name'], 2);\n if(tep_db_num_rows($check) > 0) {\n $customer_id = tep_db_fetch_array($check);\n $customer_id = $customer_id['customers_id'];\n // check addresses and init $billto and $sendto\n $check_sendto = tep_db_query(\"select address_book_id from \" . TABLE_ADDRESS_BOOK . \" where customers_id='\" . (int)$customer_id . \"' and entry_company='\" . tep_db_input($ship['company-name']) . \"' and entry_firstname='\" . tep_db_input($firstname_ship) . \"' and entry_lastname='\" . tep_db_input($lastname_ship) . \"' and entry_street_address='\" . tep_db_input($ship['address1']) . ' ' . tep_db_input($ship['address2']) . \"' and entry_postcode='\" . tep_db_input($ship['postal-code']) . \"' and entry_city='\" . tep_db_input($ship['city']) . \"' and entry_state='\" . tep_db_input($ship['region']) . \"' and entry_zone_id='\" . intval($ship['zone_id']) . \"' and entry_country_id='\" . intval($ship['countries_id']) . \"'\");\n if(tep_db_num_rows($check_sendto) > 0) {\n $sendto = tep_db_fetch_array($check_sendto);\n $sendto = $sendto['address_book_id'];\n } else {\n // insert new shipping address\n $sql_data_array = array('customers_id' => (int)$customer_id,\n 'entry_firstname' => $firstname_ship,\n 'entry_lastname' => $lastname_ship,\n 'entry_street_address' => $ship['address1'] . ' ' . $ship['address2'],\n 'entry_city' => $ship['city'],\n 'entry_postcode' => $ship['postal-code'],\n 'entry_company' => $ship['company-name'],\n 'entry_state' => $ship['region'],\n 'entry_zone_id' => (int)$ship['zone_id'],\n 'entry_country_id' => (int)$ship['countries_id']);\n tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);\n $sendto = tep_db_insert_id();\n }\n $check_billto = tep_db_query(\"select address_book_id from \" . TABLE_ADDRESS_BOOK . \" where customers_id='\" . (int)$customer_id . \"' and entry_company='\" . tep_db_input($billing['company-name']) . \"' and entry_firstname='\" . tep_db_input($firstname_bill) . \"' and entry_lastname='\" . tep_db_input($lastname_bill) . \"' and entry_street_address='\" . tep_db_input($billing['address1']) . ' ' . tep_db_input($billing['address2']) . \"' and entry_postcode='\" . tep_db_input($billing['postal-code']) . \"' and entry_city='\" . tep_db_input($billing['city']) . \"' and entry_state='\" . tep_db_input($billing['region']) . \"' and entry_zone_id='\" . (int)$billing['zone_id'] . \"' and entry_country_id='\" . (int)$billing['countries_id'] . \"'\");\n if(tep_db_num_rows($check_billto) > 0) {\n $billto = tep_db_fetch_array($check_billto);\n $billto = $billto['address_book_id'];\n } else {\n $sql_data_array = array('customers_id' => (int)$customer_id,\n 'entry_firstname' => $firstname_bill,\n 'entry_lastname' => $lastname_bill,\n 'entry_street_address' => $billing['address1'] . ' ' . $billing['address2'],\n 'entry_city' => $billing['city'],\n 'entry_postcode' => $billing['postal-code'],\n 'entry_company' => $billing['company-name'],\n 'entry_state' => $billing['region'],\n 'entry_zone_id' => (int)$billing['zone_id'],\n 'entry_country_id' => (int)$billing['countries_id']);\n tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);\n $billto = tep_db_insert_id();\n }\n } else { // create new customer\n $sql_data_array = array('customers_firstname' => $firstname_ship,\n 'customers_lastname' => $lastname_ship,\n 'customers_email_address' => $ship['email'],\n 'customers_telephone' => $ship['phone'],\n 'customers_fax' => $ship['fax']);\n tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);\n $customer_id = tep_db_insert_id();\n // insert new shipping address\n $sql_data_array = array('customers_id' => $customer_id,\n 'entry_firstname' => $firstname_ship,\n 'entry_lastname' => $lastname_ship,\n 'entry_street_address' => $ship['address1'] . ' ' . $ship['address2'],\n 'entry_city' => $ship['city'],\n 'entry_postcode' => $ship['postal-code'],\n 'entry_company' => $ship['company-name'],\n 'entry_state' => $ship['region'],\n 'entry_zone_id' => $ship['zone_id'],\n 'entry_country_id' => $ship['countries_id']);\n tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);\n $address_id = tep_db_insert_id();\n $sendto = $address_id;\n tep_db_query(\"update \" . TABLE_CUSTOMERS . \" set customers_default_address_id = '\" . $address_id . \"' where customers_id = '\" . $customer_id . \"'\");\n tep_db_query(\"insert into \" . TABLE_CUSTOMERS_INFO . \" (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('\" . (int)$customer_id . \"', '0', now())\");\n // insert new billing address\n $sql_data_array = array('customers_id' => $customer_id,\n 'entry_firstname' => $firstname_bill,\n 'entry_lastname' => $lastname_bill,\n 'entry_street_address' => $billing['address1'] . ' ' . $billing['address2'],\n 'entry_city' => $billing['city'],\n 'entry_postcode' => $billing['postal-code'],\n 'entry_company' => $billing['company-name'],\n 'entry_state' => $billing['region'],\n 'entry_zone_id' => $billing['zone_id'],\n 'entry_country_id' => $billing['countries_id']);\n tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);\n $address_id = tep_db_insert_id();\n $billto = $address_id;\n }\n/* start search engines statistics */\n $search_engines_id = 0;\n $search_words_id = 0;\n $affiliate_ref = 0;\n $search_engines_id_dom = $dom_data_root->get_elements_by_tagname(\"search_engines_id\");\n if ( is_array($search_engines_id_dom) && isset($search_engines_id_dom[0]) && is_object($search_engines_id_dom[0]) ) $search_engines_id = intval($search_engines_id_dom[0]->get_content());\n \n $search_words_id_dom = $dom_data_root->get_elements_by_tagname(\"search_words_id\");\n if ( is_array($search_words_id_dom) && isset($search_words_id_dom[0]) && is_object($search_words_id_dom[0]) ) $search_words_id = intval($search_words_id_dom[0]->get_content());\n\n $affiliate_ref_dom = $dom_data_root->get_elements_by_tagname(\"affiliate_ref\");\n if ( is_array($affiliate_ref_dom) && isset($affiliate_ref_dom[0]) && is_object($affiliate_ref_dom[0]) ) $affiliate_ref = intval($affiliate_ref_dom[0]->get_content());\n\n/* end search engines statistics*/\n\n // create order\n $google_order_number = $dom_data_root->get_elements_by_tagname(\"google-order-number\");\n $number = $google_order_number[0]->get_content();\n // recreate shopping cart\n $sess_cart = $dom_data_root->get_elements_by_tagname(\"sess_cart\");\n $sess_cart = $sess_cart[0]->get_content();\n $saved_cart = unserialize( base64_decode($sess_cart) );\n if ( $saved_cart!==false ) {\n $cart = new shoppingCart;\n $cart = $saved_cart;\n }else{\n $items_list = $dom_data_root->get_elements_by_tagname(\"osc-item\");\n $currencies = new currencies();\n $cart = new shoppingCart;\n $post_process = array();\n foreach($items_list as $item)\n {\n $uprid = $item->get_attribute('item_id');\n $qty = $item->get_content();\n if ( preg_match('/^ga/',$uprid) ) {\n $post_process[] = $uprid;\n }elseif(preg_match('/^(\\d+)\\{used_(\\d+)\\}/',$uprid,$usedm)) {\n $u_pid = $usedm[1];\n $u_uid = $usedm[2];\n $cart->add_used($u_uid, $qty);\n }else{\n $attr = get_attributes($uprid);\n $cart->add_cart($uprid, $qty, $attr);\n }\n }\n foreach($post_process as $give_away) {\n $give = explode('|',$give_away);\n if ( count($give)==3 ) {\n $attr = get_attributes($give[1]);\n $cart->add_giveaway( $give[2], (int)$give[1], $attr );\n }\n }\n }\n $cart->calculate();\n\n//\nglobal $country_code, $state_code;\n\n$country_code = $ship['country-code'];\n$state_code = $ship['region'];\n$shipping_ = $shipping;\nunset($shipping);\nInitOscShippings();\nif (isset($shipping_to_class[$xml_shipping])){\n $shipping = $shipping_to_class[$xml_shipping];\n $GLOBALS['shipping']['id'] = $shipping['id'];\n}else{\n $shipping = $shipping_;\n}\n//\n\n require_once(DIR_WS_CLASSES . 'order.php');\n $order = new order;\n require_once(DIR_WS_CLASSES . 'order_total.php');\n\n $order_total_modules = new order_total;\n $order_totals = $order_total_modules->process();\n// fake tax or warmup shipping from shipping name & recalc all corect\n//mydump(var_export($order,true));\n//mydump(var_export($order_totals,true));\n/*\nforeach( $order_totals as $idx=>$ot_module ) {\n if ( $ot_module['code']=='ot_tax' ) {\n $order_totals[$idx]['value'] = $xml_tax;\n $order_totals[$idx]['text'] = $currencies->format($xml_tax, true, $order->info['currency'], $order->info['currency_value']);\n break;\n }\n}*/\n//\\fake tax\n //print_r($order);\n //print_r($order_totals);\n if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS')) $order->info['order_status'] = MODULE_PAYMENT_GOOGLECHECKOUT_STATUS;\n\n $sql_data_array = array('customers_id' => $customer_id,\n 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],\n //{{ BEGIN FISTNAME\n 'customers_firstname' => $order->customer['firstname'],\n 'customers_lastname' => $order->customer['lastname'],\n //}} END FIRSTNAME\n 'customers_company' => $order->customer['company'],\n 'customers_street_address' => $order->customer['street_address'],\n 'customers_suburb' => $order->customer['suburb'],\n 'customers_city' => $order->customer['city'],\n 'customers_postcode' => $order->customer['postcode'],\n 'customers_state' => $order->customer['state'],\n 'customers_country' => $order->customer['country']['title'],\n 'customers_telephone' => $order->customer['telephone'],\n 'customers_email_address' => $order->customer['email_address'],\n 'customers_address_format_id' => $order->customer['format_id'],\n 'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],\n //{{ BEGIN FISTNAME\n 'delivery_firstname' => $order->delivery['firstname'],\n 'delivery_lastname' => $order->delivery['lastname'],\n //}} END FIRSTNAME\n 'delivery_company' => $order->delivery['company'],\n 'delivery_street_address' => $order->delivery['street_address'],\n 'delivery_suburb' => $order->delivery['suburb'],\n 'delivery_city' => $order->delivery['city'],\n 'delivery_postcode' => $order->delivery['postcode'],\n 'delivery_state' => $order->delivery['state'],\n 'delivery_country' => $order->delivery['country']['title'],\n 'delivery_address_format_id' => $order->delivery['format_id'],\n 'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'],\n //{{ BEGIN FISTNAME\n 'billing_firstname' => $order->billing['firstname'],\n 'billing_lastname' => $order->billing['lastname'],\n //}} END FIRSTNAME\n 'billing_company' => $order->billing['company'],\n 'billing_street_address' => $order->billing['street_address'],\n 'billing_suburb' => $order->billing['suburb'],\n 'billing_city' => $order->billing['city'],\n 'billing_postcode' => $order->billing['postcode'],\n 'billing_state' => $order->billing['state'],\n 'billing_country' => $order->billing['country']['title'],\n 'billing_address_format_id' => $order->billing['format_id'],\n 'payment_method' => $order->info['payment_method'],\n 'payment_class' => 'googlecheckout',\n 'payment_info' => $GLOBALS['payment_info'], //???\n 'google_orders_id' => $number,\n 'shipping_method' => $order->info['shipping_method'],\n 'cc_type' => $order->info['cc_type'],\n 'cc_owner' => $order->info['cc_owner'],\n 'cc_number' => $order->info['cc_number'],\n 'cc_expires' => $order->info['cc_expires'],\n 'keep_date' => 'now()',\n 'language_id' => (int)$languages_id,\n 'payment_class' => $order->info['payment_class'],\n 'shipping_class' => $order->info['shipping_class'],\n 'date_purchased' => 'now()',\n 'last_modified' => 'now()',\n/* start search engines statistics */\n 'search_engines_id' => $search_engines_id,\n 'search_words_id' => $search_words_id,\n/* end search engines statistics*/\n\n /// 'affiliate_id' => (int)$affiliate_ref,\n // 'comments' => 'AFF_DOM' . var_export($affiliate_ref_dom[0]->get_content(), true),\n\n // 'how_did_you_find' => $order->info['how_did_you_find'],\n //'how_did_you_find_text' => $order->info['how_did_you_find_text'],\n \n 'orders_status' => $order->info['order_status'],\n 'currency' => $order->info['currency'],\n 'currency_value' => $order->info['currency_value']);\n tep_db_perform(TABLE_ORDERS, $sql_data_array);\n $insert_id = tep_db_insert_id();\n for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {\n $sql_data_array = array('orders_id' => $insert_id,\n 'title' => $order_totals[$i]['title'],\n 'text' => $order_totals[$i]['text'],\n 'value' => $order_totals[$i]['value'],\n 'class' => $order_totals[$i]['code'],\n 'sort_order' => $order_totals[$i]['sort_order']);\n tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);\n }\n $sql_data_array = array('orders_id' => $insert_id,\n 'orders_status_id' => $order->info['order_status'],\n 'date_added' => 'now()',\n 'customer_notified' => '0',\n 'comments' => 'Order created by Google Checkout');\n tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\n for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {\n /*\n if (STOCK_LIMITED == 'true') {\n if (DOWNLOAD_ENABLED == 'true') {\n $stock_query_raw = \"SELECT products_quantity, products_attributes_filename\n FROM \" . TABLE_PRODUCTS . \" p\n LEFT JOIN \" . TABLE_PRODUCTS_ATTRIBUTES . \" pa\n ON p.products_id=pa.products_id\n WHERE p.products_id = '\" . tep_get_prid($order->products[$i]['id']) . \"'\";\n// Will work with only one option for downloadable products\n// otherwise, we have to build the query dynamically with a loop\n $products_attributes = $order->products[$i]['attributes'];\n if (is_array($products_attributes)) {\n $stock_query_raw .= \" AND pa.options_id = '\" . $products_attributes[0]['option_id'] . \"' AND pa.options_values_id = '\" . $products_attributes[0]['value_id'] . \"'\";\n }\n $stock_query = tep_db_query($stock_query_raw);\n } else {\n $stock_query = tep_db_query(\"select products_quantity from \" . TABLE_PRODUCTS . \" where products_id = '\" . tep_get_prid($order->products[$i]['id']) . \"'\");\n }\n if (tep_db_num_rows($stock_query) > 0) {\n $stock_values = tep_db_fetch_array($stock_query);\n // do not decrement quantities if products_attributes_filename exists\n if ((DOWNLOAD_ENABLED != 'true') || ((!$stock_values['products_attributes_filename']) && $order->products[$i]['products_file'])) {\n $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];\n } else {\n $stock_left = $stock_values['products_quantity'];\n }\n tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_quantity = '\" . $stock_left . \"' where products_id = '\" . tep_get_prid($order->products[$i]['id']) . \"'\");\n if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {\n tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '0' where products_id = '\" . tep_get_prid($order->products[$i]['id']) . \"'\");\n }\n }\n */\n // Update products_ordered (for bestsellers list)\n tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_ordered = products_ordered + \" . sprintf('%d', $order->products[$i]['qty']) . \" where products_id = '\" . tep_get_prid($order->products[$i]['id']) . \"'\");\n $sql_data_array = array('orders_id' => $insert_id,\n 'products_id' => tep_get_prid($order->products[$i]['id']),\n 'products_model' => $order->products[$i]['model'],\n 'products_name' => $order->products[$i]['name'],\n 'products_price' => $order->products[$i]['price'],\n 'final_price' => $order->products[$i]['final_price'],\n 'products_purchase_price' => tep_get_products_purchase_price(normalize_id($order->products[$i]['id']), $order->products[$i]['final_price']),\n 'products_tax' => $order->products[$i]['tax'],\n 'used' => $order->products[$i]['used'],\n\n\n 'is_give_away'=>((isset($order->products[$i]['is_give_away']) && $order->products[$i]['is_give_away']==1)?'1':'0'),\n // addon - gives as products 'gives' => (is_array($order->products[$i]['gives'])?serialize($order->products[$i]['gives']):''),\n 'products_quantity' => $order->products[$i]['qty'],\n 'products_status' => ((tep_get_products_stock($order->products[$i]['id']) - $order->products[$i]['qty'])>-1?1:0),\n 'uprid' => normalize_id($order->products[$i]['id']));\n tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);\n $order_products_id = tep_db_insert_id();\n $order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM\n //------insert customer choosen option to order--------\n $attributes_exist = '0';\n $products_ordered_attributes = '';\n\n if ((DOWNLOAD_ENABLED == 'true') && tep_not_null($order->products[$i]['products_file'])) {\n $sql_data_array = array('orders_id' => $insert_id,\n 'orders_products_id' => $order_products_id,\n 'orders_products_name' => $order->products[$i]['name'],\n 'orders_products_filename' => $order->products[$i]['products_file'],\n 'download_maxdays' => DOWNLOAD_MAX_DAYS,\n 'download_count' => DOWNLOAD_MAX_COUNT);\n tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);\n }\n\n\n //// GiveAway multiplay by senia 2007-02-23 <[email protected]> ////\n /*\n $ordered_gives = '';\n\n if (is_array($order->products[$i]['gives']) && sizeof($order->products[$i]['gives'])>0) {\n $ordered_gives .= \"\\n\\t\" . TEXT_GIVEAWAY . ':';\n foreach($order->products[$i]['gives'] as $gdata) {\n $ordered_gives .= \"\\n\\t\" . ' - ' . $gdata['fullname'];\n update_stock($gdata['uprid'], 0, $order->products[$i]['qty']);\n }\n }\n */\n\n $ordered_gives = '';\n\n if (is_array($order->products[$i]['gives']) && sizeof($order->products[$i]['gives'])>0) {\n $ordered_gives .= \"\\n\\t\" . TEXT_GIVEAWAY . ':';\n $dec_price = 0;\n foreach($order->products[$i]['gives'] as $gdata) {\n $ordered_gives .= \"\\n\\t\" . ' - ' . $gdata['fullname'] . ' (+' . $currencies->display_price($gdata['price'], $gdata['tax']) . ')';\n $dec_price += $gdata['price'];\n $sql_data_array = array('orders_id' => $insert_id,\n 'products_id' => tep_get_prid($gdata['id']),\n 'parent_giv_id' => normalize_id($order->products[$i]['id']),\n 'products_model' => $gdata['model'],\n 'products_name' => $gdata['name'] . ' (Giveaway '.$order->products[$i]['model'].')',\n 'products_price' => $gdata['price'],\n 'final_price' => $gdata['price'],\n 'products_tax' => $gdata['tax'],\n\n \n\n 'products_quantity' => $order->products[$i]['qty'],\n 'products_status' => ((tep_get_products_stock($gdata['uprid']) - $order->products[$i]['qty'])>-1?1:0),\n 'uprid' => normalize_id($gdata['uprid']));\n tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);\n $order_gives_id = tep_db_insert_id();\n\n if (is_array($gdata['attributes']) && sizeof($gdata['attributes'])>0) {\n foreach ($gdata['attributes'] as $gdata_attr) {\n\n $sql_data_array = array('orders_id' => $insert_id,\n 'orders_products_id' => $order_gives_id,\n 'products_options_id' => $gdata_attr['opt_id'],\n 'products_options' => $gdata_attr['opt_name'],\n 'products_options_values_id' => $gdata_attr['opt_val_id'],\n 'products_options_values' => $gdata_attr['tep_values_name'],\n 'options_values_price' => '0',\n 'price_prefix' => '+');\n tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);\n\n }\n }\n\n update_stock($gdata['uprid'], 0, $order->products[$i]['qty']);\n }\n\n tep_db_query(\"update \".TABLE_ORDERS_PRODUCTS.\" set products_price=(products_price-'\".floatval($dec_price).\"'), final_price=(final_price-'\".floatval($dec_price).\"') where orders_products_id='\".intval($order_products_id).\"'\");\n }\n //// GiveAway multiplay by senia 2007-02-23 <[email protected]> off ////\n\n\n\n\n if (isset($order->products[$i]['attributes'])) {\n $attributes_exist = '1';\n for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {\n if (DOWNLOAD_ENABLED == 'true') {\n $attributes_query = \"select pa.products_attributes_id, popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_maxdays, pa.products_attributes_maxcount , pa.products_attributes_filename\n from \" . TABLE_PRODUCTS_OPTIONS . \" popt, \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" poval, \" . TABLE_PRODUCTS_ATTRIBUTES . \" pa\n where pa.products_id = '\" . $order->products[$i]['id'] . \"'\n and pa.options_id = '\" . $order->products[$i]['attributes'][$j]['option_id'] . \"'\n and pa.options_id = popt.products_options_id\n and pa.options_values_id = '\" . $order->products[$i]['attributes'][$j]['value_id'] . \"'\n and pa.options_values_id = poval.products_options_values_id\n and popt.language_id = '\" . $languages_id . \"'\n and poval.language_id = '\" . $languages_id . \"'\";\n $attributes = tep_db_query($attributes_query);\n } else {\n $attributes = tep_db_query(\"select pa.products_attributes_id, popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from \" . TABLE_PRODUCTS_OPTIONS . \" popt, \" . TABLE_PRODUCTS_OPTIONS_VALUES . \" poval, \" . TABLE_PRODUCTS_ATTRIBUTES . \" pa where pa.products_id = '\" . $order->products[$i]['id'] . \"' and pa.options_id = '\" . $order->products[$i]['attributes'][$j]['option_id'] . \"' and pa.options_id = popt.products_options_id and pa.options_values_id = '\" . $order->products[$i]['attributes'][$j]['value_id'] . \"' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '\" . $languages_id . \"' and poval.language_id = '\" . $languages_id . \"'\");\n }\n\n $attributes_values = tep_db_fetch_array($attributes);\n $attributes_values['options_values_price'] = tep_get_options_values_price($attributes_values['products_attributes_id']);\n\n $sql_data_array = array('orders_id' => $insert_id,\n 'orders_products_id' => $order_products_id,\n 'products_options' => $attributes_values['products_options_name'],\n 'products_options_values' => $attributes_values['products_options_values_name'],\n 'options_values_price' => $attributes_values['options_values_price'],\n 'price_prefix' => $attributes_values['price_prefix']);\n tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);\n\n if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {\n $sql_data_array = array('orders_id' => $insert_id,\n 'orders_products_id' => $order_products_id,\n 'orders_products_name' => $order->products[$i]['name'],\n 'orders_products_filename' => $attributes_values['products_attributes_filename'],\n 'download_maxdays' => $attributes_values['products_attributes_maxdays'],\n 'download_count' => $attributes_values['products_attributes_maxcount']);\n tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);\n }\n $products_ordered_attributes .= \"\\n\\t\" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];\n }\n\n\n\n }\n\n // update inventory\nif (PRODUCTS_INVENTORY == 'True'){\n update_stock($order->products[$i]['id'], 0, $order->products[$i]['qty']);\n}\n//\n\n }\n\n //$insert_id, $customer_id, $REMOTE_ADDR, $cc_id;\n $order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM\n\n \n tep_calculate_order_revenue($insert_id); \n \n}", "public function onPlaceOrder()\n {\n $gateway = Checkout::get($this->owner)->getSelectedPaymentMethod();\n if (OrderProcessor::config()->bank_deposit_send_confirmation && GatewayInfo::isManual($gateway) && $this->owner->Status == \"Unpaid\") {\n OrderProcessor::config()->send_confirmation = true;\n } else {\n OrderProcessor::config()->send_confirmation = false;\n }\n }", "public function place_order(){\n $customer_id = $_REQUEST['customer_id'];\n $razorpay_payment_id = $_REQUEST['razorpay_payment_id'];\n $online_payment_amt = $_REQUEST['online_payment_amt'];\n\n $current_date = date('d-m-Y');\n $current_time = date('h:i:s A');\n\n /********************* Save Order Data **************/\n $save_order_data['customer_id'] = $customer_id;\n $save_order_data['order_cust_fname'] = $_REQUEST['customer_fname'];\n $save_order_data['order_cust_lname'] = $_REQUEST['customer_lname'];\n\n // $save_order_data['order_cust_addr'] = $_REQUEST['customer_address'];\n // $save_order_data['city_id'] = $_REQUEST['city_id'];\n // $save_order_data['order_cust_pin'] = $_REQUEST['customer_pin'];\n\n $save_order_data['order_cust_mob'] = $_REQUEST['customer_mobile'];\n $save_order_data['order_cust_email'] = $_REQUEST['customer_email'];\n\n // $save_order_data['order_amount'] = $_REQUEST['order_amount']; //$cart_total-$gst_amt; // GST is Inclusive...\n // $save_order_data['order_gst'] = $_REQUEST['total_gst_amount']; // Calculate Inclusive GST...\n\n $save_order_data['order_shipping_amt'] = $_REQUEST['order_shipping_amt']; // Shipping Amount is 100Rs if cart_total < 799Rs.\n $save_order_data['order_total_amount'] = $_REQUEST['order_total_amount']; // $cart_total + $shipping_amt;\n\n $save_order_data['order_date'] = date('d-m-Y');\n $save_order_data['payment_status'] = $_REQUEST['payment_status'];\n $save_order_data['order_added_date'] = date('d-m-Y h:i:s A');\n $save_order_data['order_addedby'] = 0;\n $save_order_data['order_no'] = $this->User_Model->get_count_no('order_no', 'order_tbl');\n\n $save_order_data['order_timeslot_date'] = $_REQUEST['order_timeslot_date'];\n $save_order_data['order_timeslot_time'] = $_REQUEST['order_timeslot_time'];\n $address_id = $_REQUEST['address_id'];\n $address_data = $country_info = $this->User_Model->get_info_arr_fields('*','address_id', $address_id, 'delivery_address');\n $save_order_data['order_cust_addr'] = $address_data[0]['address'];\n $save_order_data['country_id'] = $address_data[0]['country_id'];\n $save_order_data['state_id'] = $address_data[0]['state_id'];\n $save_order_data['city_id'] = $address_data[0]['city_id'];\n $save_order_data['order_cust_pin'] = $address_data[0]['pincode'];\n\n $order_id = $this->User_Model->save_data('order_tbl', $save_order_data);\n\n if($order_id){\n // Add/Save Reward Points if Shop >= 999...\n $response[\"status\"] = TRUE;\n $response[\"msg\"] = 'Order Saved Successfully';\n\n $cart_total = $_REQUEST['order_total_amount'] - $_REQUEST['order_shipping_amt'];\n if($cart_total >= 999){\n $save_point_add['customer_id'] = $customer_id;\n $save_point_add['point_add_type'] = 3;\n $save_point_add['point_add_ref_id'] = $order_id;\n $save_point_add['point_add_cnt'] = 5;\n $save_point_add['point_add_date'] = $current_date;\n $save_point_add['point_add_time'] = $current_time;\n $this->User_Model->save_data('point_add', $save_point_add);\n $response[\"reward_point_msg\"] = '5 Reward Points Saved';\n }\n\n /****************** Save Order Product ****************/\n\n\n if($_POST['order_product']){\n $total_gst_amount = \"0\";\n $i = 0;\n foreach($_POST['order_product'] as $order_product_data){\n $product_id = $order_product_data['product_id'];\n $pro_attri_id = $order_product_data['pro_attri_id'];\n $order_pro_qty = $order_product_data['order_pro_qty'];\n $order_pro_weight = $order_product_data['order_pro_weight'];\n $order_pro_qty = $order_product_data['order_pro_qty'];\n $order_pro_price = $order_product_data['order_pro_price'];\n\n $product_details = $this->User_Model->get_info_arr_fields('product_id, product_name, tax_rate, min_ord_limit, max_ord_limit, product_unit, product_details, product_img','product_id', $product_id, 'product');\n $product_attribute_details = $this->User_Model->get_info_arr_fields('pro_attri_id, product_id, pro_attri_weight, pro_attri_mrp, pro_attri_price, pro_attri_dis_per, pro_attri_dis_amt', 'pro_attri_id', $pro_attri_id, 'product_attribute');\n\n $pro_attri_dis_amt = $product_attribute_details[0]['pro_attri_dis_amt'];\n $order_pro_gst_per = $product_details[0]['tax_rate'];\n\n $order_pro_dis_amt = $order_pro_gst_per * $order_pro_qty;\n $order_pro_amt = $order_pro_price * $order_pro_qty;\n $order_pro_gst_amt = $order_pro_amt - ($order_pro_amt * (100/(100 + $order_pro_gst_per)));\n $order_pro_basic_amt = $order_pro_amt - $order_pro_gst_amt;\n\n $order_product_data['order_pro_dis_amt'] = $order_pro_dis_amt;\n $order_product_data['order_pro_gst_per'] = $order_pro_gst_per;\n $order_product_data['order_pro_gst_amt'] = $order_pro_gst_amt;\n $order_product_data['order_pro_basic_amt'] = $order_pro_basic_amt;\n $order_product_data['order_pro_amt'] = $order_pro_amt;\n $order_product_data['order_id'] = $order_id;\n $order_product_data['order_pro_date'] = date('d-m-Y h:i:s A');\n $order_product_data['order_pro_tot_weight'] = $order_pro_weight * $order_pro_qty;\n $order_pro_id = $this->User_Model->save_data('order_pro', $order_product_data);\n\n $total_gst_amount = $total_gst_amount + $order_pro_gst_amt;\n $i++;\n if($order_pro_id){\n $response[\"order_product_msg_\".$i] = 'Order Product '.$i.' Saved Successfully';\n } else{\n $response[\"order_product_msg_\".$i] = 'Order Product '.$i.' Not Saved';\n }\n }\n $cart_total = $_REQUEST['order_total_amount'] - $_REQUEST['order_shipping_amt'];\n $order_amount = $cart_total - $total_gst_amount;\n // Update total_gst_amount & order_amount in order_tbl...\n $update_order_data['order_gst'] = $total_gst_amount;\n $update_order_data['order_amount'] = $order_amount;\n $this->User_Model->update_info('order_id', $order_id, 'order_tbl', $update_order_data);\n } else{\n $response[\"order_product_msg\"] = 'Order Product Not Saved';\n }\n\n /******** Save Online Payment Data *********/\n\n if($_REQUEST['coupon_used_dis_amt'] > 0 ){ $coupon_used_dis_amt = $_REQUEST['coupon_used_dis_amt']; }\n else{ $coupon_used_dis_amt = 0; }\n\n if($_REQUEST['wallet_used_points'] > 0 ){ $wallet_used_points = $_REQUEST['wallet_used_points']; }\n else{ $wallet_used_points = 0; }\n\n\n if($razorpay_payment_id && $_REQUEST['payment_status'] == 1){\n $save_online_pay['customer_id'] = $customer_id;\n $save_online_pay['order_id'] = $order_id;\n $save_online_pay['razorpay_payment_id'] = $razorpay_payment_id;\n // $save_online_pay['razorpay_order_id'] = $razorpay_order_id;\n $save_online_pay['online_payment_amt'] = $online_payment_amt;\n $save_online_pay['cart_amount'] = $_REQUEST['order_total_amount'] - $_REQUEST['order_shipping_amt'];\n $save_online_pay['shipping_amt'] = $_REQUEST['order_shipping_amt'];\n $save_online_pay['total_pay_amt'] = $_REQUEST['order_total_amount'];\n $save_online_pay['coupon_use_amt'] = $coupon_used_dis_amt;\n $save_online_pay['point_use_amt'] = $wallet_used_points;\n $save_online_pay['online_payment_date'] = $current_date;\n $save_online_pay['online_payment_time'] = $current_time;\n $online_payment_id = $this->User_Model->save_data('order_online_payment', $save_online_pay);\n if($online_payment_id){\n $response[\"online_payment_msg\"] = 'Payment Data Saved Successfully';\n } else{\n $response[\"online_payment_msg\"] = 'Payment Data Not Saved';\n }\n $update_payment_type['payment_type'] = \"1\"; // Online Payment.\n $update_payment_type['payment_status'] = \"1\"; // Paid.\n } else{\n $update_payment_type['payment_type'] = \"2\"; // Cash On Delivery.\n $update_payment_type['payment_status'] = \"0\"; // Cash On Delivery.\n $response[\"online_payment_msg\"] = 'Payment on Delivery';\n }\n $this->User_Model->update_info('order_id', $order_id, 'order_tbl', $update_payment_type); // Update Status.\n\n\n\n /***************** Save Used Coupon ************/\n $save_coupon_data['order_id'] = $order_id;\n $save_coupon_data['customer_id'] = $customer_id;\n $save_coupon_data['coupon_id'] = $_REQUEST['coupon_id'];\n $save_coupon_data['coupon_code'] = $_REQUEST['coupon_code'];\n $save_coupon_data['coupon_used_dis_amt'] = $_REQUEST['coupon_used_dis_amt'];\n $save_coupon_data['coupon_used_date'] = $current_date;\n $save_coupon_data['coupon_used_time'] = $current_time;\n if($_REQUEST['coupon_id'] && $_REQUEST['coupon_code'] && $_REQUEST['coupon_used_dis_amt']){\n $coupon_used_id = $this->User_Model->save_data('coupon_used', $save_coupon_data);\n if($coupon_used_id){\n $response[\"coupon_code_msg\"] = 'Coupon Applied Successfully';\n } else{\n $response[\"coupon_code_msg\"] = 'Coupon Not Saved';\n }\n } else{\n $response[\"coupon_code_msg\"] = 'Coupon Not Used';\n }\n\n /******************** Save Redeem Point **************/\n $save_redeem_point_data['customer_id'] = $customer_id;\n $save_redeem_point_data['order_id'] = $order_id;\n $save_redeem_point_data['point_use_cnt'] = $_REQUEST['wallet_used_points'];\n $save_redeem_point_data['point_use_date'] = $current_date;\n $save_redeem_point_data['point_use_time'] = $current_time;\n if($_REQUEST['wallet_used_points']){\n $point_use_id = $this->User_Model->save_data('point_use', $save_redeem_point_data);\n if($point_use_id){\n $response[\"redeem_point_msg\"] = 'Points Used Successfully';\n } else{\n $response[\"redeem_point_msg\"] = 'Points Not Saved';\n }\n } else{\n $response[\"redeem_point_msg\"] = 'Redeem Point Not Used';\n }\n } else{\n $response[\"status\"] = FALSE;\n $response[\"msg\"] = 'Order Not Saved';\n }\n\n $json_response = json_encode($response,JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);\n echo str_replace('\\\\/','/',$json_response);\n }", "function CallOrder()\n {\n global $USER, $CONF, $UNI;\n\n $this->amount = str_replace(\".\",\"\",HTTP::_GP('amount',0));\n $this->amountbis = HTTP::_GP('amount',0);\n\t\t\t\t\n\t\t\t\tif($this->amount < 10000){\n\t\t\t\t$this->printMessage('You have to buy minimum 10.000 AM!', true, array('game.php?page=donate', 3)); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->amount >= 10000 && $this->amount < 20000)\t\t$this->amount *= 1.05;\n\t\t\t\telseif($this->amount >= 20000 && $this->amount < 50000) $this->amount *= 1.10;\n\t\t\t\telseif($this->amount >= 50000 && $this->amount < 100000) $this->amount *= 1.20;\n\t\t\t\telseif($this->amount >= 100000 && $this->amount < 150000) $this->amount *= 1.30;\n\t\t\t\telseif($this->amount >= 150000 && $this->amount < 200000) $this->amount *= 1.40;\n\t\t\t\telseif($this->amount >= 200000) $this->amount *= 1.50;\n\t\t\t\t\n\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->amount = round($this->amount + ($this->amount / 100 * 0));\n\t\t\t\t$this->amount = $this->amount + ($this->amount / 100 * 0);\n\t\t\t\t$this->cost = round($this->amountbis * 0.00011071);\n \n\n \n\t\t\t\t\n\t\t\t\t$this_p = new paypal_class;\n\t\t\t\t\n \n $this_p->add_field('business', $this::MAIL);\n \n\t\t\t\t\n\t\t\t $this_p->add_field('return', 'http://'.$_SERVER['HTTP_HOST'].'/game.php?page=overview');\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this_p->add_field('cancel_return', 'http://'.$_SERVER['HTTP_HOST'].'/ipns.php');\n $this_p->add_field('notify_url', 'http://'.$_SERVER['HTTP_HOST'].'/ipns.php');\n\t\t\t\t\n $this_p->add_field('item_name', $this->amount.' AM-User('.$USER['username'].').');\n $this_p->add_field('item_number', $this->amount.'_AM');\n $this_p->add_field('amount', $this->cost);\n //$this_p->add_field('action', $action); ?\n $this_p->add_field('currency_code', 'EUR');\n $this_p->add_field('custom', $USER['id']);\n $this_p->add_field('rm', '2');\n //$this_p->dump_fields(); \n\t\t\t\t foreach ($this_p->fields as $name => $value) {\n\t\t\t\t\t$field[] = array('text'=>'<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\">');\n\t\t\t\t}\n\t\t\t $this->tplObj->assign_vars(array(\n\t\t\t\t'fields' => $field,\n\t\t\t ));\n\t\t\t$this->display('paypal_class.tpl');\n }", "public function saveOrder()\n {\n $this->validate();\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n\n /**\n * @var TM_FireCheckout_Model_Service_Quote\n */\n $service = Mage::getModel('firecheckout/service_quote', $this->getQuote());\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($this->getQuote()->getId())\n ->setLastSuccessQuoteId($this->getQuote()->getId())\n ->clearHelperData();\n\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent('checkout_type_onepage_save_order_after',\n array('order'=>$order, 'quote'=>$this->getQuote()));\n\n /**\n * a flag to set that there will be redirect to third party after confirmation\n * eg: paypal standard ipn\n */\n $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();\n /**\n * we only want to send to customer about new order when there is no redirect to third party\n */\n $canSendNewEmailFlag = true;\n if (version_compare(Mage::helper('firecheckout')->getMagentoVersion(), '1.5.0.0', '>=')) {\n $canSendNewEmailFlag = $order->getCanSendNewEmailFlag();\n }\n if (!$redirectUrl && $canSendNewEmailFlag) {\n try {\n $order->sendNewOrderEmail();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession->setLastOrderId($order->getId())\n ->setRedirectUrl($redirectUrl)\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n // add recurring profiles information to the session\n $profiles = $service->getRecurringPaymentProfiles();\n if ($profiles) {\n $ids = array();\n foreach ($profiles as $profile) {\n $ids[] = $profile->getId();\n }\n $this->_checkoutSession->setLastRecurringProfileIds($ids);\n // TODO: send recurring profile emails\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => $profiles)\n );\n\n return $this;\n }", "public function createOrder($accessToken){\n $url = \"https://api.sandbox.paypal.com/v2/checkout/orders\";\n \n /* Call Headers */\n $paymentHeaders = array(\"Content-Type: application/json\", \"Authorization: Bearer \".$accessToken);\n \n\t/* Generates Random Invoice Number */\n\t$randNo= (string)rand(10000,20000);\n \n /* Fill payload with transaction info */\n\n\t\t\t$postfields = '{}';\n $postfieldsArr = json_decode($postfields, true);\n $postfieldsArr['intent'] = \"CAPTURE\";\n \t$postfieldsArr['application_context']['shipping_preference'] = \"SET_PROVIDED_ADDRESS\";\n \t$postfieldsArr['application_context']['user_action'] = \"PAY_NOW\";\n \t\n \t$postfieldsArr['purchase_units'][0]['description'] = \"PayPalPizza\";\n \t$postfieldsArr['purchase_units'][0]['invoice_id'] = \"INV-PayPalPizza-\" . $randNo;\n \t$postfieldsArr['purchase_units'][0]['amount']['currency_code'] = $_POST['currency'];\n \t$postfieldsArr['purchase_units'][0]['amount']['value'] = $_POST['total_amt'];\n \t$postfieldsArr['purchase_units'][0]['amount']['breakdown']['item_total']['currency_code'] = $_POST['currency'];\n \t$postfieldsArr['purchase_units'][0]['amount']['breakdown']['item_total']['value'] = $_POST['total_amt'];\n\t\t\t$postfieldsArr['purchase_units'][0]['shipping']['address']['recipient_name']= $_POST['shipping_recipient_name'];\n\t\t\t$postfieldsArr['purchase_units'][0]['shipping']['address']['phone']= $_POST['shipping_phone'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['address_line_1']= $_POST['shipping_line1'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['address_line_2']= $_POST['shipping_line2'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['admin_area_2']= $_POST['shipping_city'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['admin_area_1']= $_POST['shipping_state'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['postal_code']= $_POST['shipping_postal_code'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['country_code']= $_POST['shipping_country_code'];\n \n for($a = 0; $a < $_POST['itemnum']; $a++){\n $postfieldsArr['purchase_units'][0]['items'][$a]['name'] = $_POST[('itemname'. $a )];\n $postfieldsArr['purchase_units'][0]['items'][$a]['description'] = $_POST[('itemname'. $a)]; \n $postfieldsArr['purchase_units'][0]['items'][$a]['sku'] = $_POST[('itemsku'. $a)]; \n $postfieldsArr['purchase_units'][0]['items'][$a]['unit_amount']['currency_code'] = $_POST['currency']; \n $postfieldsArr['purchase_units'][0]['items'][$a]['unit_amount']['value'] = $_POST[('itemprice'. $a)];\n $postfieldsArr['purchase_units'][0]['items'][$a]['quantity'] = $_POST[('itemamount'. $a)];\n $postfieldsArr['purchase_units'][0]['items'][$a]['category'] = \"PHYSICAL_GOODS\";\n }\n \n $postfields = json_encode($postfieldsArr);\n \n/* Call Orders API */\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $paymentHeaders);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_POST, true);\n $run = curl_exec($ch);\n curl_close($ch);\n/* Call Orders API */\n\n echo $run;\n }", "public function checkout()\r\n\t{\r\n\t\t$data['view_file_name'] = 'checkout_view';\r\n $this->template->load_info_view('order/checkout_view',$data);\r\n\t}", "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 }", "private function PayForOrder()\n\t{\n\t\t// If guest checkout is not enabled and the customer isn't signed in then send the customer\n\t\t// back to the beginning of the checkout process.\n\t\tif(!GetConfig('GuestCheckoutEnabled') && !CustomerIsSignedIn() && !isset($_SESSION['CHECKOUT']['CREATE_ACCOUNT'])) {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".GetConfig('ShopPath').'/checkout.php');\n\t\t\texit;\n\t\t}\n\n\t\tif (GetConfig('EnableOrderTermsAndConditions')==1 && !isset($_POST['AgreeTermsAndConditions'])) {\n\t\t\t@ob_end_clean();\n\t\t\t$_SESSION['REDIRECT_TO_CONFIRMATION_MSG'] = GetLang('TickArgeeTermsAndConditions');\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/checkout.php?action=confirm_order\");\n\t\t\texit;\n\t\t}\n\n\t\t// ensure products are in stock\n\t\t$this->CheckStockLevels();\n\n\t\t// Customer actually chose to apply a gift certificate or coupon code to this order so\n\t\t// we actually show the confirm order page again which does all of the magic.\n\t\tif (isset($_REQUEST['apply_code'])) {\n\t\t\t$this->ConfirmOrder();\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt to create the pending order with the selected details\n\t\t$pendingResult = $this->SavePendingOrder();\n\n\t\t// There was a problem creating the pending order\n\t\tif(!is_array($pendingResult)) {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/checkout.php?action=confirm_order\");\n\t\t\texit;\n\t\t}\n\n\t\t// There was a problem creating the pending order but we have an actual error message\n\t\tif(isset($pendingResult['error'])) {\n\t\t\tif(isset($pendingResult['errorDetails'])) {\n\t\t\t\t$this->BadOrder('', $pendingResult['error'], $pendingResult['errorDetails']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->BadOrder('', $pendingResult['error']);\n\t\t\t}\n\t\t}\n\n\t\t// We've been told all we need to do is redirect to the finish order page, so do that\n\t\tif(isset($pendingResult['redirectToFinishOrder']) && $pendingResult['redirectToFinishOrder']) {\n\t\t\t@ob_end_clean();\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/finishorder.php\");\n\t\t\tdie();\n\t\t}\n\n\t\t// Otherwise, the gateway want's to do something\n\t\tif(!empty($pendingResult['provider']) && ($pendingResult['provider']->GetPaymentType() == PAYMENT_PROVIDER_ONLINE || method_exists($pendingResult['provider'], \"ShowPaymentForm\"))) {\n\t\t\t// ProviderListHTML is stored in the session when the provider requires that it can only be the only payment provider during checkout, disable the other checkout method.\n\t\t\tif(isset($_SESSION['CHECKOUT']['ProviderListHTML']) && method_exists($pendingResult['provider'], 'DoExpressCheckoutPayment')) {\n\t\t\t\t$pendingResult['provider']->DoExpressCheckoutPayment();\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t// If we have a payment form to show then show that\n\t\t\tif(isset($pendingResult['showPaymentForm']) && $pendingResult['showPaymentForm']) {\n\t\t\t\t$this->ShowPaymentForm($pendingResult['provider']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pendingResult['provider']->TransferToProvider();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// It's an offline payment method, no need to accept payment now\n\t\t\tif(!empty($pendingResult['provider']))\n\t\t\t\t$providerId = $pendingResult['provider']->GetId();\n\t\t\telse\n\t\t\t\t$providerId = '';\n\n\t\t\t@ob_end_clean();\n\t\t\theader(sprintf(\"Location:%s/finishorder.php?provider=%s\", $GLOBALS['ShopPath'], $providerId));\n\t\t\tdie();\n\t\t}\n\t}", "public function afterPlaceOrder($order)\n {\n $this->aliExpressOrderRepository->create(['order' => $order]);\n }", "public function orderPlace(Request $request)\n {\n $user_id = auth()->user()->id;\n $allCart = Cart::where('user_id',$user_id)->get();//get user items\n $i=1;\n foreach($allCart as $cart)\n {\n \n $order = new Order ;\n $order->product_id = $cart['product_id'];\n $order->user_id = $cart['user_id'];\n $order->address = $request->address ;\n $order->payment_method = $request->payment_method;\n $order->status = 'pending';\n $order->payment_status = 'pending';\n //save\n $order->save();\n Cart::where('user_id',$user_id)->delete(); //remove item from the Cart()\n }\n return back();\n }", "public function placeAction()\n {\n $paymentParam = $this->getRequest()->getParam('payment');\n $controller = $this->getRequest()->getParam('controller');\n $this->getRequest()->setPost('collect_shipping_rates', 1);\n $this->_processActionData('save');\n\n //get confirmation by email flag\n $orderData = $this->getRequest()->getPost('order');\n $sendConfirmationFlag = 0;\n if ($orderData) {\n $sendConfirmationFlag = (!empty($orderData['send_confirmation'])) ? 1 : 0;\n } else {\n $orderData = array();\n }\n\n if (isset($paymentParam['method'])) {\n\n $result = array();\n\n //create order partially\n $this->_getOrderCreateModel()->setPaymentData($paymentParam);\n $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($paymentParam);\n\n $orderData['send_confirmation'] = 0;\n $this->getRequest()->setPost('order', $orderData);\n\n try {\n //do not cancel old order.\n $oldOrder = $this->_getOrderCreateModel()->getSession()->getOrder();\n $oldOrder->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_CANCEL, false);\n\n $order = $this->_getOrderCreateModel()\n ->setIsValidate(true)\n ->importPostData($this->getRequest()->getPost('order'))\n ->createOrder();\n\n $payment = $order->getPayment();\n if ($payment && $payment->getMethod() == Mage::getModel('authorizenet/directpost')->getCode()) {\n //return json with data.\n $session = $this->_getDirectPostSession();\n $session->addCheckoutOrderIncrementId($order->getIncrementId());\n $session->setLastOrderIncrementId($order->getIncrementId());\n\n $requestToPaygate = $payment->getMethodInstance()->generateRequestFromOrder($order);\n $requestToPaygate->setControllerActionName($controller);\n $requestToPaygate->setOrderSendConfirmation($sendConfirmationFlag);\n $requestToPaygate->setStoreId($this->_getOrderCreateModel()->getQuote()->getStoreId());\n\n $adminUrl = Mage::getSingleton('adminhtml/url');\n if ($adminUrl->useSecretKey()) {\n $requestToPaygate->setKey(\n $adminUrl->getSecretKey('authorizenet_directpost_payment','redirect')\n );\n }\n $result['directpost'] = array('fields' => $requestToPaygate->getData());\n }\n\n $result['success'] = 1;\n $isError = false;\n }\n catch (Mage_Core_Exception $e) {\n $message = $e->getMessage();\n if( !empty($message) ) {\n $this->_getSession()->addError($message);\n }\n $isError = true;\n }\n catch (Exception $e) {\n $this->_getSession()->addException($e, $this->__('Order saving error: %s', $e->getMessage()));\n $isError = true;\n }\n\n if ($isError) {\n $result['success'] = 0;\n $result['error'] = 1;\n $result['redirect'] = Mage::getSingleton('adminhtml/url')->getUrl('*/sales_order_create/');\n }\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n else {\n $result = array(\n 'error_messages' => $this->__('Please, choose payment method')\n );\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function successAction() {\n\t\t\n\t\t//echo \"in b2b\";die;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t$privateId = $session->getPrivateId();\n\t\t\n\t\t\n\t\t\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['customer']['email'];\n\t\t\t$mobile = $orderDetails['customer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['customer']['deliveryAddress']['firstName'];\n\t\t\t$lastName = $orderDetails['customer']['deliveryAddress']['lastName'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['customer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['customer']['billingAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['billingAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['billingAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['billingAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['billingAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['billingAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['deliveryAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t//$paymentMethod = 'collectorpay';\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t$session->unsPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t//Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "public function saveOrder()\n {\n $this->validate();\n $this->_initKlarnaCheckout(false, false);\n\n try {\n if (($merchantCheckboxMethod = $this->_helper->getCheckoutConfig('merchant_checkbox')) != -1) {\n $this->_helper->dispatchMerchantCheckboxMethod(\n $merchantCheckboxMethod, array(\n 'quote' => $this->getQuote(),\n 'klarna_quote' => $this->getKlarnaQuote(),\n 'checked' => (bool)$this->getKlarnaCheckout()->getData('merchant_requested/additional_checkbox')\n )\n );\n }\n\n $checkboxes = $this->getKlarnaCheckout()->getData('merchant_requested/additional_checkboxes');\n if (!empty($checkboxes)) {\n $this->_helper->dispatchMultipleCheckboxesEvent(\n $this->getKlarnaCheckout()->getData('merchant_requested/additional_checkboxes'),\n $this->getQuote(),\n $this->getKlarnaQuote()\n );\n }\n } catch (Mage_Core_Exception $e) {\n Mage::logException($e);\n // Don't stop order from saving just because the checkbox processing failed\n }\n\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n\n Mage::dispatchEvent(\n 'kco_checkout_save_order_before', array(\n 'checkout' => $this\n )\n );\n\n /**\n * For older versions of Magento state cannot be removed as a requirement\n * for shipping which is necessary in some countries.\n *\n * This checks if the Magento version is below 1.7 and disabled address validation\n */\n if (version_compare(Mage::getVersion(), '1.7.0', '<')) {\n $this->getQuote()->getBillingAddress()->setShouldIgnoreValidation(true);\n if (!$this->getQuote()->isVirtual()) {\n $this->getQuote()->getShippingAddress()->setShouldIgnoreValidation(true);\n }\n }\n\n $service = Mage::getModel('sales/service_quote', $this->getQuote());\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($this->getQuote()->getId())\n ->setLastSuccessQuoteId($this->getQuote()->getId())\n ->clearHelperData();\n\n /** @var Mage_Sales_Model_Order $order */\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent(\n 'checkout_type_kco_save_order_after', array(\n 'order' => $order,\n 'quote' => $this->getQuote()\n )\n );\n\n if ($order->getCanSendNewEmailFlag()) {\n try {\n $order->sendNewOrderEmail();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession\n ->setLastOrderId($order->getId())\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => array())\n );\n\n return $order;\n }", "public function placeOrder(\n RestSplittableCheckoutRequestAttributesTransfer $restSplittableCheckoutRequestAttributesTransfer\n ): RestSplittableCheckoutResponseTransfer;", "public function placeOrder($observer)\n {\n try {\n $order = $observer->getEvent()->getOrder();\n if (!$order->getPayment()) return;\n if (!$order->getPayment()->getMethodInstance()) return;\n $payment = $order->getPayment()->getMethodInstance();\n if ($payment instanceof Quickpay_Payment_Model_Method_Abstract) {\n if ((int)Mage::getStoreConfig('cataloginventory/options/can_subtract') == 1 &&\n (int)Mage::getStoreConfig('cataloginventory/item_options/manage_stock') == 1\n ) {\n $this->addToStock($order);\n }\n\n }\n } catch (Exception $e) {\n }\n }", "public function order() {\n if(!$this->that->config->get('koraki_checkout'))\n return;\n\n if(!$this->that->session->data['order_id'])\n return;\n\n if (isset($this->that->request->server['HTTPS']) && (($this->that->request->server['HTTPS'] == 'on') || ($this->that->request->server['HTTPS'] == '1'))) {\n $base = $this->that->config->get('config_ssl');\n } else {\n $base = $this->that->config->get('config_url');\n }\n\n $this->that->load->model('checkout/order');\n $this->that->load->model('account/order');\n $this->that->load->model('catalog/product');\n $this->that->load->model('tool/image');\n\n $order_info = $this->that->model_checkout_order->getOrder($this->that->session->data['order_id']);\n if ($order_info) {\n $first_name = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8');\n $last_name = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8');\n $address1 = html_entity_decode($order_info['payment_address_1'], ENT_QUOTES, 'UTF-8');\n $address2 = html_entity_decode($order_info['payment_address_2'], ENT_QUOTES, 'UTF-8');\n $city = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8');\n $zip = html_entity_decode($order_info['payment_postcode'], ENT_QUOTES, 'UTF-8');\n $country = $order_info['payment_country'];\n\n $order_products = $this->that->model_account_order->getOrderProducts($this->that->session->data['order_id']);\n $product_name_html = \"something\";\n $cart_count = count($order_products);\n if($cart_count > 0){\n $product_name_html = \"<a href='\" . $base . \"?route=product/product&product_id=\" . $order_products[0]['product_id'] . \"' target='_blank'>\" . html_entity_decode($order_products[0]['name'], ENT_QUOTES, 'UTF-8') . \"</a>\";\n if($cart_count > 1){\n $product_name_html .= \" and \" . ($cart_count - 1) . \" other product\";\n $product_name_html .= $cart_count != 2 ? \"s\" : \"\";\n }\n }\n\n $items = array();\n foreach ($order_products as $product) {\n $p = $this->that->model_catalog_product->getProduct($product['product_id']);\n $popup = $this->that->model_tool_image->resize($p['image'], 150, 150);\n $item = array(\n \"product_id\" => $product['product_id'],\n \"product_name\" => $product['name'],\n \"url\" => $base . \"?route=product/product&product_id=\" . $product['product_id'],\n \"thumbnail\" => $popup\n );\n $items[] = $item;\n }\n\n $variables = array(\n \"fname\" => $first_name,\n \"lname\" => $last_name,\n \"city\" => $city,\n \"country\" => $country,\n \"country_code\" => html_entity_decode($order_info['payment_iso_code_2'], ENT_QUOTES, 'UTF-8'),\n \"items\" => $items\n );\n\n $location_array = array($city, $country);\n $location = $city ? join(\", \", $location_array) : $country;\n $location_verb = (empty($country) && empty($city)) ? \"\" : \" from \" . $location;\n\n $post = array(\n \"variables\" => json_encode($variables),\n \"notificationText\" => $first_name . $location_verb . \" purchased \" . $product_name_html,\n \"location\" => $address2 . \", \" . $city . \", \" . $city . \", \" . $country,\n \"thumbnailUrl\" => $items[0]['thumbnail'],\n );\n\n $this->post($post);\n }\n }", "public function create_shippify_task($order_id){\n session_start();\n $task_endpoint = \"https://api.shippify.co/task/new\";\n\n $order = new WC_Order($order_id);\n\n $products = '[{\"id\":\"10234\",\"name\":\"TV\",\"qty\":\"2\",\"size\":\"3\",\"price\":\"0\"}]'; //coger de package\n\n $sender_mail = \"[email protected]\"; //poner y coger de settings\n\n $recipient_name = get_post_meta( $order_id, '_billing_first_name', true ) . get_post_meta( $order_id, '_billing_last_name', true ) ;\n $recipient_email = get_post_meta( $order_id, '_billing_email', true );\n $recipient_phone = get_post_meta( $order_id, '_billing_phone', true );\n\n $pickup_warehouse = get_post_meta( $order_id, 'pickup_id', true );\n $pickup_latitude = get_post_meta( $order_id, 'pickup_latitude', true );\n $pickup_longitude = get_post_meta( $order_id, 'pickup_longitude', true );\n $pickup_address = get_post_meta( $order_id, 'pickup_address', true );\n\n $deliver_lat = get_post_meta( $order_id, 'Latitude', true );\n $deliver_lon = get_post_meta( $order_id, 'Longitude', true );\n $deliver_address = get_post_meta( $order_id, '_billing_address_1', true ) . get_post_meta( $order_id, '_billing_address_2', true );\n\n $note = get_post_meta( $order_id, 'Instructions', true );\n\n $ref_id = $order_id;\n\n $api_id = get_option('shippify_id');\n $api_secret = get_option('shippify_secret');\n\n $items = \"[\";\n foreach ($order->get_items() as $item_id => $_preproduct ) { \n $_product = $_preproduct->get_product();\n $items = $items . '{\"id\":\"' . $_product->get_id() . '\", \n \"name\":\"' . $_product->get_name() . '\", \n \"qty\": \"' . $_preproduct['quantity'] . '\", \n \"size\": \"' . $this->calculate_product_shippify_size($_product) . '\"\n },';\n }\n $items = substr($items, 0, -1) . ']';\n\n $wh_args = array(\n 'headers' => array(\n 'Authorization' => 'Basic ' . base64_encode( $api_id . ':' . $api_secret )\n ),\n 'method' => 'GET'\n ); \n\n $pickup_id = '';\n if ($pickup_warehouse != \"\" || isset($pickup_warehouse)){\n $warehouse_response = wp_remote_get('https://api.shippify.co/warehouse/list', $wh_args);\n if (!is_wp_error($warehouse_response)){\n $warehouse_response = json_decode($warehouse_response['body'], true);\n $warehouse_info = $warehouse_response[\"warehouses\"];\n foreach ($warehouse_info as $warehouse){\n if ($warehouse[\"id\"] == $pickup_warehouse){\n $pickup_id = $pickup_warehouse;\n break; \n }\n }\n }\n } \n\n if ($pickup_id == ''){\n $warehouse_to_request = '';\n }else{\n $warehouse_to_request = ',\n \"warehouse\": \"'. $pickup_id .'\"';\n }\n\n $total_amount = '';\n $payment_method = get_post_meta( $order_id, '_payment_method', true );\n if ($payment_method == 'cod'){\n $order_total = $order->get_total(); \n $total_amount = '\"total_amount\": \"' . $order_total . '\",'; \n }\n\n $request_body = '\n {\n \"task\" : {\n \"products\": '. $items . ',\n \"sender\" : {\n \"email\": \"'. $sender_mail . '\"\n },\n \"recipient\": {\n \"name\": \"'. $recipient_name . '\",\n \"email\": \"'. $recipient_email . '\",\n \"phone\": \"'. $recipient_phone . '\"\n },\n \"pickup\": {\n \"lat\": '. $pickup_latitude . ',\n \"lng\": '. $pickup_longitude . ',\n \"address\": \"'. $pickup_address . '\"'. $warehouse_to_request . '\n }, \n '. $total_amount . '\n \"deliver\": {\n \"lat\": '. $deliver_lat . ',\n \"lng\": '. $deliver_lon . ',\n \"address\": \"'. $deliver_address . '\"\n },\n \"ref_id\": \"'. $ref_id .'\",\n \"extra\": {\n \"note\": \"'. $note . '\" \n }\n }\n }';\n\n //Basic Authorization\n\n $args = array(\n 'headers' => array(\n 'Authorization' => 'Basic ' . base64_encode( $api_id . ':' . $api_secret ),\n 'Content-Type' => 'application/json'\n ),\n 'method' => 'POST',\n 'body' => $request_body\n );\n\n $response = wp_remote_post( $task_endpoint, $args );\n\n if (is_wp_error($response)){\n return false;\n }\n\n\n return $response;\n\n }", "function execute() {\n\t\t$guest = false;\n\t\t$this->defineProperties();\n\t\tif (!df_checkout_h()->canOnepageCheckout()) {\n\t\t\techo json_encode(['error' => 0, 'msg' => '', 'redirect' => $this->_url->getUrl('quotation/quote')]);\n\t\t\texit;\n\t\t}\n\t\t// Validate checkout\n\t\t$quote = $this->getOnepage()->getQuote();\n\t\tif (!$quote->hasItems() || $quote->getHasError() || !$quote->validateMinimumAmount()) {\n\t\t\techo json_encode(['error' => 0, 'msg' => '', 'redirect' => $this->_url->getUrl('quotation/quote')]);\n\t\t\texit;\n\t\t}\n\t\t$isLoggedIn = $this->_customerSession->isLoggedIn();\n\t\tif (!$isLoggedIn) {\n\t\t\tif (isset($_POST['register_new_account'])) {\n\t\t\t\t$isGuest = $this->getRequest()->getPost('register_new_account');\n\t\t\t\tif ($isGuest == '1' || $this->_dataHelper->haveProductDownloadable()) {\n\t\t\t\t\t// If checkbox register_new_account checked or exist downloadable product, create new account\n\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('register');\n\t\t\t\t\t$storeManager = $this->_objectManager->get('Magento\\Store\\Model\\StoreManagerInterface');\n\t\t\t\t\t// Preparing data for new customer\n\t\t\t\t\t$customer = $this->_objectManager->get('Magento\\Customer\\Model\\CustomerFactory')->create();\n\t\t\t\t\t$customer->setWebsiteId($storeManager->getWebsite()->getId())\n\t\t\t\t\t\t->setEmail(isset($_POST['billing']['email']) ? $_POST['billing']['email'] : '')\n\t\t\t\t\t\t->setPrefix(isset($_POST['billing']['prefix']) ? $_POST['billing']['prefix'] : '')\n\t\t\t\t\t\t->setFirstname(isset($_POST['billing']['firstname']) ? $_POST['billing']['firstname'] : '')\n\t\t\t\t\t\t->setLastname(isset($_POST['billing']['lastname']) ? $_POST['billing']['lastname'] : '')\n\t\t\t\t\t\t->setMiddlename(isset($_POST['billing']['middlename']) ? $_POST['billing']['middlename'] : '')\n\t\t\t\t\t\t->setSuffix(isset($_POST['billing']['suffix']) ? $_POST['billing']['suffix'] : '')\n\t\t\t\t\t\t->setDob(isset($_POST['dob']) ? $_POST['dob'] : '')\n\t\t\t\t\t\t->setTaxvat(isset($_POST['billing']['taxvat']) ? $_POST['billing']['taxvat'] : '')\n\t\t\t\t\t\t->setGender(isset($_POST['billing']['gender']) ? $_POST['billing']['gender'] : '')\n\t\t\t\t\t\t->setPassword(isset($_POST['billing']['customer_password']) ? $_POST['billing']['customer_password'] : '');\n\t\t\t\t\t// Set customer information to quote\n\t\t\t\t\t$quote->setCustomer($customer->getDataModel())->setPasswordHash($customer->getPasswordHash());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('guest');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Fix for persistent\n\t\t\t\tif (\n\t\t\t\t\t$this->getCheckout()->getPersistentRegister() && $this->getCheckout()->getPersistentRegister() == \"register\"\n\t\t\t\t) {\n\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('register');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!$this->_dataHelper->getStoreConfig('onestepcheckout/general/allowguestcheckout')\n\t\t\t\t\t\t|| !$this->_dataHelper->getStoreConfig('checkout/options/guest_checkout')\n\t\t\t\t\t\t|| $this->_dataHelper->haveProductDownloadable()\n\t\t\t\t\t) {\n\t\t\t\t\t\t$storeManager = $this->_objectManager->get('Magento\\Store\\Model\\StoreManagerInterface');\n\t\t\t\t\t\t// Preparing data for new customer\n\t\t\t\t\t\t$customer = $this->_objectManager->get(\n\t\t\t\t\t\t\t'Magento\\Customer\\Model\\CustomerFactory'\n\t\t\t\t\t\t)->create();\n\t\t\t\t\t\t$guest = false;\n\t\t\t\t\t\t$email = isset($_POST['billing']['email']) ? $_POST['billing']['email'] : '';\n\t\t\t\t\t\tif ($email) {\n\t\t\t\t\t\t\t$customer1 = $this->_objectManager->get(\n\t\t\t\t\t\t\t\t'Magento\\Customer\\Model\\CustomerFactory'\n\t\t\t\t\t\t\t)->create();\n\t\t\t\t\t\t\t$customer1->loadByEmail($email);\n\t\t\t\t\t\t\tif ($customer1->getId()) {\n\t\t\t\t\t\t\t\t$customer->setEntityId($customer1->getEntityId());\n\t\t\t\t\t\t\t\tif (!$customer1->getPasswordHash()) {\n\t\t\t\t\t\t\t\t\t$customer->setEntityId($customer1->getEntityId());\n\t\t\t\t\t\t\t\t\t$this->_customerSession->setCustomerId($customer1->getEntityId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$password = isset($_POST['billing']['customer_password']) ? $_POST['billing']['customer_password'] : '';\n\t\t\t\t\t\t\t\t\t$accountManagement = $this->_objectManager->get('Magento\\Customer\\Api\\AccountManagementInterface');\n\t\t\t\t\t\t\t\t\t$accountManagement->authenticate($email, $password);\n\t\t\t\t\t\t\t\t\t$guest = true;\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\tif (!$guest) {\n\t\t\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('register');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('guest');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$customer->setWebsiteId($storeManager->getWebsite()->getId())\n\t\t\t\t\t\t\t->setEmail(isset($_POST['billing']['email']) ? $_POST['billing']['email'] : '')\n\t\t\t\t\t\t\t->setPrefix(isset($_POST['billing']['prefix']) ? $_POST['billing']['prefix'] : '')\n\t\t\t\t\t\t\t->setFirstname(isset($_POST['billing']['firstname']) ? $_POST['billing']['firstname'] : '')\n\t\t\t\t\t\t\t->setLastname(isset($_POST['billing']['lastname']) ? $_POST['billing']['lastname'] : '')\n\t\t\t\t\t\t\t->setMiddlename(isset($_POST['billing']['middlename']) ? $_POST['billing']['middlename'] : '')\n\t\t\t\t\t\t\t->setSuffix(isset($_POST['billing']['suffix']) ? $_POST['billing']['suffix'] : '')\n\t\t\t\t\t\t\t->setDob(isset($_POST['dob']) ? $_POST['dob'] : '')\n\t\t\t\t\t\t\t->setTaxvat(isset($_POST['billing']['taxvat']) ? $_POST['billing']['taxvat'] : '')\n\t\t\t\t\t\t\t->setGender(isset($_POST['billing']['gender']) ? $_POST['billing']['gender'] : '')\n# 2021-05-26 Dmitry Fedyuk https://www.upwork.com/fl/mage2pro\n# @todo \"«empty password in vendor/magento/framework/Encryption/Encryptor.php on line 591»\n# on a quotecheckout/index/updateordermethod request\": https://github.com/canadasatellite-ca/site/issues/127\n\t\t\t\t\t\t\t->setPassword(isset($_POST['billing']['customer_password']) ? $_POST['billing']['customer_password'] : '');\n\t\t\t\t\t\t// Set customer information to quote\n\t\t\t\t\t\t$quote->setCustomer($customer->getDataModel())->setPasswordHash($customer->getPasswordHash());\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->getOnepage()->saveCheckoutMethod('guest');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Save billing address\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\t$billingData = $this->_dataHelper->filterdata(\n\t\t\t\t$this->getRequest()->getPost('billing', []),\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif ($isLoggedIn) {\n\t\t\t\t$this->saveAddress('billing', $billingData);\n\t\t\t}\n\t\t\t$customerAddressId = $this->getRequest()->getPost('billing_address_id', false);\n\t\t\tif ($this->getRequest()->getPost('billing_address_id') != \"\"\n\t\t\t\t&& (!isset($billingData['save_in_address_book'])\n\t\t\t\t\t|| (isset($billingData['save_in_address_book']) && $billingData['save_in_address_book']) == 0)\n\t\t\t) {\n\t\t\t\t$customerAddressId = \"\";\n\t\t\t}\n\t\t\tif ($isLoggedIn\n\t\t\t\t&& (isset($billingData['save_in_address_book']) && $billingData['save_in_address_book'] == 1)\n\t\t\t\t&& !$this->_dataHelper->getStoreConfig('onestepcheckout/addfield/addressbook')\n\t\t\t) {\n\t\t\t\t$customerAddressId = $this->getDefaultAddress('billing');\n\t\t\t}\n\t\t\tif (isset($billingData['email'])) {\n\t\t\t\t$billingData['email'] = trim($billingData['email']);\n\t\t\t\tif ($this->_dataHelper->isSubscriberByEmail($billingData['email'])) {\n\t\t\t\t\tif ($this->getRequest()->getParam('subscribe_newsletter') == '1') {\n\t\t\t\t\t\tif ($isLoggedIn) {\n\t\t\t\t\t\t\t$customer = $this->_customerSession->getCustomer();\n\t\t\t\t\t\t\t$this->_objectManager->get(\n\t\t\t\t\t\t\t\t'Magento\\Newsletter\\Model\\SubscriberFactory'\n\t\t\t\t\t\t\t)->create()->subscribeCustomerById($customer->getId());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->saveSubscriber($billingData['email']);\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\t$address = $this->_objectManager->get('Magento\\Quote\\Model\\Quote\\Address');\n\t\t\tif ($customerAddressId) {\n\t\t\t\t$addressData = $this->_objectManager->get('Magento\\Customer\\Api\\AddressRepositoryInterface')\n\t\t\t\t\t->getById($customerAddressId)\n\t\t\t\t\t->__toArray();\n\t\t\t\t$billingData = array_merge($billingData, $addressData);\n\t\t\t}\n\t\t\t$address->setData($billingData);\n\t\t\t$this->getOnepage()->getQuote()->setBillingAddress($address);\n\t\t\tif (isset($billingData['save_into_account'])\n\t\t\t\t&& intval($billingData['save_into_account']) == 1\n\t\t\t\t&& $isLoggedIn\n\t\t\t) {\n\t\t\t\t$this->setAccountInfoSession($billingData);\n\t\t\t}\n\t\t}\n\t\t// Save shipping address\n\t\t$isclick = $this->getRequest()->getPost('ship_to_same_address');\n\t\t$ship = \"billing\";\n\t\tif ($isclick != '1') {\n\t\t\t$ship = \"shipping\";\n\t\t}\n\t\tif ($this->getRequest()->getPost()) {\n\t\t\t$shippingData = $this->_dataHelper->filterdata($this->getRequest()->getPost($ship, []), false);\n\t\t\tif ($isLoggedIn && !$isclick) {\n\t\t\t\t$this->saveAddress('shipping', $shippingData);\n\t\t\t}\n\t\t\tif ($isclick == '1') {\n\t\t\t\t$shippingData['same_as_billing'] = 1;\n\t\t\t}\n\t\t\t// Change address if user change infomation\n\t\t\t// Reassign customeraddressid and save to shipping\n\t\t\t$customeraddressid = $this->getRequest()->getPost($ship . '_address_id', false);\n\t\t\t// If user chage shipping, billing infomation but not save to database\n\t\t\tif ($isclick || ($this->getRequest()->getPost('shipping_address_id') != \"\"\n\t\t\t\t\t&& (!isset($shippingData['save_in_address_book']) || (isset($shippingData['save_in_address_book']) && $shippingData['save_in_address_book'] == 0)))\n\t\t\t) {\n\t\t\t\t$customeraddressid = \"\";\n\t\t\t}\n\t\t\tif (!$isclick && $isLoggedIn\n\t\t\t\t&& (isset($shippingData['save_in_address_book']) && $shippingData['save_in_address_book'] == 1)\n\t\t\t\t&& !$this->_dataHelper->getStoreConfig('onestepcheckout/addfield/addressbook')\n\t\t\t) {\n\t\t\t\t$customeraddressid = $this->getDefaultAddress('shipping');\n\t\t\t}\n\t\t\t$this->getOnepage()->saveShipping($shippingData, $customeraddressid);\n\t\t}\n\t\tif ($customer_note = $this->getRequest()->getPost('onestepcheckout_comments')) {\n\t\t\t$quote->setCustomerNote($customer_note);\n\t\t}\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\t$shippingMethodData = $this->getRequest()->getPost('shipping_method', '');\n\t\t\t$resultSaveShippingMethod = $this->getOnepage()->saveShippingMethod($shippingMethodData);\n\t\t\tif (!$resultSaveShippingMethod) {\n\t\t\t\t$eventManager = $this->_objectManager->get('Magento\\Framework\\Event\\ManagerInterface');\n\t\t\t\t$eventManager->dispatch('checkout_controller_onepage_save_shipping_method', [\n\t\t\t\t\t'request' => $this->getRequest(),\n\t\t\t\t\t'quote' => $this->getOnepage()->getQuote()\n\t\t\t\t]);\n\t\t\t}\n\t\t\t$this->getOnepage()->getQuote()->collectTotals();\n\t\t}\n\t\t$result = new \\Magento\\Framework\\DataObject();\n\t\ttry {\n\t\t\tif (!$quote->getCustomerId() && !$guest) {\n\t\t\t\tdf_quote_customer_m()->populateCustomerInfo($quote);\n\t\t\t}\n\t\t\t$quote->setIsActive(false);\n\t\t\t$cQuote = df_new_om(CQuote::class); /** @var CQuote $cQuote */\n\t\t\t$quotation = $cQuote->create($quote)->load($quote->getId());\n\t\t\t$cHelper = df_o(CHelper::class); /** @var CHelper $cHelper */\n\t\t\t$isAutoProposalEnabled = $cHelper->isAutoConfirmProposalEnabled();\n\t\t\t$qtyBreak = false;\n\t\t\t$price = true;\n\t\t\t$totalItems = 0;\n\t\t\tforeach ($quote->getAllItems() as $item) {\n\t\t\t\tif (!$item->getParentItemId()) {\n\t\t\t\t\t$totalItems++;\n\t\t\t\t\tif ($item->getQty() > 1) {\n\t\t\t\t\t\t$qtyBreak = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($item->getProduct()->getFinalPrice() == 0 || $item->getProduct()->getPrice() == 0) {\n\t\t\t\t\t\t$price = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($quote->getCustomerNote() || $qtyBreak || !$price || $totalItems > 1) {\n\t\t\t\t$isAutoProposalEnabled = false;\n\t\t\t}\n\t\t\tif ($isAutoProposalEnabled) {\n\t\t\t\t$quotation->setProposalSent((new \\DateTime())->getTimestamp());\n\t\t\t\t$quotation->setState(\\Cart2Quote\\Quotation\\Model\\Quote\\Status::STATE_PENDING)\n\t\t\t\t\t->setStatus(\\Cart2Quote\\Quotation\\Model\\Quote\\Status::STATUS_AUTO_PROPOSAL_SENT);\n\t\t\t\t$qProposalSender = df_o(QuoteProposalSender::class); /** @var QuoteProposalSender $qProposalSender */\n\t\t\t\t$qProposalSender->send($quotation);\n\t\t\t\t$quotation->save();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$qRequestSender = df_o(QuoteRequestSender::class); /** @var QuoteRequestSender $qRequestSender */\n\t\t\t\t$qRequestSender->send($quotation, false);\n\t\t\t}\n\t\t\tif (true || $this->getRequest()->getParam('clear_quote', false)) {\n\t\t\t\t$qs = df_o(CSession::class); /** @var CSession $qs */\n\t\t\t\t$qs->fullSessionClear();\n\t\t\t\t$qs->updateLastQuote($quotation);\n\t\t\t}\n\t\t\t$redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();\n\t\t\t$result->setData('success', true);\n\t\t\t$result->setData('error', false);\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\t$data = ['error' => 1, 'msg' => $e->getMessage(),];\n\t\t\t$reloadcheckoutpage = $quote->getData('reloadcheckoutpage');\n\t\t\tif ($reloadcheckoutpage) {\n\t\t\t\t$data['redirect'] = $this->_url->getUrl('checkout');\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t\texit;\n\t\t}\n\t\tif (isset($redirectUrl)) {\n\t\t\t$result->setData('redirect', $redirectUrl);\n\t\t}\n\t\t$this->_eventManager->dispatch('checkout_controller_onepage_saveOrder', ['result' => $result, 'action' => $this]);\n\t\tif (isset($redirectUrl)) {\n\t\t\techo json_encode([\n\t\t\t\t'error' => 0,\n\t\t\t\t'msg' => '',\n\t\t\t\t'redirect' => $redirectUrl\n\t\t\t]);\n\t\t\texit;\n\t\t}\n\t\techo json_encode([\n\t\t\t'error' => 0,\n\t\t\t'msg' => '',\n\t\t\t'redirect' => $this->_url->getUrl('quotation/quote/success', array('id' => $quote->getId()))\n\t\t]);\n\t\texit;\n\t\treturn;\n\t}", "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}", "protected function insertOrder(&$page, $obj, $putOrderId = true)\r\n {\r\n if ($obj instanceof Mage_Sales_Model_Order) {\r\n $shipment = null;\r\n $order = $obj;\r\n } elseif ($obj instanceof Mage_Sales_Model_Order_Shipment) {\r\n $shipment = $obj;\r\n $order = $shipment->getOrder();\r\n }\r\n\r\n /* AW_Lib START */\r\n $this->setOrderModel($order);\r\n $this->collectSectionModels();\r\n /* AW_Lib END */\r\n\r\n $this->y = $this->y ? $this->y : 815;\r\n $top = $this->y;\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->drawRectangle(25, $top, 570, $top - 55);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $this->setDocHeaderCoordinates(array(25, $top, 570, $top - 55));\r\n $this->_setFontRegular($page, 10);\r\n\r\n if ($putOrderId) {\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order # ') . $order->getRealOrderId(), 35, ($top -= 30), 'UTF-8'\r\n );\r\n }\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order Date: ') . Mage::helper('core')->formatDate(\r\n $order->getCreatedAtStoreDate(), 'medium', false\r\n ),\r\n 35,\r\n ($top -= 15),\r\n 'UTF-8'\r\n );\r\n\r\n $top -= 10;\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $top, 275, ($top - 25));\r\n $page->drawRectangle(275, $top, 570, ($top - 25));\r\n\r\n /* Calculate blocks info */\r\n\r\n /* Billing Address */\r\n $billingAddress = $this->_formatAddress($order->getBillingAddress()->format('pdf'));\r\n\r\n /* Payment */\r\n $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())\r\n ->setIsSecureMode(true)\r\n ->toPdf();\r\n $paymentInfo = htmlspecialchars_decode($paymentInfo, ENT_QUOTES);\r\n $payment = explode('{{pdf_row_separator}}', $paymentInfo);\r\n foreach ($payment as $key=>$value){\r\n if (strip_tags(trim($value)) == '') {\r\n unset($payment[$key]);\r\n }\r\n }\r\n reset($payment);\r\n\r\n /* Shipping Address and Method */\r\n if (!$order->getIsVirtual()) {\r\n /* Shipping Address */\r\n $shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));\r\n $shippingMethod = $order->getShippingDescription();\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontBold($page, 12);\r\n $page->drawText(Mage::helper('sales')->__('Sold to:'), 35, ($top - 15), 'UTF-8');\r\n\r\n if (!$order->getIsVirtual()) {\r\n $page->drawText(Mage::helper('sales')->__('Ship to:'), 285, ($top - 15), 'UTF-8');\r\n } else {\r\n $page->drawText(Mage::helper('sales')->__('Payment Method:'), 285, ($top - 15), 'UTF-8');\r\n }\r\n\r\n $addressesHeight = $this->_calcAddressHeight($billingAddress);\r\n if (!$order->getIsVirtual() && isset($shippingAddress)) {\r\n $addressesHeight = max($addressesHeight, $this->_calcAddressHeight($shippingAddress));\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $page->drawRectangle(25, ($top - 25), 570, $top - 33 - $addressesHeight);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontRegular($page, 10);\r\n $this->y = $top - 40;\r\n $addressesStartY = $this->y;\r\n\r\n foreach ($billingAddress as $value){\r\n if ($value !== '') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 35, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $this->y = $addressesStartY;\r\n foreach ($shippingAddress as $value){\r\n if ($value!=='') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n /* AW_Lib after Address section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterAddressSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getAddressSectionData());\r\n }\r\n }\r\n /* AW_Lib after Address section END */\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $this->y, 275, $this->y-25);\r\n $page->drawRectangle(275, $this->y, 570, $this->y-25);\r\n\r\n $this->y -= 15;\r\n $this->_setFontBold($page, 12);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $page->drawText(Mage::helper('sales')->__('Payment Method'), 35, $this->y, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Shipping Method:'), 285, $this->y , 'UTF-8');\r\n\r\n $this->y -=10;\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n\r\n $this->_setFontRegular($page, 10);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n\r\n $paymentLeft = 35;\r\n $yPayments = $this->y - 15;\r\n } else {\r\n $yPayments = $addressesStartY;\r\n $paymentLeft = 285;\r\n }\r\n\r\n foreach ($payment as $value){\r\n if (trim($value) != '') {\r\n //Printing \"Payment Method\" lines\r\n $value = preg_replace('/<br[^>]*>/i', \"\\n\", $value);\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), $paymentLeft, $yPayments, 'UTF-8');\r\n $yPayments -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $topMargin = 15;\r\n $methodStartY = $this->y;\r\n $this->y -= 15;\r\n\r\n foreach (Mage::helper('core/string')->str_split($shippingMethod, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n\r\n $yShipments = $this->y;\r\n $totalShippingChargesText = \"(\" . Mage::helper('sales')->__('Total Shipping Charges') . \" \"\r\n . $order->formatPriceTxt($order->getShippingAmount()) . \")\";\r\n\r\n $page->drawText($totalShippingChargesText, 285, $yShipments - $topMargin, 'UTF-8');\r\n $yShipments -= $topMargin + 10;\r\n\r\n $tracks = array();\r\n if ($shipment) {\r\n $tracks = $shipment->getAllTracks();\r\n }\r\n if (count($tracks)) {\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(285, $yShipments, 510, $yShipments - 10);\r\n $page->drawLine(400, $yShipments, 400, $yShipments - 10);\r\n //$page->drawLine(510, $yShipments, 510, $yShipments - 10);\r\n\r\n $this->_setFontRegular($page, 9);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n //$page->drawText(Mage::helper('sales')->__('Carrier'), 290, $yShipments - 7 , 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Title'), 290, $yShipments - 7, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Number'), 410, $yShipments - 7, 'UTF-8');\r\n\r\n $yShipments -= 20;\r\n $this->_setFontRegular($page, 8);\r\n foreach ($tracks as $track) {\r\n\r\n $CarrierCode = $track->getCarrierCode();\r\n if ($CarrierCode != 'custom') {\r\n $carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($CarrierCode);\r\n $carrierTitle = $carrier->getConfigData('title');\r\n } else {\r\n $carrierTitle = Mage::helper('sales')->__('Custom Value');\r\n }\r\n\r\n //$truncatedCarrierTitle = substr($carrierTitle, 0, 35) . (strlen($carrierTitle) > 35 ? '...' : '');\r\n $maxTitleLen = 45;\r\n $endOfTitle = strlen($track->getTitle()) > $maxTitleLen ? '...' : '';\r\n $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle;\r\n //$page->drawText($truncatedCarrierTitle, 285, $yShipments , 'UTF-8');\r\n $page->drawText($truncatedTitle, 292, $yShipments , 'UTF-8');\r\n $page->drawText($track->getNumber(), 410, $yShipments , 'UTF-8');\r\n $yShipments -= $topMargin - 5;\r\n }\r\n } else {\r\n $yShipments -= $topMargin - 5;\r\n }\r\n\r\n $currentY = min($yPayments, $yShipments);\r\n\r\n // replacement of Shipments-Payments rectangle block\r\n $page->drawLine(25, $methodStartY, 25, $currentY); //left\r\n $page->drawLine(25, $currentY, 570, $currentY); //bottom\r\n $page->drawLine(570, $currentY, 570, $methodStartY); //right\r\n\r\n $this->y = $currentY - 7;\r\n\r\n /* AW_Lib after Payment/Shipment section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterPaymentShipmentSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getPaymentShipmentSectionData());\r\n }\r\n }\r\n /* AW_Lib after Payment/Shipment section END */\r\n }\r\n\r\n /* AW_Lib after Custom section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasCustomSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getCustomSectionData());\r\n }\r\n }\r\n /* AW_Lib after Custom section END */\r\n }", "public function submitOrder(Request $request)\n {\n // $this->validate($request, [\n // 'address' => 'required',\n // 'payment' => 'required',\n // ]);\n\n $now = \\Carbon\\Carbon::now();\n\n $id = $request->id;\n $order = Order::find($id);\n\n $items = Order::find($id)->product()->get();\n\n foreach($items as $item) {\n $product = Product::find($item->id);\n $product->inventory = $product->inventory - $item->pivot->quantity;\n $product->save();\n }\n\n if (!empty($request->street)) {\n $street = $request->street;\n $city = $request->city;\n $state = $request->state;\n $zip = $request->zip;\n $order->address = $street . ', ' . $city . ', ' . $state . ' ' . $zip;\n } else {\n $order->address = $request->address;\n }\n\n $order->transaction_total = $request->total;\n $order->dateOrdered = $now;\n $order->status_id = 2;\n $order->save();\n\n $user = Auth::User();\n\n Stripe::setApiKey(env('STRIPE_TEST_KEY'));\n\n // Get the credit card details submitted by the form\n $token = $_POST['stripeToken'];\n\n // Create the charge on Stripe's servers - this will charge the user's card\n $stripeAmount = bcmul($request->total, 100);\n try {\n $charge = \\Stripe\\Charge::create(array(\n \"amount\" => $stripeAmount, // amount in cents, again\n \"currency\" => \"usd\",\n \"source\" => $token,\n \"description\" => \"Sweet Sweet Chocolates\"\n ));\n } catch(Card $e) {\n return \"We're sorry your credit card has been declined.\";\n }\n\n // return view('email.submitorder', ['order' => $order, 'user' => $user, 'items'=>$items]);\n Mail::send('email.submitorder', ['order' => $order, 'user' => $user, 'items'=>$items], function ($m) use ($order, $user) {\n $m->from('[email protected]', 'Sweet Sweet Chocolates');\n $m->to($user->email, $user->fname.' '.$user->lname)->subject('Thank you for your order!');\n });\n\n Activity::log('Submitted an order.', $user->id);\n\n $request->session()->flash('status', 'Your order has been submitted!');\n\n return Redirect::action('ProfileController@index');\n\n }", "public function createOrder($cartData,$token,$isApi,$customerId = NULL);", "public function store(Request $request)\n {\n //dd($request->all());\n $request->validate([\n 'shipping_fullname' => 'required',\n 'shipping_state' => 'required',\n 'shipping_city' => 'required',\n 'shipping_address' => 'required',\n 'shipping_phone' => 'required',\n 'shipping_zipcode' => 'required'\n ]);\n\n $order = new Order();\n\n $order->order_number = uniqid('OrderNnumber');\n\n $order->shipping_fullname = $request->input('shipping_fullname');\n $order->shipping_state = $request->input('shipping_state');\n $order->shipping_city = $request->input('shipping_city');\n $order->shipping_address = $request->input('shipping_address');\n $order->shipping_phone = $request->input('shipping_phone');\n $order->shipping_zipcode = $request->input('shipping_zipcode');\n\n if (!$request->has('billing_fullname')) {\n $order->billing_fullname = $request->input('shipping_fullname');\n $order->billing_state = $request->input('shipping_state');\n $order->billing_city = $request->input('shipping_city');\n $order->billing_address = $request->input('shipping_address');\n $order->billing_phone = $request->input('shipping_phone');\n $order->billing_zipcode = $request->input('shipping_zipcode');\n } else {\n $order->billing_fullname = $request->input('billing_fullname');\n $order->billing_state = $request->input('billing_state');\n $order->billing_city = $request->input('billing_city');\n $order->billing_address = $request->input('billing_address');\n $order->billing_phone = $request->input('billing_phone');\n $order->billing_zipcode = $request->input('billing_zipcode');\n }\n\n $order->grand_total = \\Cart::session(auth()->id())->getTotal();\n $order->item_count = \\Cart::session(auth()->id())->getContent()->count();\n\n $order->user_id = auth()->id();\n\n //payment\n if (request('payment_method') == 'paypal') {\n //return redirect('paypal.checkout');\n $order->payment_method = 'paypal';\n }\n\n //$order->status ='pending';\n $order->save();\n\n //save order items\n $cartItems = \\Cart::session(auth()->id())->getContent();\n\n foreach ($cartItems as $item) {\n $order->items()->attach($item->id, ['price' => $item->price, 'quantity' => $item->quantity,'name' => $item->name]);\n }\n\n //payment\n if (request('payment_method') == 'paypal') {\n //return redirect('paypal.checkout');\n return redirect('checkout');\n \n }\n //empty cart\n\n \\Cart::session(auth()->id())->clear();\n\n\n //\n //return \"order completed, thank you for order\";\n //return back();\n\n return redirect('shipments')->withMessage('สั่งซื้อสินค้าสำเร็จ');\n //dd('order created',$order);\n }", "public function processPayment($order)\n {\n $shipping = sprintf('%0.2f', 0);\n // Add any tax amount if you want to apply any tax rule\n $tax = sprintf('%0.2f', 0);\n\n // Create a new instance of Payer class\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Adding items to the list\n $items = array();\n foreach ($order->items as $item) {\n $orderItems[$item->order_item_id] = new Item();\n $orderItems[$item->order_item_id]->setName($item->film->film_name)\n ->setCurrency(config('settings.currency_code'))\n ->setQuantity($item->order_item_quantity)\n ->setPrice(sprintf('%0.2f', $item->order_item_price));\n\n array_push($items, $orderItems[$item->order_item_id]);\n }\n\n $itemList = new ItemList();\n $itemList->setItems($items);\n\n // Setting Shipping Details\n $details = new Details();\n $details->setShipping($shipping)\n ->setTax($tax)\n ->setSubtotal(sprintf('%0.2f', $order->order_grand_total));\n\n // Setup currency payment\n // Create chargeable amout\n $amount = new Amount();\n $amount->setCurrency(config('settings.currency_code'))\n ->setTotal(sprintf('%0.2f', $order->order_grand_total))\n ->setDetails($details);\n\n\n // Creating a transaction\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($itemList)\n ->setDescription($order->user->full_name)\n ->setInvoiceNumber($order->order_number);\n\n // This class takes two values, return URL (after successful completion where PayPal will redirect the user) and the cancel URL (if the user cancels the payment where he should be redirected).\n // Setting up redirection urls\n $redirectUrls = new RedirectUrls();\n $redirectUrls->setReturnUrl(route('checkout.payment.complete'))\n ->setCancelUrl(route('booking.book_tickets_post'));\n\n // Creating payment instance\n $payment = new Payment();\n $payment->setIntent(\"sale\")\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n try {\n\n $payment->create($this->payPal);\n } catch (PayPalConnectionException $exception) {\n echo $exception->getCode(); // Prints the Error Code\n echo $exception->getData(); // Prints the detailed error message\n exit(1);\n } catch (Exception $e) {\n echo $e->getMessage();\n exit(1);\n }\n\n $approvalUrl = $payment->getApprovalLink();\n\n header(\"Location: {$approvalUrl}\");\n exit;\n }", "public function storeOrder($request);", "public function checkout(Request $request)\n {\n\n\t\t$builder = new ProductCheckoutBuilder();\n\t\t\n\t\t$order = new Order();\n\t\t$order->customer_id = $request->customer_id;\n\t\t$builder->setOrder($order);\n\t\t\n\t\tcollect($request->cart)->map(function($order) use ($builder) {\n\t\t\t$order_detail = new OrderDetail();\n\t\t\t$order_detail->product_id = $order['product_id'];\n\t\t\t$order_detail->quantity = $order['quantity'];\n\t\t\t$builder->add($order_detail);\n\t\t});\n\t\t$builder->checkout();\n }", "function do_order($order, $response){\n if ( !is_user_logged_in() || 0 == $order->user_id )\n {\n $wpuser = get_user_by('email', $order->billing_email);\n if ($wpuser)\n {\n update_post_meta( $order->id, '_customer_user', $wpuser->ID );\n }\n }\n\n // Reduce stock levels\n //$order->reduce_order_stock();\n\n global $woocommerce;\n\n $woocommerce->cart->empty_cart();\n\n // Return thankyou redirect\n $order->add_order_note( sprintf( 'BrainTree Transaction ID: %s Env: %s Card Type: %s Last 4: %s Customer Token %s' ,\n\t\t\t\t\t$response->transaction->id,\n\t\t\t\t\t$this->environment,\n\t\t\t\t\t$response->transaction->creditCardDetails->cardType,\n\t\t\t\t\t$response->transaction->creditCardDetails->last4,\n\t\t\t\t\t$response->transaction->creditCardDetails->token )\n\t\t\t);\n\n\t\t\t\t\t\t// save transaction info as order meta\n\t\t\tupdate_post_meta( $order->id, 'Braintree Transaction Id', $response->transaction->id );\n\n\t\t\t// update customer ID and credit card token\n\t\t\tupdate_post_meta( $order->id, 'Braintree Customer', $response->transaction->customerDetails->id );\n\n\t\t\t// update braintree customer ID saved to user\n\t\t\tupdate_user_meta( $order->user_id, 'braintree_v0_customer_id', $response->transaction->customerDetails->id );\n\n\n $order->payment_complete();\n }", "public function store()\n\t{\n\t\t$order = new Order();\n\n\t\t$items = json_decode(Input::get('items', []), true);\n\n\t\tforeach($items as &$item) {\n\t\t\t$id = $item['reference']['id'];\n\t\t\t$model = Product::find($id);\n\t\t\t$item['name'] = $model->name;\n\t\t\t$item['unit_price'] = $model->price;\n\t\t\t$item['total_price_including_tax'] = ceil($model->price * $model->vatgroup->amount * $item['quantity']);\n\t\t\t$item['total_price_excluding_tax'] = ceil($model->price * $item['quantity']);\n\t\t\t$item['type'] = 'physical';\n\t\t\t$item['discount_rate'] = 0;\n\t\t\t$item['tax_rate'] = (int) abs((1 - $model->vatgroup->amount) * 100);\n\t\t}\n\n\t\t$order->items = $items;\n\n\t\t# determine shipping type\n\t\t$total = $order->getTotal();\n\t\t$weight = $order->getWeight();\n\t\tif ($weight <= 1000) {\n\t\t\t$shippingType = 'mail';\n\t\t\t$shippingCost = 39;\n\t\t}else {\n\t\t\t$shippingType = 'service-pack';\n\t\t\t$shippingCost = 99;\n\t\t}\n\n\t\t# free shipping?\n\t\tif ($total >= 800) {\n\t\t\t$shippingCost = 0;\n\t\t}\n\n\t\t# add shipping\n\t\t$items = $order->items;\n\t\t$items[] = [\n\t\t\t'discount_rate' => 0,\n\t\t\t'name' => $shippingType,\n\t\t\t'quantity' => 1,\n\t\t\t'reference' => null,\n\t\t\t'tax_rate' => 0,\n\t\t\t'total_price_excluding_tax' => $shippingCost,\n\t\t\t'total_price_including_tax' => $shippingCost,\n\t\t\t'total_tax_amount' => 0,\n\t\t\t'type' => 'shipping_fee',\n\t\t\t'unit_price' => $shippingCost,\n\t\t];\n\t\t$order->items = $items;\n\n\t\t# set user\n\t\t$order->user_id = Input::get('user_id');\n\n\t\t# set shipping & billing addresses\n\t\t$order->billing_address = [\n\t\t\t'given_name' => $order->user->firstname,\n\t\t\t'family_name' => $order->user->lastname,\n\t\t\t'street_address' => null,\n\t\t\t'postal_code' => null,\n\t\t\t'city' => null,\n\t\t\t'country' => null,\n\t\t\t'email' => $order->user->email,\n\t\t\t'phone' => null,\n\t\t];\n\t\t$order->shipping_address = $order->billing_address;\n\n\t\t# set locale etc\n\t\t$order->locale = 'nb-no';\n\t\t$order->purchase_country = 'no';\n\t\t$order->purchase_currency = 'nok';\n\n\t\t# set total\n\t\t$order->total_price_including_tax = $order->getTotal();\n\n\t\t$total = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$total += $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_price_excluding_tax = $total;\n\n\t\t# total tax amount\n\t\t$tax = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$tax += $item['total_price_including_tax'] - $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_tax_amount = $tax;\n\n\t\t$order->status = 'unprocessed';\n\n\t\t# save\n\t\t$order->save();\n\n\t\t# redirect to edit that order now\n\t\treturn Redirect::to(route('admin.orders.edit', $order->id));\n\t}", "public function send_order($order_id)\n {\n // Return if barcode exists\n if (get_post_meta($order_id, 'barcode', true)) {\n return;\n }\n\n $order = wc_get_order($order_id);\n\n // Return if the city is out of area\n $billing_info = $order->get_data()['billing'];\n if (!in_array(ucwords(sanitize_text_field($billing_info['city'])), $this->business_area)) {\n return;\n }\n\n $billing_info = array_map(function ($v) {\n return sanitize_text_field($v);\n }, $billing_info);\n\n // The short description of order items\n $description = [];\n foreach ($order->get_items() as $k => $item) {\n $product = $item->get_product_id();\n $description[] = get_the_excerpt($product);\n }\n $description = sanitize_text_field(implode(\"\\n\", $description));\n\n $info = $this->format_fields([\n 'createdBy' => null,\n 'type' => 'package',\n 'status' => 'in_warehouse',\n 'collectType' => 'pickup',\n 'collectedBy' => null,\n 'description' => $description,\n 'note' => $order->get_customer_note(),\n 'from' => $this->get_store_info_value('blogname'),\n 'fromAddress1' => $this->get_store_info_value('woocommerce_store_address'),\n 'fromAddress2' => $this->get_store_info_value('woocommerce_store_address_2'),\n 'fromCity' => $this->get_store_info_value('woocommerce_store_city'),\n 'fromPostCode' => $this->get_store_info_value('woocommerce_store_postcode'),\n 'fromTel' => $this->get_store_info_value('phone'),\n 'fromEmail' => $this->get_store_info_value('email'),\n 'to' => $billing_info['first_name'] . ' ' . $billing_info['last_name'],\n 'toAddress1' => $billing_info['address_1'],\n 'toAddress2' => $billing_info['address_2'],\n 'toCity' => $billing_info['city'],\n 'toPostCode' => $billing_info['postcode'],\n 'toTel' => $billing_info['phone'],\n 'toEmail' => $billing_info['email'],\n 'verified' => true,\n 'tomatoProduceId' => $order_id,\n ]);\n\n $curl = curl_init(TOMATOGO_URL);\n curl_setopt_array($curl, [\n CURLOPT_HEADER => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => ['Content-Type: application/json'],\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode($info),\n ]);\n $res = json_decode(curl_exec($curl));\n\n curl_close($curl);\n\n $barcode = sanitize_text_field($res->barcode);\n if ($barcode) {\n update_post_meta($order_id, 'barcode', $barcode);\n }\n }", "public function placeOrder($observer) {\n //file_put_contents('/tmp/place_order',time());\n\n $order = $observer->getEvent()->getOrder();\n\n // update last_purchase_date\n $date = $order->getUpdatedAt();\n $customer_id = $order->getCustomerId();\n $db = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sq = 'UPDATE calltab_customer SET last_purchase_date=:date WHERE customer_id=:customer_id LIMIT 1';\n $db->query($sq,array('customer_id'=>$customer_id,'date'=>$date));\n\n $call_id = Mage::getSingleton('admin/session')->getCalltabCallId();\n if ($call_id) {\n $sq = 'UPDATE calltab_customer SET last_sales_call_date=:date WHERE customer_id=:customer_id LIMIT 1';\n $db->query($sq,array('customer_id'=>$customer_id,'date'=>$date));\n\n $manager_id = (int)$this->getManagerId();\n\n $sq = 'UPDATE calls SET order_id=:order_id, manager_id=:manager_id WHERE call_id=:call_id LIMIT 1';\n $db->query($sq,array('call_id'=>$call_id,'order_id'=>$order->getId(),'manager_id'=>$manager_id));\n }\n\n return $this;\n }", "public function checkoutForm()\n\t{\n\t\t$objOrder = new IsotopeOrder();\n\n\t\tif (!$objOrder->findBy('cart_id', $this->Isotope->Cart->id))\n\t\t{\n\t\t\t$this->redirect($this->addToUrl('step=failed', true));\n\t\t}\n\t\t\n\t\t$arrAddress = $this->Isotope->Cart->billing_address;\n\n\t\t$arrParams = array\n\t\t(\n\t\t\t'merchantId'\t\t\t=> $this->datatrans_id,\n\t\t\t'amount'\t\t\t\t=> round($this->Isotope->Cart->grandTotal * 100),\n\t\t\t'currency'\t\t\t\t=> $this->Isotope->Config->currency,\n\t\t\t'refno'\t\t\t\t\t=> $objOrder->id,\n\t\t\t'language'\t\t\t\t=> $GLOBALS['TL_LANGUAGE'],\n\t\t\t'reqtype'\t\t\t\t=> ($this->trans_type == 'auth' ? 'NOA' : 'CAA'),\n\t\t\t'uppCustomerDetails'\t=> 'yes',\n\t\t\t'uppCustomerTitle'\t\t=> $arrAddress['salutation'],\n\t\t\t'uppCustomerFirstName'\t=> $arrAddress['firstname'],\n\t\t\t'uppCustomerLastName'\t=> $arrAddress['lastname'],\n\t\t\t'uppCustomerStreet'\t\t=> $arrAddress['street_1'],\n\t\t\t'uppCustomerStreet2'\t=> $arrAddress['street_2'],\n\t\t\t'uppCustomerCity'\t\t=> $arrAddress['city'],\n\t\t\t'uppCustomerCountry'\t=> $arrAddress['country'],\n\t\t\t'uppCustomerZipCode'\t=> $arrAddress['postal'],\n\t\t\t'uppCustomerPhone'\t\t=> $arrAddress['phone'],\n\t\t\t'uppCustomerEmail'\t\t=> $arrAddress['email'],\n\t\t\t'successUrl'\t\t\t=> ampersand($this->Environment->base . $this->addToUrl('step=complete', true)),\n\t\t\t'errorUrl'\t\t\t\t=> ampersand($this->Environment->base . $this->addToUrl('step=failed', true)),\n\t\t\t'cancelUrl'\t\t\t\t=> ampersand($this->Environment->base . $this->addToUrl('step=failed', true)),\n\t\t\t'mod'\t\t\t\t\t=> 'pay',\n\t\t\t'id'\t\t\t\t\t=> $this->id,\n\t\t);\n\t\t\n\t\t// Security signature (see Security Level 2)\n\t\t$arrParams['sign'] = hash_hmac('md5', $arrParams['merchantId'].$arrParams['amount'].$arrParams['currency'].$arrParams['refno'], $this->convertHexStringToByteString($this->datatrans_sign));\n\n\t\t$objTemplate = new FrontendTemplate('iso_payment_datatrans');\n\t\t$objTemplate->id = $this->id;\n\t\t$objTemplate->action = ('https://' . ($this->debug ? 'pilot' : 'payment') . '.datatrans.biz/upp/jsp/upStart.jsp');\n\t\t$objTemplate->params = $arrParams;\n\t\t$objTemplate->headline = $GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][0];\n\t\t$objTemplate->message = $GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][1];\n\t\t$objTemplate->slabel = specialchars($GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][2]);\n\n\t\treturn $objTemplate->parse();\n\t}", "public function postOrder(Request $request) {\n //`user_id``address_id``total_ongkir``no_resi``kurir``status``total`\n\n $address_tarif = explode('|', Input::get('address_id'));\n $address_id = $address_tarif[0];\n $total_ongkir = $address_tarif[1];\n\n // Set $user_id to the currently authenticated user\n $user_id = Auth::user()->id;\n\n // Set $cart_products to the Cart Model with its products where\n // the user_id = to the current signed in user ID\n $cart_products = Cart::with('products')->where('user_id', '=', $user_id)->get();\n\n // Set $cart_total to the Cart Model alond with all its products, and\n // where the user_id = the current signed in user ID, and\n // also get the sum of the total field.\n $cart_total = Cart::with('products')->where('user_id', '=', $user_id)->sum('total');\n\n // Get the total, and set the charge amount\n $charge_amount = number_format($cart_total, 2) * 100;\n\n\n // Create the order in DB, and assign each variable to the correct form fields\n $order = Order::create (\n array(\n 'user_id' => $user_id,\n 'address_id' => $address_id,\n 'total_ongkir' => $total_ongkir,\n 'total' => $cart_total+$total_ongkir,\n 'status' => 'unpaid'\n ));\n\n // Attach all cart items to the pivot table with their fields\n foreach ($cart_products as $order_products) {\n $order->orderItems()->attach($order_products->product_id, array(\n 'qty' => $order_products->qty,\n 'price' => $order_products->products->price,\n 'reduced_price' => $order_products->products->reduced_price,\n 'total' => $order_products->products->price * $order_products->qty,\n 'total_reduced' => $order_products->products->reduced_price * $order_products->qty,\n ));\n // Decrement the product quantity in the products table by how many a user bought of a certain product.\n // \\DB::table('products')->decrement('product_qty', $order_products->qty);\n // \\DB::table('products')->increment('buy', $order_products->qty);\n \\DB::table('products')->where('id',$order_products->product_id)->decrement('product_qty', $order_products->qty);\n \\DB::table('products')->where('id',$order_products->product_id)->increment('buy', $order_products->qty);\n }\n\n\n \n\n \n // Delete all the items in the cart after transaction successful\n Cart::where('user_id', '=', $user_id)->delete();\n \n // Then return redirect back with success message\n flash()->success('Success', 'Your order was processed successfully.');\n\n return redirect()->route('cart');\n\n }", "public function saveAction()\n {\n $tab = '';\n \n \n $pPoOrderId = $this->getRequest()->getPost('po_order_id');\n \n //get input parametre from the webpage.\n $order = Mage::getModel('purchase/order')->load($pPoOrderId);\n\n $order->setPurchaseRep(Mage::getSingleton('admin/session')->getUser()->getUsername());\n \n if ($this->getRequest()->getPost('order_eta')){\n $order->setOrderEta($this->getRequest()->getPost('order_eta'));\n }else{\n $order->setOrderEta(null);\n }\n $order->setPaymentTerms($this->getRequest()->getPost('payment_term_id'));\n $order->setShippingMethod($this->getRequest()->getPost('shipping_method_id'));\n \n $order->setComments($this->getRequest()->getPost('comments'));\n $order->setStoreId($this->getRequest()->getPost('store_id'));\n \n $order->setShippingName($this->getRequest()->getPost('shipping_name'));\n $order->setShippingCompany($this->getRequest()->getPost('shipping_company'));\n $order->setShippingStreet1($this->getRequest()->getPost('shipping_street1'));\n $order->setShippingStreet2($this->getRequest()->getPost('shipping_street2'));\n $order->setShippingCity($this->getRequest()->getPost('shipping_city'));\n $order->setShippingState($this->getRequest()->getPost('shipping_state'));\n $order->setShippingZipcode($this->getRequest()->getPost('shipping_zipcode'));\n $order->setShippingCountry($this->getRequest()->getPost('shipping_country'));\n $order->setShippingTelephone1($this->getRequest()->getPost('shipping_telephone1'));\n $order->setShippingTelephone2($this->getRequest()->getPost('shipping_telephone2'));\n $order->setShippingFax($this->getRequest()->getPost('shipping_fax'));\n $order->setShippingEmail($this->getRequest()->getPost('shipping_email'));\n $order->setShippingType($this->getRequest()->getPost('shipping_type')); \n// $order->setShippingSalesOrderId(\"\"); \n if($this->getRequest()->getPost('po_shipping_type')==\"so\")\n $order->setShippingSalesOrderId($this->getRequest()->getPost('po_shipping_so_num')); \n else\n $order->setShippingSalesOrderId(\"\"); \n \n $order->save(); \n \n $purchaseOrderId = $order->getId();\n \n \n //Process information from \"review product\" tab page\n foreach ($order->getOrderItems() as $item)\n {\n\n $itemId = $item->getId();\n \n if ($this->getRequest()->getPost('delete_'.$itemId) == 1)\n {\n $vOldQty = $item->getProductQty();\n $vProductQty = 0;\n $item->delete();\n }\n else \n {\n $receivedQty =$item->getQtyReceipted(); \n $vOldQty = $item->getProductQty();\n $vProductQty = $this->getRequest()->getPost('product_qty_'.$itemId);\n\n if (!(($vProductQty < $receivedQty) || ($vOldQty < $receivedQty))){ \n $item->setPurchaseOrderId($purchaseOrderId);\n $item->setProductId($this->getRequest()->getPost('product_id_'.$itemId));\n $item->setProductName($this->getRequest()->getPost('product_name_'.$itemId));\n \n //$item->setpop_supplier_ref($this->getRequest()->getPost('pop_supplier_ref_'.$item->getId()));\n \n $item->setProductQty($vProductQty);\n $item->setProductPrice($this->getRequest()->getPost('product_price_'.$itemId));\n $item->setSubtotal($item->getProductQty() * $item->getProductPrice());\n $item->setTotal($item->getSubtotal() + $item->getTax() + $item->getAdjustFee());\n $item->save();\n\n $vendorProduct = Mage::getModel(\"purchase/vendorproduct\")\n ->loadByProductId($order->getVendorId() , $item->getProductId());\n $vendorProduct->setVendorSku($this->getRequest()->getPost('vendor_sku_'.$itemId))\n ->setUnitCost($item->getProductPrice())\n ->save();\n }else {\n Mage::getSingleton('adminhtml/session')->addWarning($this->__('not updated for %s: new qty[%s] less than received qty [%s]', $item->getProductName(), $vProductQty, $receivedQty)); \n $vProductQty = $vOldQty;\n } \n\n } \n //process update qty when order had been send to vendor\n if ((($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_WAITING_FOR_DELIVERY) \n ||($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_PARTIALLY_RECEIVED))\n && ($vOldQty != $vProductQty)){\n \n Mage::dispatchEvent('purchase_order_refresh_poqty', \n array('po_order_id' => $purchaseOrderId,\n 'po_product_id' => $item->getProductId(), \n 'po_product_qty_old' => $vOldQty,\n 'po_product_qty_new' => $vProductQty));\n\n } \n\n }\n\n\n \n //process information from \"Add product\" tab page, check if we have to add products\n if ($this->getRequest()->getPost('add_product') != '')\n {\n $productsToAdd = Mage::helper('purchase')->decodeInput($this->getRequest()->getPost('add_product'));\n foreach($productsToAdd as $key => $value)\n {\n //retrieves values\n $productId = $key;\n $qty = $value['qty'];\n if ($qty == '')\n $qty = 1;\n \n //add product\n $order->addItems($productId, $qty);\n \n //process update qty when order had been send to vendor\n if (($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_WAITING_FOR_DELIVERY)\n ||($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_PARTIALLY_RECEIVED)){\n \n Mage::dispatchEvent('purchase_order_refresh_poqty', \n array('po_order_id' => $purchaseOrderId,\n 'po_product_id' => $productId, \n 'po_product_qty_old' => 0,\n 'po_product_qty_new' => $qty));\n\n }\n \n }\n \n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Products added'));\n $tab = 'tab_products';\n $order->resetOrderItems();\n \n }\n \n $orderSubtotal = 0.0000;\n //$orderTotal = 0.0000;\n foreach ($order->getOrderItems() as $item)\n {\n $orderSubtotal += $item->getSubtotal();\n //$orderTotal += $item->getTotal();;\n //Update vendor_product's vendor sku, cost...etc,.\n Mage::dispatchEvent('purchase_order_update_vendor_product', array('po_order_item'=>$item));\n }\n $order->setSubtotal($orderSubtotal)\n ->setTotal($orderSubtotal + $order->getTax() + $order->getAdjustFee() + $order->getShippingPrice())\n ->save();\n \n //Process information from \"send to vendor\" tab page.\n $notifyFlag = $this->getRequest()->getPost('send_to_customer');\n if ($notifyFlag == 1)\n {\n $order->notifyVendor($this->getRequest()->getPost('email_comment'));\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Vendor notified'));\n\n //update Po_qty in stockitem.\n foreach ($order->getOrderItems() as $item)\n {\n Mage::dispatchEvent('purchase_order_refresh_poqty', \n array('po_order_id' => $order->getId(),\n 'po_product_id' => $item->getProductId(), \n 'po_product_qty_old' => 0,\n 'po_product_qty_new' => $item->getProductQty()));\n }\n\n }\n \n if (($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_WAITING_FOR_DELIVERY)\n ||($order->getStatus() == Ebulb_Purchase_Model_Order::STATUS_PARTIALLY_RECEIVED) ){\n Mage::dispatchEvent('purchase_order_refresh_status', \n array('po_order' => $order)); \n }\n \n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Purchase order successfully Saved'));\n \n $this->_redirect('purchase/orders/edit/po_order_id/'.$order->getOrderId().'/tab/'.$tab);\n \n }", "public function billing()\n {\n\n //this is a good time to calc shippable items as the nbext screen will be for a shipping address\n $this->count_shippable_items();\n\n\n //customer is stil step 0\n $this->is_step(1) OR redirect( NC_ROUTE.'/checkout/');\n\n $this->load->helper('nitrocart/nitrocart_zone');\n $this->load->model('nitrocart/addresses_m');\n $data = new ViewObject();\n\n $this->form_validation->set_rules('useragreement', 'User Agreement', 'required|numeric|trim');\n\n\n // Initi the data\n foreach ($this->addresses_m->address_validation AS $rule)\n {\n $data->{$rule['field']} = $this->input->post($rule['field']);\n }\n\n $data->addresses = [];\n\n // if logged in get some fields from our profile\n if ($this->current_user)\n {\n $data = $this->get_existing_address('billing');\n }\n\n\n\n // Existing Adress\n if($this->input->post('selection') == 'existing')\n {\n $this->form_validation->set_rules('address_id', 'Address', 'required|numeric|trim');\n \n if ($this->form_validation->run())\n {\n\n $this->session->set_userdata('billing', $this->input->post('address_id'));\n\n if ($this->input->post('sameforshipping'))\n {\n\n $address_id = $this->input->post('address_id');\n\n if($this->validate_country_list_by_address_id( $address_id ))\n {\n //update this row to allow for shipping\n $this->addresses_m->doShippingAlso( $this->input->post('address_id') );\n //$this->session->set_userdata('shipping', $this->input->post('address_id'));\n $this->set_shipping_address_id( $address_id );\n $this->set_step(3); //+2\n redirect( NC_ROUTE. '/checkout/shipment');\n }\n else\n {\n $this->session->set_flashdata(JSONStatus::Error,'This product can not be shipped to your location.');\n redirect( NC_ROUTE.'/cart');\n }\n\n\n }\n\n $this->set_step(2); \n redirect( NC_ROUTE.'/checkout/shipping');\n }\n }\n\n\n\n // New Adress\n if($this->input->post('selection') == 'new')\n {\n\n $this->form_validation->set_rules( $this->addresses_m->address_validation );\n $this->form_validation->set_rules('state', 'State', 'callback_country_state_check');\n\n if ($this->form_validation->run())\n {\n $input = $this->input->post();\n $input['user_id'] = $this->session->userdata('user_id');\n\n $same_for_shipping = ($this->input->post('sameforshipping'))?1:0;\n //add the new address, note this is for billing\n $address_id = $this->addresses_m->create($input, 1, $same_for_shipping );\n\n $this->session->set_userdata('billing', $address_id);\n\n if ($same_for_shipping)\n {\n\n if($this->validate_country_list_by_address_id( $address_id ))\n { \n //$this->session->set_userdata('shipping', $address_id);\n $this->set_shipping_address_id( $address_id );\n\n $this->set_step(3); //+2\n redirect( NC_ROUTE.'/checkout/shipment');\n }\n else\n {\n $this->session->set_flashdata(JSONStatus::Error,'This product can not be shipped to your location.');\n redirect( NC_ROUTE.'/cart'); \n }\n }\n else\n {\n $this->set_step(2); \n redirect(NC_ROUTE.'/checkout/shipping'); \n }\n }\n else\n {\n //recall info that was entered\n foreach ($this->addresses_m->address_validation AS $rule)\n {\n $data->{$rule['field']} = $this->input->post($rule['field']);\n } \n }\n }\n\n $this->set_step(1);\n\n $this->template\n ->title(Settings::get('shop_name'),'billing') \n ->set_breadcrumb('User Account',NC_ROUTE.'/checkout')\n ->set_breadcrumb('Billing')\n ->build($this->theme_layout_path .'address_billing', $data);\n }", "function setOrderPaid($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "public function placeOrder( Request $request )\n {\n if(!config(\"constant.getDataFromApis\")){\n return $this->starrtecUnifiedPosHandler->payment_process( $request );\n }else{\n return $this->starrtecPosApiHandler->payment_process( $request );\n }//..... end if-else() .....//\n }", "function wpb_woo_my_account_order() {\r\n\t$myorder = array(\r\n\t\t'certificados' \t\t => __( 'Meus Certificados', 'woocommerce' ),\r\n\t\t'agendamento' \t\t => __( 'Agendamento', 'woocommerce' ),\r\n\t\t'downloads' => __( 'Downloads', 'woocommerce' ),\r\n\t\t'edit-account' => __( 'Detalhes da conta', 'woocommerce' ),\t\t\r\n\t\t'orders' => __( 'Meus pedidos', 'woocommerce' ),\t\t\r\n\t\t'edit-address' => __( 'Endereços', 'woocommerce' ),\r\n\t\t'payment-methods' => __( 'Formas de Pagamento', 'woocommerce' ),\r\n\t\t'customer-logout' => __( 'Sair', 'woocommerce' ),\r\n\t);\r\n\treturn $myorder;\r\n}", "public function placeOrder(array $checkoutData, array $extendedCartModel)\n {\n $cartModel = $extendedCartModel['cart'];\n\n /**\n * 1. check (and hooks)\n * 2. collect (&) (and hooks)\n * 3. db insert\n * 3a. create order\n * 3b. create invoice(s)\n */\n //--------------------------------------------\n // CHECK\n //--------------------------------------------\n /**\n * Very first checking is about errorCode.\n * errorCode can come from carrier (shippingErrorCode) or paymentMethodHandler.\n *\n * An errorCode prevents the checkout process to complete,\n * and so we handle them asap.\n *\n * An errorCode translates to a public message being sent\n * to the user when she clicks the pay button.\n *\n * The team can acknowledge the will from the user to pay and\n * recontact the user later.\n *\n * A typical carrier errorCode translated into text looks like this (to give you ideas of how errorCode is used):\n *\n * - Dear customer, your order address is shipped to a location that we don't usually deliver.\n * Our team will choose the most appropriate shipping method for your order and recontact you by phone\n * as soon as possible.\n *\n *\n *\n * Otherwise, (if no errorCode)\n * We check that we have all the data we want,\n * and it's also time to check the consistency of the data\n * (is the user really who she/he pretends to be, does she/he own\n * the address, etc...).\n *\n * A check error will throw an exception.\n * Then, we ask the modules to do the same (checking the consistency of the data they have collected,\n * which should be in the CCD that we pass to them, at least that's our recommendation,\n * see my notes:\n *\n * @see SokoPaymentCheckoutProcessStep::getModel()\n *\n *\n */\n $shippingErrorCode = $cartModel['carrier_error_code'];\n if (null !== $shippingErrorCode) {\n self::handleCarrierErrorCode($shippingErrorCode);\n }\n\n\n $importantKeys = [\n 'user_id',\n// 'shop_id',\n// 'lang_id',\n// 'currency_id',\n 'billing_address_id',\n 'payment_method_id',\n ];\n if (true === CartUtil::hasAtLeastOneShippableItem($extendedCartModel)) {\n $importantKeys = array_merge($importantKeys, [\n 'carrier_id',\n 'shipping_address_id',\n 'store_address_id',\n ]);\n }\n $missing = ArrayTool::getMissingKeys($checkoutData, $importantKeys);\n if (false === $missing) {\n\n $this->checkDataConsistency($checkoutData, $extendedCartModel);\n\n //--------------------------------------------\n // COLLECT\n //--------------------------------------------\n /**\n * In this step, we collect the information to save in the database.\n *\n *\n * We want to recreate the orderModel -- @see EkomModels::orderModel()\n *\n * This involves two special actors:\n * - carriers (CarrierInterface)\n * - payment method handlers (PaymentMethodHandlerInterface)\n *\n *\n * Those actors can potentially fetch data using external apis\n * (for instance, carrier can ask for a tracking number, and payment method handler\n * will execute a financial transaction with a bank...).\n *\n *\n */\n\n $orderModel = [];\n /**\n * @var $refProvider OrderReferenceProviderInterface\n */\n $refProvider = X::get(\"Ekom_getOrderReferenceProvider\");\n $reference = $refProvider->getReference();\n /**\n * The reference might be needed by some payment handlers (for tracking financial transactions,\n * hence we provide it right away).\n */\n $orderModel['reference'] = $reference;\n\n\n // we start with special objects\n //--------------------------------------------\n $billingAddressId = $checkoutData['billing_address_id'];\n\n // carrier\n /**\n * The carrier is applied at the order level\n * https://github.com/KamilleModules/Ekom/tree/master/doc/checkout/carrier-and-sellers.md\n */\n $carrierId = null;\n if (array_key_exists(\"carrier_id\", $checkoutData)) {\n $carrierId = $checkoutData['carrier_id'];\n $carrier = CarrierLayer::getCarrierInstanceById($carrierId);\n $carrier->placeOrder($orderModel, $extendedCartModel, $checkoutData);\n }\n\n\n // payment method handler\n /**\n * For payment method handlers, in this collect step, we only collect the user configuration\n * (of the chosen payment method) when he clicked the \"pay\" button.\n */\n $paymentMethodId = $checkoutData['payment_method_id'];\n $paymentHandler = PaymentLayer::getPaymentMethodHandlerById($paymentMethodId);\n $paymentMethodDetails = $paymentHandler->getCommittedConfiguration($checkoutData, $extendedCartModel);\n\n\n $this->checkPaymentErrors($checkoutData, $extendedCartModel, $paymentMethodDetails, $paymentHandler);\n\n\n // now ekom logic\n $trackingNumber = $orderModel[\"tracking_number\"] ?? \"\";\n\n\n $userId = (int)$checkoutData['user_id'];\n $userInfo = UserLayer::getUserInfoById($userId);\n if (false === $userInfo) { // I'm a little paranoid here, since this has been already checked, but it shouldn't hurt\n $this->devError(\"See, I was not too paranoid: user not found: $userId\");\n }\n\n\n $storeAddressId = (array_key_exists(\"store_address_id\", $checkoutData)) ? $checkoutData['store_address_id'] : null;\n $storeInfo = [];\n if (null !== $storeAddressId) {\n $storeInfo = OrderLayer::getStoreInfoByStoreAddressId($storeAddressId);\n }\n\n\n $shippingAddressId = (array_key_exists(\"shipping_address_id\", $checkoutData)) ? $checkoutData['shipping_address_id'] : null;\n if (null !== $shippingAddressId) {\n $shippingAddress = UserAddressLayer::getAddressById($userId, $shippingAddressId);\n } else {\n $shippingAddress = false;\n }\n $billingAddress = UserAddressLayer::getAddressById($userId, $billingAddressId);\n\n\n $paymentMethodNameAndLabel = PaymentLayer::getPaymentMethodNameAndLabelById($paymentMethodId);\n if (false === $paymentMethodNameAndLabel) {\n $this->devError(\"Inconsistent data: payment method name not found with id $paymentMethodId\");\n }\n $orderDetails = [\n \"cartModel\" => $extendedCartModel,\n \"payment_method_id\" => $paymentMethodId,\n \"payment_method_name\" => $paymentMethodNameAndLabel['name'],\n \"payment_method_label\" => $paymentMethodNameAndLabel['label'],\n \"payment_method_details\" => $paymentMethodDetails,\n ];\n if (null !== $carrierId) { // did we use a carrier for this order?\n $orderDetails = array_replace($orderDetails, [\n \"carrier_id\" => $carrierId,\n \"carrier_name\" => $carrier->getName(),\n \"carrier_tracking_number\" => $trackingNumber,\n ]);\n }\n\n //--------------------------------------------\n // miscellaneous\n //--------------------------------------------\n if (array_key_exists(\"shipping_comments\", $checkoutData)) {\n $orderDetails['shipping_comment'] = $checkoutData[\"shipping_comments\"];\n } else {\n $orderDetails['shipping_comment'] = \"\";\n }\n\n\n //--------------------------------------------\n // LAST OPPORTUNITY FOR MODULES TO DECORATE ORDER DETAILS\n //--------------------------------------------\n Hooks::call(\"Ekom_CheckoutOrderUtil_decorateOrderDetails\", $orderDetails, $checkoutData, $extendedCartModel);\n\n\n // I let this model in non serialized form for debugging\n $orderModel = array_replace($orderModel, [\n \"user_id\" => $userId,\n \"date\" => date('Y-m-d H:i:s'),\n \"amount\" => $cartModel['order_grand_total'],\n \"cart_total_tax_excluded\" => $cartModel['cart_total_tax_excluded'],\n \"shipping_cost_tax_excluded\" => $cartModel['shipping_cost_tax_excluded'],\n \"coupon_saving\" => $cartModel['coupons_total'],\n \"cart_quantity\" => $cartModel['cart_total_quantity'],\n \"user_info\" => $userInfo,\n \"store_info\" => $storeInfo,\n \"shipping_address\" => $shippingAddress,\n \"billing_address\" => $billingAddress,\n \"order_details\" => $orderDetails,\n \"order_origin\" => \"ekom\",\n \"currency_iso_code\" => \"EUR\",\n ]);\n\n\n //--------------------------------------------\n // INSERT IN DATABASE\n //--------------------------------------------\n return $this->placeOrderModel($orderModel);\n\n\n } else {\n $this->devError(\"The following keys are missing: \" . implode(\", \", $missing));\n }\n\n }", "public function run()\n {\n $this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();\n\n $this->checkoutOnepage->getBraintree3dSecureBlock()->fill($this->secure3d);\n }", "public function placeNewOrder(Request $request){\n // body\n $team = new Order();\n $data = $team->placeOrder($request);\n\n // return response.\n return response()->json($data);\n }", "function add_to_project_library(Request $request){\n $pid = $request->pid;\n $pro = Products::where('pid',$pid)->first();\n\n if($pro->sale_price_start_date <= date('Y-m-d') && $pro->sale_price_end_date >= date('Y-m-d')){\n $totalPrice = $pro->sale_price;\n $price = $pro->sale_price;\n }else{\n $totalPrice = $pro->price;\n $price = $pro->price;\n }\n\n $address = UserAddress::where('user_id',Auth::user()->id)->count();\n if($address > 0){\n $user_address = UserAddress::where('user_id',Auth::user()->id)->first();\n $address_id = $user_address->id;\n }else{\n $add = new UserAddress;\n $add->user_id = Auth::user()->id;\n $add->type = 'billing';\n $add->first_name = Auth::user()->first_name;\n $add->last_name = Auth::user()->last_name;\n $add->email = Auth::user()->email;\n $add->mobile = '9000000000';\n $add->address = 'Test Address';\n $add->city = 'Test City';\n $add->state = 'Test State';\n $add->zipcode = 'Test zipcode';\n $add->is_default = 0;\n $add->status = 1;\n $add->created_at = Carbon::now();\n $save = $add->save();\n\n $address_id = $add->id;\n }\n\n $invoice = time();\n\n $order = new Orders;\n $order->user_id = Auth::user()->id;\n $order->order_number = $invoice;\n $order->order_date = Carbon::now();\n\n $order->order_token = $invoice;\n $order->order_status = 'Success';\n $order->payer_email = Auth::user()->email;\n $order->payerid = Auth::user()->id;\n $order->payer_first_name = Auth::user()->first_name;\n $order->payer_last_name = Auth::user()->last_name;\n\n $order->order_description = 'Payment towards order '.$invoice;\n $order->ordered_amt = $totalPrice;\n $order->booking_datebooked = date('Y-m-d');\n $order->booking_timebooked = date('H:i:s');\n $order->booking_cart_total = 1;\n $order->total = $totalPrice;\n $order->address_id = $address_id;\n $order->cart_total = serialize($pro);\n $order->created_at = Carbon::now();\n $order->save();\n\n $bp = new Booking_process;\n $bp->user_id = Auth::user()->id;\n $bp->order_id = $order->id;\n $bp->category_id = 1;\n $bp->product_id = $pro->id;\n $bp->product_name = $pro->product_name;\n $bp->product_quantity = 1;\n $bp->bookingdate = date('Y-m-d');\n $bp->bookingtime = date('H:i:s');\n $bp->setpayment = $price;\n $bp->subtotal = $totalPrice;\n $bp->created_at = Carbon::now();\n $bp->save();\n\n $this->remove_all_items();\n\n return redirect('order/invoice/'.$invoice);\n }", "public function completeorder($txtName,$txtCouponCode,$txtEmail,$txtPhone,$txtAddress1,$txtAddress2,$txtAddress3,$txtAddress4,$txtCity,$txtLandmark,$txtPin,$ddlState,$ddlPaymentType,$txtSpecialNote,$OrderDiscount,$shippingCharge,$totalAmount){\n\n\t\t$countCartItem = 0;//Count Cart Item Quantity\n\t\tforeach($this->cart->contents() as $items)\n\t\t{\n\t\t $countCartItem++;\n\t\t}\n\t\t$object=array(\n\t\t\t'OrderBY' => $txtName,\n\t\t\t'OrderDateTime' => date('Y/m/d H:i:s'),\n\t\t\t'OrderQuantity' => $countCartItem,\n\t\t\t'OrderCuponCode' => $txtCouponCode,\n\t\t\t'OrderDiscount' => $OrderDiscount,\n\t\t\t'OrderShipmentCharge' => $shippingCharge,\n\t\t\t'OrderTotAmount' => $totalAmount,\n\t\t\t'OrderShipName' => $txtName,\n\t\t\t'OrderShipAddressL1' => $txtAddress1,\n\t\t\t'OrderShipAddressL2' => $txtAddress2,\n\t\t\t'OrderShipAddressL3' => $txtAddress3,\n\t\t\t'OrderShipAddressL4' => $txtAddress4,\n\t\t\t'OrderLandmark' => $txtLandmark,\n\t\t\t'OrderCity' => $txtCity,\n\t\t\t'OrderState' => $ddlState,\n\t\t\t'OrderZip' => $txtPin,\n\t\t\t'OrderCountry' => 'India',\n\t\t\t'OrderPhone' => $txtPhone,\n\t\t\t'OrderEmail' => $txtEmail,\n\t\t\t'OrderStatus' => 'Pending',\n\t\t\t'PaymentMode' => $ddlPaymentType\n\t\t);\n\t\t$this->db->insert('tbl_order_summery', $object);\n\t\t$orderId=$this->db->insert_id();\n\t\t$this->inserOrderproduct($orderId);\n\t\tif($this->session->userdata('referaldiscount'))\n\t\t{\n\t\t\t$this->updatebivapoints();\t\n\t\t}\n\t\t//$this->insertBivapoints($txtEmail,$orderId);\n\t\treturn $orderId;\n\t}", "function wcfm_wcfmmarketplace_order_mark_shipped() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = absint( $_POST['productid'] );\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n $tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n \r\n if( wcfm_is_vendor() ) {\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcfm_marketplace_orders SET commission_status = 'shipped', shipping_status = 'shipped' WHERE order_id = $order_id and vendor_id = $user_id and item_id = $order_item_id\");\r\n\t\t\t\t$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($user_id) );\r\n\t\t\t\t$wcfm_messages = sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a class=\"wcfm_dashboard_item_title\" target=\"_blank\" href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url );\r\n \t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n \t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\tadd_comment_meta( $comment_id, '_vendor_id', $user_id );\r\n\t\t\t} else {\r\n\t\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Product <b>%s</b> has been shipped to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update Shipping Tracking Info\r\n\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t}\r\n\t\tdie;\r\n\t}", "public function checkoutDone(Request $request)\n {\n $user = Auth::user();\n if(isset($user))\n {\n $user_id = $user->id;\n $dat_order = date('Y-m-d H:i:s');\n $total = Cart::total();\n $delivered = 0;\n $note = $request->input('note');\n\n DB::select('call sp_insert_order(?,?,?,?,?)', array($user_id, $dat_order, $total, $note, $delivered));\n\n $order_data = DB::select('call sp_findOrderByDate(?)', array($dat_order));\n\n foreach ($order_data as $details) {\n $order_id = $details->id;\n }\n $cartItems = Cart::content();\n foreach ($cartItems as $cartItem) {\n $product_id = $cartItem->id;\n $quantity = $cartItem->qty;\n $price = $cartItem->price;\n }\n $order_details = DB::select('call sp_addOrderDetail(?,?,?,?)', array($order_id, $product_id, $quantity, $price));\n\n //user_id, order_id, name, email, address, phone_number\n\n $shipping_name = $request->input('fullName');\n $shipping_email = $request->input('email');\n $shipping_address = $request->input('address');\n $shipping_phonenum = $request->input('phoneNumber');\n\n DB::select('call sp_addShippingInfo(?,?,?,?,?,?)', array($user_id,$order_id,$shipping_name,$shipping_email,$shipping_address,$shipping_phonenum));\n\n Cart::destroy();\n return redirect()->route('front.home');\n }\n else{\n return redirect()->route('front.home');\n }\n\n }", "public function checkoutByCreditDone(Request $request)\n {\n $user = Auth::user();\n\n if(isset($user))\n {\n $user_id = $user->id;\n $user_credit = $user->credit_point;\n\n if(isset($user_credit))\n {\n $user_id = $user->id;\n $dat_order = date('Y-m-d H:i:s');\n $total = Cart::total();\n $delivered = 0;\n $note = $request->input('note');\n $payment = $user_credit - $total;\n if($payment >= 0)\n {\n DB::select('call sp_saveCreditPointAfterPayment(?,?)', array($user_id,$payment));\n // create a new order\n DB::select('call sp_insert_order(?,?,?,?,?)', array($user_id, $dat_order, $total, $note, $delivered));\n }\n else\n {\n return redirect()->back();\n }\n //get order id after create an order successful\n $order_data = DB::select('call sp_findOrderByDate(?)', array($dat_order));\n\n foreach ($order_data as $details) {\n $order_id = $details->id;\n }\n $cartItems = Cart::content();\n foreach ($cartItems as $cartItem) {\n $product_id = $cartItem->id;\n $quantity = $cartItem->qty;\n $price = $cartItem->price;\n }\n // create order details for order.\n $order_details = DB::select('call sp_addOrderDetail(?,?,?,?)', array($order_id, $product_id, $quantity, $price));\n\n //user_id, order_id, name, email, address, phone_number\n // create shipping information in shipping infor table after create successful order details.\n $shipping_name = $request->input('fullName');\n $shipping_email = $request->input('email');\n $shipping_address = $request->input('address');\n $shipping_phonenum = $request->input('phoneNumber');\n\n DB::select('call sp_addShippingInfo(?,?,?,?,?,?)', array($user_id,$order_id,$shipping_name,$shipping_email,$shipping_address,$shipping_phonenum));\n\n Cart::destroy();\n return redirect()->route('front.home');\n }\n }\n\n else{\n return redirect()->route('front.home');\n }\n\n }", "public function bsuccessAction() {\n\t\t\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t\n\t\t\n\t\t$typeData = $session->getTypeData();\n\t\t\n\t\t$privateId = $session->getBusinessPrivateId();\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t//echo \"<pre>business \";print_r($orderData);die;\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['businessCustomer']['email'];\n\t\t\t$mobile = $orderDetails['businessCustomer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$lastName = $orderDetails['businessCustomer']['referencePerson'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['invoiceAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['invoiceAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['invoiceAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['invoiceAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['invoiceAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['deliveryAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\t\t\t//die;\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->unsBusinessPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "public function store()\n\t{\n //create a new checkout\n $checkout = new Checkout;\n\n $rules = array(\n //billing table fields\n 'bt_firstname' => 'required|min:2',\n 'bt_lastname' => 'required|min:2',\n 'bt_address_1' => 'required',\n 'bt_zip' => array('required', 'regex:/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i'),\n 'bt_city' => 'required',\n 'bt_country' => 'required',\n 'bt_email' => 'required',\n 'bt_phone_1' => 'min:10',\n 'bt_phone_2' => 'min:10',\n //shipping table fields\n 'st_firstname' => 'required|min:2',\n 'st_lastname' => 'required|min:2',\n 'st_address_1' => 'required',\n 'st_zip' => array('required', 'regex:/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i'),\n 'st_city' => 'required',\n 'st_country' => 'required',\n );\n\n //check if fields are valid\n $validator = Validator::make(Input::all(), $rules);\n\n if ($validator->fails())\n {\n return Redirect::to('checkout')\n ->withInput(Input::all())\n ->withErrors($validator);\n }\n\n /**\n * TODO when customer decides to create account after checkout, create that one first\n * in order to store the billing and shipping address and the order\n **/\n\n\n\t}", "public function OrderPlaced()\n\t{\t\t\n\t\t$user_id\t\t\t\t=$this->session->userdata('user_id');\t\n\t\t$cart_id\t\t\t\t=$this->session->userdata('cart_id');\t\n\t\t$this->Cart_model->UpdateOrderFailSuccess($cart_id,3);\n\t\t$data['total_amount']\t=$this->Cart_model->GetTotalPrice($user_id,'MainTable','Success');\n\t\t$data['payment_info']\t=$this->session->userdata('payment_array');\n\t\t$data['user_address']\t=$this->User_model->GetAddress();\n\t\t$data['product_info_array']\t=$this->Cart_model->ProductInfoFromMainTable('Success'); \n //echo \"<pre>\";print_r($data);die;\n\t\t$this->load->view('OrderPlaced_HTML',$data);\n\t}", "public function orderItem()\n {\n /* @var $customerAccount MagentoComponents_Pages_CustomerAccount */\n $customerAccount = Menta_ComponentManager::get('MagentoComponents_Pages_CustomerAccount');\n $customerAccount->login();\n\n /* @var $cart MagentoComponents_Pages_Cart */\n $cart = Menta_ComponentManager::get('MagentoComponents_Pages_Cart');\n $cart->clearCart();\n\n /* @var $productSingleView MagentoComponents_Pages_ProductSingleView */\n $productSingleView = Menta_ComponentManager::get('MagentoComponents_Pages_ProductSingleView');\n $productSingleView->putProductsIntoCart($this->getConfiguration()->getValue('testing.simple.product.id'));\n\n /* @var $onePageCheckout MagentoComponents_Pages_OnePageCheckout */\n $onePageCheckout = Menta_ComponentManager::get('MagentoComponents_Pages_OnePageCheckout');\n\n $onePageCheckout->goThroughCheckout();\n\n $this->getHelperAssert()->assertTextNotPresent(\"There was an error capturing the transaction.\");\n $orderNumber = $onePageCheckout->getOrderNumberFromSuccessPage();\n\n return $orderNumber;\n }", "public function checkout()\n {\n $user = Auth::User();\n $cart = DB::table('orders')\n ->select('id')\n ->where('status_id', '=', 1)\n ->where('user_id', '=', $user->id)\n ->value('id');\n $items = Order::find($cart)->product()->get();\n $order = Order::find($cart);\n\n $sum = 0;\n foreach($items as $item) {\n $sum+= number_format($item->pivot->quantity * $item->price, 2);\n }\n\n $addresses = $user->address()->get();\n\n return view('cart.checkout', ['items'=>$items, 'sum'=>$sum, 'user'=>$user, 'addresses'=>$addresses, 'order'=>$order]);\n }", "public function salesOrderSave($observer)\n {\n $order = $observer->getOrder();\n $quote = $observer->getQuote();\n \n $payment = $order->getPayment();\n \n if( !Mage::getStoreConfig('payment/'.$payment->getMethod().'/mc_active') ){\n return $this;\n }\n \n $data = new Varien_Object();\n \n if($payment->getCcType())\n $data->setCcType($payment->getCcType());\n if($payment->getCcOwner())\n $data->setCcOwner($payment->getCcOwner());\n if($payment->getCcLast4())\n $data->setCcLast4($payment->getCcLast4());\n if($payment->getCcNumber())\n $data->setCcNumber($payment->getCcNumber());\n if($payment->getCcParcelas())\n $data->setCcParcelas($payment->getCcParcelas());\n if($payment->getCcCid())\n $data->setCcCid($payment->getCcCid());\n if($payment->getCcExpMonth())\n $data->setCcExpMonth($payment->getCcExpMonth());\n if($payment->getCcExpYear())\n $data->setCcExpYear($payment->getCcExpYear());\n if($payment->getGwapBoletoType())\n $data->setGwapBoletoType($payment->getGwapBoletoType());\n \n /**\n * create braspag payment\n */\n $mGwap = Mage::getModel('gwap/order');\n $mGwap->setStatus(Indexa_Gwap_Model_Order::STATUS_CREATED);\n $mGwap->setCreatedAt(date('Y-m-d H:i:s'));\n $mGwap->setInfo(Mage::helper('core')->encrypt(serialize($data->toArray())));\n $mGwap->setType(Mage::getStoreConfig('payment/'.$payment->getMethod().'/mc_type'));\n\n $mGwap->setOrderId($order->getId());\n $mGwap->save();\n \n return $this;\n }", "public function captureOrder(\\TPkgShopPaymentTransactionManager $transactionManager, \\TdbShopOrder $order);", "public function checkoutSubmit(&$Merchant) {\n global $wpdb, $wpsc_cart, $current_user, $cart_data;\n\n $this->addrs = wpsc_get_customer_meta( 'klarna_address_object' );\n $klarnaCustomerInfo = wpsc_get_customer_meta( 'klarna_customer_info' );\n\n get_currentuserinfo();\n\n $wpsc_checkout = new wpsc_checkout();\n\n $Taxes = new wpec_taxes_controller();\n $taxCountry = $wpsc_cart->delivery_country;\n $taxRate = $Taxes->wpec_taxes->wpec_taxes_get_rate(\n $taxCountry,\n $Taxes->wpec_taxes_retrieve_region());\n if(!isset($taxRate['rate']))\n $taxRate['rate'] = 0;\n \n $klarnaPno = $klarnaCustomerInfo['socialNumber'];\n\n if($klarnaCustomerInfo['invoiceType'] == 'company') {\n $this->setReference(utf8_decode($klarnaCustomerInfo['reference']), '');\n $this->setComment(utf8_decode($klarnaCustomerInfo['reference']));\n }\n \n $shipmentCost = 0;\n\n // Add all cart items\n foreach($Merchant->cart_items AS $item) {\n extract($Taxes->wpec_taxes_calculate_included_tax($item), EXTR_PREFIX_ALL, 'item');\n if(!isset($item_rate))\n $item_rate = 0;\n if($Taxes->wpec_taxes_isincluded()) {\n $item_price = $item['price'];\n } else {\n $item_price = $item['price'] * ( ($item_rate / 100) + 1);\n }\n if($item['shipping'] > 0)\n $shipmentCost += $item['shipping'];\n $this->addArticle(\n $item['quantity'],\n utf8_decode($item['product_id']),\n utf8_decode(strip_tags($item['name'])),\n $item_price,\n $item_rate,\n 0,\n KlarnaFlags::INC_VAT);\n }\n\n // Add shipping cost \n if($Merchant->cart_data['base_shipping'] > 0) {\n $shipmentFlags = KlarnaFlags::IS_SHIPMENT;\n $shipmentCost += $Merchant->cart_data['base_shipping'];\n $shipmentTaxRate = 0;\n \n // Check if to apply tax to shipping cost\n if($taxRate['shipping']) {\n if(!$Taxes->wpec_taxes_isincluded())\n $shipmentCost *= (($taxRate['rate'] / 100) + 1);\n $shipmentTaxRate = $taxRate['rate'];\n $shipmentFlags += KlarnaFlags::INC_VAT;\n }\n $this->addArticle(1, '', __('Total Shipping', 'wpsc'), $shipmentCost, $shipmentTaxRate, 0, $shipmentFlags);\n }\n \n // Add invoice fee\n if($this->invoiceFee > 0) {\n $this->addArticle(\n 1,\n '',\n utf8_decode($this->fetchFromLanguagePack('INVOICE_FEE_TITLE')),\n $this->invoiceFee * ($Taxes->wpec_taxes_isincluded() ? 1 : ($taxRate['rate'] / 100) + 1),\n $taxRate['rate'],\n 0,\n KlarnaFlags::INC_VAT + KlarnaFlags::IS_HANDLING);\n\n $wpdb->query($wpdb->prepare(\n \"INSERT INTO `\".WPSC_TABLE_CART_CONTENTS.\"` (\n `prodid`, `name`, `purchaseid`, `price`, `pnp`,\n `tax_charged`, `gst`, `quantity`, `donation`,\n `no_shipping`, `custom_message`, `files`, `meta`\n ) VALUES ('0', '%s', '%d', '%s', '0', '%s', '%s', '1', '0', '0', '', '%s', NULL)\",\n $this->fetchFromLanguagePack('INVOICE_FEE_TITLE'),\n $Merchant->purchase_id,\n $this->invoiceFee,\n (float)($Taxes->wpec_taxes_isincluded() ? $Taxes->wpec_taxes_calculate_tax($this->invoiceFee, $taxRate['rate'], false) : 0),\n (float)($Taxes->wpec_taxes_isincluded() ? $taxRate['rate'] : 0),\n serialize(null)\n ));\n $cart_id = $wpdb->get_var(\"SELECT LAST_INSERT_ID() AS `id` FROM `\".WPSC_TABLE_CART_CONTENTS.\"` LIMIT 1\");\n wpsc_update_cartmeta($cart_id, 'sku', null);\n $invoiceFeeFinal = $this->invoiceFee;\n if(!$Taxes->wpec_taxes_isincluded()) {\n $invoiceFeeFinal *= (($taxRate['rate'] / 100) + 1);\n $invoiceFeeTax = $Taxes->wpec_taxes_calculate_tax($invoiceFeeFinal, $taxRate['rate'], false);\n $wpdb->query($wpdb->prepare(\n \"UPDATE `\" . WPSC_TABLE_PURCHASE_LOGS . \"` SET `totalprice` = `totalprice` + '%d', `wpec_taxes_total` = `wpec_taxes_total` + '%d' WHERE `sessionid` = '%s'\",\n (float)$invoiceFeeFinal,\n (float)$invoiceFeeTax,\n $Merchant->cart_data['session_id']\n ));\n } else {\n $wpdb->query($wpdb->prepare(\n \"UPDATE `\" . WPSC_TABLE_PURCHASE_LOGS . \"` SET `totalprice` = `totalprice` + '%d' WHERE `sessionid` = '%s'\",\n (float)$invoiceFeeFinal,\n $Merchant->cart_data['session_id']\n ));\n }\n }\n \n // Add discounts\n if($Merchant->cart_data['has_discounts'] && $Merchant->cart_data['cart_discount_value'] > 0) {\n $this->addArticle(\n 1,\n '',\n __('Discount', 'wpsc'),\n 0 - ($Merchant->cart_data['cart_discount_value'] * ($Taxes->wpec_taxes_isincluded() ? 1 : ($taxRate['rate'] / 100) + 1)),\n $taxRate['rate'],\n 0,\n KlarnaFlags::INC_VAT);\n }\n\n $new_address_object = new KlarnaAddr( \n $this->addrs['email'], \n $this->addrs['telno'], \n $this->addrs['cellno'], \n $this->addrs['fname'], \n $this->addrs['lname'], \n $this->addrs['careof'], \n $this->addrs['street'], \n $this->addrs['zip'], \n $this->addrs['city'], \n $this->addrs['country'], \n $this->addrs['house_number'], \n $this->addrs['house_extension'] \n );\n\n\n if ( $this->addrs['country'] == KlarnaCountry::NL || $this->addrs['country'] == KlarnaCountry::DE ) {\n $billingAddress = $new_address_object;\n } else {\n try {\n $billingPhone = '';\n foreach($wpsc_checkout->checkout_items as $formData) {\n if($formData->unique_name == 'billingphone') {\n $billingPhone = $_POST['collected_data'][$formData->id];\n break;\n }\n }\n if($billingPhone == '')\n $billingPhone = $this->addrs['telno'];\n\n if(isset($Merchant->cart_data['billing_address']['country']))\n $billingCountry = $Merchant->cart_data['billing_address']['country'];\n else\n $billingCountry = $this->getCountryCode();\n\n $billingAddress = new KlarnaAddr($klarnaCustomerInfo['emailAddress'],\n $billingPhone, '', \n utf8_decode($Merchant->cart_data['billing_address']['first_name']),\n utf8_decode($Merchant->cart_data['billing_address']['last_name']), '',\n utf8_decode($Merchant->cart_data['billing_address']['address']),\n utf8_decode($Merchant->cart_data['billing_address']['post_code']),\n utf8_decode($Merchant->cart_data['billing_address']['city']),\n utf8_decode($billingCountry));\n } catch(Exception $e) {\n $Merchant->set_error_message('<div style=\"border:1px solid #7BA7C9;padding:10px;\">\n <img src=\"' . KLARNA_URL . '/klarna_library/images/klarna/images/logo/klarna_logo.png\" /><br />' .\n utf8_encode($e->getMessage() . \" (#\" . $e->getCode() . \")\") . '</div>');\n return false;\n }\n }\n \n $this->addrs = $new_address_object;\n\n try {\n $this->setAddress(KlarnaFlags::IS_SHIPPING, $new_address_object);\n $this->setAddress(KlarnaFlags::IS_BILLING, $billingAddress);\n\n if ($this->askForYearlySalary()) {\n $this->setIncomeInfo('yearly_salary', absint($klarnaCustomerInfo['year_salary']));\n }\n \n if(\n isset($klarnaCustomerInfo['ilt']) &&\n is_array($klarnaCustomerInfo['ilt']) &&\n count($klarnaCustomerInfo['ilt']) >= 1) {\n \n foreach($klarnaCustomerInfo['ilt'] AS $iltQuestion => $iltAnswer) {\n $this->setIncomeInfo($iltQuestion, absint($iltAnswer));\n }\n }\n \n switch($this->moduleType) {\n case 'part':\n case 'spec':\n $pclassId = absint($klarnaCustomerInfo['paymentPlan']);\n break;\n default:\n $pclassId = KlarnaPClass::INVOICE;\n }\n \n $result = $this->addTransaction(\n $klarnaPno,\n ($this->getCountry() == KlarnaCountry::DE || $this->getCountry() == KlarnaCountry::NL) ? $klarnaCustomerInfo['gender'] : null,\n KlarnaFlags::NO_FLAG,\n $pclassId);\n } catch(Exception $e) {\n\n $error = '<div style=\"border:1px solid #7BA7C9;padding:10px;\">\n <img src=\"' . KLARNA_URL . '/klarna_library/images/klarna/images/logo/klarna_logo.png\" /><br />' .\n utf8_encode($e->getMessage() . \" (#\" . $e->getCode() . \")\") . '</div>';\n\n $Merchant->set_error_message( $error );\n\n return false;\n }\n\n $this->updateShippingData($Merchant->purchase_id);\n \n if(isset($result[0]) && strlen($result[0]) > 0)\n $this->updateOrderNo($result[0], $Merchant->purchase_id);\n \n wpsc_delete_customer_meta( 'klarna_customer_info' );\n wpsc_delete_customer_meta( 'klarna_address_object' );\n\n return $result;\n }", "protected function addOrder($data) {\n\t\n\t\t$this->db->query(\"INSERT INTO `\" . DB_PREFIX . \"order` SET invoice_prefix = '\" . $this->db->escape($data['invoice_prefix']) . \"', store_id = '\" . (int)$data['store_id'] . \"', store_name = '\" . $this->db->escape($data['store_name']) . \"', store_url = '\" . $this->db->escape($data['store_url']) . \"', customer_id = '\" . (int)$data['customer_id'] . \"', customer_group_id = '\" . (int)$data['customer_group_id'] . \"', firstname = '\" . $this->db->escape($data['firstname']) . \"', lastname = '\" . $this->db->escape($data['lastname']) . \"', email = '\" . $this->db->escape($data['email']) . \"', telephone = '\" . $this->db->escape($data['telephone']) . \"', fax = '\" . $this->db->escape($data['fax']) . \"', custom_field = '\" . $this->db->escape(isset($data['custom_field']) ? serialize($data['custom_field']) : '') . \"', payment_firstname = '\" . $this->db->escape($data['payment_firstname']) . \"', payment_lastname = '\" . $this->db->escape($data['payment_lastname']) . \"', payment_company = '\" . $this->db->escape($data['payment_company']) . \"', payment_address_1 = '\" . $this->db->escape($data['payment_address_1']) . \"', payment_address_2 = '\" . $this->db->escape($data['payment_address_2']) . \"', payment_city = '\" . $this->db->escape($data['payment_city']) . \"', payment_postcode = '\" . $this->db->escape($data['payment_postcode']) . \"', payment_country = '\" . $this->db->escape($data['payment_country']) . \"', payment_country_id = '\" . (int)$data['payment_country_id'] . \"', payment_zone = '\" . $this->db->escape($data['payment_zone']) . \"', payment_zone_id = '\" . (int)$data['payment_zone_id'] . \"', payment_address_format = '\" . $this->db->escape($data['payment_address_format']) . \"', payment_custom_field = '\" . $this->db->escape(isset($data['payment_custom_field']) ? serialize($data['payment_custom_field']) : '') . \"', payment_method = '\" . $this->db->escape($data['payment_method']) . \"', payment_code = '\" . $this->db->escape($data['payment_code']) . \"', shipping_firstname = '\" . $this->db->escape($data['shipping_firstname']) . \"', shipping_lastname = '\" . $this->db->escape($data['shipping_lastname']) . \"', shipping_company = '\" . $this->db->escape($data['shipping_company']) . \"', shipping_address_1 = '\" . $this->db->escape($data['shipping_address_1']) . \"', shipping_address_2 = '\" . $this->db->escape($data['shipping_address_2']) . \"', shipping_city = '\" . $this->db->escape($data['shipping_city']) . \"', shipping_postcode = '\" . $this->db->escape($data['shipping_postcode']) . \"', shipping_country = '\" . $this->db->escape($data['shipping_country']) . \"', shipping_country_id = '\" . (int)$data['shipping_country_id'] . \"', shipping_zone = '\" . $this->db->escape($data['shipping_zone']) . \"', shipping_zone_id = '\" . (int)$data['shipping_zone_id'] . \"', shipping_address_format = '\" . $this->db->escape($data['shipping_address_format']) . \"', shipping_custom_field = '\" . $this->db->escape(isset($data['shipping_custom_field']) ? serialize($data['shipping_custom_field']) : '') . \"', shipping_method = '\" . $this->db->escape($data['shipping_method']) . \"', shipping_code = '\" . $this->db->escape($data['shipping_code']) . \"', comment = '\" . $this->db->escape($data['comment']) . \"', total = '\" . (float)$data['total'] . \"', affiliate_id = '\" . (int)$data['affiliate_id'] . \"', commission = '\" . (float)$data['commission'] . \"', marketing_id = '\" . (int)$data['marketing_id'] . \"', tracking = '\" . $this->db->escape($data['tracking']) . \"', language_id = '\" . (int)$data['language_id'] . \"', currency_id = '\" . (int)$data['currency_id'] . \"', currency_code = '\" . $this->db->escape($data['currency_code']) . \"', currency_value = '\" . (float)$data['currency_value'] . \"', ip = '\" . $this->db->escape($data['ip']) . \"', forwarded_ip = '\" . $this->db->escape($data['forwarded_ip']) . \"', user_agent = '\" . $this->db->escape($data['user_agent']) . \"', accept_language = '\" . $this->db->escape($data['accept_language']) . \"', date_added = NOW(), date_modified = NOW()\");\n\n\t\t$order_id = $this->db->getLastId();\n\n\t\t// Products\n\t\tif (isset($data['products'])) {\n\t\t\tforeach ($data['products'] as $product) {\n\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_product SET order_id = '\" . (int)$order_id . \"', product_id = '\" . (int)$product['product_id'] . \"', name = '\" . $this->db->escape($product['name']) . \"', model = '\" . $this->db->escape($product['model']) . \"', quantity = '\" . (int)$product['quantity'] . \"', price = '\" . (float)$product['price'] . \"', total = '\" . (float)$product['total'] . \"', tax = '\" . (float)$product['tax'] . \"', reward = '\" . (int)$product['reward'] . \"'\");\n\t\n\t\t\t\t$order_product_id = $this->db->getLastId();\n\t\n\t\t\t\tforeach ($product['option'] as $option) {\n\t\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_option SET order_id = '\" . (int)$order_id . \"', order_product_id = '\" . (int)$order_product_id . \"', product_option_id = '\" . (int)$option['product_option_id'] . \"', product_option_value_id = '\" . (int)$option['product_option_value_id'] . \"', name = '\" . $this->db->escape($option['name']) . \"', `value` = '\" . $this->db->escape($option['value']) . \"', `type` = '\" . $this->db->escape($option['type']) . \"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Gift Voucher\n\t\t // don't need gift voucher\n\t\t\n\t\t// Totals\n\t\tif (isset($data['totals'])) {\n\t\t\tforeach ($data['totals'] as $total) {\n\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_total SET order_id = '\" . (int)$order_id . \"', code = '\" . $this->db->escape($total['code']) . \"', title = '\" . $this->db->escape($total['title']) . \"', `value` = '\" . (float)$total['value'] . \"', sort_order = '\" . (int)$total['sort_order'] . \"'\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $order_id;\n\t}", "function pacz_woocommerce_button_proceed_to_checkout() {\n\t\t$checkout_url = wc_get_checkout_url();\n\n\t\t?>\n\t\t<div class=\"button-icon-holder alt checkout-button-holder\"><a href=\"<?php echo esc_url($checkout_url); ?>\" class=\"checkout-button\"><i class=\"pacz-icon-shopping-cart\"></i><?php esc_html_e( 'Proceed to Checkout', 'classiadspro' ); ?></a></div>\n\t\t<?php\n\t}", "public function actionCheckout($order_id)\n {\n // Open a new session\n $session = Yii::$app->session;\n $invoice_id = 0;\n\n // check if a session is already open and create an [Invoice] header\n if ($session->isActive && $invoice = Invoice::find()->where(['session_id' => $session->id, 'invoice_status_id' => Invoice::OPEN_INVOICE])->one())\n {\n $invoice_id = $invoice->id;\n } else {\n $session->open();\n $invoice = new Invoice();\n $invoice->loadDefaultValues();\n $invoice->order_id = $order_id;\n $invoice->session_id = $session->id;\n $invoice->save();\n\n $invoice_id = $invoice->id;\n }\n\n // Copy from order-items\n $order_items = \\app\\models\\OrderItem::find()->where(['order_id'=> $order_id])->all();\n foreach ($order_items as $key => $value) {\n $invoice_item = new \\app\\models\\InvoiceItem();\n $invoice_item->loadDefaultValues();\n $invoice_item->invoice_id = $invoice_id;\n $invoice_item->product_item_id = $value['product_item_id'];\n $invoice_item->description = $value['description'];\n $invoice_item->quantity = $value['quantity'];\n $invoice_item->unit_cost = $value['unit_cost'];\n $invoice_item->total = $value['total'];\n $invoice_item->save();\n\n // Change product Status\n \\app\\models\\Product::setProductStatus($value['product_item_id'], 'ordered');\n\n }\n\n return $this->redirect(['payment/create', 'invoice_id' => $invoice_id]);\n }", "public function sendOrder(Mage_Sales_Model_Order $order)\n {\n try{\n\t\t\t$this->_eventType = 'placeOrder';\n\t\t\t$amount\t\t= number_format($order->getGrandTotal(),2);\n\t\t\t$samount\t= number_format($order->getSubtotal(),2);\n\t\t\t$tax \t\t= number_format($order->getBaseTaxAmount(),2);\n\t\t\t$shipping \t= number_format($order->getBaseShippingAmount(),2);\n\t\t\t$discounts \t= number_format($order->getDiscountAmount(),2);\n\t\t\t$shippingAddressData \t= $order->getShippingAddress()->getData();\n\t\t\t$billingAddressData \t= $order->getBillingAddress()->getData();\n\t\t\t$shippingMethod \t \t= $order->_data[\"shipping_description\"];\n\t\t\t$paymentMethod \t \t \t= $order->getPayment()->getMethodInstance()->getTitle();\n\t\t\t$customerId \t\t\t= $order->getCustomerId();\n\t\t\t$websiteId \t\t\t\t= 1;\n\t\t\t$balanceModel \t\t\t= Mage::getModel('enterprise_customerbalance/balance')\n\t\t \t\t\t\t \t->setCustomerId($customerId)\n\t\t \t\t\t\t \t->setWebsiteId($websiteId)\n\t\t \t\t\t\t\t->loadByCustomer();\t\n\t\t $storeCredit\t\t\t= ($balanceModel->getId())? number_format($balanceModel->getAmount(),2) :'0' ; \t\t\t\t\t\t\n $data = array(\n 'email' => $order->getCustomerEmail(),\n 'items' => $this->_getItems($order->getAllVisibleItems()),\n 'adjustments' => $this->_getAdjustments($order),\n 'message_id' => $this->getMessageId(),\n 'send_template' => 'Purchase Receipt',\n 'tenders' => $this->_getTenders($order),\n 'vars'\t=> array ( 'order#'=> $order->getIncrementId(),\n\t\t\t\t\t\t\t\t\t'subtotal'=> $samount,\n\t\t\t\t\t\t\t\t\t'shipping_and_handling'=> $shipping,\n\t\t\t\t\t\t\t\t\t'sale_tax'=> $tax,\n\t\t\t\t\t\t\t\t\t'billing_address'=> $shippingAddressData,\n\t\t\t\t\t\t\t\t\t'shipping_address'=> $billingAddressData,\n\t\t\t\t\t\t\t\t\t'shipping_method'=> $shippingMethod,\n\t\t\t\t\t\t\t\t\t'payment_method'=> $paymentMethod,\n\t\t\t\t\t\t\t\t\t'store_credit' => $storeCredit\n\t\t\t ),\n \t);\n /**\n * Send order data to purchase API\n */\n $responsePurchase = $this->apiPost('purchase', $data);\n\t\t\t\n\t\t\t/****Update product sku in following items for price alert****/\n $productSku = array();\n\t\t\tforeach ($order->getAllVisibleItems() as $item) {\n\t\t\t\tif($item->getProductType() == 'configurable') {\n\t\t\t\t\t$productSku[] = $item->getProduct()->getData('sku');\n\t\t\t\t}\n\t\t\t}\n $sailthru_userdata = $this->apiGet('user', array('id' => $order->getCustomerEmail()));\n\t\t\tif(isset($sailthru_userdata['vars']['following_items']) && $productSku) {\n\t\t\t\t$sailthru_followingItems = $sailthru_userdata['vars']['following_items'];\n\t\t\t\t$sailthru_followingItems = array_values($sailthru_followingItems);\n\t\t\t\t$sailthru_followingItems = array_diff($sailthru_followingItems,$productSku);\n\t\t\t\t$sailthru_followingItems = array_unique($sailthru_followingItems);\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\"id\" => $order->getCustomerEmail(),\n\t\t\t\t\t\t\"vars\" => array(\"following_items\" => $sailthru_followingItems)\n\t\t\t\t\t\t);\n\t\t\t\t$response = $this->apiPost('user', $data);\n\t\t\t}\n /*************************************************/\n\t\t\t\n /**\n * Send customer data to user API\n */\n //$responseUser = Mage::getModel('sailthruemail/client_user')->sendCustomerData($customer);\n }catch (Exception $e) {\n Mage::logException($e);\n return false;\n }\n }", "public function actionOrder($order_id=999)\n {\n \n $obj = $this->c->getOrderObj($order_id);\n //$data = $obj->houseContract->contracts[0]->getTemplate();\n if (!$obj->houseContract) {\n echo 'none houseContract obj!';\n }\n $arr = $obj->houseContract->contracts;\n foreach ($arr as $o) {\n $str = \"[tpl_id={$o->id}][tpl_name={$o->name}]===========>\\n\";\n $data = $o->getContractText();\n if (in_array(PHP_OS, array('windows', 'WINNT'))) {\n $str = iconv('utf-8', 'gbk', $str);\n $data = iconv('utf-8', 'gbk', $data);\n }\n echo $str;\n print_r($data);\n echo \"\\n\";\n }\n echo 'job done!';\n }", "public function addOrder(Order $order);", "public static function placeOrder($dbController, $customerId, $productId, $productQuantity) {\n $sql = \"SELECT * FROM order_processing WHERE customerid = $customerId AND processed = '0' \";\n $result = $dbController->conn->query($sql); \n //case of new order \n if ($result->num_rows == 0) {\n $sql = \"INSERT INTO order_processing(customerid,productid,quantity,processed,shipped)\n\t\t\t\t\t\tVALUES ($customerId,$productId,$productQuantity,0,0)\"; \n $dbController->conn->query($sql); \n $transactionId = $dbController->conn->insert_id;; // get last id\n // case of exist order\n } else {\n $row = $result->fetch_assoc();\n $transactionId = $row['transaction_id']; \n \n }\n \n //add product to cart\n $sql = \"SELECT * FROM order_product WHERE transaction_id = $transactionId AND product_id = $productId\";\n $result = $dbController->conn->query($sql);\n //case of new product\n if ($result->num_rows == 0) {\n \n $sql = \"INSERT INTO order_product VALUES ($transactionId,$productId,$productQuantity)\";\n }\n //case of exist product\n else {\n $row = $result->fetch_assoc();\n $productQuantity += $row['product_quantity'];\n $sql = \"UPDATE order_product SET product_quantity = $productQuantity \"\n . \"WHERE transaction_id =$transactionId AND product_id = $productId\";\n }\n \n return $dbController->conn->query($sql);\n \n }", "public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'shop_name'=>'required|string',\n 'owner_name'=>'required|string',\n 'coupon'=>'nullable|string',\n 'number'=>'required|numeric|digits:10',\n 'post'=>'required|string',\n 'pin'=>'required|numeric|digits:6',\n 'mark'=>'required|string',\n 'place'=>'required|string',\n 'email'=>'required|email'\n ]);\n //return $request->all();\n\n if(empty(Cart::where('user_id',auth()->user()->id)->where('order_id',null)->first())){\n request()->session()->flash('error','Cart is Empty !');\n return back();\n }\n\n\n $order=new Order();\n $order_data=$request->all();\n $order_data['order_number']='ORD-'.strtoupper(Str::random(10));\n\n $order_data['user_id']=$request->user()->id;\n $order_data['shipping_id']=$request->shipping;\n $shipping=Shipping::where('id',$order_data['shipping_id'])->pluck('price');\n // return session('coupon')['value'];\n $order_data['sub_total']=Helper::totalCartPrice();\n //return $order_data['sub_total'];\n $order_data['quantity']=Helper::cartCount();\n\n //gst 12% add with amound\n $gst=$order_data['sub_total']+($order_data['sub_total']*(12/100));\n //return $gst;\n\n\n if(session('coupon')){\n $order_data['coupon']=session('coupon')['value'];\n }\n if($request->shipping){\n if(session('coupon')){\n $order_data['total_amount']=$gst+$shipping[0]-session('coupon')['value'];\n }\n else{\n $order_data['total_amount']=$gst+$shipping[0];\n }\n }\n else{\n if(session('coupon')){\n $order_data['total_amount']=$gst-session('coupon')['value'];\n }\n else{\n $order_data['total_amount']=$gst;\n }\n }\n\n\n $order_data['status']=\"new\";\n $order_data['payment_status']='Unpaid';\n\n //$api = new Api(env('RAZOR_KEY'), env('RAZOR_SECRET'));\n //$create = $api->order->create(array('receipt' => '123', 'amount' => $order_data['total_amount'] * 100 , 'currency' => 'INR')); // Creates order\n //$orderId = $create['id'];\n\n\n\n\n\n $order->fill($order_data);\n //return $order;\n //dd($order);\n $status=$order->save();\n\n $data = array(\n 'order_id' => $order_data['order_number'],\n 'amount' => $order_data['total_amount']\n );\n\n //return $data;\n //Session::put('data', $data);\n //Session::put('order_id', $order_data['order_number']);\n //Session::put('amount' , $order_data['total_amount']);\n\n\n if($order)\n // dd($order->id);\n $users=User::where('role','admin')->first();\n $details=[\n 'title'=>'New order created',\n 'actionURL'=>route('order.show',$order->id),\n 'fas'=>'fa-file-alt'\n ];\n Notification::send($users, new StatusNotification($details));\n\n if(request('payment_method')=='paypal'){\n return redirect()->route('payment')->with(['id'=>$order->id]);\n }\n else{\n session()->forget('cart');\n session()->forget('coupon');\n }\n\n Cart::where('user_id', auth()->user()->id)->where('order_id', null)->update(['order_id' => $order->id]);\n\n // dd($users);\n\n\n //request()->session()->flash('success','Your product successfully placed in order');\n request()->session()->flash('success','Order successfully placed');\n //return redirect()->route('start')->with('data',$data);\n //return view('frontend.pages.payment')->with('data',$data);\n return redirect()->route('home');\n }", "private function _addBillingElement($order)\n {\n $billingAddress = $order->addChild('billingAddress');\n $this->_addAddressElement(\n $billingAddress,\n $this->billingAddress['firstName'],\n $this->billingAddress['lastName'],\n $this->billingAddress['street'],\n $this->billingAddress['postalCode'],\n $this->billingAddress['city'],\n $this->billingAddress['countryCode']\n );\n }", "public function run()\n {\n\n $order1 = new Order();\n $order1->processed = 1;\n $order1->user_id = 4;\n $order1->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:2:{i:10;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:5;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:10;s:5:\"title\";s:17:\"Bear Beer Special\";s:11:\"description\";s:176:\"Special Bear Beer beer. Combines classic sophistication with chic trendsetting.Great at weddings, picnics, and sporting events when it is being compared to domestic light beer.\";s:5:\"price\";s:4:\"2.50\";s:3:\"img\";s:28:\"/storage/images/bearbeer.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:6;a:3:{s:3:\"qty\";i:1;s:5:\"price\";d:2;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:6;s:5:\"title\";s:14:\"Laško Special\";s:11:\"description\";s:334:\"Laško Special combines classic sophistication with chic trendsetting. On the one hand, the designation “traditionally brewed” is about reviving tried and tested names in new versions, and on the other, “new tradition” suggests fresh recipes. History is embodied in a noble red, and the future in an elegant silver neck label.\";s:5:\"price\";s:4:\"2.00\";s:3:\"img\";s:27:\"/storage/images/special.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:3;s:10:\"totalPrice\";d:7;}';\n $order1->save();\n\n $order2 = new Order();\n $order2->processed = 1;\n $order2->user_id = 4;\n $order2->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:2:{i:4;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:2.8999999999999999;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:4;s:5:\"title\";s:16:\"Laško Weißbier\";s:11:\"description\";s:320:\"Laško Weißbier Laško Weißbier was inspired by the freshness of the Alps. This light, unfiltered beer pivo is characterized by haziness, yeast sediment and special harmonious note with mild bitterness. It\"s made with lovers of rich flavored beers in mind and it\"s the perfect refreshment for hanging out with friends.\";s:5:\"price\";s:4:\"1.45\";s:3:\"img\";s:25:\"/storage/images/weiss.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:1;a:3:{s:3:\"qty\";i:4;s:5:\"price\";d:4.3600000000000003;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:1;s:5:\"title\";s:15:\"Laško Zlatorog\";s:11:\"description\";s:985:\"A specific taste which has remained the same over years owing to our unchanged recipe. Full of pride! Zlatorog is a pale lager with a specific flavour, rich head and a characteristic distinct bitterness achieved by using worldwide known Slovenian hop varieties. Incorporating the finest ingredients and the latest technological advances and brewed using our traditional formula which has remained unchanged for decades we can proudly say Zlatorog is a beer that was already enjoyed by our grandparents. Incorporating the finest ingredients and the latest technological advances and brewed using our traditional formula which has remained unchanged for decades we can proudly say Zlatorog is a beer that was already enjoyed by our grandparents. It is the best-selling Laško beer which suggests how nicely it goes down the hatch. In selected bars across Slovenia you can also indulge in a mug of Laško Zlatorog draught beer which gratifies all the senses and provides perfect pleasure.\";s:5:\"price\";s:4:\"1.09\";s:3:\"img\";s:26:\"/storage/images/svetlo.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:6;s:10:\"totalPrice\";d:7.2599999999999998;}';\n $order2->save();\n\n $order3 = new Order();\n $order3->processed = 0;\n $order3->user_id = 5;\n $order3->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:3:{i:9;a:3:{s:3:\"qty\";i:10;s:5:\"price\";d:49.900000000000006;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:9;s:5:\"title\";s:19:\"Desparados Tequilla\";s:11:\"description\";s:163:\"Desperados is a pale lager beer with 5.9% alcohol by volume originally produced by the French brewing company Fischer Brewery, now produced by Karlovačko Brewery.\";s:5:\"price\";s:4:\"4.99\";s:3:\"img\";s:30:\"/storage/images/desparados.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:11;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:1.98;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:11;s:5:\"title\";s:5:\"Chang\";s:11:\"description\";s:446:\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\";s:5:\"price\";s:4:\"0.99\";s:3:\"img\";s:25:\"/storage/images/chang.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:10;a:3:{s:3:\"qty\";i:5;s:5:\"price\";d:12.5;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:10;s:5:\"title\";s:17:\"Bear Beer Special\";s:11:\"description\";s:176:\"Special Bear Beer beer. Combines classic sophistication with chic trendsetting.Great at weddings, picnics, and sporting events when it is being compared to domestic light beer.\";s:5:\"price\";s:4:\"2.50\";s:3:\"img\";s:28:\"/storage/images/bearbeer.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:17;s:10:\"totalPrice\";d:64.380000000000024;}';\n $order3->save();\n\n $order4 = new Order();\n $order4->processed = 1;\n $order4->user_id = 5;\n $order4->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:1:{i:3;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:2.6600000000000001;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:3;s:5:\"title\";s:20:\"Laško Unpasteurized\";s:11:\"description\";s:574:\"Laško Nepasterizirano (Laško Unpasteurized) is an exceptionally drinkable light beer that comes in bottles with a retro hint, and is celebrated for its relaxed character formed by a full taste, a pleasantly fresh, hoppy aroma and the authentic bitterness of the legendary Slovenian beer. Laško Nepasterizirano offers a unique freshness, which is why its shelf life is limited to 12 weeks. It is, in fact, created with the help of a special procedure following the traditional recipe using pure malt. The perfect companion for spontaneous gatherings on hot and sunny days.\";s:5:\"price\";s:4:\"1.33\";s:3:\"img\";s:35:\"/storage/images/nepasterizirano.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:2;s:10:\"totalPrice\";d:2.6600000000000001;}';\n $order4->save();\n\n $order5 = new Order();\n $order5->processed = 0;\n $order5->user_id = 6;\n $order5->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:1:{i:12;a:3:{s:3:\"qty\";i:24;s:5:\"price\";d:7.9199999999999999;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:12;s:5:\"title\";s:10:\"KingFisher\";s:11:\"description\";s:446:\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\";s:5:\"price\";s:4:\"0.33\";s:3:\"img\";s:30:\"/storage/images/kingfisher.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:24;s:10:\"totalPrice\";d:7.9200000000000008;}';\n $order5->save();\n\n }", "function receipt_page( $order ) {\n\t\techo '<p>'.__( 'Thank you for your order, please click the button below to pay with Veritrans.', 'woocommerce' ).'</p>';\n\t\techo $this->generate_veritrans_form( $order );\n\t}", "public function addPickupOrderEmailTemplate()\n {\n $template = $this->templateFactory->create();\n $template->setTemplateCode('New Pickup Order');\n $template->setTemplateText($this->getEmailTemplate());\n $template->setTemplateType(TemplateTypesInterface::TYPE_HTML);\n $template->setTemplateSubject(\n '{{trans \"Your %store_name order confirmation\" store_name=$store.getFrontendName()}}'\n );\n $template->setOrigTemplateCode('sales_email_order_template');\n // @codingStandardsIgnoreLine\n $template->setOrigTemplateVariables('{\"var formattedBillingAddress|raw\":\"Billing Address\",\"var order.getEmailCustomerNote()\":\"Email Order Note\",\"var order.increment_id\":\"Order Id\",\"layout handle=\\\"sales_email_order_items\\\" order=$order area=\\\"frontend\\\"\":\"Order Items Grid\",\"var payment_html|raw\":\"Payment Details\",\"var formattedShippingAddress|raw\":\"Shipping Address\",\"var order.getShippingDescription()\":\"Shipping Description\",\"var shipping_msg\":\"Shipping message\"}');\n\n $this->templateResource->save($template);\n }", "function wc_veruspay_display_crypto_address_in_admin( $order ) {\n\tglobal $wc_veruspay_global;\n\t$order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;\n\t$wc_veruspay_payment_method = $order->get_payment_method();\n\tif ( $wc_veruspay_payment_method == $wc_veruspay_global['id'] ){\n\t\t$wc_veruspay_order_status = get_post_meta( $order_id, '_wc_veruspay_status', TRUE );\n\t\tif ( $wc_veruspay_order_status == 'noaddress' ) {\n\t\t\tforeach ( $order->get_items() as $item_key => $item_values) { \n\t\t\t\t$wc_veruspay_stock = get_post_meta( $item_values['variation_id'], '_manage_stock', TRUE ); \n\t\t\t}\n\t\t\tupdate_post_meta( $order_id, '_wc_veruspay_status', sanitize_text_field( 'cancelled' ) );\n\t\t\t$order->update_status( 'cancelled', __( 'Missing Payment Address', 'woocommerce') );\n\t\t\theader(\"Refresh:0\");\n\t\t}\n\t\telse {\n\t\t\tif ( $order->has_status( 'processing' ) ) {\n\t\t\t\t$wc_veruspay_payment_status = 'Received';\n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_paid', TRUE );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$wc_veruspay_payment_status = 'Pending'; \n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_price', TRUE ); \n\t\t\t}\n\t\t\t$wc_veruspay_address = get_post_meta( $order_id, '_wc_veruspay_address', TRUE );\n\t\t\t$_chain_up = strtoupper( get_post_meta( $order_id, '_wc_veruspay_coin', TRUE ) );\n\t\t\t$_chain_lo = strtolower( $_chain_up );\n\t\t\techo '<style>.wc-order-totals-items{height:3rem!important}.wc-order-totals-items:after{content: \"' . $_chain_up . ' ' . $wc_veruspay_payment_status . ': ' . $wc_veruspay_price . '\"!important;position:relative;font-size:1rem;font-weight:bold;color:#007bff!important;top:0;float:right;width:200px;height:30px;}</style>';\n\t\t\techo '<p><strong>'.__( $_chain_up . ' Price', 'woocommerce' ).':</strong>' . $wc_veruspay_price . ' with exchange rate of ' . get_post_meta( $order_id, '_wc_veruspay_rate', TRUE ) . '</p>';\n\t\t\tif ( substr($wc_veruspay_address, 0, 2) !== 'zs' ) {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> <a target=\"_BLANK\" href=\"' . $wc_veruspay_global['chain_dtls'][$_chain_lo]['address'] . $wc_veruspay_address . '\">' . $wc_veruspay_address . '</a></p>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> '.$wc_veruspay_address.'</p';\n\t\t\t}\n\t\t}\n\t}\n}", "public function sCreateTemporaryOrder()\n {\n $this->sShippingData['AmountNumeric'] = $this->sShippingData['AmountNumeric'] ? $this->sShippingData['AmountNumeric'] : '0';\n if (!$this->sShippingcostsNumeric) {\n $this->sShippingcostsNumeric = 0.;\n }\n if (!$this->sBasketData['AmountWithTaxNumeric']) {\n $this->sBasketData['AmountWithTaxNumeric'] = $this->sBasketData['AmountNumeric'];\n }\n\n $net = '0';\n if ($this->isTaxFree(\n $this->sSYSTEM->sUSERGROUPDATA['tax'],\n $this->sSYSTEM->sUSERGROUPDATA['id']\n )) {\n $net = '1';\n }\n\n $dispatchId = '0';\n $this->sBasketData['AmountNetNumeric'] = round($this->sBasketData['AmountNetNumeric'], 2);\n if ($this->dispatchId) {\n $dispatchId = $this->dispatchId;\n }\n\n $this->sBasketData['AmountNetNumeric'] = round($this->sBasketData['AmountNetNumeric'], 2);\n\n if (empty($this->sBasketData['sCurrencyName'])) {\n $this->sBasketData['sCurrencyName'] = 'EUR';\n }\n if (empty($this->sBasketData['sCurrencyFactor'])) {\n $this->sBasketData['sCurrencyFactor'] = '1';\n }\n\n $shop = Shopware()->Shop();\n $mainShop = $shop->getMain() !== null ? $shop->getMain() : $shop;\n\n $taxfree = '0';\n if (!empty($this->sNet)) {\n // Complete net delivery\n $net = '1';\n $this->sBasketData['AmountWithTaxNumeric'] = $this->sBasketData['AmountNetNumeric'];\n $this->sShippingcostsNumeric = $this->sShippingcostsNumericNet;\n $taxfree = '1';\n }\n if (empty($this->sBasketData['AmountWithTaxNumeric'])) {\n $this->sBasketData['AmountWithTaxNumeric'] = '0';\n }\n if (empty($this->sBasketData['AmountNetNumeric'])) {\n $this->sBasketData['AmountNetNumeric'] = '0';\n }\n\n $data = [\n 'ordernumber' => '0',\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'invoice_amount' => $this->sBasketData['AmountWithTaxNumeric'],\n 'invoice_amount_net' => $this->sBasketData['AmountNetNumeric'],\n 'invoice_shipping' => $this->sShippingcostsNumeric,\n 'invoice_shipping_net' => $this->sShippingcostsNumericNet,\n 'ordertime' => new Zend_Db_Expr('NOW()'),\n 'status' => -1,\n 'paymentID' => $this->getPaymentId(),\n 'customercomment' => $this->sComment,\n 'net' => $net,\n 'taxfree' => $taxfree,\n 'partnerID' => (string) $this->getSession()->offsetGet('sPartner'),\n 'temporaryID' => $this->getSession()->offsetGet('sessionId'),\n 'referer' => (string) $this->getSession()->offsetGet('sReferer'),\n 'language' => $shop->getId(),\n 'dispatchID' => $dispatchId,\n 'currency' => $this->sBasketData['sCurrencyName'],\n 'currencyFactor' => $this->sBasketData['sCurrencyFactor'],\n 'subshopID' => $mainShop->getId(),\n 'deviceType' => $this->deviceType,\n ];\n\n try {\n $affectedRows = $this->db->insert('s_order', $data);\n $orderID = $this->db->lastInsertId();\n } catch (Exception $e) {\n throw new Enlight_Exception(sprintf('##sOrder-sTemporaryOrder-#01:%s', $e->getMessage()), 0, $e);\n }\n if (!$affectedRows || !$orderID) {\n throw new Enlight_Exception('##sOrder-sTemporaryOrder-#01: No rows affected or no order id saved', 0);\n }\n\n // Create order attributes\n $this->attributePersister->persist($this->orderAttributes, 's_order_attributes', $orderID);\n\n foreach ($this->sBasketData['content'] as $basketRow) {\n if (!$basketRow['price']) {\n $basketRow['price'] = '0,00';\n }\n\n $basketRow['articlename'] = html_entity_decode($basketRow['articlename']);\n $basketRow['articlename'] = strip_tags($basketRow['articlename']);\n\n $basketRow['articlename'] = $this->sSYSTEM->sMODULES['sArticles']->sOptimizeText($basketRow['articlename']);\n\n if (!$basketRow['esdarticle']) {\n $basketRow['esdarticle'] = '0';\n }\n if (!$basketRow['modus']) {\n $basketRow['modus'] = '0';\n }\n if (!$basketRow['taxID']) {\n $basketRow['taxID'] = '0';\n }\n if (!$basketRow['releasedate']) {\n $basketRow['releasedate'] = '0000-00-00';\n }\n\n $data = [\n 'orderID' => $orderID,\n 'ordernumber' => 0,\n 'articleID' => $basketRow['articleID'],\n 'articleDetailID' => $basketRow['additional_details']['articleDetailsID'],\n 'articleordernumber' => $basketRow['ordernumber'],\n 'price' => $basketRow['priceNumeric'],\n 'quantity' => $basketRow['quantity'],\n 'name' => $basketRow['articlename'],\n 'status' => 0,\n 'releasedate' => $basketRow['releasedate'],\n 'modus' => $basketRow['modus'],\n 'esdarticle' => $basketRow['esdarticle'],\n 'taxID' => $basketRow['taxID'],\n 'tax_rate' => $basketRow['tax_rate'],\n ];\n\n try {\n $this->db->insert('s_order_details', $data);\n $orderDetailId = $this->db->lastInsertId();\n } catch (Exception $e) {\n throw new Enlight_Exception(\n sprintf('##sOrder-sTemporaryOrder-Position-#02:%s', $e->getMessage()),\n 0,\n $e\n );\n }\n\n // Create order detail attributes\n $attributeData = $this->attributeLoader->load('s_order_basket_attributes', $basketRow['id']);\n $this->attributePersister->persist($attributeData, 's_order_details_attributes', $orderDetailId);\n } // For every product in basket\n }", "function receipt_page($order) {\n echo '<p>' . __('Gracias! - Tu orden ahora está pendiente de pago. Deberías ser redirigido automáticamente a la página de transbank.') . '</p>';\n\n echo $this->generate_webpayplus_form($order);\n }", "public function placeOrder(Mage_Sales_Model_Quote $quote)\n {\n Mage::dispatchEvent(\"fontis_masterpass_place_order_before\", array(\"quote\" => $quote));\n\n // Check to see if the customer is logged in or not.\n if (!$quote->getCustomerId()) {\n $quote->setCustomerIsGuest(true)\n ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)\n ->setCustomerEmail($quote->getBillingAddress()->getEmail());\n }\n $quote->collectTotals();\n\n /** @var Mage_Sales_Model_Service_Quote $service */\n $service = Mage::getModel(\"sales/service_quote\", $quote);\n\n // The Mage_Sales_Model_Service_Quote interface changed from v1.4.1.0 CE onwards.\n // This accounts for this change.\n if (method_exists($service, \"submitAll\")) {\n $service->submitAll();\n $order = $service->getOrder();\n } else {\n $order = $service->submit();\n }\n $order->save();\n\n Mage::dispatchEvent(\"fontis_masterpass_place_order_after\", compact(\"quote\", \"order\"));\n\n return $order;\n }", "public function setupPayment($order){\r\n $response = array(\r\n 'success'=> false,\r\n 'msg'=> __('Payment failed!', ET_DOMAIN)\r\n );\r\n // write session\r\n et_write_session('order_id', $order->ID);\r\n et_write_session('processType', 'buy');\r\n $arg = apply_filters('ae_payment_links', array(\r\n 'return' => et_get_page_link('process-payment') ,\r\n 'cancel' => et_get_page_link('process-payment')\r\n ));\r\n /**\r\n * process payment\r\n */\r\n $paymentType_raw = $order->payment_type;\r\n $paymentType = strtoupper($order->payment_type);\r\n /**\r\n * factory create payment visitor\r\n */\r\n $order_data = array(\r\n 'payer' => $order->post_author,\r\n 'total' => '',\r\n 'status' => 'draft',\r\n 'payment' => $paymentType,\r\n 'paid_date' => '',\r\n 'post_parent' => $order->post_parent,\r\n 'ID'=> $order->ID,\r\n 'amount'=> $order->amount\r\n );\r\n $order_temp = new mJobOrder($order_data);\r\n $order_temp->add_product($order);\r\n $order = $order_temp;\r\n $visitor = AE_Payment_Factory::createPaymentVisitor($paymentType, $order, $paymentType_raw);\r\n // setup visitor setting\r\n $visitor->set_settings($arg);\r\n // accept visitor process payment\r\n $nvp = $order->accept($visitor);\r\n if ($nvp['ACK']) {\r\n $response = array(\r\n 'success' => $nvp['ACK'],\r\n 'data' => $nvp,\r\n 'paymentType' => $paymentType\r\n );\r\n } else {\r\n $response = array(\r\n 'success' => false,\r\n 'paymentType' => $paymentType,\r\n 'msg' => __(\"Invalid payment gateway!\", ET_DOMAIN)\r\n );\r\n }\r\n /**\r\n * filter $response send to client after process payment\r\n *\r\n * @param Array $response\r\n * @param String $paymentType The payment gateway user select\r\n * @param Array $order The order data\r\n *\r\n * @package AE Payment\r\n * @category payment\r\n *\r\n * @since 1.0\r\n * @author Dakachi\r\n */\r\n $response = apply_filters('mjob_setup_payment', $response, $paymentType, $order);\r\n return $response;\r\n }", "function receipt_page( $order ) {\n\n\t\t\techo '<p>'. __( 'Thank you for your order, please click the button below to pay with eSewa.', 'esewa-payment-gateway-for-woocommerce' ) . '</p>';\n\t\t\techo $this->generate_esewa_form( $order );\n\n\t\t}", "public function purchase($options);", "private function saveOrder() {\n $currentDate = new Zend_Date();\n $customer = Customer::findByEmail($this->getRequest()->getParam('email'));\n $customer->name = $this->getRequest()->getParam('name');\n $customer->phone = $this->getRequest()->getParam('phone');\n\n $ord = new Order();\n $ord->Customer = $customer;\n $ord->date = $currentDate->get();\n //TODO Take product id from param and check if it is available (not in future, still on sales, etc)\n $product = Product::getCurrentProduct();\n $ord->Product = $product;\n $customer->save();\n $ord->save();\n $product->takeFromStock();\n $customer->sendOrderNotification($ord);\n }", "public function placeOrder(){\n $sql = \"INSERT INTO `tbl_order`(`o_id`, `u_id`, `p_id`, `date`) VALUES (NULL,'$this->userId','$this->productId','$this->orderDate')\";\n // echo $sql; exit;\n return $this->connect->qry($sql);\n }", "public function saveOrder()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$modelUserCart = $this->getModel('usercart');\n\n\t\t$modelUserCart->storeUserOrder();\n\t\t$modelUserCart->sendOrderMail();\n\t\t$modelUserCart->emptyCart();\n\t\t$params = $app->getParams('com_simpleshop');\n\t\t$return_url = $params->get('return_url');\n\n\n\t\t$app->redirect($return_url);\n\n\t}", "public function store(Request $request)\n {\n \n /* Note: please try improving the code below if possible for production */\n //------------------------------------------------------------------------//\n\n\n //Finding the requested item for the order \n $item = Item::findOrFail( request('item_id') );\n \n //Getting the Quanitiy & customer's name\n $qty = request('qty');\n $customer_name = request('customer_name');\n $total = $item->price * $qty; //Calculating the total\n \n // Checks if the order is already paid for or not\n if(request('paid') == null) $paid=0;\n else $paid = 1;\n\n //getting the first Order line object (if any)\n $first = Order_line::orderBy('id', 'desc')->first();\n \n //Checking whether our table is empty or has record \n if($first == null) $order_line = 1;\n else $order_line = $first->id + 1 ; \n\n //Inserting the new order to the database\n Order::create([\n \"customer_name\" => $customer_name,\n \"price\" => $item->price,\n \"order_lines_id\" => $order_line,\n \"paid\" => $paid\n ]);\n\n //Retrevieng the last order for the order ID\n $order_id = Order::orderBy('id', 'desc')->first()->id;\n\n //Inserting the orderLine\n Order_line::create([\n 'id' => $order_line,\n 'order_id' => $order_id,\n 'item_id' => $item->id,\n 'price' => $total,\n 'qty' => $qty\n ]);\n\n // Returning back to the index page\n return redirect('orders');\n }", "public function paypalCreateOrder(SessionInterface $session) {\n\n $clientId = \"AZvdHvxArQ6e9N1xtCO-Hc8X6oFGVxizZfnkJvDEYGF4zP727c1NjVD5lGbbDxi4QjGraqrFQ_cxcZNm\";\n $clientSecret = \"EANsINF_SmRiv25XBD0g5dIDdKmcoQCIpiaGhcazF45itNfSSW1t-Hm1NXoF5C7QxCt094i8KjaCGgn8\";\n $env = new SandboxEnvironment($clientId,$clientSecret);\n $client = new PayPalHttpClient($env);\n $req = new OrdersCreateRequest();\n $req->prefer('return=representation');\n\n // Get Orders from cart\n /** @var Cart|null $cart */\n if ($session->has('CART') === true) {\n $cart = $session->get('CART');\n }\n if (null === $cart) {\n throw new $this->createNotFoundException();\n }\n if($cart->getCartLines()->count() == 0){\n throw new $this->createNotFoundException();\n }\n $lines = $cart->getCartLines();\n $items = [];\n $menuName=\"\";\n $qty = 1;\n $description = \"\";\n $currency = \"USD\";\n /*switch ($city = $session->get('CART')) {\n case \"Morroco\":\n $currency ='MAD';\n break;\n case \"Canada\":\n $currency='USD';\n break;\n default:\n $currency='USD';\n }*/\n foreach ($lines as $line) {\n /** @var Variant|null $variant */\n $variant = $line->getVariant();\n $qty= $line->getQuantity();\n $price = $variant->getPrice();\n $description = $variant->getSize();\n\n /** @var User|null $restaurant */\n if ($variant->getMenu() != null) {\n $restaurant = $variant->getMenu()->getUser();\n $menuName = $variant->getMenu()->getName();\n } elseif ($variant->getSubMenu() != null) {\n $restaurant = $variant->getSubMenu()->getMenu()->getUser();\n $menuName = $variant->getSubMenu()->getName();\n } else {\n throw new NotFoundHttpException();\n }\n\n $item = [\n 'name' => $menuName,\n 'description' => $description,\n 'unit_amount' =>\n [\n 'currency_code' => $currency,\n 'value' => $price,\n ],\n 'quantity' => $qty,\n ];\n $items[]= $item;\n }\n $req->body = array(\n 'intent' => 'CAPTURE',\n 'application_context' =>\n array(\n 'brand_name' => 'Foodepia',\n 'landing_page' => 'BILLING',\n 'user_action' => 'PAY_NOW',\n ),\n 'purchase_units' =>\n array(\n 0 =>\n array(\n 'amount' =>\n array(\n 'currency_code' => $currency,\n 'value' => $cart->total(),\n 'breakdown' =>\n array(\n 'item_total' =>\n array(\n 'currency_code' => $currency,\n 'value' => $cart->total(),\n ),\n ),\n ),\n 'items' => $items,\n ),\n ),\n );\n try {\n // Call API with your client and get a response for your call\n $response = $client->execute($req);\n return new JsonResponse($response);\n // If call returns body in response, you can get the deserialized version from the result attribute of the response\n }catch (HttpException $ex) {\n $response = $ex->getMessage();\n $response .= $ex->statusCode ;\n return new JsonResponse($response);\n }\n }", "public function save_order() {\n$customer = array(\n'nama' => $this->input->post('nama'),\n'email' => $this->input->post('email'),\n);\n// And store user information in database.\n$cust_id = $this->Shop_model->insert_customer($customer);\n\n$order = array(\n'pelanggan' => $cust_id\n);\n\n$ord_id = $this->Shop_model->insert_order($order);\n\n\nforeach ($this->cart->contents() as $item):\n$order_detail = array(\n'order_id' => $ord_id,\n'produk' => $item['id'],\n'qty' => $item['qty'],\n'harga' => $item['price']\n);\n\n// Insert product imformation with order detail, store in cart also store in database.\n\n$cust_id = $this->Shop_model->insert_order_detail($order_detail);\nendforeach;\n\n\nredirect('shop');\n\n }", "public function order() {\n if(\\Auth::user() == null){\n\n \\Session::flash('warning', 'Je moet eerst inloggen!');\n return Redirect('/inloggen');\n\n }\n\n // Create order\n $order = new Order();\n $order->user_id = \\Auth::user()->id;\n\n // Save order\n $order->save();\n\n // Store ordered products\n foreach($this->getCart() as $item => $amount){\n $order_product = new OrderProduct();\n $order_product->order_id = $order->id;\n $order_product->product_id = $item;\n $order_product->amount = $amount;\n $order_product->save();\n }\n\n // Remove shopping cart session\n session()->forget('cart');\n\n // Send user to his order page\n return Redirect('/orders/'.$order->id);\n\n }", "public function store(Request $request)\n {\n $request->validate([\n 'billing_fullname' => 'required',\n 'billing_address' => 'required',\n 'billing_city' => 'required',\n 'billing_province' => 'required',\n 'billing_zipcode' => 'required',\n 'billing_phone' => 'required',\n 'notes' => 'max:255',\n ]);\n\n $order = Order::create([\n 'order_number' => uniqid(),\n 'user_id' => auth()->user()->id ?? null,\n 'billing_discount' => $this->getNumbers()->get('discount'),\n 'billing_discount_code' => $this->getNumbers()->get('code'),\n 'billing_subtotal' => $this->getNumbers()->get('newSubtotal'),\n 'billing_tax' => $this->getNumbers()->get('newTax'),\n 'billing_total' => $this->getNumbers()->get('newTotal'),\n 'billing_fullname' => $request->billing_fullname,\n 'billing_address' => $request->billing_address,\n 'billing_city' => $request->billing_city,\n 'billing_province' => $request->billing_province,\n 'billing_zipcode' => $request->billing_zipcode,\n 'billing_phone' => $request->billing_phone,\n 'billing_email' => $request->billing_email,\n 'notes' => $request->billing_notes,\n 'error' => null, \n ]);\n\n foreach (Cart::content() as $item) {\n OrderProduct::create([\n 'order_id' => $order->id, \n 'product_id' => $item->model->id,\n 'quantity' => $item->qty,\n ]); \n }\n\n //paypal payment\n if ($request->payment_method == 'paypal') {\n # redirect to paypal\n return redirect(route('paypal.checkout', $order->id));\n\n }\n\n //clear cart contents\n Cart::destroy();\n\n session()->flash('success', \"Thank you $request->billing_fullname, your order has been placed successfully!\");\n\n return redirect(route('my-orders.index'));\n }", "function order_success()\n{\n\n}", "public static function geoCart_payment_choicesProcess()\n {\n //VARIABLES TO SEND\n //sid\n //product_id\n //quantity\n //merchant_order_id\n //demo\n trigger_error('DEBUG TRANSACTION: Top of process 2checkout.');\n $cart = geoCart::getInstance();\n $gateway = geoPaymentGateway::getPaymentGateway(self::gateway_name);\n $user_data = $cart->user_data;\n\n //get invoice on the order\n $invoice = $cart->order->getInvoice();\n $invoice_total = $due = $invoice->getInvoiceTotal();\n\n if ($due >= 0) {\n //DO NOT PROCESS! Nothing to process, no charge (or returning money?)\n return ;\n }\n\n $transaction = new geoTransaction();\n $transaction->setGateway(self::gateway_name);\n $transaction->setUser($cart->user_data['id']);\n $transaction->setStatus(0); //for now, turn off until it comes back from paypal IPN.\n $transaction->setAmount(-1 * $due);//set amount that it affects the invoice\n $msgs = $cart->db->get_text(true, 183);\n $transaction->setDescription($msgs[500575]);\n\n $transaction->setInvoice($invoice);\n\n $transaction->save();\n\n $testing = $gateway->get('testing_mode');\n $sid = geoString::specialChars($gateway->get('sid'));\n $responseURL = self::_getResponseURL();\n\n\n //build redirect\n $formdata = $cart->user_data['billing_info'];\n $cc_url = \"https://www.2checkout.com/2co/buyer/purchase?\";\n\n $cc_url .= \"sid=\" . $sid;\n $cc_url .= \"&fixed=Y\";\n $cc_url .= \"&x_receipt_link_url=\" . urlencode($responseURL);\n $cc_url .= \"&cart_order_id=\" . $transaction->getId();\n $cc_url .= \"&total=\" . sprintf(\"%01.2f\", $transaction->getAmount());\n if ($testing) {\n $cc_url .= \"&demo=Y\";\n }\n $cc_url .= \"&card_holder_name=\" . urlencode($formdata['firstname'] . \" \" . $formdata['lastname']);\n $cc_url .= \"&street_address=\" . urlencode($formdata['address'] . \" \" . $formdata['address_2']);\n $cc_url .= \"&city=\" . urlencode($formdata['city']);\n $cc_url .= \"&state=\" . urlencode($formdata['state']);\n $cc_url .= \"&zip=\" . urlencode($formdata['zip']);\n $cc_url .= \"&country=\" . urlencode($formdata['country']);\n $cc_url .= \"&email=\" . urlencode($formdata['email']);\n $cc_url .= \"&phone=\" . urlencode($formdata['phone']);\n $cc_url .= \"&merchant_order_id=\" . $cart->order->getId() . self::ORDER_SEP . $transaction->getId();\n\n //remember URL for debugging if needed\n $transaction->set('cc_url', $cc_url);\n $transaction->save();\n\n //add transaction to invoice\n $invoice->addTransaction($transaction);\n\n //set order to pending\n $cart->order->setStatus('pending');\n\n //stop the cart session\n $cart->removeSession();\n trigger_error('DEBUG TRANSACTION: 2checkout URL: ' . $cc_url);\n require GEO_BASE_DIR . 'app_bottom.php';\n //go to 2checkout to complete\n header(\"Location: \" . $cc_url);\n exit;\n }", "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 }", "public function execute()\n {\n if (!$this->cart->getQuote()->getId()) {\n $this->_redirect('/');\n } else {\n $resultPage = $this->resultPageFactory->create();\n $currencyCode = $this->cart->getQuote()->getStoreCurrencyCode();\n $email = $_POST['email'];\n $customerEmail = $this->pwLocalModel->getEmailCustomer() == null ? $email : $this->pwLocalModel->getEmailCustomer();\n\n $tempOrder = [\n 'currency_id' => $currencyCode,\n 'email' => $customerEmail,\n 'shipping_address' => $this->pwLocalModel->getShipping(),\n 'items' => $this->pwLocalModel->getProducts()\n ];\n\n $tempOrder['billing_address'] = $this->getRequest()->getParam('billing_data') ? json_decode($this->getRequest()->getParam('billing_data'),true) : $this->pwLocalModel->getShipping();\n $result = $this->pwLocalModel->createMageOrder($tempOrder);\n\n if ($result['status']) {\n $params = [\n 'email' => $customerEmail,\n 'orderId' => $result['order_id'],\n 'currency' => $currencyCode,\n 'total' => $result['total_paid']\n ];\n\n $widget = $this->pwLocalModel->getWidget($params);\n\n $resultPage->getConfig()->getTitle()\n ->prepend(__('New order with Paymentwall: #' . $result['order_id']));\n $resultPage->getLayout()->getBlock('paymentwall_paymentwall')->setData('widget', $widget);\n } else {\n $resultPage->getConfig()->getTitle()\n ->prepend(__($result['message']));\n }\n }\n return $resultPage;\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'name'=>'required',\n 'address'=>'required',\n 'phone'=>'required'\n ]);\n\n if($request->payment_method != \"cash_in\"){\n if($request->transaction_id == NULL || empty($request->transaction_id)){\n return back()->with('error','Please Insert Transaction Id');\n }\n }\n $payment_id = Payment::where('short_name',$request->payment_method)->first();\n $order = new Order();\n if(Auth::check()){\n $order->user_id = Auth::id();\n }\n\n $order->email = $request->email;\n $order->name = $request->name;\n $order->address = $request->address;\n $order->phone = $request->phone;\n $order->ip_address = request()->ip();\n $order->payment_id = $payment_id->id;\n $order->transaction_id = $request->transaction_id;\n $order->save();\n\n foreach (Cart::totalCarts() as $cart){\n $cart->order_id = $order->id;\n $cart->save();\n }\n return redirect()->route('products.index')->with('success','Order Successful');\n\n\n }", "public function pay($order)\n {\n $order=Order::findOrFail($order);\n $totalValue=$order->order_price+$order->delivery_price;\n\n //GET THE KEY\n //System setup \n $access_token=config('mercadopago.access_token',\"\");\n\n //Setup based on vendor\n if(config('mercadopago.useVendor')){\n $access_token=$order->restorant->getConfig('mercadopago_access_token','');\n }\n\n // Agrega credenciales\n SDK::setAccessToken($access_token);\n\n \n \n // Crea un objeto de preferencia\n $preference = new Preference();\n\n // Crea un ítem en la preferencia\n $item = new Item();\n $item->title = 'Pedido #'.$order->id;\n $item->quantity = 1;\n $item->unit_price = $totalValue;\n $preference->items = array($item);\n $preference->external_reference=$order->id;\n\n $preference->back_urls = array(\n \"success\" => route('mercadopago.execute','success'),\n \"failure\" => route('mercadopago.execute','failure'),\n \"pending\" => route('mercadopago.execute','pending')\n );\n $preference->auto_return = \"approved\";\n\n\n $preference->save();\n\n //OR\n return redirect($preference->init_point);\n\n //OR\n // return view('mercadopago::pay',['preference_id'=>$preference->id,'order'=>$order]);\n }", "function placeOrder($username, $subtotal, $GST, $grandTotal, $status)\n {\n $users = $this->data->getUserByName($username);\n while ($user = $users->fetch_assoc())\n {\n $userID = $user['UserID'];\n }\n return $this->data->insertOrder($userID, $subtotal, $GST, $grandTotal, $status);\n }", "public function preparePayment() {\n\n $order = $this->getOrder();\n $payment = $this->getPaymentModule();\n\n $amount = $order->getTotalAmount();\n $amount = (int) round($amount * 100);\n $orderId = $order->get(\"id\");\n\n $payment->setId($orderId);\n $payment->setCurrency($this->modules->get(\"PadCart\")->currency);\n\n $url = $this->page->httpUrl;\n $payment->setProcessUrl($url . \"process/\" . $orderId . \"/\");\n $payment->setFailureUrl($url . \"fail/\");\n $payment->setCancelUrl($url . \"cancel/\");\n\n $customer = Array();\n $customer['givenName'] = $order->pad_firstname;\n $customer['familyName'] = $order->pad_lastname;\n $customer['streetAddress'] = $order->pad_address;\n $customer['streetAddress2'] = $order->pad_address2;\n $customer['locality'] = $order->pad_city;\n $customer['postalCode'] = $order->pad_postcode;\n $customer['country'] = $order->pad_countrycode;\n $customer['email'] = $order->email;\n $payment->setCustomerData($customer);\n\n foreach ($order->pad_products as $p) {\n $amount = $p->pad_price * 100; // Amount in payment modules always in cents\n if ($this->cart->prices_without_tax) $amount = $amount + ($p->pad_tax_amount * 100 / $p->pad_quantity); // TODO: currently we have only\n $payment->addProduct($p->title, $amount, $p->pad_quantity, $p->pad_percentage, $p->pad_product_id);\n }\n }", "public function payWayPurchase()\n\t{\n\t}" ]
[ "0.71236956", "0.70294875", "0.6991281", "0.6849258", "0.66342485", "0.6588023", "0.6585187", "0.6568522", "0.65447295", "0.6419774", "0.6392548", "0.6386586", "0.63590527", "0.6308668", "0.63011426", "0.6278019", "0.6258966", "0.62468094", "0.6238467", "0.6223669", "0.6223247", "0.62042856", "0.6199984", "0.61988527", "0.61978334", "0.6194136", "0.61912155", "0.6165965", "0.61443657", "0.61372304", "0.6121608", "0.6121323", "0.6116776", "0.6112609", "0.61102843", "0.60877186", "0.60867685", "0.6074842", "0.6068926", "0.6047563", "0.6028853", "0.6021418", "0.6016211", "0.60054666", "0.59636086", "0.595996", "0.5957992", "0.59547436", "0.59482276", "0.5938723", "0.5934967", "0.59304607", "0.59253395", "0.59200054", "0.5919833", "0.5912515", "0.591215", "0.5909598", "0.59070474", "0.5905153", "0.5902328", "0.5901452", "0.58962667", "0.5884841", "0.58751243", "0.5871364", "0.58672965", "0.58668256", "0.5854548", "0.584915", "0.5848239", "0.58414716", "0.58387053", "0.58358085", "0.5833484", "0.58299387", "0.5827253", "0.58253163", "0.58237374", "0.5814615", "0.58142245", "0.58112454", "0.58097434", "0.5807455", "0.5803079", "0.5800946", "0.5798044", "0.5791277", "0.5786595", "0.57796764", "0.57779056", "0.57706314", "0.5768821", "0.5765444", "0.5763752", "0.5754276", "0.5752687", "0.5749317", "0.5746587", "0.57441837" ]
0.64667463
9
Handle the remove issue command.
public function handle(RemoveIssueCommand $command) { $issue = $command->issue; event(new IssueWasRemovedEvent($issue)); $issue->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteIssue($args, $request) {\n\t\t$issueId = (int) $request->getUserVar('issueId');\n\t\t$journal = $request->getJournal();\n\t\t$issueDao = DAORegistry::getDAO('IssueDAO');\n\t\t$issue = $issueDao->getById($issueId, $journal->getId());\n\t\tif (!$issue) fatalError('Invalid issue ID!');\n\n\t\t$isBackIssue = $issue->getPublished() > 0 ? true: false;\n\n\t\t// remove all published articles and return original articles to editing queue\n\t\t$articleDao = DAORegistry::getDAO('ArticleDAO');\n\t\t$publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');\n\t\t$publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);\n\t\tif (isset($publishedArticles) && !empty($publishedArticles)) {\n\t\t\t// Insert article tombstone if the issue is published\n\t\t\timport('classes.article.ArticleTombstoneManager');\n\t\t\t$articleTombstoneManager = new ArticleTombstoneManager();\n\t\t\tforeach ($publishedArticles as $article) {\n\t\t\t\tif ($isBackIssue) {\n\t\t\t\t\t$articleTombstoneManager->insertArticleTombstone($article, $journal);\n\t\t\t\t}\n\t\t\t\t$articleDao->changeStatus($article->getId(), STATUS_QUEUED);\n\t\t\t\t$publishedArticleDao->deletePublishedArticleById($article->getPublishedArticleId());\n\t\t\t}\n\t\t}\n\n\t\t$issueDao->deleteObject($issue);\n\t\tif ($issue->getCurrent()) {\n\t\t\t$issues = $issueDao->getPublishedIssues($journal->getId());\n\t\t\tif (!$issues->eof()) {\n\t\t\t\t$issue = $issues->next();\n\t\t\t\t$issue->setCurrent(1);\n\t\t\t\t$issueDao->updateObject($issue);\n\t\t\t}\n\t\t}\n\n\t\treturn DAO::getDataChangedEvent($issueId);\n\t}", "protected function afterRemoving()\n {\n }", "public function remove() {\n\t\tremove_action($this->controller->getHookName(),array($this,'handle'),$this->priority);\n }", "public function remove() {}", "public function remove() {}", "public function processDelete(): void \n {\n if ($this->delete()) { // The tag is deleted in the database storage.\n auth()->user()->logActivity($this, 'Tags', 'Has deleted an issue tag with the name ' . $this->name);\n flash(\"The ticket tag with the name <strong>{$this->name}</strong> has been deleted in the application.\")->info()->important();\n }\n }", "public function onRemove();", "function removeIssueFromAlerts($Issue){\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"delete from issuealert where userid='$user' and issueid='$Issue'\";\r\n\t\tmysql_query($query);\r\n\t}", "public function resolveRemove() {\r\n\t\tif($this->status == self::CONFLICT && $this->numFiles == 1) {\r\n\t\t\t$this->status = self::OBSOLETE;\r\n\t\t\tlist($this->from, $this->to) = array($this->to, $this->from);\t// Swaps from and to\r\n\t\t\t$this->direction = 3 - $this->direction;\t// Changes direction: 1 -> 2, 2 -> 1\r\n\t\t}\r\n\t}", "public function remove() {\n }", "protected function beforeRemoving()\n {\n }", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "protected function _postDelete()\n {\n $this->getResource()->delete();\n\n $this->getIssue()->compileHorizontalPdfs();\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function afterRemove()\n\t{}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function hookRemove(): void\n {\n $this->say(\"Executing the Plugin's remove hook...\");\n $this->_exec(\"php ./src/hook_remove.php\");\n }", "public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }", "public function postRemove($entity);", "function remove($iat_id, $add_history = true)\n {\n $iat_id = Misc::escapeInteger($iat_id);\n $usr_id = Auth::getUserID();\n $stmt = \"SELECT\n iat_iss_id\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment\n WHERE\n iat_id=$iat_id\";\n if (Auth::getCurrentRole() < User::getRoleID(\"Manager\")) {\n $stmt .= \" AND\n iat_usr_id=$usr_id\";\n }\n $res = DB_Helper::getInstance()->getOne($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n }\n\n if (empty($res)) {\n return -2;\n }\n\n $issue_id = $res;\n $files = self::getFileList($iat_id);\n $stmt = \"DELETE FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment\n WHERE\n iat_id=$iat_id AND\n iat_iss_id=$issue_id\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n }\n foreach ($files as $file) {\n self::removeFile($file['iaf_id']);\n }\n if ($add_history) {\n Issue::markAsUpdated($usr_id);\n // need to save a history entry for this\n History::add($issue_id, $usr_id, History::getTypeID('attachment_removed'), 'Attachment removed by ' . User::getFullName($usr_id));\n }\n return 1;\n }", "function deleteIssue( $sessionID, $issueID ) {\r\n\t\t//@session_start();\r\n\t\tif( $this->userCanDeleteIssue( $sessionID, $issueID ) ) {\r\n\t\t\t\r\n\t\t\t// delete attached files and references to files in db\r\n\t\t\t$contacts = $this->getIssuesContacts($issueID);\r\n\t\t\tfor($i=0; $i<sizeof($contacts); $i++){\r\n\t\t\t\t$contact = $this->viewContact('', $contacts[$i]);\r\n\t\t\t\tif(!$this->deleteAllFiles($contact['ID'])){\r\n\t\t\t\t\techo 'Error deleting files for contact '.$contact['ID'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t// Michael Thompson * 12/14/2005 * Also delete contacts, watches, xrefs, etc...\r\n\t\t\t$query = \"DELETE FROM issues WHERE ID='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"delete from `issuealert` where IssueID ='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"delete from `issuewatch` where IssueID ='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"DELETE FROM `contacts-users` WHERE ContactID in (select id from contacts where issue = '\".$issueID.\"' )\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t$query = \"DELETE FROM `contacts-students` WHERE ContactID in (select id from contacts where issue = '\".$issueID.\"' )\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t$query = \"delete from contacts where issue='$issueID'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t}\r\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('rid', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$removed = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$entry = Respondent::oneOrFail(intval($id));\n\n\t\t\t// Delete the entry\n\t\t\tif (!$entry->destroy())\n\t\t\t{\n\t\t\t\tNotify::error($entry->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Trigger before delete event\n\t\t\t\\Event::trigger('onEventsAfterDeleteRespondent', array($id));\n\n\t\t\t$removed++;\n\t\t}\n\n\t\tif ($removed)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_EVENTS_RESPONDENT_REMOVED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . Request::getInt('event', 0), false)\n\t\t);\n\t}", "public function remove()\n {\n }", "abstract public function delete__do_process ();", "function edithistory_delete_post($pid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"pid='{$pid}'\");\n}", "public function remove()\n {\n\n }", "public function remove()\n\t{\n\t\t$this->todo = 3 ;\n\t}", "public function adminRemove()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function remove() {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = \"--force\";\n\t\t$cmdArgs[] = escapeshellarg($this->name);\n\t\t$cmdArgs[] = \"remove\";\n\t\t$cmd = new \\OMV\\System\\Process(\"update-rc.d\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute();\n\t}", "public function remove() {\n\t\t$this->DispositionManager->remove();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "static function remove() {\n }", "function stopWatchingIssue( $sessionID, $issueID ) {\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query=\"delete from issuewatch where userid='$user' and issueid='$issueID'\";\r\n\t\tmysql_query($query);\r\n\t}", "public function testHandleRemoveNoID()\n {\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/remove');\n \n $this->assertResponseStatus(404);\n }", "public function removeAction()\n {\n }", "#[CLI\\Command(name: self::DELETE, aliases: ['wd-del', 'wd-delete', 'wd', 'watchdog-delete'])]\n #[CLI\\Argument(name: 'substring', description: 'Delete all log records with this text in the messages.')]\n #[CLI\\Option(name: 'severity', description: 'Delete messages of a given severity level.')]\n #[CLI\\Option(name: 'type', description: 'Delete messages of a given type.')]\n #[CLI\\Usage(name: 'drush watchdog:delete', description: 'Delete all messages.')]\n #[CLI\\Usage(name: 'drush watchdog:delete 64', description: 'Delete messages with id 64.')]\n #[CLI\\Usage(name: 'drush watchdog:delete \"cron run succesful\"', description: 'Delete messages containing the string \"cron run succesful\".')]\n #[CLI\\Usage(name: '@usage drush watchdog:delete --severity=Notice', description: 'Delete all messages with a severity of notice.')]\n #[CLI\\Usage(name: 'drush watchdog:delete --type=cron', description: 'Delete all messages of type cron.')]\n #[CLI\\ValidateModulesEnabled(modules: ['dblog'])]\n #[CLI\\Complete(method_name_or_callable: 'watchdogComplete')]\n #[CLI\\Bootstrap(level: DrupalBootLevels::FULL)]\n public function delete($substring = '', $options = ['severity' => self::REQ, 'type' => self::REQ]): void\n {\n if ($substring == 'all') {\n $this->output()->writeln(dt('All watchdog messages will be deleted.'));\n if (!$this->io()->confirm(dt('Do you really want to continue?'))) {\n throw new UserAbortException();\n }\n $ret = $this->connection->truncate('watchdog')->execute();\n $this->logger()->success(dt('All watchdog messages have been deleted.'));\n } elseif (is_numeric($substring)) {\n $this->output()->writeln(dt('Watchdog message #!wid will be deleted.', ['!wid' => $substring]));\n if (!$this->io()->confirm(dt('Do you want to continue?'))) {\n throw new UserAbortException();\n }\n $affected_rows = $this->connection->delete('watchdog')->condition('wid', $substring)->execute();\n if ($affected_rows == 1) {\n $this->logger()->success(dt('Watchdog message #!wid has been deleted.', ['!wid' => $substring]));\n } else {\n throw new \\Exception(dt('Watchdog message #!wid does not exist.', ['!wid' => $substring]));\n }\n } else {\n if ((empty($substring)) && (!isset($options['type'])) && (!isset($options['severity']))) {\n throw new \\Exception(dt('No options provided.'));\n }\n $where = $this->where($options['type'], $options['severity'], $substring, 'OR');\n $this->output()->writeln(dt('All messages with !where will be deleted.', ['!where' => preg_replace(\"/message LIKE %$substring%/\", \"message body containing '$substring'\", strtr($where['where'], $where['args']))]));\n if (!$this->io()->confirm(dt('Do you want to continue?'))) {\n throw new UserAbortException();\n }\n $affected_rows = $this->connection->delete('watchdog')\n ->where($where['where'], $where['args'])\n ->execute();\n $this->logger()->success(dt('!affected_rows watchdog messages have been deleted.', ['!affected_rows' => $affected_rows]));\n }\n }", "public function handleDelete()\n {\n $id = Input::get('requirement');\n $requirement = Requirements::findOrFail($id);\n $requirement->delete();\n return Redirect::action('RequirementsController@index');\n }", "public function remove() {\n\n //GETS TASK RECORD WITH REQUEST TASK ID (ID)\n $task = Tasks::findorfail(request('TaskID'));\n\n //DELETES TASK RECORD FROM DB\n $task->delete();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$task->NotepadID\");\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "function delete_ch8bt_bug() {\r\n\t// Check that user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present\r\n\tcheck_admin_referer( 'ch8bt_deletion' );\r\n\r\n\t// If bugs are present, cycle through array and call SQL\r\n\t// command to delete entries one by one\r\n\tif ( !empty( $_POST['bugs'] ) ) {\r\n\t\t// Retrieve array of bugs IDs to be deleted\r\n\t\t$bugs_to_delete = $_POST['bugs'];\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\tforeach ( $bugs_to_delete as $bug_to_delete ) {\r\n\t\t\t$query = 'DELETE from ' . $wpdb->get_blog_prefix() . 'ch8_bug_data ';\r\n\t\t\t$query .= 'WHERE bug_id = %d';\r\n\t\t\t$wpdb->query( $wpdb->prepare( $query, intval( $bug_to_delete ) ) );\r\n\t\t}\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function remove($username, $repository, $issue, $label)\n {\n return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.$issue.'/labels/'.rawurlencode($label));\n }", "function deleteCustomTrack ($ref, $userId, $tableName) {\n // Then remove everything from customTrackFiles and customTrackMeta\n $mysqli = connectCPB(CUSTOM_TRACK_DB_NAME);\n $stmt = $mysqli->prepare(\"SELECT * FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries = $stmt->get_result();\n if ($tableEntries && $tableEntries->num_rows > 0) {\n // table entry found\n $entry = $tableEntries->fetch_assoc();\n $fileName = $entry['fileName'];\n if (substr(\n $fileName, 0, strlen(CUSTOM_TRACK_TABLE_PREFIX)\n ) === CUSTOM_TRACK_TABLE_PREFIX) {\n // is a table\n $mysqli->query(\"DROP TABLE `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_DB_NAME) . \"`.`\" .\n $mysqli->real_escape_string($fileName) .\n \"`\");\n } else if (!filter_var($fileName, FILTER_VALIDATE_URL)) {\n // is a local file that needs to be deleted\n unlink($fileName);\n }\n } else {\n $tableEntries->free();\n $mysqli->close();\n throw new Exception('Track not found!');\n }\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_META_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $mysqli->close();\n}", "public function remove($item);", "function rack_assignment_del($options=\"\") {\n global $conf, $self, $onadb;\n printmsg(\"DEBUG => rack_assignment_del({$options}) called\", 3);\n\n // Version - UPDATE on every edit!\n $version = '1.00';\n\n // Parse incoming options string to an array\n $options = parse_options($options);\n\n // Sanitize options[commit] (default is yes)\n $options['commit'] = sanitize_YN($options['commit'], 'N');\n\n // Return the usage summary if we need to\n if ($options['help'] or !$options['rack_assignment'] ) {\n // NOTE: Help message lines should not exceed 80 characters for proper display on a console\n $self['error'] = 'ERROR => Insufficient parameters';\n return(array(1,\n<<<EOM\n\nrack_assignment_del-v{$version}\nDeletes a rack_assignment from the database\n\n Synopsis: rack_assignment_del [KEY=VALUE] ...\n\n Required:\n rack_assignment=ID ID of the rack_assignment to delete\n\n Optional:\n commit=[Y|N] commit db transaction (no)\n\\n\nEOM\n\n ));\n }\n\n\n // Check if it exists\n list($status, $rows, $entry) = db_get_record($onadb, 'rack_assignments', \"id={$options['rack_assignment']}\");\n\n // Test to see that we were able to find the specified record\n if (!$entry['id']) {\n printmsg(\"DEBUG => Unable to find a rack_assignment record using ID {$options['rack_assignment']}!\",3);\n $self['error'] = \"ERROR => Unable to find the rack_assignment record using ID {$options['rack_assignment']}!\";\n return(array(4, $self['error']. \"\\n\"));\n }\n\n // Debugging\n printmsg(\"DEBUG => rack_assignment_del(): Found entry, {$entry['id']}\", 3);\n\n\n\n\n // If \"commit\" is yes, delete the record\n if ($options['commit'] == 'Y') {\n\n // Check permissions\n if (! (auth('rack_del') or auth('advanced'))){\n $self['error'] = \"Permission denied!\";\n printmsg($self['error'], 0);\n return(array(10, $self['error'] . \"\\n\"));\n }\n\n // Delete actual rack_assignment\n list($status, $rows) = db_delete_records($onadb, 'rack_assignments', array('id' => $entry['id']));\n if ($status) {\n $self['error'] = \"ERROR => rack_assignment_del() SQL Query failed: {$self['error']}\";\n printmsg($self['error'],0);\n return(array(9, $self['error'] . \"\\n\"));\n }\n\n\n\n\n // Return the success notice\n $self['error'] = \"INFO => Rack assignment DELETED: {$entry['id']}\";\n printmsg($self['error'],0);\n return(array(0, $self['error'] . \"\\n\"));\n }\n\n // Otherwise display the record that would have been deleted\n//FIXME: make this better outpud display\n $text = <<<EOL\nRecord(s) NOT DELETED (see \"commit\" option)\nDisplaying record(s) that would have been deleted:\n\nNAME: {$entry['id']}\n\nEOL;\n\n return(array(6, $text));\n\n}", "abstract public function mass_remove();", "abstract protected function handle_unset($name);", "public function postRemove(LifecycleEventArgs $args)\n {\n $entity = $args->getEntity();\n\n if ($entity instanceof Files){\n\n return;\n }\n }", "function onesignin_client_handle_delete_notification($account) {\n watchdog('onesignin', 'Deleting user %name on request of One Signin server.', array('%name' => $account->name), WATCHDOG_INFO);\n user_delete($account->uid);\n}", "public function handle()\n {\n $symbol = $this->argument('symbol');\n\n $pair = Pair::where('symbol_id', strtolower($symbol))->first();\n\n if (!$pair) return $this->line('Symbol not found');\n\n $watchList = WatchList::where('pair_id', $pair->id)->first();\n\n if (!$watchList) return $this->line(\"Symbol isn't in the watch list\");\n\n $watchList->delete();\n\n return $this->line(\"Remove $symbol DONE!\");\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function handle()\n {\n printf(\"Command no longer supported\\n\");\n return;\n $demoUser = User::where('email', '[email protected]')->first();\n Project::where('title', 'SIMPSON Demo Study')->where('creator_id', $demoUser->id)->delete();\n\n $users = User::where('email', 'like', '%demo-temp.demo')->get();\n Connection::whereIn('recipient_id', $users->pluck('id'))->delete();\n Connection::whereIn('initiator_id', $users->pluck('id'))->delete();\n Request::whereIn('recipient_id', $users->pluck('id'))->delete();\n Request::whereIn('initiator_id', $users->pluck('id'))->delete();\n Membership::whereIn('user_id', $users->pluck('id'))->delete();\n Answer::whereIn('user_id', $users->pluck('id'))->delete();\n Score::whereIn('user_id', $users->pluck('id'))->delete();\n\n User::where('email', 'like', '%demo-temp.demo')->delete();\n }", "public function delete() {\n\t\t$message = $this->discussion->message(['id' => $this->request->id]);\n\n\t\tif ($this->discussion->pull_message($message)) {\n\t\t\treturn $this->render(['head' => true, 'status' => 204]);\n\t\t}\n\n\t\treturn $this->render(['head' => true, 'status' => 400]);\n\t}", "function delete_item() {\n\n $code = 201;\n\n // Prepare different SQL for each entity type\n switch($_GET[\"type\"]) {\n case 'bucket':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM buckets WHERE user_id=:user_id AND bucket_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'category':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM categories WHERE user_id=:user_id AND category_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'task':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM tasks WHERE user_id=:user_id AND task_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'user':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM user WHERE user_id=:user_id');\n $code = 206;\n break;\n default:\n $_SESSION[\"msg\"][\"danger\"][] = \"Invalid type passed.\";\n return 500;\n }\n\n try {\n $sql->bindParam(':user_id', $_SESSION[\"user\"][\"user_id\"]);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n // Deleted account so reset auth token\n if ($code == 206) {\n $_SESSION[\"user\"] = array();\n }\n return $code;\n } else {\n return 500;\n }\n\n\n } catch (\\PDOException $e) {\n $_SESSION[\"msg\"][\"danger\"][] = \"ERROR: PDO Exception on delete\";\n return 500;\n }\n}", "public function handle()\n {\n $assets = Story::where([['state', 'rejected'], ['updated_at', '<', Carbon::now()->subDays(1)->toDateTimeString()]])\n ->orderBy('updated_at', 'DESC')\n ->get();\n\n if(count($assets)>0) {\n\n // Loop through stories\n foreach ($assets as $asset) {\n\n // Output to schedule log\n echo Carbon::now()->toDateTimeString().': Asset Deleted: '.$asset->alpha_id.' : '.$asset->title. PHP_EOL;\n\n $asset->delete(); // Soft delete story\n\n }\n }\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function after_delete() {}", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "function after_delete() {}", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "public function destroy(Issue $issue)\n {\n $issue->delete();\n\t\treturn back();\n }", "public function handle_changeset_trash_request()\n {\n }", "public function remove() {\n if (!in_array('deleteWorkorder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n $workorder_id = $this->input->post('workorder_id');\n\n $response = array();\n if ($workorder_id) {\n $delete = $this->model_workorder->remove($workorder_id);\n if ($delete == true) {\n $response['success'] = true;\n $response['messages'] = \"Successfully removed\";\n } else {\n $response['success'] = false;\n $response['messages'] = \"Error in the database while removing the workorder information\";\n }\n } else {\n $response['success'] = false;\n $response['messages'] = \"Refersh the page again!!\";\n }\n\n echo json_encode($response);\n }", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\tif (count($ids) > 0)\n\t\t{\n\t\t\t// Loop through each ID\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$row = new Middleware\\Location(intval($id));\n\n\t\t\t\tif (!$row->delete())\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception($row->getError(), 500);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false),\n\t\t\tLang::txt('COM_TOOLS_ITEM_DELETED'),\n\t\t\t'message'\n\t\t);\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_CORE_DELETE_NOT_PERMITTED'));\n\t\t}\n\n\t\t$ids = Request::getArray('cid', array());\n\t\t\\Hubzero\\Utility\\Arr::toInteger($ids, array());\n\n\t\t$success = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$model = Extension::oneOrFail($id);\n\n\t\t\tif (!$model->remove())\n\t\t\t{\n\t\t\t\tNotify::error($model->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$success++;\n\t\t}\n\n\t\tif ($success)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_INSTALLER_UNINSTALL_SUCCESS', $success));\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}", "public function afterDeleteCommit(): void\n {\n }", "public function preRemove(LifecycleEventArgs $args)\n {\n $follow = $args->getDocument();\n $dm = $this->container->get('doctrine_mongodb.odm.document_manager');\n $activity_manager = $this->container->get('pw_activity.activity_manager');\n $notification_manager = $this->container->get('pw_activity.notification_manager');\n \n if ($follow instanceOf Follow) {\n $activity_manager\n ->getRepository()\n ->createQueryBuilder()\n ->remove()\n //->field('target')->references($follow)\n ->field('target.$id')->equals(new \\MongoId($follow->getId()))\n ->field('target.$ref')->equals('follows')\n ->getQuery()\n ->execute();\n \n\n $notification_manager\n ->getRepository()\n ->createQueryBuilder()\n ->remove()\n //->field('target')->references($follow)\n ->field('target.$id')->equals(new \\MongoId($follow->getId()))\n ->field('target.$ref')->equals('follows')\n ->getQuery()\n ->execute(); \n \n $target = $follow->getTarget();\n if ($target instanceof User) {\n // also remove follows for collections of target User\n $follower = $follow->getFollower();\n $this->getFollowManager()->getRepository()\n ->createQueryBuilder()\n ->remove()\n ->field('follower')->references($follower)\n ->field('user')->references($target)\n ->field('target.$ref')->equals('boards')\n ->getQuery()\n ->execute();\n }\n } \n }", "public function handle()\n {\n $id = $this->argument('id');\n\n $submission = Submission::withTrashed()->findOrFail($id);\n event(new SubmissionWasDeleted($submission,true));\n $data = $submission->data;\n Redis::connection()->hdel('voten:submission:url',$data['url']);\n $submission->forceDelete();\n }", "public function remove()\n\t{\n\t\t$data_id = $this->input->post('remove_menu_id');\n\t\t\n\t\t$this->load->model('promo_model');\n\t\t$result = $this->promo_model->remove($data_id);\n\t\t\n\t\tif($result)\n\t\t\techo \"Data remove was successful!\";\n\t\telse\n\t\t\techo \"Data remove not successful!\";\n\t}", "function remove(){//called when user click uninstall\n\t\tswitch($this->act){\n\t\tcase ACT_SAVE:\n\t\t\tparent::cleanup();\n\t\t\tredirect($this->makeUrl(ACT_DONE,NULL,'remove'));\n\t\tcase ACT_DONE:\n\t\t\tshowloadscreen(URL_UP,5,'Tool uninstalled...');\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->startPage('Uninstall system file editor tool');\n\t\t\t$this->startForm(ACT_SAVE,NULL,'remove');\n\t\t\techo 'please click OK to remove tool, CANCEL to continue to use tool';\n\t\t\techo '<input type=\"submit\" value=\"OK\" class=\"button\"/>';\n\t\t\techo '<input type=\"button\" value=\"CANCEL\" onclick=\"window.alert(&quot;thank you&quot;);window.history.back();\" class=\"button\" />';\n\t\t\t$this->endForm();\n\t\t\t$this->endPage();\n\t\t}\n\t}", "function uninstall()\n {\n SQLExec('DROP TABLE IF EXISTS apiai_actions');\n SQLExec('DROP TABLE IF EXISTS apiai_entities');\n unsubscribeFromEvent($this->name, 'COMMAND');\n parent::uninstall();\n }", "public function handle()\n {\n $curl = curl_init();\n $collection= config('solarium.endpoint.localhost.core'); \n\n curl_setopt_array($curl, array(\n CURLOPT_PORT => \"8983\",\n CURLOPT_URL => \"http://localhost:8983/solr/admin/cores?action=UNLOAD&deleteInstanceDir=true&core=\".$collection.\"\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_HTTPHEADER => array(\n \"cache-control: no-cache\",\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n if ($err) {\n echo \"cURL Error #:\" . $err;\n $this->info(\"\\Error Created Collection \" .$err);\n\n\n } else {\n echo $response;\n $this->info(\"\\nDeleted Collection \" .$collection . $response);\n\n }\n\n }", "function runDelete($repo)\n{\n $delBar = new ChocolateBar();\n $delBar->chocoID= 15;\n $repo->delete($delBar);\n}", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function getCommand() {\n return 'remove';\n }", "function remove()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function remove($id) {\r\n $this->db->where('id', $id);\r\n\t\t$this->db->where('school_id', $this->school_id);\r\n $this->db->delete('book_issues');\r\n }", "function delGroupHandler() {\n global $inputs;\n\n $sql = \"delete from `group` where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "function delMemberGroupHandle() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_group` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function handle()\n {\n //\n $logs = LogListMagento::all();\n\n if(!$logs->isEmpty()) {\n foreach($logs as $log) {\n echo $log->product_id.\" Started to delete \\n\";\n $product = ProductPushErrorLog::where(\"product_id\",$log->product_id)->get();\n if(!$product->isEmpty()){\n foreach($product as $p) {\n $p->delete();\n }\n }\n $log->delete();\n }\n }\n\n }", "public function deleteWorklog(){\n\n }", "public function clear($username, $repository, $issue)\n {\n return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.$issue.'/labels');\n }", "public function removeUserFromGroup(){\n //Gets the id frim the input\n $removeId = $_GET[\"input\"];\n //This model removes the connection record from the table\n $this->individualGroupModel->removeUserFromTheGroup($removeId);\n }", "protected function afterDelete()\r\n {\r\n }", "function deleteSubmission(&$args, &$request) {\n\t\t//FIXME: Implement\n\n\t\treturn false;\n\t}", "public function handle()\n {\n\n\n\n PushRequest::where('mode','qr')->whereNull('device_id')->delete();\n\n\n $this->comment(PHP_EOL.'ok!'.PHP_EOL);\n }", "function delEmailHandler1() {\n global $inputs;\n\n $sql = \"DELETE FROM mail WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function handle()\n {\n $branchName = $this->getBranchName();\n $this->removeItemFromFile($branchName);\n }", "public function postRemove() {\n if(Request::ajax()) {\n $status = false; // Start status check\n $image_src = Input::get('src');\n $task_id = Input::get('id');\n $type = Input::get('type');\n $tasks = Task::find($task_id);\n $imagePath = public_path($image_src);\n switch($type){\n case 'new_image':\n @unlink($imagePath);\n return Response::json(['success'=>true]);\n\n break;\n\n default: // Old images already saved in DB\n\n if(isset($tasks->image_src)) {\n $new_image_src = json_decode($tasks->image_src,true);\n foreach($new_image_src as $key => $value) {\n\n if($value['path'] == $image_src) { // Matches in db so remove from the set\n unset($new_image_src[$key]); // removes image from array\n // remove image from folder\n @unlink($imagePath);\n // update the db with a new \n $tasks->image_src = json_encode($new_image_src);\n if($tasks->save()){\n return Response::json(['success'=>true]);\n }\n }\n }\n }\n break;\n }\n return Response::json(['success'=>false]);\n }\n }", "function threadRemove(){\n\n\t$threadId\t\t\t \t= strip_tags($_GET['ThreadId']);\t\t\t\t #int - primaryKey\n\n\t$db = pdo(); # pdo() creates and returns a PDO object\n\t#dumpDie($_POST);\n\n\t$sql = \"DELETE FROM ma_Threads WHERE `ThreadID` = :ThreadID\";\n\n\t$stmt = $db->prepare($sql);\n\t//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);\n\t$stmt->bindValue(':ThreadID', $threadId, PDO::PARAM_INT);\n\n\ttry {$stmt->execute();} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\t#feedback success or failure of update\n\n\tif ($stmt->rowCount() > 0)\n\t{//success! provide feedback, chance to change another!\n\t\tfeedback(\"Thread Removed Successfully From Timeline!\",\"success\");\n\t}else{//Problem! Provide feedback!\n\t\tfeedback(\"Thread Not Removed!\",\"warning\");\n\t}\n\tmyRedirect(THIS_PAGE);\n}", "function delCondoHandler() {\n global $inputs;\n\n $sql = \"delete from condo where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function cleanupTagsCommand() {\n\t\t/** @var Tag $tag */\n\t\tforeach ($this->tagRepository->findAll() as $tag) {\n\t\t\tif ($this->assetRepository->countByTag($tag) == 0) {\n\t\t\t\t$this->outputLine('Tag \"%s\" deleted.', [$tag->getLabel()]);\n\t\t\t\t$this->tagRepository->remove($tag);\n\t\t\t}\n\t\t}\n\t}", "public function preRemove($entity);", "function deleteItem(&$errorMsg, $userInput)\n {\n $query='DELETE FROM todos WHERE id=:id';\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':id', $userInput, PDO::PARAM_INT);\n $stmt->execute();\n }" ]
[ "0.63412756", "0.6070603", "0.60372996", "0.5984083", "0.5983521", "0.59507513", "0.59356076", "0.59081984", "0.5843781", "0.5820493", "0.58113396", "0.58065546", "0.57392687", "0.57363456", "0.57363456", "0.57363456", "0.5726919", "0.56949914", "0.56949914", "0.56949914", "0.56949914", "0.56914264", "0.56604445", "0.5651862", "0.56240034", "0.5610945", "0.5594373", "0.55840015", "0.5561436", "0.55551165", "0.5500168", "0.5495157", "0.54871655", "0.5465", "0.5446327", "0.5444532", "0.5429065", "0.5421792", "0.5411234", "0.54109114", "0.53847194", "0.53701705", "0.5361661", "0.53527224", "0.5344025", "0.5314481", "0.53083336", "0.5245266", "0.52416056", "0.5233788", "0.52208334", "0.52195305", "0.52159184", "0.52064896", "0.51941174", "0.5193849", "0.5193576", "0.5192111", "0.51866823", "0.5183858", "0.51731235", "0.5158997", "0.5156934", "0.5153317", "0.51505184", "0.5143443", "0.51411164", "0.5126096", "0.51202947", "0.5119166", "0.5118293", "0.5117909", "0.5108654", "0.5100711", "0.5094722", "0.5093802", "0.5085515", "0.5077878", "0.50651807", "0.50636894", "0.50635886", "0.50601006", "0.50590557", "0.5055933", "0.5052406", "0.50494736", "0.5039651", "0.50386053", "0.5038289", "0.50295657", "0.502491", "0.50205153", "0.501619", "0.5012021", "0.50001264", "0.49997425", "0.49969617", "0.49954852", "0.49939832", "0.4992756" ]
0.7258914
0
IL EST PAS POSSIBLE DE METTRE LA RECUPERATION DE LA LISTE ICI CAR UNE SESSION EST DEJA STARTED! ==================|TROUVER UN COMPTE PAR SON NUM|==================
function findAccountByNum($numero){ $sql = "SELECT * FROM compte WHERE numero='$numero'"; global $db; return $db->query($sql)->fetch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "public function InscribirSoporteEstado($numInsercion,$lin_inf, $conexion,$idTablaGeneral) { \n header(\"Content-Type: text/html;charset=utf-8\"); \n $IdUsuario = $_SESSION['idUsuario']; \n $registro = explode(\";\", $lin_inf);\n $sql = \"CALL SPAGREGARCARGAMASIVADETALLECE($idTablaGeneral,$registro[0],$registro[1],$registro[2],$registro[3]);\";\n $resultado=1;\n $rs=null;\n $array=\"\";\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n $array = $fila['pIdTabla'];\n }\n }\n } \n return $array;\n }", "function nbProduit(){\n\t$nombre = 0; \n\t\n\tif(isset($_SESSION['panier']['quantite'])){\n\t\tfor($i=0; $i < count($_SESSION['panier']['quantite']); $i++){\n\t\t// On tourne autant de fois qu'il y a de références dans le panier (nombre de ligne dans le petit tableau des quantités)\n\t\t\t$nombre += $_SESSION['panier']['quantite'][$i];\n\t\t}\n\t}\n\t\n\treturn $nombre;\n}", "function ini__operacion (){\n \n //obtenemos el arreglo almacenado en la operacion \"aulas disponibles\". Su formato es :\n //Array ('id_aula'=>x 'hora_inicio'=>x 'hora_fin'=>x)\n $datos_ad=toba::memoria()->get_parametros();\n //esta condicion es fundamental para no quedarnos en la misma pantalla\n if(isset($datos_ad['id_aula'])){\n $this->s__accion=\"Vinculo\";\n $this->s__aula_disponible=$datos_ad;\n \n //eliminamos la informacion guardada en el arreglo $_SESSION\n toba::memoria()->limpiar_memoria();\n $this->set_pantalla('pant_persona');\n }\n }", "function fProcesaCartera(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $igSecue++;\n foreach($ogDet as $k => $r) {\n\t\t$alDet = fIniDetalle();\n\t\t$alDet[\"det_codcuenta\"]\t= $r->det_codcuenta;\n\t\t$alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 40);\n\t\t$alDet['det_idauxiliar']= $r->det_idauxiliar;\n\t\t$alDet[\"det_numcheque\"]\t= $r->det_numdocum; \t\t\t// es el numero de documento\n\t\t$alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n\t\t$alDet['det_valcredito']= $r->txt_pago * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar\n\t\t$alDet['det_valdebito']\t= 0;\n\t\t$alDet['det_secuencia']\t= $igSecue++;\n\t\tif(fGetParam(\"pAppDbg\",0)){\n\t\t\techo\"<br>---registro:----\";\n\t\t\tprint_r($r);\n\t\t\techo\"<br>---arreglo:-----\";\n\t\t\tprint_r($alDet);\n\t\t}\n\t\tfInsdetalleCont($db, $alDet);\n\t}\n}", "public function InscribirSoporteRefrigerio($numInsercion,$lin_inf, $conexion,$idTablaGeneral) { \n header(\"Content-Type: text/html;charset=utf-8\"); \n $IdUsuario = $_SESSION['idUsuario']; \n $registro = explode(\";\", $lin_inf);\n \n $sql = \"CALL SPAGREGARCARGAMASIVADETALLESR($idTablaGeneral,'$registro[0]');\";\n $resultado=1;\n $rs=null;\n $array=\"\";\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n $array = $fila['pIdTabla'];\n }\n }\n } \n return $array;\n }", "function evt__procesar(){\n $m = $this->dep('datos')->tabla('mesa')->get();\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Ingreso con perfil junta_electoral\n $m['estado'] = 3;//Cambia el estado de la mesa a Confirmado\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);\n if($p !== false){//Ingreso con perfil secretaria\n $m['estado'] = 4;//Cambia el estado de la mesa a Definitivo\n }\n else{\n $p = array_search('autoridad_mesa', $this->s__perfil); \n if($p !== false){//Ingreso con perfil autoridad de mesa\n $m['estado'] = 1;//Cambia el estado de la mesa a Cargado\n }\n }\n }\n $this->dep('datos')->tabla('mesa')->set($m);\n// print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n $this->dep('datos')->tabla('mesa')->resetear();\n \n \n if(isset($this->s__retorno)){//debe retornar a confirmar\n if($this->s__retorno_estado=='')\n $dato = true;\n else\n $dato['f'] = $this->s__retorno_estado;\n toba::vinculador()->navegar_a(\"\",$this->s__retorno,$dato); \n $this->s__retorno = null; \n $this->s__id_mesa = null;\n $this->s__retorno_estado = null;\n }\n }", "public function InscribirSoporteMatricula($numInsercion,$lin_inf, $conexion,$idTablaGeneral){ \n header(\"Content-Type: text/html;charset=utf-8\"); \n $IdUsuario = $_SESSION['idUsuario']; \n $registro = explode(\";\", $lin_inf);\n $sql = \"CALL SPAGREGARCARGAMASIVADETALLESM($idTablaGeneral,$registro[0],$registro[1],$registro[2]);\";\n $resultado=1;\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n $array= $fila['pIdTabla'];\n }\n }\n } \n return $array;\n }", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "function contaNumeroCadastros(){\n if ($GLOBALS['cadastros'] == null) {//se não tiver nenhum cadastro\n $GLOBALS['quantidadeCadastros'] = 0;//numero de pessoas cadastradas = 0\n }else{\n $GLOBALS['quantidadeCadastros'] = count($GLOBALS['cadastros']);//salva na variavel global quantidadeCadastros o número de cadastros\n }\n }", "public function daEntrada(){\n\t\t$this->hora_entrada = date('d/m/y - H:i:s');\n\t\t$this->numero_visitas = $this->numero_visitas + 1;\n\t}", "public function listarPacientes(){\n\t\t\t$list= oci_parse($conn,\"BEGIN Nombre_paquete.NOmbre.funvion(Aqui los values) END \");\n\t\t\t// $list= oci_parse($conn,\"SELECT * FROM CITAS\");\n\t\t\toci_execute($list);\n\t\t}", "function reporteCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTREP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('id_persona','int4');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('dir_per', 'varchar');\n\t\t$this->captura('tel_per1', 'varchar');\n\t\t$this->captura('tel_per2', 'varchar');\n\t\t$this->captura('cel_per','varchar');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('nombre_ins','varchar');\n\t\t$this->captura('cel_ins','varchar');\n\t\t$this->captura('dir_ins','varchar');\n\t\t$this->captura('fax','varchar');\n\t\t$this->captura('email_ins','varchar');\n\t\t$this->captura('tel_ins1','varchar');\n\t\t$this->captura('tel_ins2','varchar');\t\t\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('nro_contrato','varchar');\t\t\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function ResumenEstadoCC(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_RESESTCC_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n\n $this->setParametro('id_agencia','id_agencia','int4');\n\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('tipo','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }", "public function ctlBuscaNumOpEntradas($fecha){\n\t\t$busca = $fecha.'%';\n\n\t\t$respuesta = Datos::mdlNumOperaciones('entradas', $busca);\n\n\t\t$next = $respuesta['cuenta']+1;\n\t\techo $fecha,\"-\",$next;\n\t\t//echo '$fecha-$next';\n\t}", "function anteriorEstadoCotizacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_ANTEST_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('operacion','operacion','varchar');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function procesarCarrito($conn,$fechaentrega,$dni) {\n\t \t//$fechaActual = date(\"Y-m-d H:m:s\");\n\t\tdate_default_timezone_set ('Europe/Madrid');\n\t\t$fechaActual = strftime(\"%Y-%m-%d %H:%M:%S\");\n\t\t$sql = \"SELECT IFNULL(MAX(cod_pedido),0) as cod_pedido FROM pedidos\";\n\t\t$result = mysqli_query($conn, $sql);\n\t\t$fila = mysqli_fetch_assoc($result);\n\t\t$cod_pedido = $fila['cod_pedido'] + 1;\n\t\t\n\t\t$total = 0;\n\tforeach ($_COOKIE as $key => $value) {\n\n\t\tif (is_numeric($key)) {\n\t\t\t$sql = \"SELECT precio FROM platos where cod_plato=$key\";\n\t\t\t$result = mysqli_query($conn, $sql);\n\t\t\t$fila = mysqli_fetch_assoc($result);\n\t\t\t$total += ($fila['precio'] * $value);\n\t\t}\n\t}\n\t$sql = \"INSERT INTO pedidos (dni,cod_pedido,fecha_pedido,fecha_entrega,precio_total) VALUES ('$dni','$cod_pedido','$fechaActual','$fechaentrega',$total)\";\n\tmysqli_query($conn, $sql);\n\n\t$sql = \"SELECT MAX(cod_detallepedido) as cod_detallepedido FROM detallepedido\";\n\t$result = mysqli_query($conn, $sql);\n\t$fila = mysqli_fetch_assoc($result);\n\t$cod_detallepedido = $fila['cod_detallepedido'] + 1;\n\techo \"<script>console.log(\".$cod_detallepedido.\")</script>\";\n\n\n\tforeach ($_COOKIE as $key => $value) {\n\t\t$cod_plato = $key;\n\t\t$cantidad = $value;\n\t\tif (is_numeric($key)) {\n\t\t\t$sql = \"INSERT INTO detallepedido (cod_detallepedido,cod_pedido,cod_plato,cantidad) VALUES ('$cod_detallepedido','$cod_pedido','$cod_plato','$cantidad')\";\n\t\t\t\tmysqli_query($conn, $sql);\n\t\t\t\t$cod_detallepedido++;\n\t\t\t\techo \"<script>console.log(\".$cod_detallepedido.\")</script>\";\n\t\t}\n\t}\n\n\t$sql = \"SELECT repartidores.nombre as n,repartidores.apellidos as a FROM clientes,municipios,repartidores WHERE clientes.dni='$dni' AND clientes.id_municipio=municipios.id_municipio AND municipios.id_repartidor_encargado=repartidores.id_repartidor\";\n\t$result = mysqli_query($conn, $sql);\n\t$fila = mysqli_fetch_assoc($result);\n\n\t$final=\"Su repartidor@ \" . $fila['n'] . \" \" . $fila['a'] . \" entregará su pedido el \" . $fechaentrega;\n\n\treturn $final;\n\n }", "function VerificarPendientesEmision(){\r\n $apiImpuestosBoa = $_SESSION['_END_POINT_FACTURACION_PRO'];\r\n\t\tif ($_SESSION['_ESTADO_SISTEMA'] != \"produccion\") {\r\n\t\t\t$apiImpuestosBoa = $_SESSION['_END_POINT_FACTURACION_DEV'];\r\n\t\t}\r\n\t\t//\r\n\t\t$response = array('codigo' => '', 'message' => '', 'tiempo' => '');\r\n\r\n\t\t $ch = curl_init();\r\n\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $apiImpuestosBoa.'EnviarFacturaElectronicaCompraVenta');\r\n\t\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\t\t/*Esperaremos 3 segundos de respuesta para no afectar al cajero*/\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT_MS, 3000);\r\n\t\t\t\t/***************************************************************/\r\n\t\t curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\r\n\t\t // Petición HEAD\r\n\t\t curl_setopt($ch, CURLOPT_HEADER, true);\r\n\t\t curl_setopt($ch, CURLOPT_NOBODY, true);\r\n\r\n\t\t $content = curl_exec($ch);\r\n\r\n\t\t\t\t//var_dump(\"aqui llega la respuesta\",$content);exit;\r\n\r\n\t\t\t\tif (!curl_errno($ch)) {\r\n\t\t $info = curl_getinfo($ch);\r\n\t\t\t\t\t\t$response['message'] = 'Conexion Existosa';\r\n\t\t\t\t\t\t$response['codigo'] = 'CONEXION_OK';\r\n\t\t\t\t\t\t$response['tiempo'] = $info['total_time'];\r\n\r\n\t\t } else {\r\n\t\t\t\t\t\t$response['message'] = 'No se pudo conectar con el middleware de facturacion electronica.';\r\n\t\t\t\t\t\t$response['codigo'] = 'SIN_CONEXION';\r\n\t\t\t\t\t\t$response['tiempo'] = $info['total_time'];\r\n\r\n $send = array(\r\n \"error\" => true,\r\n \"mensaje\" => $response['message'],\r\n );\r\n echo json_encode($send);exit;\r\n\t\t }\r\n\r\n\r\n\t\t curl_close($ch);\r\n /***************************************/\r\n\r\n //Si hay conexion entonces procedemos a registrar las facturas\r\n if ($response['codigo'] == 'CONEXION_OK') {\r\n\r\n $this->objFunc=$this->create('MODVentaFacturacion');\r\n $this->res=$this->objFunc->VerificarPendientesEmision($this->objParam);\r\n\r\n\r\n if ($this->res->getTipo() != 'EXITO') {\r\n $this->res->imprimirRespuesta($this->res->generarJson());\r\n exit;\r\n }\r\n\r\n $datosRecuperados = $this->res->getDatos();\r\n\r\n $json_datos = json_decode($datosRecuperados['pendientes_emision']);\r\n\r\n //var_dump(\"aqui llega datos\",$json_datos);exit;\r\n $datos2 = json_decode(json_encode($json_datos->datos_pendientes), true);\r\n\r\n\r\n if ($datos2 != null) {\r\n $facturas = array();\r\n\r\n\r\n foreach ($datos2 as $value) {\r\n\r\n\r\n $this->objParam->addParametro('id_venta', $value['id_venta']);\r\n $this->objFunc=$this->create('MODVentaFacturacion');\r\n $this->resEstado=$this->objFunc->verificarEstadoFactura($this->objParam);\r\n\r\n $estado_factura = $this->resEstado->getDatos()['emitir'];\r\n\r\n if ($estado_factura == 'si') {\r\n $this->objParam->addParametro('id_venta', $value['id_venta']);\r\n \t\t\t\t$this->objParam->addParametro('nro_factura_asignar', $value['nro_factura']);\r\n \t\t\t\t$this->objParam->addParametro('documento_sector', 1);\r\n \t\t\t\t$this->objParam->addParametro('leyenda', $value['leyenda']);\r\n $this->objFunc=$this->create('MODServicioImpuesto');\r\n \t\t\t\t$this->res2=$this->objFunc->procesarFacturaElectronicaCompraVenta($this->objParam);\r\n\r\n if ($this->res2->getTipo() == 'ERROR') {\r\n $this->res2->imprimirRespuesta($this->res2->generarJson());\r\n exit;\r\n }\r\n\r\n $datos = $this->res2->getDatos();\r\n \t\t\t\t$resImp = json_decode($this->facturaElectronicaCompraVentaImpuestos($datos,$value['id_venta'],$value['codigo_pv_impuestos'],$value['codigo']));\r\n\r\n if ($resImp->codigo != 'EXITO') {\r\n \t\t\t\t\tif ($resImp->codigo == 'ERROR') {\r\n \t\t\t\t\t\t//throw new Exception($resImp->message);\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => $resImp->message,\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}else\tif ($resImp->codigo == 'PENDIENTE_EMISION') {\r\n \t\t\t\t\t\t//throw new Exception(\"No se pudo Emitir la Factura vuelva a intentar mas tarde.\");\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se pudo Emitir la Factura vuelva a intentar mas tarde. (\".$resImp->codigo.\")\",\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t} else\tif ($resImp->codigo == 'SIN_CONEXION') {\r\n \t\t\t\t\t\t//throw new Exception(\"No se pudo Emitir la Factura vuelva a intentar mas tarde.\");\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se pudo Emitir la Factura vuelva a intentar mas tarde. cod. error (\".$resImp->codigo.\")\",\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}else\tif ($resImp->codigo == 'BAD_REQUEST') {\r\n \t\t\t\t\t\t//throw new Exception(\"No se pudo Emitir la Factura vuelva a intentar mas tarde.\");\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se pudo Emitir la Factura vuelva a intentar mas tarde. (\".$resImp->codigo.\")\",\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}else\tif ($resImp->codigo == 'API_NO_ENCONTRADA') {\r\n \t\t\t\t\t\t//throw new Exception(\"No se pudo Emitir la Factura vuelva a intentar mas tarde.\");\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se pudo Emitir la Factura vuelva a intentar mas tarde.(\".$resImp->codigo.\")\",\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}else\tif ($resImp->codigo == 'REQUEST_TIMEOUT') {\r\n \t\t\t\t\t\t//throw new Exception(\"No se pudo Emitir la Factura vuelva a intentar mas tarde.\");\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se pudo Emitir la Factura vuelva a intentar mas tarde.(\".$resImp->codigo.\")\",\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}else {\r\n \t\t\t\t\t\t//throw new Exception(\"Mensaje Error: \".$resImp->message);\r\n \t\t\t\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"Mensaje Error: \".$resImp->message,\r\n );\r\n echo json_encode($send);exit;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n\r\n if ($resImp->result->cuf == \"\") {\r\n \t\t\t\t\t//throw new Exception(\"Mensaje : El middleware servcio de facturacion tuvo exito en sus registros, pero no retorno el valor del CUF, para la emision de la factura. Contactarse con sistemas.\");\r\n \t\t\t\t\t$send = array(\r\n \t\t\t\t\t\t\t\"error\" => true,\r\n \t\t\t\t\t\t\t\"mensaje\" => \"Mensaje : El middleware servcio de facturacion tuvo exito en sus registros, pero no retorno el valor del CUF, para la emision de la factura. Contactarse con sistemas.\",\r\n \t\t\t\t\t);\r\n \t\t\t\t\techo json_encode($send);exit;\r\n \t\t\t\t}\r\n\r\n if ($resImp->result->cufd == \"\") {\r\n \t\t\t\t\t//throw new Exception(\"Mensaje : El middleware servcio de facturacion tuvo exito en sus registros, pero no retorno el valor del CUFD, para la emision de la factura. Contactarse con sistemas.\");\r\n \t\t\t\t\t$send = array(\r\n \t\t\t\t\t\t\t\"error\" => true,\r\n \t\t\t\t\t\t\t\"mensaje\" => \"Mensaje : El middleware servcio de facturacion tuvo exito en sus registros, pero no retorno el valor del CUFD, para la emision de la factura. Contactarse con sistemas.\",\r\n \t\t\t\t\t);\r\n \t\t\t\t\techo json_encode($send);exit;\r\n \t\t\t\t}\r\n\r\n\r\n $this->res->datos = $resImp;\r\n\r\n \t\t\t\tif ($this->res->getTipo() == 'EXITO') {\r\n\r\n $this->objParam->addParametro('id_estado_wf_act', $value['id_estado_wf']);\r\n $this->objParam->addParametro('id_proceso_wf_act', $value['id_proceso_wf']);\r\n $this->objParam->addParametro('tipo_pv', $value['tipo']);\r\n \t\t\t\t\t$this->objParam->addParametro('tipo', 'factura');\r\n\r\n \t\t\t\t\t$this->objFunc=$this->create('MODCajero');\r\n \t\t\t\t\t$this->res=$this->objFunc->EmitirFacturaPendiente($this->objParam);\r\n \t\t\t\t\t//$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n if ($this->res->getTipo() == 'EXITO') {\r\n\r\n array_push($facturas, \"NRO FACTURA: \".$value['nro_factura'].', NIT: '.$value['nit'].\", RAZON SOCIAL: \".$value['nombre_factura'].\", PUNTO DE VENTA: \".$value['nombre'].\".\");\r\n\r\n }\r\n\r\n\r\n\r\n \t\t\t\t} else {\r\n \t\t\t\t\t//throw new Exception(\"Mensaje : El middleware servcio de facturacion tuvo exito en sus registros, pero no retorno el valor del CUFD, para la emision de la factura. Contactarse con sistemas.\");\r\n \t\t\t\t\t// $send = array(\r\n \t\t\t\t\t// \t\t\"error\" => true,\r\n \t\t\t\t\t// \t\t\"mensaje\" => $this->res->message,\r\n \t\t\t\t\t// );\r\n \t\t\t\t\t// echo json_encode($send);exit;\r\n\r\n $this->res->imprimirRespuesta($this->res->generarJson());\r\n exit;\r\n \t\t\t\t}\r\n \t\t\t\t/**************************************************************************************/\r\n }\r\n }\r\n\r\n $send = array(\r\n \"error\" => false,\r\n \"mensaje\" => \"Se registrarón las siguientes Facturas: \".json_encode($facturas).\" correctamente. favor verificar la informacion\",\r\n );\r\n\r\n echo json_encode($send);exit;\r\n } else {\r\n $send = array(\r\n \"error\" => false,\r\n \"mensaje\" => \"NO SE ENCONTRARON FACTURAS PENDIENTE DE EMISION\",\r\n );\r\n echo json_encode($send);exit;\r\n }\r\n\r\n }else{\r\n $send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No hay Conexion con el servicio de impuestos\",\r\n );\r\n\r\n echo json_encode($send);exit;\r\n\r\n }\r\n\r\n }", "public function InscribirSoporteFirma($numInsercion,$lin_inf, $conexion,$idTablaGeneral) { \n header(\"Content-Type: text/html;charset=utf-8\"); \n $IdUsuario = $_SESSION['idUsuario']; \n $registro = explode(\";\", $lin_inf);\n \n $sql = \"CALL SPAGREGARCARGAMASIVADETALLESF($idTablaGeneral,'$registro[0]');\";\n $resultado=1;\n $rs=null;\n $array=\"\";\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $inserto = 0;\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n $array = $fila['pIdTabla'];\n }\n }else{\n $array=\"error\";\n }\n } else{\n\n $array=\"error\";\n }\n return $array;\n }", "function nbr_auteurs_enligne() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n// nombre d_auteurs depuis 15 mn ()\r\n# inc/auth.php update-set en_ligne => NOW() : \"moment\" de session !\r\n# voir ecrire/action:logout.php\r\n# spip update-set 'en_ligne' datetime -15 mn au logout de session !!??!!\r\n# aff' nbr corresp aux auteurs affiches par spip en bandeau sup !\r\n\r\n\t$q = sql_select(\"COUNT(DISTINCT id_auteur) AS nb, statut \" .\r\n\t\t\"FROM spip_auteurs \" .\r\n\t\t\"WHERE en_ligne > DATE_SUB( NOW(), INTERVAL 15 MINUTE) \" .\r\n\t\t\"AND statut IN ('0minirezo', '1comite', '6forum') \" . // limite statuts spip (autres!)\r\n\t\t\"AND id_auteur != $connect_id_auteur \" .\r\n\t\t\"GROUP BY statut\"\r\n\t);\r\n\r\n\tif (sql_count($q)) {\r\n\t\t$aff .= _T(\"actijour:auteurs_en_ligne\") . \"<br />\\n\";\r\n\t\tWhile ($r = sql_fetch($q)) {\r\n\t\t\tif ($r['statut'] == '0minirezo') {\r\n\t\t\t\t$stat = _T('actijour:abrv_administrateur');\r\n\t\t\t} elseif ($r['statut'] == '1comite') {\r\n\t\t\t\t$stat = _T('actijour:abrv_redacteur');\r\n\t\t\t} elseif ($r['statut'] == '6forum') {\r\n\t\t\t\t$stat = _T('actijour:abrv_visiteur');\r\n\t\t\t}\r\n\t\t\t$aff .= $r['nb'] . \" $stat<br />\\n\";\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t$aff .= _T(\"actijour:aucun_auteur_en_ligne\") . \"\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "function anteriorEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_ANTV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function generarNumOC(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_GENOCDE_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function listarProcesoCompraPedido(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROCPED_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\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$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function contarPruebasAcuerdo1993027($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n if($reglamento['REG_REGLAMENTO']=='S'){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }", "function Init_Dossier_AEV_Situation_11($formx) {\n//$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));\n//$formx->setVar('L_AEV_Situation',$situation);\n\n\n$ids = $formx->getIDS();\n$id_instance = $formx->getIdInstance();\n$idu = $formx->getVar('ids');\n\neko ($ids);\neko ($id_instance);\neko ($idu);\n\n// On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx\n// $requete=new clRequete(BDD,TABLEFORMX,$param);\n// $sql=$requete->delRecord(\"idformx='Dossier_Colectomie_Periode_P1' and ids='\".$ids.\"'\");\n\n//$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;\n//$req = new clResultQuery ;\n//$res = $req -> Execute ( \"Fichier\", \"getMatriculeMedecin\", $param, \"ResultQuery\" ) ;\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Accident_Situation_11',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Accident_Situation_11',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Prophylaxie_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Prophylaxie_Situation_11',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Prophylaxie_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Prophylaxie_Situation_11',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Situation_11',\"Non\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Hyeres_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Hyeres_Situation_11',\"Oui\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Etablissement_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Etablissement_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Nom_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Nom_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Prenom_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Prenom_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Jour_Naissance_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Jour_Naissance_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Mois_Naissance_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Mois_Naissance_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Annee_Naissance_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Annee_Naissance_Situation_11',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Complement_Situation_11'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Complement_Situation_11',\"\");\n }\n\nreturn \"O\";\n}", "function iniciar_sincro($tabla)\n { \n //Marcar momento de inicio\n $registro['fecha_inicio'] = date('Y-m-d H:i:s');\n $condicion = \"nombre_tabla = '{$tabla}'\";\n \n $this->Pcrn->guardar('sis_tabla', $condicion, $registro);\n }", "function head() {\n global $_lib;\n\n $query = \"select max(RemittanceDaySequence) from invoicein where RemittanceSendtDateTime='\" . $_lib['sess']->get_session('Date') . \"' and Active=1\";\n #print \"Finn h¿yeste dag sekvens: $query\";\n $daysequence = $_lib['storage']->get_row(array('query' => $query));\n\n $query = \"select max(RemittanceSequence) from invoicein where Active=1\";\n #print \"Finn h¿yeste sekvens: $query\";\n $sequence = $_lib['storage']->get_row(array('query' => $query));\n \n #print \"<h2>Her kommer remitteringsfila p&aring; TelePay 2.0.1 formatet</h2>\";\n $transaction = new stdClass();\n $this->transaction->RemittanceSequence = $daysequence->RemittanceSequence + 1; #MŒ kalkuleres og settes\n $this->transaction->RemittanceDaySequence = $daysequence->RemittanceDaySequence; #MŒ kalkuleres og settes\n\n #$this->transaction->BatchID = 99; #MŒ kalkuleres og settes\n $this->transaction->Date = $_lib['sess']->get_session('Date');\n $this->transaction->Datetime = $_lib['sess']->get_session('Datetime');\n $this->transaction->VersionSoftware = '00001.00 LODO';\n \n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $this->transaction->CustomerOrgNumber = strtolower(preg_replace($old_pattern, $new_pattern , $_lib['sess']->get_companydef('OrgNumber'))); \n $this->transaction->CustomerName = $_lib['sess']->get_companydef('CompanyName');\n $this->transaction->Database = $_SETUP['DB_NAME']['0'];\n \n $this->transaction->NumTransactions = 0;\n $this->transaction->TotalAmount = 0;\n $this->transaction->NumRecords = 0; \n\n if(!$InvoiceO->CustomerBankAccount) { #Sjekke lengde og modulus pŒ kontonummer ogsŒ\n $_lib['message']->Add(\"Betalerkonto mangler\");\n return;\n }\n if(!$this->transaction->CustomerOrgNumber) {\n $_lib['message']->Add(\"Orgnummer/personnummer mangler p&aring; betaler\");\n return;\n }\n }", "function recuperaDatosActividad(){\n if($this->data['folio']!=\"\"){\n $tmp=explode('-',$this->data['folio']);\n if( ($tmp[0] + 0)>0)\n $this->arrayDatos = $this->regresaDatosActividad($tmp[0]);\n }\n }", "public function disponibilidadAction(){ \n if (isset($_REQUEST['asd'])) {\n header('Location:disponibilidad?mes=Marzo&dia=11');\n } \n //Aca empieza lo generico\n $horarios = array(1=>'08:00 a 08:30',2=>'08:30 a 09:00',3=>'09:00 a 09:30',4=>'09:30 a 10:00',5=>'10:00 a 10:30',\n 6=>'10:30 a 11:00',7=>'11:00 a 11:30 ',8=>'11:30 a 12:00',9=>'12:00 a 12:30',10=>'12:30 a 13:00',11=>'13:00 a 13:30',\n 12=>'13:30 a 14:00',13=>'14:00 a 14:30',14=>'14:30 a 15:00',15=>'15:00 a 15:30',16=>'15:30 a 16:00',17=>'16:00 a 16:30',\n 18=>'16:30 a 17:00',19=>'17:00 a 17:30',20=>'17:30 a 18:00',21=>'18:00 a 18:30',22=>'18:30 a 19:00',23=>'19:00 a 19:30',\n 24=>'19:30 a 20:00',25=>'20:00 a 20:30',26=>'20:30 a 21:00',27=>'21:00 a 21:30',28=>'21:30 a 22:00',29=>'22:00 a 22:30',30=>'22:30 a 23:00');\n //Arreglar\n $arrayDeTranformacion = array('08:00 a 08:30'=>1,'08:30 a 09:00'=>2,'09:00 a 09:30'=>3,'09:30 a 10:00'=>4,'10:00 a 10:30'=>5,\n '10:30 a 11:00'=>6,'11:00 a 11:30'=>7,'11:30 a 12:00'=>8,'12:00 a 12:30'=>9,'12:30 a 13:00'=>10,'13:00 a 13:30'=>11,\n '13:30 a 14:00'=>12,'14:00 a 14:30'=>13,'14:30 a 15:00'=>14,'15:00 a 15:30'=>15,'15:30 a 16:00'=>16,'16:00 a 16:30'=>17,\n '16:30 a 17:00'=>18,'17:00 a 17:30'=>19,'17:30 a 18:00'=>20,'18:00 a 18:30'=>21,'18:30 a 19:00'=>22,'19:00 a 19:30'=>23,'19:30 a 20:00'=>24,\n '20:00 a 20:30'=>25,'20:30 a 21:00'=>26,'21:00 a 21:30'=>27,'21:30 a 22:00'=>28,'22:00 a 22:30'=>29,'22:30 a 23:00'=>30); \n $elmesEnNumero= array('Enero'=>1,'Febrero'=>2,'Marzo'=>3,'Abril'=>4,'Mayo'=>5,'Junio'=>6,'Julio'=>7,\n 'Agosto'=>8,'Septiembre'=>9,'Octubre'=>10,'Noviembre'=>11,'Diciembre'=>12);\n $meses = array(1=>'Enero',2=>'Febrero',3=>'Marzo',4=>'Abril',5=>'Mayo',6=>'Junio',7=>'Julio',\n 8=>'Agosto',9=>'Septiembre',10=>'Octubre',11=>'Noviembre',12=>'Diciembre');\n $AnioActual = date('Y');\n $dias = 1;\n $MesesDe30 = array();\n $MeseDe31 = array();\n $Febrero = array();\n while ($dias < 32){\n $MeseDe31[$dias] = $dias;\n $dias = $dias + 1;\n }\n $dias = 1;\n while ($dias < 31){\n $MesesDe30[$dias] = $dias;\n $dias = $dias + 1;\n }\n $dias = 1;\n if (($AnioActual % 4 == 0) && ($AnioActual % 100 != 0) || ($AnioActual % 400 == 0)){\n //es bisiesto \n while ($dias < 30){\n $Febrero[$dias] = $dias;\n $dias = $dias + 1;\n }\n }\n else{\n while ($dias < 29){\n $Febrero[$dias] = $dias;\n $dias = $dias + 1;\n }\n }\n $unArray = array('Enero' => $MeseDe31,'Febrero' => $Febrero,'Marzo' => $MeseDe31,'Abril' => $MesesDe30,\n 'Mayo' => $MeseDe31,'Junio' => $MesesDe30,'Julio' => $MeseDe31,'Agosto' => $MeseDe31,'Septiembre' => $MesesDe30,\n 'Octubre' => $MeseDe31,'Noviembre' => $MesesDe30,'Diciembre' => $MeseDe31);\n $em = $this->getDoctrine()->getManager();\n $mesActual = date('m');\n $diaActual =date('d');\n //Aca termina lo generico\n if ((empty($_GET[\"mes\"])) and (empty($_GET[\"dia\"]))){\n $query1 = $em->createQuery('SELECT a FROM CrestaAulasBundle:Aula a ORDER BY a.nombre ASC');\n $aulasMostrar = $query1->getResult();\n $pasar = date('Y-m-d');\n $query = $em->createQuery('SELECT r FROM CrestaAulasBundle:Reserva r WHERE r.fecha = :fechitaMostri')->setParameter('fechitaMostri', $pasar);\n $reservasMostrar = $query->getResult();\n $contador =0;\n foreach ($reservasMostrar as $aux) {\n $reservasMostrar[$contador]->getHoraDesde();\n //Busco los minutos para saber si es 30 o 00\n $minutoComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('i');\n $horaComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('H');\n $minutoComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('i');\n $horaComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('H');\n //Traigo la hora desde de las reservas.\n $hh = $reservasMostrar[$contador]->getHoraHasta()->format('H:i');\n $hd = $reservasMostrar[$contador]->getHoraDesde()->format('H:i');\n //si el min es 30 deberia concatenar con la hora siguente.\n if ( ($minutoComparableDesde == 30) and ($minutoComparableHasta == 00) ){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n //Busco el aula de la reserva (nombre)\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 30) and ($minutoComparableHasta == 30)){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 30)) {\n //a la hora le sumo uno para llegar al valor.\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 00)){\n //a la hora le sumo uno para llegar al valor.\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n else{\n throw $this->createNotFoundException('Lo sentimos se rompieron las reservas :/ los horarios deberian ser en minutos 00 o 30.');\n }\n $ArrayContenedor[$contador] = array(1=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[1]],\n 2=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[2]],3=>$arrayCargadoConHorariosConcat[3],4=>$reservasMostrar[$contador]);\n $contador = $contador + 1;\n }\n if ((count($reservasMostrar)) == 0){\n $ArrayContenedor = null;\n }\n $mesSelect = array();\n $buscameEsto='Mes';\n \n //Arreglo de last moment, con los meses del 1 al 9, como lo tomamos de la fecha actual\n //lo toma como 01 al 09, y se rompe!!!\n\n \n $mesActual=intval($mesActual);\n $buscameEstoAhora = $meses[$mesActual];\n\n return $this->render('CrestaAulasBundle:Aula:disponibilidad.html.twig',array('mesSelect'=>$mesSelect,\n 'seleccionadoMes'=>$buscameEsto,'meses'=>$meses,'horarios'=>$horarios,'aulasMostrar'=>$aulasMostrar,'mesActual'=>$mesActual\n ,'diaActual'=>$diaActual,'seleccionadoMesAhora'=>$buscameEstoAhora,'ArrayContenedor'=>$ArrayContenedor,'seleccionadoDia' => 'Dia'));\n }\n elseif (((($_GET[\"mes\"] == 'Mes')) or (!isset($_GET[\"dia\"]))) and (isset ($_GET[\"aula\"]))){\n throw new Exception('Para filtrar el aula, primero completa el campo mes y dia para que podamos encontrar lo que estas buscando.');\n }\n elseif ((!empty($_GET[\"mes\"])) and (!empty($_GET[\"dia\"])) and (!empty($_GET[\"aula\"]))) {\n $seleccionadoDia = $_GET[\"dia\"];\n $buscameEsto= $_GET[\"mes\"];\n $asd = $elmesEnNumero[$buscameEsto];\n //tengo la id buscate el aula pedru\n $idDelAulaSeleccionada = $_GET[\"aula\"];\n \n $aulasMostrar[0] = $em->getRepository('CrestaAulasBundle:Aula')->find($idDelAulaSeleccionada); \n /* dios es cuate\n // $seleccionadoAula = $aulasMostrar->getNombre();\n echo \"<PRE>\";\n print_r($aulasMostrar);\n echo \"</PRE>\";*/\n $mesSelect = $unArray[$buscameEsto];\n //$aulasMostrar[]['nombre'] = $seleccionadoAula;\n $mesActual=intval($mesActual);\n $buscameEstoAhora = $meses[$mesActual];\n $pasar = $AnioActual . '-' . $asd . '-' . $seleccionadoDia;\n $parameters = array('fechitaMostri' => $pasar,'elaula' => $idDelAulaSeleccionada);\n $query = $em->createQuery(' SELECT r FROM CrestaAulasBundle:Reserva r \n WHERE r.fecha = :fechitaMostri and r.aula = :elaula')->setParameters($parameters);\n $reservasMostrar = $query->getResult();\n $contador =0;\n foreach ($reservasMostrar as $aux) {\n $reservasMostrar[$contador]->getHoraDesde();\n //Busco los minutos para saber si es 30 o 00\n $minutoComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('i');\n $horaComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('H');\n $minutoComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('i');\n $horaComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('H');\n //Traigo la hora desde de las reservas.\n $hh = $reservasMostrar[$contador]->getHoraHasta()->format('H:i');\n $hd = $reservasMostrar[$contador]->getHoraDesde()->format('H:i');\n //si el min es 30 deberia concatenar con la hora siguente.\n if ( ($minutoComparableDesde == 30) and ($minutoComparableHasta == 00) ){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n //Busco el aula de la reserva (nombre)\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 30) and ($minutoComparableHasta == 30)){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 30)) {\n //a la hora le sumo uno para llegar al valor.\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 00)){\n //a la hora le sumo uno para llegar al valor.\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n else{\n throw $this->createNotFoundException('Lo sentimos se rompieron las reservas :/ los horarios deberian ser en minutos 00 o 30.');\n }\n $ArrayContenedor[$contador] = array(1=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[1]],\n 2=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[2]],3=>$arrayCargadoConHorariosConcat[3],4=>$reservasMostrar[$contador]);\n $contador = $contador + 1;\n }\n if ((count($reservasMostrar)) == 0){\n $ArrayContenedor = null;\n }\n return $this->render('CrestaAulasBundle:Aula:disponibilidad.html.twig',array('mesSelect'=>$mesSelect,\n 'seleccionadoMes'=>$buscameEsto,'mesActual'=>$mesActual,'meses'=>$meses,'horarios'=>$horarios,'aulasMostrar'=>$aulasMostrar,\n 'diaActual'=>$diaActual,'asd'=>$asd,'seleccionadoMesAhora'=>$buscameEstoAhora,\n 'ArrayContenedor'=>$ArrayContenedor,'seleccionadoDia' =>$seleccionadoDia));\n }\n else{\n $query1 = $em->createQuery('SELECT a FROM CrestaAulasBundle:Aula a ORDER BY a.nombre ASC');\n $aulasMostrar = $query1->getResult();\n $seleccionadoDia = $_GET[\"dia\"];\n $buscameEsto= $_GET[\"mes\"];\n $asd= $elmesEnNumero[$buscameEsto];\n $pasar = $AnioActual . '-' . $asd . '-' . $seleccionadoDia;\n $query = $em->createQuery('SELECT r FROM CrestaAulasBundle:Reserva r WHERE r.fecha = :fechitaMostri')->setParameter('fechitaMostri', $pasar);\n $reservasMostrar = $query->getResult();\n $contador = 0;\n \n foreach ($reservasMostrar as $aux) {\n $reservasMostrar[$contador]->getHoraDesde();\n //Busco los minutos para saber si es 30 o 00\n $minutoComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('i');\n $horaComparableDesde = $reservasMostrar[$contador]->getHoraDesde()->format('H');\n $minutoComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('i');\n $horaComparableHasta = $reservasMostrar[$contador]->getHoraHasta()->format('H');\n //Traigo la hora desde de las reservas.\n $hh = $reservasMostrar[$contador]->getHoraHasta()->format('H:i');\n $hd = $reservasMostrar[$contador]->getHoraDesde()->format('H:i');\n //si el min es 30 deberia concatenar con la hora siguente.\n if ( ($minutoComparableDesde == 30) and ($minutoComparableHasta == 00) ){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n //Busco el aula de la reserva (nombre)\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 30) and ($minutoComparableHasta == 30)){\n //a la hora le sumo uno para llegar al valor.\n $horaComparableDesde = $horaComparableDesde + 1;\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':00';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 30)) {\n //a la hora le sumo uno para llegar al valor.\n $horaComparableHasta = $horaComparableHasta + 1;\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':00';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n elseif (($minutoComparableDesde == 00) and ($minutoComparableHasta == 00)){\n //a la hora le sumo uno para llegar al valor.\n //Esto pro si la hora es 08 por ejemplo increible, pero real\n if (strlen($horaComparableDesde) == 1){\n $horaComparableDesde ='0' . $horaComparableDesde ; \n } \n if (strlen($horaComparableHasta) == 1){\n $horaComparableHasta ='0' . $horaComparableHasta ; \n } \n //concateno todo para tener el valor exacto estilo \"12:30 a 13:00\"\n $hd = $hd . ' a ' . $horaComparableDesde . ':30';\n $hh = $hh . ' a ' . $horaComparableHasta . ':30';\n $idBuscar = $reservasMostrar[$contador]->getAula();\n $aulaVar = $em->getRepository('CrestaAulasBundle:Aula')->find($idBuscar);\n $aulaNombre = $aulaVar->getNombre();\n $arrayCargadoConHorariosConcat = array (1=>$hd,2=>$hh,3=>$aulaNombre); \n }\n else{\n throw $this->createNotFoundException('Lo sentimos se rompieron las reservas :/ los horarios deberian ser en minutos 00 o 30.');\n }\n $ArrayContenedor[$contador] = array(1=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[1]],\n 2=>$arrayDeTranformacion[$arrayCargadoConHorariosConcat[2]],3=>$arrayCargadoConHorariosConcat[3],4=>$reservasMostrar[$contador]);\n $contador = $contador + 1;\n }\n if ((count($reservasMostrar)) == 0){\n $ArrayContenedor = null;\n }\n \n \n $diaActual =date('d'); \n $mesSelect = $unArray[$buscameEsto];\n $asd= $elmesEnNumero[$buscameEsto];\n $buscameEstoAhora = $buscameEsto; \n $mesActual = date('m');\n return $this->render('CrestaAulasBundle:Aula:disponibilidad.html.twig',array('mesSelect'=>$mesSelect,\n 'seleccionadoMes'=>$buscameEsto,'mesActual'=>$mesActual,'meses'=>$meses,'horarios'=>$horarios,'aulasMostrar'=>$aulasMostrar,\n 'diaActual'=>$diaActual,'asd'=>$asd,'seleccionadoMesAhora'=>$buscameEstoAhora,\n 'ArrayContenedor'=>$ArrayContenedor,'seleccionadoDia' =>$seleccionadoDia));\n //Por el neg de la gente\n }\n }", "function procesar_carga ($datos){\n \n if(strcmp($datos['tipo'], \"Definitiva\")==0){\n $this->s__dia=$datos['dia_semana'];\n \n //if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'])){\n //if($this->existe_definitiva($datos)){\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_definitiva($datos);\n //agregamos el equipo de catedra si existe\n if(count($this->s__docentes_seleccionados)>0){\n foreach($this->s__docentes_seleccionados as $clave=>$docente){\n $catedra=array(\n 'id_asignacion' => $secuencia,\n 'nro_doc' => $docente['nro_doc'],\n 'tipo_doc' => $docente['tipo_doc']\n );\n \n $this->dep('datos')->tabla('catedra')->nueva_fila($catedra);\n $this->dep('datos')->tabla('catedra')->sincronizar();\n $this->dep('datos')->tabla('catedra')->resetear();\n }\n }\n //}\n// else{\n// $mensaje=\" Está intentando solapar asignaciones \";\n// //$mensaje=\"Error Horario Repetido {$this->s__error}\";\n// toba::notificacion()->agregar(utf8_d_seguro($mensaje));\n// }\n// }\n// else{\n// $mensaje=\" La hora de inicio debe ser menor a la hora de fin \";\n// toba::notificacion()->agregar($mensaje);\n// }\n }\n else{\n if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'], $datos['fecha_inicio'], $datos['fecha_fin'])){\n if($this->existe_periodo($datos)){\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_periodo($datos);\n }\n else{\n $mensaje=\" Está intentando solapar asignaciones \";\n toba::notificacion()->agregar(utf8_decode($mensaje), $nivel);\n }\n }\n else{\n $mensaje=\" Datos inconsistentes en la fecha u hora \";\n toba::notificacion()->agregar($mensaje, $nivel);\n }\n }\n }", "function EstadoCuenta(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_SALAT_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_agencia','id_agencia','int4');\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('id_periodo_venta','int4');\n $this->captura('nombre','varchar');\n $this->captura('mes','varchar');\n $this->captura('fecha_ini','date');\n $this->captura('fecha_fin','date');\n $this->captura('credito','varchar');\n $this->captura('total_credito','numeric');\n $this->captura('debito','varchar');\n $this->captura('total_debito','numeric');\n $this->captura('saldo','numeric');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function protoinsertar(){\r\n\t\t\t\t$aux=$this->consultarAct();\r\n\t\t \t$_SESSION['act'] = $aux;\r\n\r\n\r\n\t\t}", "function procesar_vinculo ($datos){\n $hora_inicio=$this->s__aula_disponible['hora_inicio'];\n $hora_inicio_datos=\"{$datos['hora_inicio']}:00\";\n $hora_fin=$this->s__aula_disponible['hora_fin'];\n $hora_fin_datos=\"{$datos['hora_fin']}:00\";\n \n if(($hora_inicio_datos < $hora_fin_datos) && (($hora_inicio_datos >= $hora_inicio) && ($hora_inicio_datos <= $hora_fin)) && ($hora_fin_datos <= $hora_fin)){\n $this->procesar_carga($datos);\n $this->s__accion=\"Nop\";\n }\n else{\n $mensaje=\" El horario especificado no pertenece al rango disponible : $hora_inicio y $hora_fin hs \";\n toba::notificacion()->agregar($mensaje);\n }\n }", "function getCorrelativoComprobante() {\n\t\tglobal $bd;\n\t\tglobal $x_correlativo_comprobante;\n\t\t/// buscamos el ultimo correlativo\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select (correlativo + 1) as d1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\t\t\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\n\n\t\t\t// if ($x_array_comprobante['codsunat'] === \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// SI TAMBIEN MODIFICA EN REGISTRO PAGO\n\t\t$x_correlativo_comprobante = $correlativo_comprobante;\n\t\tif ( strrpos($x_from, \"e\") !== false ) { $x_from = str_replace('e','',$x_from); setComprobantePagoARegistroPago(); }\n\n\t\t// print $correlativo_comprobante;\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante));\n\t\tprint $x_respuesta.'|';\n\t}", "private function addRetardRec($nbHeure, $nbMinute)\n {\n //init\n $volSuivant = null;\n self::init();\n\n\n //1 Etape : recuperation et test du prochain vol de l'avion utilisé\n $volSuivant = self::$_mapper->getNextVolByAvion($this);\n\n\n //Si le vol est en conflit\n if ($volSuivant instanceof ServPlaning_Model_Vol &&\n $this->get_heureAtterissage() > $volSuivant->get_heureDecollage()) {\n $arrayEnVol = ServPlaning_Model_EnVol::getEnVolByVol($volSuivant->get_noVol());\n //modification de la date Start / stop de chaque en Vol\n foreach ($arrayEnVol as $enVol) {\n $dateStart = new DateTime($enVol->get_heureStart());\n $dateStop = new DateTime($enVol->get_heureStop());\n $dateStart->modify(\"+\" . $nbHeure . \" hour +\" . $nbMinute . \" min\");\n $dateStop->modify(\"+\" . $nbHeure . \" hour +\" . $nbMinute . \" min\");\n $enVol->set_heureStart($dateStart->format(DATE_ATOM));\n $enVol->set_heureStop($dateStop->format(DATE_ATOM));\n $envol->save();\n }\n $volSuivant->addRetardDecollage($nbHeure, $nbMinute);\n }\n\n //2 Etape : recuperation et test des pilotes de l'avion utilisé\n $enVols = ServPlaning_Model_EnVol::getEnVolByVol($this->get_noVol());\n $compteur = 0; // afin de ses souvenir que vol a deja ete modifié\n foreach ($enVols as $enVol) {\n //Pour chaque EnVol Courant\n $enVolSuivant = ServPlaning_Model_EnVol::getNextEnVolByEnVol($enVol);\n if ($enVolSuivant instanceof ServPlaning_Model_EnVol &&\n $enVol->get_heureStop() > $enVolSuivant->get_heureStart()) {\n $VolMod = ServPlaning_Model_Vol::getVol($enVolSuivant->get_noVol());\n $VolMod->addRetardRec($nbHeure, $nbMinute);\n }\n }\n }", "public function RegistreComision($fecha,$ValorComision, $TipoVenta,$comisionista,$idVenta,$Paga)\r\n{\r\n\r\n\t\t\t\t\t\r\n\t\t$tabla=\"comisionesporventas\";\r\n\t\t$NumRegistros=8;\r\n\t\r\n\t\t$this->NombresColumnas(\"colaboradores\");\r\n\t\t\r\n\t\t$DatosColaborador=$this->DevuelveValores($comisionista);\r\n\t\t\t\t\t\t\t\r\n\t\t$CuentaPUC=\"233520$comisionista\";\r\n\t\t$NombreCuenta=\"Comision por pagar del colaborador $DatosColaborador[Nombre] CC $DatosColaborador[Identificacion]\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$Columnas[0]=\"Fecha\";\t\t\t\t\t\t\t$Valores[0]=$fecha;\r\n\t\t$Columnas[1]=\"CuentaPUC\";\t\t\t\t\t\t$Valores[1]=$CuentaPUC;\r\n\t\t$Columnas[2]=\"NombreCuenta\";\t\t\t\t\t$Valores[2]=$NombreCuenta;\r\n\t\t$Columnas[3]=\"Valor\";\t\t\t\t\t\t\t$Valores[3]=$ValorComision;\r\n\t\t$Columnas[4]=\"TipoVenta\";\t\t\t\t\t\t$Valores[4]=$TipoVenta;\r\n\t\t$Columnas[5]=\"Colaboradores_idColaboradores\";\t$Valores[5]=$comisionista;\r\n\t\t$Columnas[6]=\"Ventas_NumVenta\";\t\t\t\t\t$Valores[6]=$idVenta;\r\n\t\t$Columnas[7]=\"Paga\";\t\t\t\t\t\t\t$Valores[7]=$Paga;\r\n\t\t\t\t\t\t\t\r\n\t\t$this->InsertarRegistro($tabla,$NumRegistros,$Columnas,$Valores);\r\n\r\n\r\n}", "function listarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_PAREJE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tipo_cc','id_tipo_cc','int4');\n\t\t\n\t\t$this->capturaCount('total_egreso_mb','numeric');\n\t\t$this->capturaCount('total_ingreso_mb','numeric');\n\t\t$this->capturaCount('total_monto_anticipo_mb','numeric');\n\t\t$this->capturaCount('total_monto_desc_anticipo_mb','numeric');\n\t\t$this->capturaCount('total_monto_iva_revertido_mb','numeric');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_partida_ejecucion','int4');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('id_moneda','int4');\n $this->captura('moneda','varchar');\n\t\t$this->captura('id_presupuesto','int4');\n $this->captura('desc_pres','varchar');\n $this->captura('codigo_categoria','varchar');\n\t\t$this->captura('id_partida','int4');\n $this->captura('codigo','varchar');\n $this->captura('nombre_partida','varchar');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('tipo_cambio','numeric');\n\t\t$this->captura('columna_origen','varchar');\n\t\t$this->captura('tipo_movimiento','varchar');\n\t\t$this->captura('id_partida_ejecucion_fk','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('egreso_mb','numeric');\n\t\t$this->captura('ingreso_mb','numeric');\n\t\t$this->captura('monto_mb','numeric');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('valor_id_origen','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','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');\t\t\n\t\t$this->captura('id_tipo_cc','int4');\n\t\t$this->captura('desc_tipo_cc','varchar');\n\t\t\n\t\t$this->captura('nro_cbte','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t\n\t\t$this->captura('monto_anticipo_mb','numeric');\n\t\t$this->captura('monto_desc_anticipo_mb','numeric');\n\t\t$this->captura('monto_iva_revertido_mb','numeric');\n\t\t\n\t\t$this->captura('glosa1','varchar');\t\t\n\t\t$this->captura('glosa','varchar');\n\t\t\n\t\t$this->captura('cantidad_descripcion','numeric');\n\n $this->captura('total_pago','numeric');\n $this->captura('desc_contrato','varchar');\n $this->captura('obs','varchar');\n $this->captura('tipo_ajuste_formulacion','varchar'); //#41\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function fTraeAuxiliar($pTip, $pCod){\n global $db, $cla, $olEsq;\n $slDato= substr($olEsq->par_Clave,4,2);\n if ($slDato == \"CL\") { // el movimiento se asocia al Cliente\n $iAuxi = $cla->codProv;\n }\n else {\n $iAuxi = NZ(fDBValor($db, \"fistablassri\", \"tab_txtData3\", \"tab_codTabla = '\" . $pTip . \"' AND tab_codigo = '\" . $pCod . \"'\" ),0);\n }\n//echo \"<br>aux\" . $olEsq->par_Clave. \" / \" .$slDato . \" $iAuxi <br>\";\n error_log(\" aux: \" . $iAuxi. \" \\n\", 3,\"/tmp/dimm_log.err\");\t\n return $iAuxi;\n}", "function contador($nombretabla, $BDImportRecambios,$ConsultaImp) {\n\t// Inicializamos array\n $Tresumen['n'] = 0; //nuevo\n $Tresumen['t'] = 0; //total\n $Tresumen['e'] = 0; //existe\n\t$Tresumen['v'] = 0; //existe\n\t\n\t// Contamos los registros que tiene la tabla\n \t$total = 0;\n $whereC = '';\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['t'] = $total; // total registros\n\t\t\n // Obtenemos lineas de registro en blanco y contamos cuantas\n\t$whereC = \" WHERE trim(Estado) = ''\";\n\t$campo[1]= 'RefFabPrin';\n\t$campo[2]= 'linea';\n\t$RegistrosBlanco = $ConsultaImp->registroLineas($BDImportRecambios,$nombretabla,$campo,$whereC);\n\t// Como queremos devolver javascript los creamos\n\t$Tresumen['v'] = $RegistrosBlanco['NItems'];\n\t$Tresumen['LineasRegistro'] = $RegistrosBlanco; //Registros en blanco\n \n \n\t// Contamos los registros que tiene la tabla nuevo\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'nuevo'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['n'] = $total; //nuevo\n\t\n\t\n\t\n\t\n\t\n\t\n\t// Contamos los registros que tiene la tabla existente\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'existe'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n\t$Tresumen['e'] = $total; //existe\n return $Tresumen;\n}", "function siguienteEstadoCotizacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_SIGECOT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_tipo_estado','id_tipo_estado','integer');\n $this->setParametro('id_funcionario','id_funcionario','integer');\n $this->setParametro('obs','obs','varchar');\n $this->setParametro('fecha_oc','fecha_oc','date');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function AsignarVacacion(){\n\t $this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_ASIGVAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setCount(false); \n\t\t\n\t\t$this->tipo_conexion='seguridad';\n\t\t\n\t\t$this->arreglo=array(\"id_usuario\" =>1,\n\t\t\t\t\t\t\t \"tipo\"=>'TODOS'\n\t\t\t\t\t\t\t );\n\t\t\n\t\t$this->setParametro('id_usuario','id_usuario','int4');\t\t\t\t\t\t \n $this->captura('dias_asignados','int4');\n\n\t //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//echo (\"entro al cron modelo vacacion juan \".$this->consulta.' fin juan');\n\t\t//exit;\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarCotizacionProcesoCompra(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\t \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 atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "function contarPruebasAcuerdo2011004($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo>=20113){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }", "function siguienteEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_SIGAV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('historico','historico','varchar');\n \n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\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$this->captura('id_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('funcionario_contacto','varchar');\n\t\t$this->captura('telefono_contacto','varchar');\n\t\t$this->captura('correo_contacto','varchar');\n\t\t$this->captura('prellenar_oferta','varchar');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\t\t$this->captura('tiene_form500','varchar');\n\t\t$this->captura('correo_oc','varchar');\n\n\t\t$this->captura('id_gestion','int4');\n\n\t\t$this->captura('cuce','varchar');\n\t\t$this->captura('fecha_conclusion','date');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('justificacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_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_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROC_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_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\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$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function EstadoCuentaDes(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_AGTD_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_agencia','id_agencia','int4');\n //Definicion de la lista del resultado del query\n $this->captura('fecha_ini','date');\n $this->captura('fecha_fin','date');\n $this->captura('titulo','varchar');\n $this->captura('mes','varchar');\n $this->captura('fecha','date');\n $this->captura('autorizacion__nro_deposito','varchar');\n $this->captura('id_periodo_venta','int4');\n $this->captura('monto_total','numeric');\n $this->captura('neto','numeric');\n $this->captura('monto','numeric');\n $this->captura('cierre_periodo','varchar');\n $this->captura('ajuste','varchar');\n $this->captura('tipo','varchar');\n $this->captura('transaccion','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function liste_articles_jour($date_jour, $nb_art_visites_jour, $date_maj_art, $prev_visites = '') {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_art'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\r\n\t//\r\n\t// requete liste article du jour\r\n\t$q = sql_select(\"sva.id_article, sva.date, sva.visites as visites_j, \r\n\t\t\tsa.titre, sa.visites, sa.popularite, sa.statut \r\n\t\t\tFROM spip_visites_articles sva \r\n\t\t\tLEFT JOIN spip_articles sa ON sva.id_article = sa.id_article \r\n\t\t\tWHERE sva.date='$date_jour' \r\n\t\t\tORDER BY visites_j DESC LIMIT $dl,$fl\");\r\n\r\n\t$nbart = sql_count($q);\r\n\r\n\r\n\t$aff = debut_cadre_relief(\"cal-jour.gif\", true);\r\n\r\n\t// bouton relance brut de la page\r\n\t// en attendant de passer a jquery !\r\n\tif ($date_jour == date('Y-m-d', mktime(0, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\")))) {\r\n\t\t$aff .= \"<div class='bouton_maj'>\\n\"\r\n\t\t\t. \"<a href='\" . generer_url_ecrire(\"actijour_pg\") . \"'>\"\r\n\t\t\t. http_img_pack('puce-blanche.gif', 'ico', '', _T('actijour:mise_a_jour')) . \"</a>\\n\"\r\n\t\t\t. \"</div>\\n\";\r\n\t}\r\n\r\n\t// texte entete\r\n\tif (empty($date_maj_art)) {\r\n\t\t# La date du jour passé en 1er arg (jour, hier ...)\r\n\t\t$tbdate = recup_date($date_jour);\r\n\t\t$date_maj_art = date('d/m/y', mktime(0, 0, 0, $tbdate[1], $tbdate[2], $tbdate[0]));\r\n\t}\r\n\t$aff .= \"<div class='verdana3'>\"\r\n\t\t. _T('actijour:entete_tableau_art_jour', array(\r\n\t\t\t'nb_art_visites_jour' => $nb_art_visites_jour,\r\n\t\t\t'aff_date_now' => ' - ' . $date_maj_art\r\n\t\t))\r\n\t\t. \"</div>\\n\";\r\n\r\n\t// affichage tableau\r\n\tif (sql_count($q)) {\r\n\t\t// valeur de tranche affichꥉ\r\n\t\t$nba1 = $dl + 1;\r\n\t\t//\t\r\n\t\t$ifond = 0;\r\n\r\n\t\t// Presenter valeurs de la tranche de la requete\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. tranches_liste_art($nba1, $nb_art_visites_jour, $fl)\r\n\t\t\t. \"\\n</div>\\n\";\r\n\r\n\t\t// tableau\r\n\t\t$aff .= \"<table align='center' border='0' cellpadding='1' cellspacing='1' width='100%'>\\n\"\r\n\t\t\t. \"<tr bgcolor='$couleur_foncee' class='head_tbl'>\\n\"\r\n\t\t\t. \"<td width='7%'>\" . _T('actijour:numero_court') . \"</td>\\n\"\r\n\t\t\t. \"<td width='65%'>\" . _T('actijour:titre_article') . \"</td>\\n\"\r\n\t\t\t. \"<td width=9%>\" . _T('actijour:visites_jour') . \"</td>\\n\"\r\n\t\t\t. \"<td width=11%>\" . _T('actijour:total_visites') . \"</td>\\n\"\r\n\t\t\t. \"<td width=8%>\" . _T('actijour:popularite') . \"</td>\\n\"\r\n\t\t\t. \"</tr>\\n\";\r\n\r\n\t\t// corps du tableau\r\n\t\twhile ($row = sql_fetch($q)) {\r\n\t\t\t$visites_a = $row['visites'];\r\n\t\t\t$visites_j = $row['visites_j'];\r\n\t\t\t$id_art = $row['id_article'];\r\n\t\t\t$titre = $row['titre'];\r\n\t\t\t$etat = $row['statut'];\r\n\t\t\t// round sur popularit鍊\t\t\t$pop = round($row['popularite']);\r\n\t\t\t// Le total-visites de l'article\r\n\t\t\t#$tt_visit = $visit + $ipv;\r\n\r\n\t\t\t$ifond = $ifond ^ 1;\r\n\t\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t\t$aff .= \"<tr bgcolor='$couleur'><td width='7%'>\\n\"\r\n\t\t\t\t. \"<div align='right' class='verdana2'>\"\r\n\t\t\t\t. affiche_lien_graph($id_art, $titre, $etat, 'spip')\r\n\t\t\t\t. \"</div>\\n</td>\"\r\n\t\t\t\t. \"<td width='65%'>\\n\"\r\n\t\t\t\t. \"<div align='left' class='verdana1' style='margin-left:5px;'><b>\"\r\n\t\t\t\t. affiche_lien_graph($id_art, $titre, $etat)\r\n\t\t\t\t. \"</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='9%'>\\n\"\r\n\t\t\t\t. \"<div align='center' class='verdana2'><b>$visites_j</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='11%'>\\n\"\r\n\t\t\t\t. \"<div align='right' class='verdana1' style='margin-right:3px;'><b>$visites_a</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='8%'>\\n\"\r\n\t\t\t\t. \"<div align='center' class='verdana1'>$pop</div>\\n\"\r\n\t\t\t\t. \"</td></tr>\\n\";\r\n\t\t}\r\n\t\t$aff .= \"</table>\";\r\n\t} // aucun articles\r\n\telse {\r\n\t\t$aff .= \"<div align='center' class='iconeoff bold' style='clear:both;'>\"\r\n\t\t\t. _T('actijour:aucun_article_visite') . \"</div><br />\\n\";\r\n\t}\r\n\t$aff .= visites_pre_traitement($prev_visites);\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function siguienteEstadoBoleta(){\r\n $this->procedimiento='leg.ft_boleta_garantia_dev_ime';\r\n $this->transaccion='LG_POBODEV_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4'); \r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_anexo','id_anexo','int4');\r\n\t\t\r\n\t\t\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function procCtrl($ar){\n $ok = true;\n \n $p = new XParam($ar, array());\n \n // dtff !empty = date valide = écran edition\n // age si < 18 => champs complémentaire\n $dtnaiss = $this->xset->desc['dtnaiss']->post_edit($p->get('dtnaiss'));\n $diff = date_diff(new DateTime(date('Y-m-d')), new DateTime($dtnaiss->raw));\n if ($diff->y < 18){\n foreach($this->eplmodule->modcustomer->parentMandFields as $fn){\n $v = trim($p->get($fn));\n if (empty($v)){\n $ok = false;\n }\n }\n if (!$ok){\n $_REQUEST['message'] .= \"Pour un mineur renseigner les champs 'Responsable légal'\";\n }\n }\n if ($ok && $ar['_typecontrol'] == 'insert'){\n $wtpcard = trim($p->get('wtpcard'));\n if (empty($wtpcard)){\n $ok = false;\n $_REQUEST['message'] = 'Merci de renseigner le numéro de carte'; \n } else {\n list($okcard, $messcard) = $this->checkNewWTPCard($wtpcard);\n if (!$okcard){\n $ok = false;\n $_REQUEST['message'] .= $messcard;\n }\n }\n }\n// $_REQUEST['message'] .= 'TESTS';\n// $ok = false;\n$this->erreurCtrl = !$ok;\n return $ok;\n\n }", "function proceso4($testing,$desaprobar){\n //include($this->POROTO->ModelPath . '/alumnocarrera.php');\n //$claseAlumnoCarrera = new AlumnoCarreraModel($this->POROTO);\n include($this->POROTO->ModelPath . '/alumnomateria.php');\n include($this->POROTO->ControllerPath . '/correlativas.php');\n \n\t$db =& $this->POROTO->DB; \n\t$ses =& $this->POROTO->Session;\n\t$lib =& $this->POROTO->Libraries['siteLibrary'];\n\t\n $db->dbConnect(\"procesos/proceso4/\");\n\t$db->begintrans();\t\n $bOk=true;\n $cambios=array();\n \n\tif(!$ses->tienePermiso('','Proceso 4 - Proceso Actualizar/Desaprobar Condicionales')){\n $ses->setMessage(\"Acceso denegado. Contactese con el administrador.\", SessionMessageType::TransactionError);\n header(\"Location: /verprocesos\", TRUE, 302);\n exit();\n\t}\n\t \n if($testing==0){\n $cambios[]=\"EJECUCION Desaprobar:\".$desaprobar;\n }\n else\n {\n $cambios[]=\"SIMULACION Desaprobar:\".$desaprobar;\n }\n $cambios[]=\" \";\n \n $claseAlumnoMateria = new AlumnoMateriaModel($this->POROTO);\n $result=$claseAlumnoMateria->getAlumnoMateriaCondicionales();\n $claseCorrelativas = new correlativas($this->POROTO);\n \n $cambios[]=\"Listado de alumnos actualizar condicionalidades.\";\n \n foreach ($result as $alumnomateria) {\n //Obtengo las correlativas y si las cumple o no.\n $resultados=$claseCorrelativas->getCorrelativasAlumno($alumnomateria[\"idcarrera\"], $alumnomateria[\"idmateria\"], $alumnomateria[\"idcomision\"], $alumnomateria[\"idpersona\"],$alumnomateria[\"idalumnocarrera\"]);\n $valida=true;\n foreach($resultados as $regla){\n if ($regla[\"idregla\"]!=6 && $regla[\"estado\"]==false) $valida=false;\n }\n\n if($valida){//Si cumple con las correlativas, quito la condicionalidad\n if($testing==0){\n //Actualizar registro\n $res=$claseAlumnoMateria->quitarCondicionalidad($alumnomateria[\"idalumnomateria\"]); \n }\n $cambios[]=\"Alumno: \".$alumnomateria[\"idalumnomateria\"].\" \".$alumnomateria[\"alumno\"].\" \".$alumnomateria[\"documento\"].\" Carrera:\".$alumnomateria[\"idalumnocarrera\"].\" \".$alumnomateria[\"carrera\"].\" Materia:\".$alumnomateria[\"nombre\"].\" Quitar Condicionalidad\"; \n \n }else{\n //No quito la condicionalidad porque sigue condicional\n $cambios[]=\"Alumno: \".$alumnomateria[\"idalumnomateria\"].\" \".$alumnomateria[\"alumno\"].\" \".$alumnomateria[\"documento\"].\" Carrera:\".$alumnomateria[\"idalumnocarrera\"].\" \".$alumnomateria[\"carrera\"].\" Materia:\".$alumnomateria[\"nombre\"].\" Continua Cond.\";\n }\n }\n \n if($desaprobar==1 && $testing==0){\n $result=$claseAlumnoMateria->getAlumnoMateriaCondicionales(); \n $cambios[]=\"---\";\n $cambios[]=\"Listado de alumnos desaprobar condicionales.\";\n foreach ($result as $alumnomateria) {\n $claseAlumnoMateria->desaprobarCondicionales($alumnomateria[\"idalumnocarrera\"],$alumnomateria[\"idpersona\"],$alumnomateria[\"idalumnomateria\"],$this->POROTO->Config['estado_alumnomateria_desaprobada'],$ses->getUsuario(),0);\n $res=$claseAlumnoMateria->quitarCondicionalidad($alumnomateria[\"idalumnomateria\"]); \n $cambios[]=\"Alumno: \".$alumnomateria[\"idalumnomateria\"].\" \".$alumnomateria[\"alumno\"].\" \".$alumnomateria[\"documento\"].\" Carrera:\".$alumnomateria[\"idalumnocarrera\"].\" \".$alumnomateria[\"carrera\"].\" Materia:\".$alumnomateria[\"nombre\"].\" DESAPROBADA.\";\n }\n }\n\n \n\tif ($bOk === false) {\n\t\t$db->rollback();\n\t\t$ses->setMessage(\"Se produjo un error al ejecutar el proceso.<br>\", SessionMessageType::TransactionError);\n\t}\n\t else \n\t{\n if(count($cambios)>0){\n $log=$this->POROTO->TempPath.\"proceso4-log-\".date('Ymd').\"-\".date('Hi').\".txt\";\n $ruta=\"proceso4-log-\".date('Ymd').\"-\".date('Hi').\".txt\";\n for($i=0;$i<count($cambios);$i++){\n file_put_contents($log, $cambios[$i].\"\\n\", FILE_APPEND);\n }\n $ses->setMessage(\"Proceso ejecutado con éxito. <br> <a href='/procesos/downloadFile?file=\".$ruta.\"' >Ver log de acción</a><br>\", SessionMessageType::Success);\n }else{\n $ses->setMessage(\"Proceso ejecutado con éxito. <br> \", SessionMessageType::Success);\n }\n\t\t$db->commit();\n\t}\n\t\n\t$db->dbDisconnect();\n\theader(\"Location: /verprocesos\", TRUE, 302);\n }", "public function ctlBuscaNumOpSalidas($fecha){\n\t\t$busca = $fecha.'%';\n\n\t\t$respuesta = Datos::mdlNumOperaciones('salidas', $busca);\n\n\t\t$next = $respuesta['cuenta']+1;\n\t\techo $fecha,\"-\",$next;\n\t\t//echo '$fecha-$next';\n\t}", "function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }", "function getEspecialDisponibilidadPonderada() {\n \t\tglobal $mdb2;\n \t\tglobal $log;\n \t\tglobal $current_usuario_id;\n \t\tglobal $usr;\n\n\t\t//TRAE LAS PONDERACIONES DEL OBJETIVO ESPECIAL\n\t\t$ponderaciones_hora = $this->extra['ponderaciones'];\n\t\t//DATO PARA LA CONSULTA SQL, LISTA LAS HORAS DEL DÍA\n\t\t//SI ES 0 TRAE LAS 24 HORAS\n\t\t$ponderacion = $usr->getPonderacion();\n\n\t\tif ($ponderacion == null) {\n\t\t\t$ponderacion_id = 0;\n\t\t}\n\t\telse {\n\t\t\t$ponderacion_id = $ponderacion->ponderacion_id;\n\t\t}\n\n\t\t$sql = \"SELECT * FROM reporte.disponibilidad_resumen_global_ponderado_poritem(\".\n \t\t\t\tpg_escape_string($current_usuario_id).\",\".\n \t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n \t\t\t\tpg_escape_string($ponderacion_id).\",' \".\n \t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n \t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n \t\t//echo '<3>'.$sql.'<br>';\n\n \t\t$res = & $mdb2->query($sql);\n \t\tif (MDB2::isError($res)) {\n \t\t\t$log->setError($sql, $res->userinfo);\n \t\t\texit();\n \t\t}\n\n \t\tif($row = $res->fetchRow()){\n \t\t\t$dom = new DomDocument();\n \t\t\t$dom->preserveWhiteSpace = FALSE;\n\t\t\t$dom->loadXML($row[\"disponibilidad_resumen_global_ponderado_poritem\"]);\n \t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"disponibilidad_resumen_global_ponderado_poritem\"]);\n \t\t}\n\n\n \t\t$conf_pasos = $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo/paso[@visible=1]\");\n \t\t$conf_eventos = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\t\t$conf_ponderaciones = $xpath->query(\"/atentus/resultados/propiedades/ponderaciones/item\");\n\n \t\t//SI NO HAY DATOS MOSTRAR MENSAJE\n \t\tif (!$conf_pasos->length or $xpath->query(\"/atentus/resultados/detalles/detalle/detalles/detalle\")->length == 0) {\n \t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n \t\t\treturn;\n \t\t}\n\t\t//VALIDA QUE NO HAYA MAS DEL 100% DE PONDERACIONES\n\t\tforeach ($ponderaciones_hora as $value) {\n\t\t\t$suma_pond += $value->valor_ponderacion;\n\t\t}\n\n\t\tif (number_format($suma_pond, 2) > 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES SUPERIROR AL 100%.';\n\t\t\treturn;\n\t\t}elseif (number_format($suma_pond, 2) < 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES MENOR AL 100%.';\n\t\t\treturn;\n \t\t}\n\n \t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n \t\t$T->setFile('tpl_tabla', 'especial_disponibilidad_resumen.tpl');\n \t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TITULOS', 'bloque_eventos_titulos');\n \t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS', 'bloque_eventos');\n \t\t$T->setBlock('tpl_tabla', 'BLOQUE_PASOS', 'bloque_pasos');\n \t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n \t\t$T->setBlock('tpl_tabla', 'BLOQUE_HORARIOS', 'bloque_horarios');\n\n \t\t$T->setVar('bloque_titulo_horarios', '');\n \t\t$T->setVar('bloque_eventos_titulos', '');\n \t\tforeach ($conf_eventos as $conf_evento) {\n \t\t\t$T->setVar('__evento_nombre', $conf_evento->getAttribute(\"nombre\"));\n \t\t\t$T->parse('bloque_eventos_titulos', 'BLOQUE_EVENTOS_TITULOS', true);\n \t\t}\n\n \t\t$linea = 1;\n \t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t$array_porcentaje_por_paso = array();\n\t\t\t$tag_paso = $xpath->query(\"//detalles/detalle/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute(\"paso_orden\").\"]\")->item(0);\n \t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n \t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n \t\t\t$T->setVar('__pasoNombre', $conf_paso->getAttribute(\"nombre\"));\n\n \t\t\t$path_dato = \"//detalles/detalle[@nodo_id=0]/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute(\"paso_orden\").\"]/estadisticas/estadistica/@porcentaje\";\n \t\t\t$diferencia = $xpath->evaluate(\"sum(\".$path_dato.\")\") - 100;\n \t\t\t$maximo = $xpath->evaluate($path_dato.\"[not(. < \".$path_dato.\")][1]\")->item(0)->value;\n\n\t\t\tforeach ($conf_ponderaciones as $conf_ponderacion) {\n\t\t\t\tif ($ponderaciones_hora[$conf_ponderacion->getAttribute('inicio')]->valor_ponderacion == 0) {\n\t\t\t\t\tcontinue;\n \t\t\t\t}\n\n\t\t\t\t$valor=$ponderaciones_hora[$conf_ponderacion->getAttribute('inicio')];\n\n\t\t\t\tforeach ($conf_eventos as $conf_evento) {\n\t\t\t\t\t$tag_dato_item = $xpath->query(\"detalles/detalle[@item_id=\".$conf_ponderacion->getAttribute('item_id').\"]/estadisticas/estadistica[@evento_id=\".$conf_evento->getAttribute(\"evento_id\").\"]\", $tag_paso)->item(0);\n\n\t\t\t\t\t// SE REGISTRAN LOS VALORES POR ITEM.\n\t\t\t\t\tif ($tag_dato_item == null) {\n\t\t\t\t\t\t$porcentaje = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$porcentaje = $tag_dato_item->getAttribute(\"porcentaje\");\n\t\t\t\t\t}\n\t\t\t\t\t$array_porcentaje_por_paso[$conf_evento->getAttribute(\"evento_id\")] += $porcentaje* ($valor->valor_ponderacion/100);\n \t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$T->setVar('bloque_eventos', '');\n\t\t\tforeach ($conf_eventos as $conf_evento) {\n\n\t\t\t\t$T->setVar('__evento_valor', number_format($array_porcentaje_por_paso[$conf_evento->getAttribute(\"evento_id\")], 2, '.', ''));\n \t\t\t\t$T->setVar('__evento_color', ($conf_evento->getAttribute(\"color\") == \"f0f0f0\")?\"b2b2b2\":$conf_evento->getAttribute(\"color\"));\n \t\t\t\t$T->parse('bloque_eventos', 'BLOQUE_EVENTOS', true);\n \t\t\t}\n\n \t\t\t$T->parse('bloque_pasos', 'BLOQUE_PASOS', true);\n \t\t\t$linea++;\n\n \t\t}\n \t\t$T->parse('bloque_horarios', 'BLOQUE_HORARIOS', true);\n\n \t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n \t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n \t}", "function imprimir_voucher_estacionamiento($numero,$chofer,$patente,$horainicio,$horatermino,$montototal,$comentario,$correlativopapel,$cliente,$fecha_termino,$fecha_inicio_2){\ntry {\n // Enter the share name for your USB printer here\n //$connector = null; \n //$connector = new WindowsPrintConnector(\"EPSON TM-T81 Receipt\");\n $connector = new WindowsPrintConnector(\"EPSON TM-T20 Receipt\");\n // $connector = new WindowsPrintConnector(\"doPDF 8\");\n /* Print a \"Hello world\" receipt\" */\n $printer = new Printer($connector);\n\n \n $date=new DateTime();\n $fecha = $date->format('d-m-Y');\n\n\n $Chofer = $chofer;\n $Patente = $patente;\n $serie = $numero;\n $img = EscposImage::load(\"logo1.png\");\n $printer -> graphics($img);\n \n \n $printer -> text(\"Numero : $serie\\n\");\n $printer -> text(\"Chofer : $Chofer\\n\");\n $printer -> text(\"Patente: $Patente\\n\");\n\n if ($cliente != 0) {\n include_once(\"conexion.php\");\n $con = new DB;\n $buscarpersona = $con->conectar();\n $strConsulta = \"select * from cliente where rut_cliente ='$cliente'\";\n $buscarpersona = mysql_query($strConsulta);\n $numfilas = mysql_num_rows($buscarpersona);\n $row = mysql_fetch_assoc($buscarpersona);\n $nombre_cliente = $row['nombre_cliente'];\n //var_dump($numfilas);\n if($numfilas >= 1){\n $printer -> text(\"Cliente: $nombre_cliente\\n\");\n }\n \n }\n \n if ($correlativopapel != 0) {\n $printer -> text(\"\\nCorrelativo : $correlativopapel\\n\");\n }\n $printer -> text(\"Fecha Inicio : $fecha_inicio_2\\n\");\n $printer -> text(\"Hora de inicio : $horainicio\\n\");\n\n\n\n if ($horatermino != 0) {\n $printer -> text(\"Fecha de Termino: $fecha_termino\\n\");\n $printer -> text(\"Hora de Termino : $horatermino\\n\"); \n }\n \n \n if ($montototal != 0) {\n $printer -> text('Monto total : $'.$montototal);\n }\n \n if ($horatermino != 0) {\n $printer -> text(\"\\n\");\n $printer -> text(\"\\n\\n\");\n $printer -> text(\"Firma: _________________\\n\");\n \n }\n $printer -> text(\"$comentario\\n\");\n $printer -> cut();\n /* Close printer */\n $printer -> close();\n\n echo \"<div class='alert alert-success'><strong>Impresion Correcta $comentario</strong></div>\";\n} catch (Exception $e) {\n echo \"No se pudo imprimir \" . $e -> getMessage() . \"\\n\";\n}\n}", "public function affectation()\n {\n session_start();\n $bdd = new PDO('mysql:host=localhost;dbname=projet', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n $allmsg = $bdd->query('SELECT * FROM role ORDER BY ordre ASC ');\n //on va devoir ajouter une colonne dans la BD ca sera le pseudo du joueur on va voir ca\n while($msg= $allmsg->fetch())\n {\n ?>\n <br> <b><?php echo $msg['pseudo'].' a choisis le rôle: ' . $msg['role']. ' !' ?> </b> </br>\n <?php\n }\n\n //nombre de lignes dans la table\n $JoueursRestant = 7 - $allmsg->rowCount();\n\n if($JoueursRestant != 0)\n {\n echo \" <p id='avantlancer1'> En attente de \". $JoueursRestant .\" Joueurs</p>\t<img src=\\\"ajax-loader.gif\\\" alt=\\\"patientez...\\\" id='ajax'> </br>\";\n }\n else{\n echo '<p id=\"avantlancer2\">La partie va commencer dans: <p/>';\n\n\n }\n\n }", "public function RegistreVenta($idVentaActiva,$TipoVenta,$CuentaDestino,$Comision,$Comisionista)\r\n {\r\n \r\n $fecha=date(\"Y-m-d\");\r\n $Hora=date(\"H:i:s\");\r\n \r\n //////// Averiguamos el ultimo numero de venta/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"ventas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumVenta=$campos[\"NumVenta\"];\r\n$NumVenta=$NumVenta+1;\r\n\r\n//////// Averiguamos el ultimo numero de factura/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"facturas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumFact=$campos[\"idFacturas\"];\r\n$NumFact=$NumFact+1;\r\n\r\n//////// Averiguamos el ultimo numero de cotizacion/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"cotizaciones\");\r\n$maxID=$this->VerUltimoID();\r\n$idCoti=$maxID+1;\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumCot=$campos[\"NumCotizacion\"];\r\n$NumCot=$NumCot+1;\r\n\r\n//print(\"max id de ventas: $maxID, Numero de Venta: $NumVenta\");\r\n\r\n$DatosVentaActiva=mysql_query(\"SELECT * FROM vestasactivas WHERE idVestasActivas='$idVentaActiva';\", $this->con) or die('problemas para consultas vestasactivas: ' . mysql_error());\r\n$DatosVentaActiva=mysql_fetch_array($DatosVentaActiva);\r\n$idCliente=$DatosVentaActiva[\"Clientes_idClientes\"];\r\n\r\n$registros=mysql_query(\"SELECT * FROM preventa WHERE VestasActivas_idVestasActivas='$idVentaActiva';\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\r\n//$registros1=mysql_fetch_array($registros);\t\r\n\t\t\t//$this->NombresColumnas(\"productosventa\");\r\n\t\t\tif(mysql_num_rows($registros)){\r\n\t\t\t\t$i=0;\r\n\t\t\t\t//print($i);\r\n\t\t\t\t\r\n\t\t\t\twhile($registros2=mysql_fetch_array($registros)){\r\n\t\t\t\t\t$i++;\t\t\t\r\n\t\t\t\t\t//print(\"fila $i:///////////////////////////////////////////////////////////////<br>\");\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t//print_r($registros2);\r\n\t\t\t\t\t$this->NombresColumnas(\"productosventa\");\r\n\t\t\t\t\t$idProducto=$registros2[\"ProductosVenta_idProductosVenta\"];\r\n\t\t\t\t\t$campos=$this->DevuelveValores($idProducto);\r\n\t\t\t\t\t$TotalVenta=$registros2[\"TotalVenta\"]+$registros2[\"Descuento\"];\r\n\t\t\t\t\t$IVA=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$TotalCostoP=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; \r\n\t\t\t\t\t////////empezamos a formar el registro que se hará en ventas empezamos desde porque el id es autoincrement y el numcuentapuc es conocido\r\n\t\t\t\t\t\r\n\t\t\t\t\t$CamposVenta[2]=$NumVenta;\r\n\t\t\t\t\t$CamposVenta[3]=$fecha;\r\n\t\t\t\t\t$CamposVenta[4]=$idProducto;\r\n\t\t\t\t\t$CamposVenta[5]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$CamposVenta[6]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$CamposVenta[7]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$CamposVenta[8]=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$CamposVenta[9]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$CamposVenta[10]=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$CamposVenta[11]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$CamposVenta[12]=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; //Total costo\r\n\t\t\t\t\t$CamposVenta[13]=$TotalVenta;\r\n\t\t\t\t\t$CamposVenta[14]=$TipoVenta;\r\n\t\t\t\t\t$CamposVenta[15]=\"NO\"; //cerrado en periodo\r\n\t\t\t\t\t$CamposVenta[16]=$campos[\"Especial\"];\r\n\t\t\t\t\t$CamposVenta[17]=$idCliente;\r\n\t\t\t\t\t$CamposVenta[18]=$Hora;\r\n\t\t\t\t\t$CamposVenta[19]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$CamposVenta[20]=$NumFact;\r\n\t\t\t\t\t//print_r($CamposVenta);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Inserto el registro en la tabla ventas\r\n\t\t\t\t\tif($TipoVenta==\"Credito\" and $idCliente==0)\r\n\t\t\t\t\t\texit(\"Usted está intentando Registrar una venta a credito sin seleccionar un cliente, por favor asignelo a esta venta antes de continuar\");\r\n\t\t\t\t\telse\t\r\n\t\t\t\t\t\t$this->GuardaRegistroVentas(\"ventas\", $CamposVenta);\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALIDA DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALIDA\";\r\n\t\t\t\t\t$Detalle=\"VENTA\";\r\n\t\t\t\t\t$idDocumento=$NumVenta;\r\n\t\t\t\t\t$Cantidad=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$ValorUnitario=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$ValorTotalSalidas=round($Cantidad*$ValorUnitario);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $Cantidad, $ValorUnitario, $ValorTotalSalidas, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALDOS DESPUES DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALDOS\";\r\n\t\t\t\t\t$CantidadSaldo=$campos[\"Existencias\"];\r\n\t\t\t\t\t$NuevoSaldo=$CantidadSaldo-$Cantidad;\r\n\t\t\t\t\t$ValorTotal=$NuevoSaldo*$ValorUnitario;\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $NuevoSaldo, $ValorUnitario, $ValorTotal, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Actualiza tabla de productos venta\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"productosventa\";\r\n\t\t\t\t\t$NumRegistros=1;\r\n\t\t\t\t\t$Columnas[0]=\"Existencias\";\r\n\t\t\t\t\t//$Columnas[1]=\"CostoUnitario\";\r\n\t\t\t\t\t//$Columnas[2]=\"CostoTotal\";\r\n\t\t\t\t\t$Valores[0]=$NuevoSaldo;\r\n\t\t\t\t\t//$Valores[1]=$ValorUnitario;\r\n\t\t\t\t\t//$Valores[2]=$ValorTotal;\r\n\t\t\t\t\t$Filtro=\"idProductosVenta\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->EditeValoresTabla($tabla,$NumRegistros,$Columnas,$Valores,$Filtro,$idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Ingresar a Cotizaciones \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"cotizaciones\";\r\n\t\t\t\t\t$NumRegistros=16; \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Columnas[0]=\"Fecha\";\t\t\t\t\t$Valores[0]=$fecha;\r\n\t\t\t\t\t$Columnas[1]=\"NumCotizacion\";\t\t\t$Valores[1]=$NumCot;\r\n\t\t\t\t\t$Columnas[2]=\"Descripcion\";\t\t\t\t$Valores[2]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$Columnas[3]=\"Referencia\";\t\t\t\t$Valores[3]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$Columnas[4]=\"ValorUnitario\";\t\t\t$Valores[4]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$Columnas[5]=\"Cantidad\";\t\t\t\t$Valores[5]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$Columnas[6]=\"Subtotal\";\t\t\t\t$Valores[6]=$registros2[\"Subtotal\"];\r\n\t\t\t\t\t$Columnas[7]=\"IVA\";\t\t\t\t\t\t$Valores[7]=$IVA;\r\n\t\t\t\t\t$Columnas[8]=\"Total\";\t\t\t\t\t$Valores[8]=round($registros2[\"Subtotal\"]+$IVA);\r\n\t\t\t\t\t$Columnas[9]=\"Descuento\";\t\t\t\t$Valores[9]=0;\r\n\t\t\t\t\t$Columnas[10]=\"ValorDescuento\";\t\t\t$Valores[10]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$Columnas[11]=\"Clientes_idClientes\";\t$Valores[11]=$idCliente;\r\n\t\t\t\t\t$Columnas[12]=\"Usuarios_idUsuarios\";\t$Valores[12]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$Columnas[13]=\"TipoItem\";\t\t\t\t$Valores[13]=\"PR\";\r\n\t\t\t\t\t$Columnas[14]=\"PrecioCosto\";\t\t\t$Valores[14]=round($campos[\"CostoUnitario\"]);\r\n\t\t\t\t\t$Columnas[15]=\"SubtotalCosto\";\t\t\t$Valores[15]=round($campos[\"CostoUnitario\"]*$registros2[\"Cantidad\"]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->InsertarRegistro($tabla,$NumRegistros,$Columnas,$Valores);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\nreturn($NumVenta);\t\r\n//echo \"Venta Registrada\";\r\n\r\n}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "function listar_simbolos_provisionales_limit($inicial,$cantidad) {\n\t\t\t\n\t\t$query = \"SELECT *\n\t\tFROM simbolos_temp\n\t\tWHERE revisado = 0\n\t\tORDER BY id_simbolo_tmp desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public static function getNumarCurent($registru, $rol){\n $database = new Database();\n $conexiune = $database->conectare();\n \n $sql = \"SELECT * FROM $registru\";\n \n if($result = mysqli_query($conexiune, $sql)){\n if(mysqli_num_rows($result) > 0){\n $sqlGetNumarUrmator = \"SELECT MAX(numar_curent_corespondenta) FROM $registru\";\n if($result = mysqli_query($conexiune, $sqlGetNumarUrmator)){\n $NumarUrmator = mysqli_fetch_assoc($result);\n return (int)$NumarUrmator['MAX(numar_curent_corespondenta)'] + 1;\n }\n }elseif(mysqli_num_rows($result) == 0 || mysqli_num_rows($result) == NULL){\n $sqlGetNumarUrmatorBaza = \"SELECT start_number FROM rd_start_numbers WHERE cod_registru = $rol\";\n if($result = mysqli_query($conexiune, $sqlGetNumarUrmatorBaza)){\n $NumarUrmator = mysqli_fetch_assoc($result);\n return (int)$NumarUrmator['start_number'];\n };\n }\n }\n }", "function contarPruebasAcuerdo2009007($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo!=20101 && $anioperiodo!=20111 ){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }", "function obtnerUosEpsDetalleAdjudicado(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_OBEPUO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "public function LeerSubscripciones(){\n\t\t\t$u=Login::getUsuario();\n\t\t\tif(!$u)\n\t\t\t\tshow_error('Tens que estar identificat',404,'Error , Identificat');\n\t\t\t//crear una instancia de Subscripciones\n\t\t\t$p = new SubscripcionsModel();\n\t\t\t$p->id_usuari=$u->id;\n\t\t\t//leer las Subscripciones de un usuario en BDD\n\t\t\tif($p->getSubscripcions()){\n\t\t\t\t//mostrar la vista de Subscripciones de un usuario\n\t\t\t\t$data['id_usuari'] = $p->id_usuari;\n\t\t\t\t$data['id_curs'] = $p->id_curs;\n\t\t\t\t$data['data_hora'] = $p->data_hora;\n\t\t\t\t\n\t\t\t\t$this->load->view('templates/header', $data);\n\t\t\t\t$this->load->view('result/exit', $data);// vista Subscripcions alumne\n\t\t\t\t$this->load->view('templates/footer', $data);\n\t\t\t}else{\n\t\t\t\t// ESTE USUARIO NO TIENE SUBSCRIPCIONES\n\t\t\t\t$data['mensaje'] = \"Alumne sense Subscripcions a cap curs\";\n\t\t\t\t$data['usuario']=$u;\n\t\t\t\t$this->load->view('templates/header', $data);\n\t\t\t\t$this->load->view('result/exit', $data);// vista no exito Subscripcions alumne\n\t\t\t\t$this->load->view('templates/footer', $data);\n\t\t\t}\n\t\t}", "function get_seq_account_financing_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_financing_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "function insertarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\t\t\n\t\t$this->setParametro('id_venta','id_venta','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('correo_copia','correo_copia','varchar');\n\t\t$this->setParametro('observacion','observacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function generarPreingreso(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_PREING_GEN';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//echo $this->consulta;exit;\n\t\t\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function listadoProyectos(){\n $class=\"\";\n $this->arrayEstatusVisibles = array();\n if($this->session['rol'] == 1)\n $this->arrayEstatusVisibles = array(0,1,2,3,4,5,6,7,8,9,10);\n if ($this->session ['rol'] == 2)\n $this->arrayEstatusVisibles = array (0,1,2,3,4,5,6,7,8,9,10);\n \n if($this->session['rol'] == 3)\n $this->arrayEstatusVisibles = array(5,6,7,8,9,10);\n if($this->session['rol'] == 4)\n $this->arrayEstatusVisibles = array(1,2,3,4,5,6,7,8,9,10);\n \n $no_registros = $this->consultaNoProyectosAvances();\n $this->arrayNotificaciones = $this->notificaciones();\n $arrayDisabled = $this->recuperaPermisos(0,0);\n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $noTri = $trimestreId;\n if($trimestreId == 1)\n $noTri =\"\";\n \n if($no_registros){\n $this->pages = new Paginador();\n $this->pages->items_total = $no_registros;\n $this->pages->mid_range = 25;\n $this->pages->paginate();\n $resultados = $this->consultaProyectosAvances();\n $this->bufferExcel = $this->generaProyectosExcel();\n }\n $col=6;\n $this->buffer=\"\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading'><span class='titulosBlanco'>\".str_replace(\"#\",$trimestreId,REPORTETRIMESTRAL).\"</span></div>\n <div class='panel-body'><center><span id='res'></span></center>\".$this->divFiltrosProyectos(1,0,\"\",\"\").\"\n <center>\".$this->regresaLetras().\"</center><br>\";\n if(count($resultados) > 0){\n $arrayAreas = $this->catalogoAreas();\n $arrayOpera = $this->catalogoUnidadesOperativas();\n $this->buffer.=\"\n <table width='95%' class='table tablesorter table-condensed' align='center' id='MyTableActividades'>\n <thead><tr>\n <td class='tdcenter fondotable' width='2%' >\".NO.\"</td>\n <td class='tdcenter fondotable' width='10%' >\".AREA.\"</td>\n <td class='tdcenter fondotable' width='36%' >\".PROYECTOS.\"</td>\n <td class='tdcenter fondotable' width='10%' >\".METASREPORTE.\"</td> \n <td class='tdcenter fondotable' width='10%' >\".FECHAALTA.\"</td>\n <td class='tdcenter fondotable' width='12%' >\".ESTATUSVALIDACION.\" Trimestre \".$trimestreId.\"</td> \n <td clasS='tdcenter fondotable' width='12%' >\".ENVIARCOORDINADOR.\"</td>\";\n if($this->session['rol']>=3 ){\n $this->buffer.=\"<td clasS='tdcenter fondotable' width='10%'>\".MARCAVALIDAR.\"</td>\";\n $col++;\n }\n $this->buffer.=\"</tr></thead><tbody>\";\n $contador=1;\n $varTemporal=\"\";\n if($this->session['page']<=1)\n $contadorRen= 1;\n else\n $contadorRen=$this->session['page']+1; \n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo = \"estatus_avance_entrega\".$noTri;\n $idEstatus=$resul[$campo]; \n $varTemporal = $resul['id'];\n if($idEstatus == 0){\n $this->arrayNotificaciones[0]['act'] = 1;\n }\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'> \n <td class='tdcenter'>\".$contador.\"</td>\n <td class='tdcenter'>\n <a class='negro' href='#'\n data-toggle='tooltip' data-placement='bottom'\n title='\".$arrayAreas[$resul['unidadResponsable_id']].\". - Unidad Operativa: \".$arrayOpera[$resul['unidadOperativaId']].\"'>\n &nbsp;\" . $resul['unidadResponsable_id']. \"</a>\n </td> \n <td class='tdleft'>\".$resul['proyecto'].\"</td>\n <td class='tdcenter'>\";\n if($resul['noAcciones'] > 0)\n {\n $this->buffer.=\"\n <a class='negro' href='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=9&folio=\".$varTemporal.\"'\n data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPMETAREP.\"' id='\".$varTemporal.\"'>\".$resul['noAcciones'].\"</a>\";\n }\n $this->buffer.=\"</td> \n <td class='tdcenter'>\".substr($resul['fecha_alta'],0,10).\"</td>\n <td class='tdcenter' style='background-color:\".$this->arrayNotificaciones[$idEstatus]['color'].\";color:#000000;'>\";\n if($idEstatus > 2){\n $this->buffer.=\"<a class='negro visualizaComentarios' href='#' onclick='return false;' id='\".$varTemporal.\"'\n data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPMUESTRACOMENTARIOS.\"'>\n &nbsp;\".$this->arrayNotificaciones[$idEstatus]['nom'].\"\n </a>\";\n }\n else{\n $this->buffer.=$this->arrayNotificaciones[$idEstatus]['nom'];\n }\n $this->buffer.=\"</td><td class='tdcenter'>\";\n //mostramos el checkbox rol 1\n if(($this->session['rol'] == 1 || $this->session['rol'] == 2) && $idEstatus>0 && $idEstatus < 4){\n //if( ($this->arrayNotificaciones[$idEstatus]['act'] == 1) && ($resul['userId'] == $this->session['userId']) ){\n if( ($this->arrayNotificaciones[$idEstatus]['act'] == 1) ){\n if($resul['noAcciones']>0)\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n }\n //mostramos el checkbox rol 2\n if($this->session['rol'] == 2 && $idEstatus >= 4 && $idEstatus < 7 && $idEstatus != 5){\n if($resul['noAcciones']>0)\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n //mostramos el checkbox rol 3\n if($this->session['rol'] == 3 && $idEstatus >= 5 && $idEstatus < 10 && $idEstatus != 6 && $idEstatus != 8){\n if($resul['noAcciones']>0)\n if($idEstatus == 5)\n $this->buffer.=$this->pintaComentarioAvance($idEstatus,$resul['id'],$trimestreId);\n else\n $this->buffer.=\"<input data-toggle='tooltip' data-placement='bottom' title='\".DESMARCAVALIDAR.\"' type='checkbox' name='enviaId' id='\".$varTemporal.\"' class='enviaIdAvance' value='\".$resul['id'].\"'>\";\n }\n //mostramos el checkbox rol 4\n if($this->session['rol'] == 4 && $idEstatus >= 6 && $idEstatus <= 10 && $idEstatus != 7){\n if($resul['noAcciones']>0)\n if($idEstatus == 8)\n $this->buffer.=$this->pintaComentarioAvance($idEstatus,$resul['id'],$trimestreId);\n }\n $this->buffer.=\"</td>\";\n \n if ($this->session['rol'] == 3){\n $this->buffer.=\"<td class='tdcenter'>\";\n if($idEstatus == 6 ){\n $this->buffer.=\"<a class='negro enviaEnlacePlaneacion' id='c-\".$varTemporal.\"-0' href='#' data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPREGRESAPROYECTOPLANEACION.\"'><span class='glyphicon glyphicon-thumbs-down'></span>&nbsp;</a>\";\n }\n $this->buffer.=\"</td>\";\n }\n if ($this->session['rol'] >= 4){\n $this->buffer.=\"<td class='tdcenter'>\";\n if($idEstatus == 9 ){\n $this->buffer.=\"<a class='negro enviaCoordinador' id='p-\".$varTemporal.\"-0' href='#' data-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPREGRESAPROYECTOCOORDINADOR.\"'><span class='glyphicon glyphicon-thumbs-down'></span>&nbsp;</a>\";\n }else{\n if($idEstatus <10 )\n $this->buffer .= \"<input data-toggle='tooltip' data-placement='bottom' title='\" . DESMARCAVALIDAR . \"' type='checkbox' name='enviaId' id='\" . $varTemporal . \"' class='enviaIdAvance' value='\" . $resul ['id'] . \"'>\";\n }\n $this->buffer.=\"</td>\";\n }\n \n $this->buffer.=\"</tr>\";\n $contador++;\n } \n $this->buffer.=\"<tbody><thead><tr>\n <td colspan='\".($col-1).\"' class='tdcenter'>&nbsp;</td>\n <td colspan='2' class='tdcenter'>\".$this->Genera_Archivo($this->bufferExcel,$this->path_sis).\"</td>\n </tr></thead></table>\n <table width='100%'><tr><td class='tdcenter'>\".$this->pages->display_jump_menu().\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".$this->pages->display_items_per_page($this->session ['regs']).\"</td></tr></table>\"; \n }\n else{\n $this->buffer.=\"<table class='table table-condensed'><tr><td class='tdcenter'>\".SINREGISTROS.\"</td></tr></table>\";\n }\n $this->buffer.=\"</div></div>\";\n }", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "public function veractivcursoAction()\r\n {\r\n // action body\r\n // requiere layout activado en aplication ini\r\n $this->_helper->layout->disableLayout();\r\n //echo \"voy bien 1\";\r\n //configuraci�n inicial\r\n $config = Zend_Registry::get('config');\r\n //echo \"voy bien 2\";\r\n //CONEXION\r\n $DB = Zend_Db_Table::getDefaultAdapter();\r\n //echo \"voy bien 3\";\r\n \r\n\r\n\r\n //con parametros\r\n\r\n //PARAMETROS\r\n $S_LISTA=$this->_request->getPost('veractivcursop1');\r\n $S_RBD = $this->_request->getPost('veractuvcursop2');\r\n \r\n \r\n //$session = new Zend_Session_Namespace('EMATLOCAL');\r\n \r\n \r\n //con parametros\r\n if(trim($S_LISTA)!=\"\" )\r\n {\r\n \r\n /*\r\n $S_ID=$this->encrypt($S_ID,$keyStr);\r\n $S_CLAVE=$this->encrypt($S_CLAVE,$keyStr);\r\n */ \r\n //echo \"$S_ID@@@$S_CLAVE<br>\";\r\n \r\n \r\n // si los datos est�n encriptados\r\n // usamos encrypt\r\n //$S_ID=$functions->decrypt($S_ID,$keyStr);\r\n //$S_CLAVE=$functions->decrypt($S_CLAVE,$keyStr);\r\n \r\n //echo \"$S_ID@@@$S_CLAVE<br>\";\r\n //echo ($S_LISTA);\r\n $sql = \"select a.rut,a.nombre,b.modulo,b.ingreso,b.termino,b.estado,b.puntaje\r\n from tblacceso a,tblregistro b\r\n where\r\n a.rut = b.rut and\r\n a.lista = '$S_LISTA'\";\r\n if($S_RBD!=\"\") $sql.= \" and a.institucion = $S_RBD \";\r\n $sql.= \"order by a.nombre asc,b.termino desc\";\r\n //\r\n //echo($sql);\r\n try{\r\n $rowset = $DB->fetchAll($sql);\r\n //print_r($rowset);\r\n if (count($rowset) > 0)\r\n {\r\n\r\n Zend_Layout::getMvcInstance()->assign('actalum',$rowset);\r\n }\r\n\r\n }\r\n catch (Zend_Exception $e)\r\n {\r\n echo $e->getMessage();\r\n }\r\n\r\n\r\n }\r\n else\r\n {\r\n echo \"-1\";\r\n }\r\n\r\n\r\n //con sesion\r\n //}else if(isset($_SESSION[\"login-ok\"]) && trim($_SESSION[\"login-ok\"])!=\"\") \r\n //}\r\n\r\n \r\n }", "function insertarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('num_convocatoria','num_convocatoria','varchar');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_ini_proc','fecha_ini_proc','date');\n\t\t$this->setParametro('obs_proceso','obs_proceso','varchar');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('num_tramite','num_tramite','varchar');\n\t\t$this->setParametro('codigo_proceso','codigo_proceso','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('num_cotizacion','num_cotizacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function reparacion_num_ser()\n {\n $menu = 4;\n $this->render ('/reparacion/reparacion_num_ser', compact('menu'));\n }", "function etape_1(&$repete) {\n global $message,$Dossier,$Cabinet, $deval, $self, $tcabinet, $tville, $t_diab;\n\n $req=\"SELECT cabinet, total_diab2, nom_cab, region \".\n \"FROM account \".\n \"WHERE region!='' and infirmiere!='' \".\n \"GROUP BY nom_cab \".\n \"ORDER BY nom_cab \";\n\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $reg=array();\n while(list($cab, $total_diab2, $ville, $region) = mysql_fetch_row($res)) {\n\n $t_diab[$cab]=0;\n\n $tville[$cab]=$ville;\n\n $regions[$cab]=$region;\n $nb_dossiers[$cab]=0;\n $rcva[$cab]=0;\n $nb_dossiers[$region]=0;\n $rcva[$region]=0;\n\n if(!in_array($region, $reg)){\n $reg[]=$region;\n }\n }\n\n $nb_dossiers[\"tot\"]=0;\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, \".\n \"dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb_dossiers[$cabinet]=$nb_dossiers[$cabinet]+1;\n $nb_dossiers[\"tot\"]=$nb_dossiers[\"tot\"]+1;\n $nb_dossiers[$regions[$cabinet]]=$nb_dossiers[$regions[$cabinet]]+1;\n }\n\n $date1an=date(\"Y\");\n $date1an--;\n $date1an=$date1an.\"-\".date(\"m\").\"-\".date(\"d\");\n\n $date3ans=date(\"Y\");\n $date3ans=$date3ans-3;\n $date3ans=$date3ans.\"-\".date(\"m\").\"-\".date(\"d\");\n\n echo \"<table border='1'><tr><td></td><th>Taux moyen Asalée</th>\";\n\n foreach($reg as $region){\n echo \"<th>$region</th>\";\n }\n\n foreach($tville as $ville){\n echo \"<th>$ville</th>\";\n }\n\n echo \"<tr><td width='150'>Antécédents familiaux<sup>1</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, \".\n \"dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and (antecedants='oui' or antecedants='non') and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Tabagisme<sup>2</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and (tabac='oui' or tabac='non') and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Poids<sup>3</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dpoids>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n\n echo \"<tr><td>Alcool<sup>4</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and (alcool='oui' or alcool='non') and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Cholestérol total<sup>5</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dChol>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>HDL<sup>6</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dHDL>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n\n echo \"<tr><td>LDL<sup>7</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dLDL>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Triglycérides<sup>8</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dtriglycerides>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Glycémie<sup>9</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dgly>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Créatinine<sup>10</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and cardio_vasculaire_depart.dCreat>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Kaliémie<sup>11</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dkaliemie>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Protéinurie<sup>12</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dproteinurie>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Fond d'oeil<sup>13</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dfond>='$date3ans' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Fréquence cardiaque<sup>14</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dpouls>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Tension<sup>15</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dTA>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Echocardiogramme Hypertrophie Ventriculaire Gauche<sup>16</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and (HVG='oui' or HVG='non') and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>ECG<sup>17</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dECG>='$date3ans' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>A défaut Surcharge ventriculaire gauche<sup>18</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and (surcharge_ventricule='oui' or surcharge_ventricule='non') and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Sokolov<sup>19</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and dsokolov>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Examen cardio-vasculaire<sup>20</sup></td>\";\n\n $req=\"SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account \".\n \"where dossier.id=cardio_vasculaire_depart.id and \".\n \"dossier.cabinet=account.cabinet and region!='' and infirmiere!='' \".\n \"and exam_cardio>='$date1an' and actif='oui' group by dossier.id\";\n $res=mysql_query($req) or die(\"erreur SQL:\".mysql_error().\"<br>$req\");\n\n $nb[\"tot\"]=0;\n foreach($reg as $region){\n $nb[$region]=0;\n }\n\n foreach($tville as $cab=>$ville){\n $nb[$cab]=0;\n }\n\n while(list($cabinet)=mysql_fetch_row($res)){\n $nb[\"tot\"]=$nb[\"tot\"]+1;\n $nb[$cabinet]=$nb[$cabinet]+1;\n $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1;\n }\n\n echo \"<td align='right'>\".round($nb[\"tot\"]/$nb_dossiers[\"tot\"]*100).\" %</td>\";\n foreach($reg as $region){\n if($nb_dossiers[$region]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$region]/$nb_dossiers[$region]*100).\" %</td>\";\n }\n }\n\n foreach($tville as $cab=>$ville){\n if($nb_dossiers[$cab]==0){\n echo \"<td align='right'>ND</td>\";\n }\n else{\n echo \"<td align='right'>\".round($nb[$cab]/$nb_dossiers[$cab]*100).\" %</td>\";\n }\n }\n\n echo \"<tr><td>Nombre de patients actifs avec au moins un suivi<sup>21</sup></td>\";\n\n echo \"<td align='right'>\".$nb_dossiers[\"tot\"].\"</td>\";\n foreach($reg as $region){\n echo \"<td align='right'>\".$nb_dossiers[$region].\"</td>\";\n }\n\n foreach($tville as $cab=>$ville){\n echo \"<td align='right'>\".$nb_dossiers[$cab].\"</td>\";\n }\n\n echo \"</table><br><br>\";\n\n $annee0=2007;\n $mois0=3;\n\n $annee=date('Y');\n $mois=date('m');\n\n $mois--;\n\n\n if($mois<3)\n {\n $annee--;\n $mois=12;\n }\n elseif(($mois>=3)&&($mois<6))\n {\n $mois=3;\n }\n elseif(($mois>=6)&&($mois<9))\n {\n $mois=6;\n }\n elseif(($mois>=9)&&($mois<12))\n {\n $mois=9;\n }\n\n $jour[3]=$jour[12]=31;\n $jour[6]=$jour[9]=30;\n\n while(($annee>$annee0)||(($annee==$annee0)&&($mois>=$mois0)))\n {\n if($mois<10)\n {\n $date=$annee.'-0'.$mois.'-'.$jour[$mois];\n }\n else\n {\n $date=$annee.'-'.$mois.'-'.$jour[$mois];\n }\n tableau($date, $regions);\n\n $mois=$mois-3;\n\n if($mois<=0)\n {\n $mois=$mois+12;\n $annee--;\n }\n }\n\n echo \"<sup>1</sup> Taux de patients pour lesquels les antécédents familiaux ont été renseignés à la date du jour<br>\".\n \"<sup>2</sup> Taux de patients pour lesquels le tabagisme a été renseigné à la date du jour<br>\".\n \"<sup>3</sup> Taux de patients pour lesquels le poids date de moins d'un an<br>\".\n \"<sup>4</sup> Taux de patients pour lesquels la consommation d'alcool a été renseignée<br>\".\n \"<sup>5</sup> Taux de patients pour lesquels le cholestérol total date de moins d'un an<br>\".\n \"<sup>6</sup> Taux de patients pour lesquels le HDL date de moins d'un an<br>\".\n \"<sup>7</sup> Taux de patients pour lesquels le LDL date de moins d'un an<br>\".\n \"<sup>8</sup> Taux de patients pour lesquels les triglycérides datent de moins d'un an<br>\".\n \"<sup>9</sup> Taux de patients pour lesquels la glycémie date de moins d'un an<br>\".\n \"<sup>10</sup> Taux de patients pour lesquels la créatinine date de moins d'un an<br>\".\n \"<sup>11</sup> Taux de patients pour lesquels la kaliémie date de moins d'un an<br>\".\n \"<sup>12</sup> Taux de patients pour lesquels la protéinurie date de moins d'un an<br>\".\n \"<sup>13</sup> Taux de patients pour lesquels le fond d'oeil date de moins de 3 ans<br>\".\n \"<sup>14</sup> Taux de patients pour lesquels la fréquence cardiaque date de moins d'un an<br>\".\n \"<sup>15</sup> Taux de patients pour lesquels la tension artérielle date de moins d'un an<br>\".\n \"<sup>16</sup> Taux de patients pour lesquels l'échocardiogramme hypertrophie ventriculaire gauche a été renseigné<br>\".\n \"<sup>17</sup> Taux de patients pour lesquels l'ECG date de moins de 3 ans<br>\".\n \"<sup>18</sup> Taux de patients pour lesquels la surcharge ventriculaire gauche a été renseignée<br>\".\n \"<sup>19</sup> Taux de patients pour lesquels le sokolov date de moins d'un an<br>\".\n \"<sup>20</sup> Taux de patients pour lesquels l'examen cardio-vasculaire date de moins d'un an<br>\".\n \"<sup>21</sup> Nombre de patients actifs à la date du jour et ayant eu au moins un questionnaire collecte de données RCVA rempli\";\n\n}", "public function reporte(){\n\n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,24);\n if($resultado != 1){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n /*Cierra la seguridad*/\n\n //datos para la vista previa en genera y beneratodo\n $solicitude = $this->Solicitudes->newEntity();\n\n //Se guardar las siglas y Ids de los estudiantes con solicitudes aceptadas para usarlos en la vista donde se seleecionara algun estudiante\n $carnetId = $this->Solicitudes->getCarnetId();\n $carnet=array(0 => \"\"); //vector para guardad los carnet de estudiantes que han sido asistentes\n $Ids=array(0 => \"\"); //vector para guardad los id de estudiantes que han sido asistentes\n foreach ($carnetId as $key => $value) {\n array_push($carnet, $value['nombre_usuario']);\n array_push($Ids, $value['usuarios_id']);\n }\n\n if ($this->request->is('post')) { \n $data = $this->request->getData(); \n $ronda = $data['Ronda'];\n if ($ronda == 0){\n $id = $data['Carné'];\n return $this->redirect(['action' => 'genera', $Ids[$id]]);\n } else {\n return $this->redirect(['action' => 'generaRonda', $ronda]);\n }\n }\n\n $this->set(compact('carnet', 'solicitude', 'ronda'));\n }", "function revisaNuevo($data2, $compra, $inve){\n foreach ($data2 as $min1) {\n $art=$min1->CVE_ART;\n $mov=$min1->NUM_MOV;\n $this->query=\"SELECT count(num_mov) as movimientos FROM MINVE06 WHERE CVE_ART = '$art' and num_mov < $mov \";\n $res=$this->EjecutaQuerySimple();\n $rowM=ibase_fetch_object($res);\n $movs=$rowM->MOVIMIENTOS;\n if($movs == 0){\n $this->query=\"UPDATE MINVE06 SET COSTO_PROM_INI = 0, COSTO_PROM_fin = 0 WHERE NUM_MOV = $mov\";\n $this->queryActualiza();\n }\n\n $this->query=\"SELECT first 1 * FROM MINVE06 WHERE REFER = '$compra' \n AND CVE_ART = '$inve' \n and costeado_ff is null \n ORDER BY NUM_MOV ASC \";\n $res=$this->EjecutaQuerySimple();\n while ($tsarray=ibase_fetch_object($res)){\n $data3[]=$tsarray;\n }\n }\n return $data3;\n }", "public function onDevolucion() {\n try {\n if ($this->input->post('Venta') !== '' && $this->input->post('Venta') > 0) {\n $Datos = $this->ventas_model->onCrearFolio($this->input->post('TP'));\n $vta = $this->dvm->getVentabyID($this->input->post('Venta'));\n /* GENERAR VENTA */\n $Folio = $Datos[0]->FolioTienda;\n if (empty($Folio)) {\n $Folio = 1;\n } else {\n $Folio = $Folio + 1;\n }\n $diff = $this->input->post('DiferenciaACobrar');\n $supago = str_replace(\",\", \"\", $this->input->post('SuPago'));\n $data = array(\n 'TipoDoc' => $vta[0]->TipoDoc,\n 'Tienda' => $this->session->userdata('TIENDA'),\n 'FolioTienda' => $Folio,\n 'Cliente' => $vta[0]->Cliente,\n 'Vendedor' => $this->session->userdata('ID'),\n 'FechaCreacion' => Date('d/m/Y h:i:s a'),\n 'FechaMov' => Date('d/m/Y h:i:s a'),\n 'MetodoPago' => $this->input->post('MetodoDePago'),\n 'Estatus' => 'CERRADA',\n 'Importe' => ($diff > 0) ? $diff : 0,\n 'Usuario' => $this->session->userdata('ID'),\n 'SuPago' => $supago,\n 'ImporteEnLetra' => $this->input->post('ImporteEnLetra'),\n 'Tipo' => 'D'\n );\n $ID = $this->dvm->onAgregar($data);\n print '{ \"ID\":' . $ID . '}'; /* ID REQUERIDO PARA EL TICKET */\n $data = array(\n 'Venta' => $this->input->post('Venta'),\n 'TipoDoc' => $vta[0]->TipoDoc,\n 'Tienda' => $this->session->userdata('TIENDA'),\n 'FolioTienda' => $Folio,\n 'Cliente' => $vta[0]->Cliente,\n 'Vendedor' => $this->session->userdata('ID'),\n 'FechaCreacion' => Date('d/m/Y h:i:s a'),\n 'FechaMov' => Date('d/m/Y h:i:s a'),\n 'MetodoPago' => $this->input->post('MetodoDePago'),\n 'Estatus' => 'CERRADA',\n 'Importe' => ($diff > 0) ? $diff : 0,\n 'Usuario' => $this->session->userdata('ID'),\n 'SuPago' => $this->input->post('SuPago'),\n 'ImporteEnLetra' => $this->input->post('ImporteEnLetra'),\n 'Tipo' => 'D'\n );\n $IDD = $this->dvm->onAgregarDevolucion($data);\n\n /* DETALLE DE LA VENTA DEVUELTO */\n $DetalleDevuelto = json_decode($this->input->post(\"DetalleDevuelto\"));\n foreach ($DetalleDevuelto as $key => $v) {\n /* AGREGAR LOS PRODUCTOS DEVUELTOS (SUMAR) */\n\n /* OBTENER SERIE X ESTILO */\n $serie = $this->dvm->getSerieXEstilo($v->Estilo);\n\n /* ACTUALIZA LAS EXISTENCIAS DE LA TIENDA DESTINO */\n $existencia = 0;\n for ($index = 1; $index <= 22; $index++) {\n /* CONSULTAR EXISTENCIAS DE LA TIENDA DESTINO */\n $existencias = $this->dvm->getExistenciasXTiendaXEstiloXColor($this->session->userdata('TIENDA'), $v->Estilo, $v->Color);\n /* COMPROBAR EXISTENCIAS EN LA TIENDA ORIGEN TENGA DISPONIBLES DE LA TALLA SOLICITADA */\n $existencias_disponibles = $this->dvm->getExistenciasXTiendaXEstiloXColor($this->session->userdata('TIENDA'), $v->Estilo, $v->Color);\n // print \"Talla : \" . $v->Talla . \"-\" . $v->Cantidad . \", EXDES: \" . $existencias_disponibles[0]->{\"Ex$index\"} . \"\\n\";\n if ($serie[0]->{\"T$index\"} == $v->Talla) {\n /* SUMAR LA CANTIDAD EN LA TALLA DE LA TIENDA DESTINO */\n $existencia = ($existencias[0]->{\"Ex$index\"} + $v->Cantidad);\n /* AGREGAR EXISTENCIAS DE LA TIENDA DESTINO */\n $this->dvm->onModificarExistencias($this->session->userdata('TIENDA'), $v->Estilo, $v->Color, $existencia, $index);\n $data = array(\n 'Devolucion' => $IDD,\n 'Estilo' => $v->Estilo,\n 'Color' => $v->Color,\n 'Talla' => $v->Talla,\n 'Cantidad' => $v->Cantidad,\n 'Subtotal' => $v->SubTotal,\n 'Descuento' => 0,\n 'Precio' => $v->Precio,\n 'PorcentajeDesc' => 0,\n 'Registro' => Date('d/m/Y h:i:s a')\n );\n $this->dvm->onAgregarDevolucionDetalle($data);\n }\n }/* FIN AGREGAR LOS PRODUCTOS DEVUELTOS */\n }\n\n /* DETALLE DE LA VENTA (DEVOLUCION) */\n $Detalle = json_decode($this->input->post(\"Detalle\"));\n foreach ($Detalle as $key => $v) {\n /* ENTREGAR LOS PRODUCTOS SELECCIONADOS (RESTAR) */\n /* OBTENER SERIE X ESTILO */\n $serie = $this->dvm->getSerieXEstilo($v->Estilo);\n\n /* ACTUALIZA LAS EXISTENCIAS DE LA TIENDA DESTINO */\n $existencia = 0;\n for ($index = 1; $index <= 22; $index++) {\n /* CONSULTAR EXISTENCIAS DE LA TIENDA DESTINO */\n $existencias = $this->dvm->getExistenciasXTiendaXEstiloXColor($this->session->userdata('TIENDA'), $v->Estilo, $v->Color);\n /* COMPROBAR EXISTENCIAS EN LA TIENDA ORIGEN TENGA DISPONIBLES DE LA TALLA SOLICITADA */\n $existencias_disponibles = $this->dvm->getExistenciasXTiendaXEstiloXColor($this->session->userdata('TIENDA'), $v->Estilo, $v->Color);\n\n if ($serie[0]->{\"T$index\"} > 0 && $serie[0]->{\"T$index\"} == $v->Talla && $existencias_disponibles[0]->{\"Ex$index\"} > 0) {\n /* RESTAR LA CANTIDAD EN LA TALLA DE LA TIENDA ORIGEN */\n $existencia = ($existencias_disponibles[0]->{\"Ex$index\"} - $v->Cantidad);\n /* REMOVER EXISTENCIAS DE LA TIENDA ACTUAL/ORIGEN */\n $this->dvm->onModificarExistencias($this->session->userdata('TIENDA'), $v->Estilo, $v->Color, $existencia, $index);\n /* FIN RESTAR LA CANTIDAD EN LA TALLA DE LA TIENDA ORIGEN */\n /* AGREGAR UN REGISTRO EN EL DETALLE DE LA DEVOLUCIÓN */\n $data = array(\n 'Venta' => $ID,\n 'Estilo' => $v->Estilo,\n 'Color' => $v->Color,\n 'Talla' => $v->Talla,\n 'Cantidad' => $v->Cantidad,\n 'Subtotal' => $v->SubTotal,\n 'Descuento' => 0,\n 'Precio' => $v->Precio,\n 'PorcentajeDesc' => 0\n );\n $this->dvm->onAgregarDetalle($data);\n break;\n }\n }\n /* FIN ENTREGAR LOS PRODUCTOS SELECCIONADOS */\n }\n }\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function premier($nombre)\n{\n if($nombre > 10000){\n for($i = 1;$i <= $nombre; $i++)\n {\n $cpt=0;\n for($j=1;$j<=$i; $j++)\n {\n if($i%$j==0)\n {\n $cpt++;\n }\n }\n if($cpt==2)\n {\n $T1[] = $i;\n }\n } \n }else{\n echo \"<center>entrer un nombre superieur a 10 000<center>\";\n }\n\n $inferieurs = array();\n $superieurs= array();\n\n for($i=0;$i< count($T1); $i++)\n {\n if($T1[$i]< moyenne($T1))\n {\n $inferieurs[] = $T1[$i];\n }else{\n $superieurs[] = $T1[$i];\n }\n }\n\n $T = array\n (\n 'inferieur'=>$inferieurs,\n 'superieur'=>$superieurs\n );\n\n $_SESSION['T'] = $T1;\n\n $_SESSION['inferieur'] = $T['inferieur'];\n $_SESSION['superieur'] = $T['superieur'];\n}", "public function inscrireEnfantAction($id,Request $request,$nomEnfant,$prenomEnfant) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n } \n \n $em = $this->getDoctrine()->getManager();\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n $season = new Saison;\n $year = $season->connaitreSaison();\n $saison = $em->getRepository('SC\\ActiviteBundle\\Entity\\Saison')->find($year);\n $userParent = $request->getSession()->get('email');\n //on verifie que les parametres sont bons\n if (is_null($saison) OR is_null($activite)) {\n return $this->pageErreur('paramètres entrés invalides');\n }\n //on verifie que l'enfant est inscrit a l'activite\n if ($this->inscritActivite($activite,$saison,$nomEnfant,$prenomEnfant,$userParent)==false) {\n //return $this->pageErreur($nomEnfant.' '.'non inscrit à cette activité');\n $request->getSession()->getFlashBag()->add('info2', 'enfant non inscrit a cette activite');\n return $this->render('SCActiviteBundle:Activite:view.html.twig', array('activite'=> $activite));\n }\n //on verifie que l'enfant n'est pas deja inscrit a cette sortie\n $sortie = $request->getSession()->get('sortie');\n if ($this->estInscrit($id,$sortie, $userParent, $nomEnfant, $prenomEnfant,$year)==true) {\n //return $this->pageErreur($nomEnfant.' '.'est déja inscrit à cette sortie');\n $request->getSession()->getFlashBag()->add('info2', 'enfant deja inscrit a cette sortie');\n return $this->render('SCActiviteBundle:Activite:view.html.twig', array('activite'=> $activite));\n }\n\n $inscriptionSortie = new InscriptionSortie;\n $inscriptionSortie->setDateSortie($sortie->getDateSortie());\n $inscriptionSortie->setEmailParent($userParent);\n $inscriptionSortie->setIdActivite($id);\n $inscriptionSortie->setNomEnfant($nomEnfant);\n $inscriptionSortie->setPreNomEnfant($prenomEnfant);\n $inscriptionSortie->setParticipation(0);\n $inscriptionSortie->setSaison($year);\n \n //on persist\n $em->persist($inscriptionSortie);\n $em->flush();\n $request->getSession()->getFlashBag()->add('info', 'votre inscription a bien été prise en compte');\n $mesInscriptions = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->findBy(array('emailParent'=>$userParent,'saison'=>$year));\n $request->getSession()->set('mesInscriptions', $mesInscriptions);\n return $this->render('SCActiviteBundle:Activite:view.html.twig', array('activite'=> $activite));\n }", "function insertarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarVacacion(){\n\t\t$this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_VAC_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 $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->captura('id_vacacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('dias','numeric');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n $this->captura('desc_funcionario1','varchar');\n\t\t//wf\n $this->captura('id_proceso_wf','int4');\n $this->captura('id_estado_wf','int4');\n $this->captura('estado','varchar');\n $this->captura('nro_tramite','varchar');\n $this->captura('medio_dia','integer');\n $this->captura('dias_efectivo', 'numeric');\n// medio_dia\n //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function get_compte(){retrun($id_local_compte); }", "function choixVoeux($link){\n\t\t$delaiJ=1;\n\t\t$delaiH=1;\n\t\t$dateact=date(\"Y-m-d hh:mm:ss\");\n\t\t$heureact=date(\"H:i\");\n\t\t$delaiJFinal=date(\"Y-m-d H:i:s\", strtotime(\"+\".$delaiJ.\" day\",strtotime($dateact)));\n\t\t\n\t\t$choixGroupe = $link->query('SELECT idProj, idG FROM ChoixGroupe WHERE idG='.getGroupId().' ORDER BY `index` LIMIT 6');\n\n\t\t$tab = array();\n\n\t\twhile($v = $choixGroupe->fetch_array()){\n\t\t\t$v = $v['idProj'];\n\t\t\t$tab[] = $v;\n\t\t\t$rq=\"SELECT (number>=nbMini AND number<=nbMax) as dispo FROM Projet, (SELECT COUNT(*) as number FROM Etudiant as etu WHERE idGrEtu=\".getGroupId().\") as _ WHERE idProj=\".$v;\n\n\t\t\t$nbdisp=$link->query($rq) or die(\"Erreur de requette nbMax(table Projet)\");\n\t\t\t\n\t\t\tif(!intval($nbdisp->fetch_assoc()['dispo']))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/* Remplissage de la table Candidature */\n\t\t$cptTemp=0;\n\t\t$cptGroupe=0.5;\n\n\t\t$time = new DateTime();\n\t\t$cpt = $time->getTimestamp() + ($delaiJ * (3600*24));\n\n\t\t/*On inclus les candidatures*/\n\t\tforeach($tab as $v){\n\t\t\t/*Decalage en fonction de l'ordre des choix*/\n\t\t\t$cpt=$cpt+$delaiH*3600;\n\t\t\t/*on met le delai*/\n\t\t\t/*concatenation de la date (date+heure)*/\n\t\n\t\t\t$sql=\"insert into Candidature (Date, idPro_C, IdGroupe_C) values('\".date(\"Y-m-d H:i:s\", $cpt).\"', $v,\".getGroupId().\")\";\n\t\t\t$execc=mysqli_query($link,$sql) or die('Erreur d\\'insertion');\n\t\t}\n\n\t\t// $sql=\"update Groupe set EstBloque=1 where idG=\".getGroupId();\n\t\t// $exec=mysqli_query($link,$sql) or die('Erreur de bloquage');\n\n\t\treturn true;\n\t}", "function fIniDetalle(){\n\tglobal $agPar;\n return array('det_regnumero'=> $agPar[\"com_RegNumero\"],\n\t'det_tipocomp' \t\t=> $agPar[\"com_TipoComp\"],\n 'det_numcomp' \t\t=> $agPar[\"com_NumComp\"],\n 'det_secuencia'\t\t=> 1,\n 'det_clasregistro' \t=> 0,\n 'det_idauxiliar'\t=> 0 ,\n 'det_valdebito' \t=> 0,\n 'det_valcredito'\t=> 0,\n 'det_glosa' \t\t=> $agPar[\"com_Concepto\"],\n 'det_estejecucion' \t=> 0,\n 'det_fecejecucion' \t=> '2020-12-31',\t\t\t\t//@TODO: Hacer una fecha futura en base a la fecha contable!!!\n 'det_estlibros' \t=> 0,\n 'det_feclibros' \t=> '2020-12-31',\n 'det_refoperativa' \t=> 0,\n 'det_numcheque' \t=> 0,\n 'det_feccheque' \t=>'0000-00-00',\n\t'det_valdebito'\t\t=> 0,\n\t'det_valcredito'\t=>0,\n 'det_codcuenta' \t=> '' ) ;\n }", "function consultar_opedidos(){\n \n $query_RecordsetResumo = \"SELECT * FROM CAIXACUPOM \";\n $query_RecordsetResumo .= \" WHERE TIPOATENDIMENTO = 'DELIVERY' \";\n #$query_RecordsetResumo .= \" AND STATUS_GO4YOU != '4' \";\n $query_RecordsetResumo .= \" ORDER BY CAIXACUPOM_CONTROLE DESC\";\n $query_RecordsetResumo .= \" LIMIT 20\";\n $RecordsetResumo = mysql_query($query_RecordsetResumo, $con) or die(mysql_error());\n $row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo);\n $totalRows_RecordsetResumo = mysql_num_rows($RecordsetResumo);\n \n $tempo = $_SESSION['TEMPO_PREPARACAO'];\n $pedidos = array();\n $i = 0;\n if($totalRows_RecordsetResumo != 0 ){\n do {\n \n # Checa se percisa alterar o status\n if(dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) == 2 && $row_RecordsetResumo['STATUS_GO4YOU'] == \"0\"){\n update_status($row_RecordsetResumo['CAIXACUPOM_CONTROLE'], 2);\n }\n \n # Condicao para gerar contador de Tempo\n $status = \" excedido \";\n if($row_RecordsetResumo['STATUS_GO4YOU'] == \"0\" && dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) != 2){\n $status = dif_hora_draw(acrescenta_min($row_RecordsetResumo['DATAHORA'], $tempo), date('Y-m-d H:i:s'));\n }\n \n $pedidos[$i]['CAIXACUPOM_CONTROLE'] = $row_RecordsetResumo['CAIXACUPOM_CONTROLE' ];\n $pedidos[$i]['DATAHORA' ] = dataMySql2BR($row_RecordsetResumo['DATAHORA' ]);\n $pedidos[$i]['TEMPO_PREVISTO' ] = acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo);\n $pedidos[$i]['STATUS_GO4YOU' ] = trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU']));\n $pedidos[$i]['TEMPO' ] = $status;\n $pedidos[$i]['STATUS_BTN' ] = $row_RecordsetResumo['STATUS_GO4YOU'] < 4 ? \n '<input type=\"submit\" value=\"'.trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU'] + 1)).'\" onClick=\"update_status('.$row_RecordsetResumo['CAIXACUPOM_CONTROLE'].', '.$row_RecordsetResumo['STATUS_GO4YOU'].')\" style=\"cursor: pointer;\" />' :\n '<input type=\"button\" value=\"Entregue\" disabled />' ;\n ++$i;\n } while ($row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo)); \n }\n \n return json_encode($pedidos);\n \n}", "function autorizar_entregar_pm($id_movimiento_material) {\r\n global $_ses_user,$db,$id_stock_rma;\r\n \r\n\r\n //$db->StartTrans();\r\n $sql=\"select id_deposito from general.depositos where nombre='RMA-Produccion-San Luis' \";\r\n $res = sql($sql) or fin_pagina();\r\n $id_stock_rma = $res->fields[\"id_deposito\"];\r\n \r\n $titulo_pagina = \"Movimiento de Material\";\r\n $fecha_hoy = date(\"Y-m-d H:i:s\",mktime());\r\n \r\n \r\n $sql = \"select deposito_origen,deposito_destino from movimiento_material \r\n where id_movimiento_material = $id_movimiento_material\";\r\n $res = sql($sql) or fin_pagina();\r\n \r\n $deposito_origen = $res->fields[\"deposito_origen\"];\r\n $deposito_destino = $res->fields[\"deposito_destino\"];\r\n \r\n $sql = \" select id_detalle_movimiento,cantidad,id_prod_esp from detalle_movimiento \r\n where id_movimiento_material = $id_movimiento_material\";\r\n $detalle_mov = sql($sql) or fin_pagina();\r\n \r\n for($i=0; $i < $detalle_mov->recordcount(); $i++){ \t \r\n \t $id_detalle_movimiento = $detalle_mov->fields[\"id_detalle_movimiento\"];\t\r\n \t $cantidad = $detalle_mov->fields[\"cantidad\"];\r\n \t $id_prod_esp = $detalle_mov->fields[\"id_prod_esp\"];\r\n $sql = \"select id_recibidos_mov,cantidad\r\n from recibidos_mov where id_detalle_movimiento=$id_detalle_movimiento \r\n and ent_rec=0\";\r\n $detalle_rec = sql($sql) or fin_pagina();\r\n $id_recibido_mov = $detalle_rec->fields[\"id_recibidos_mov\"];\r\n\r\n if($id_recibido_mov==\"\") {\r\n\t \t //insert\r\n\t\t $sql = \"select nextval('recibidos_mov_id_recibidos_mov_seq') as id_recibido_mov\";\r\n\t\t $res_1 = sql($sql) or fin_pagina();\r\n\t\t $id_recibido_mov = $res_1->fields[\"id_recibido_mov\"];\r\n\t\t $sql=\"insert into recibidos_mov(id_recibidos_mov,id_detalle_movimiento,cantidad,ent_rec)\r\n\t\t values($id_recibido_mov,$id_detalle_movimiento,$cantidad,0)\";\r\n }else {\r\n\t //update\r\n\t $sql=\"update recibidos_mov set cantidad=cantidad+$cantidad\r\n\t where id_recibidos_mov=$id_recibido_mov\";\r\n }//del else\r\n sql($sql) or fin_pagina();\r\n $sql =\"insert into log_recibidos_mov(id_recibidos_mov,usuario,fecha,cantidad_recibida,tipo)\r\n values($id_recibido_mov,'\".$_ses_user[\"name\"].\"','$fecha_hoy',$cantidad,'entrega')\";\r\n sql($sql) or fin_pagina();\r\n //eliminamos las reservas hechas para este movimiento\r\n $comentario_stock=\"Utilización de los productos reservados por el $titulo_pagina Nº $id_movimiento\";\r\n $id_tipo_movimiento=7;\r\n descontar_reserva($id_prod_esp,$cantidad,$deposito_origen,$comentario_stock,$id_tipo_movimiento,$id_fila=\"\",$id_detalle_movimiento);\r\n //ahora incremento el stock destino\r\n \r\n if($deposito_destino==$id_stock_rma) {\r\n\t $comentario_rma=\"Ingreso de productos a RMA mediante el $titulo_pagina Nº $id_movimiento\";\r\n $tipo_log=\"Creacion MM Nº $id_movimiento\";\r\n $cb_insertados=array();\r\n $rma_san_luis = 1;\r\n incrementar_stock_rma($id_prod_esp,$cantidad,\"\",$comentario_rma,\"\",$cb_insertados,\"\",1,\"\",\"\",\"\",\"null\",\"\",$nro_caso,\"\",$tipo_log,\"\",$id_movimiento_material,$rma_san_luis);\r\n //guardamos el id de proveedor elegido para RMA, en la fila del PM o MM (en la tabla detalle_movimiento)\r\n /*\r\n $query=\"update mov_material.detalle_movimiento set id_proveedor=$id_proveedor_rma where id_detalle_movimiento=$id_detalle_movimiento\";\r\n sql($query,\"<br>Error al actualizar el proveedor de RMA del producto<br>\") or fin_pagina();\r\n */\r\n }\r\n else { \r\n $comentario = \" Ingreso de Productos mediante PM N°: $id_movimiento_material\";\r\n agregar_stock($id_prod_esp,$cantidad,$deposito_destino,$comentario,13,\"disponible\");\r\n } \r\n \r\n $detalle_mov->movenext(); \r\n }//del for\r\n \r\n}", "function entraCPU(){\n\tif($_SESSION['processoCPU']['pid'] != $_SESSION['fila'][0]){\n\t\t$_SESSION['numeroTrocaContexto'] = $_SESSION['numeroTrocaContexto'] + 1;\n\t}\n\t$_SESSION['processoCPU'] = $_SESSION['fila'][0];\n\n\tgeraLogs($_SESSION['processoCPU'],\"entrar\");\n\n\t/*REMOVE O PROCESSO DA LISTA DE PRONTOS*/\n\tremoveProcessoPronto();\n}", "public function getSimulacionReajuste(){\n //calculando según el IPC acumulado\n //entre el último reajuste realizado y ahora. \n $mes_actual = (int)date(\"m\");\n $agno_actual = (int)date('Y');\n $mes_inicio = $mes_actual - $this->reajusta_meses;\n $agno_inicio = $agno_actual;\n if($mes_inicio <= 0){\n $agno_inicio -= 1;\n $mes_inicio+= 12;\n }\n $ipcs = array();\n if($agno_inicio != $agno_actual){\n $ipcs = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes >= :m and agno = :a','params'=>array(':m'=>$mes_inicio,':a'=>$agno_inicio)));\n $ipcs_actual = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes < :m and agno = :a','params'=>array(':m'=>$mes_actual,':a'=>$agno_actual)));\n foreach($ipcs_actual as $ipc){\n $ipcs[] = $ipc;\n }\n }\n else{\n $ipcs = Ipc::model()->findAll(array('condition'=>'mes >= :m1 and mes < :m2 and agno = :a','params'=>array(':m1'=>$mes_inicio,':m2'=>$mes_actual,':a'=>$agno_actual)));\n }\n\n $ipc_acumulado = 0;\n foreach($ipcs as $ipc){\n //sumo los ipcs para generar el ipc acumulado\n $ipc_acumulado+= $ipc->porcentaje;\n }\n //para hacer el cálculo según porcentaje\n $ipc_acumulado /= 100;\n\n //saco el último debe pagar para ver cuánto era lo que tenía que pagar antes\n $debePagars = DebePagar::model()->findAllByAttributes(array('contrato_id'=>$this->id),array('order'=>'id DESC'));\n $debePagar = $debePagars[0];\n \n $debeNuevo = new DebePagar();\n $debeNuevo->agno = $agno_actual;\n $debeNuevo->mes = $mes_actual;\n $debeNuevo->dia = $debePagar->dia;\n $debeNuevo->contrato_id = $this->id;\n //ahora hay que reajustar los montos del contrato dependiendo del ipc_acumulado\n //el precio base debe ser el valor anterior en debe pagar\n $debeNuevo->monto_gastocomun = intval($debePagar->monto_gastocomun*(1+$ipc_acumulado));\n $debeNuevo->monto_gastovariable = intval($debePagar->monto_gastovariable*(1+$ipc_acumulado));\n $debeNuevo->monto_mueble = intval($debePagar->monto_mueble*(1+$ipc_acumulado));\n $debeNuevo->monto_renta = intval($debePagar->monto_renta*(1+$ipc_acumulado));\n \n return array('actual'=>$debePagar, 'nuevo'=>$debeNuevo);\n }", "function listarCotizacionRPC(){\n $this->procedimiento='adq.f_cotizacion_sel';\n $this->transaccion='ADQ_COTRPC_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n \n \n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('id_funcionario_rpc','id_funcionario_rpc','int4');\n $this->setParametro('historico','historico','varchar');\n \n //Definicion de la lista del resultado del query\n $this->captura('id_cotizacion','int4');\n $this->captura('estado_reg','varchar');\n $this->captura('estado','varchar');\n $this->captura('lugar_entrega','varchar');\n $this->captura('tipo_entrega','varchar');\n $this->captura('fecha_coti','date');\n $this->captura('numero_oc','varchar');\n $this->captura('id_proveedor','int4');\n $this->captura('desc_proveedor','varchar');\n $this->captura('fecha_entrega','date');\n $this->captura('id_moneda','int4');\n $this->captura('moneda','varchar');\n $this->captura('id_proceso_compra','int4');\n $this->captura('fecha_venc','date');\n $this->captura('obs','text');\n $this->captura('fecha_adju','date');\n $this->captura('nro_contrato','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('id_estado_wf','integer');\n $this->captura('id_proceso_wf','integer');\n $this->captura('desc_moneda','varchar');\n $this->captura('tipo_cambio_conv','numeric');\n $this->captura('id_solicitud','integer');\n\t\t$this->captura('id_categoria_compra','integer');\n\t\t$this->captura('numero','varchar');\n $this->captura('num_tramite','varchar');\n $this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\n\t\t$this->captura('id_gestion','int4');\n\n \n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n \n //Devuelve la respuesta\n return $this->respuesta;\n }", "function wtsProPaiement($ar){\n $p = new XParam($ar, array());\n $orderoid = $p->get('orderoid');\n // verification du client de la commande et du compte connecte\n list($okPaiement, $mess) = $this->paiementEnCompte($orderoid);\n if (!$okPaiement){\n XLogs::critical(get_class($this), 'paiement pro refusé '.$orderoid.' '.$mess);\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n return;\n }\n // traitement post commande std\n clearSessionVar('caddie');\n XLogs::critical(get_class($this), 'enregistrement paiement en compte '.$orderoid);\n // traitement standards après validation\n $this->postOrderActions($orderoid, true);\n\n // traitement post order - devrait être dans postOrderActions\n $this->proPostOrderActions($orderoid);\n\n // retour \n if (defined('EPL_ALIAS_PAIEMENT_ENCOMPTE')){\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self().'alias='.EPL_ALIAS_PAIEMENT_ENCOMPTE);} else {\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n }\n }", "public static function parler()\n {\n echo 'Je suis un personnage <br/>';\n }", "function excesoPeticiones($conexion,$ip,$fecha,$cardNum){\r\n $consu = \"select numeroTransacciones from visitas where ip_cliente ='$ip'\r\n and numeroTarjeta =\".$cardNum.\" \r\n and fecha ='$fecha'\";\r\n $rs = mysqli_query($conexion,$consu);\r\n $fila = mysqli_fetch_array($rs);\r\n\r\n if($fila[\"numeroTransacciones\"] > 3){\r\n echo \"<script>alert('Solicitud negada exceso de peticiones')</script>\";\r\n updateTransaccion($conexion,$ip,$fecha,$cardNum,$fila);\r\n }else{\r\n updateTransaccion($conexion,$ip,$fecha,$cardNum,$fila);\r\n }\r\n \r\n }", "public function reiniciaCompraTimeAction(){\n echo $this->view->MantenimientoTicketing->reiniciaCompraTime();\n }" ]
[ "0.6448443", "0.58655244", "0.57688165", "0.57363504", "0.56996715", "0.56863695", "0.5668509", "0.5668442", "0.5636443", "0.5619218", "0.5578589", "0.55767006", "0.5574262", "0.557132", "0.55558145", "0.55531645", "0.55505306", "0.5545309", "0.55382043", "0.55274636", "0.5526832", "0.54986006", "0.5488527", "0.54750794", "0.5461772", "0.5447681", "0.54458064", "0.54304355", "0.54246616", "0.54223", "0.54138196", "0.54112756", "0.5409702", "0.5394165", "0.5392033", "0.5386759", "0.5373443", "0.5368333", "0.5365501", "0.53644556", "0.5362459", "0.5356026", "0.5355308", "0.53364134", "0.53327376", "0.5318089", "0.5317793", "0.53174967", "0.5316713", "0.53085566", "0.5300339", "0.52985823", "0.52968794", "0.5291679", "0.5281191", "0.52776533", "0.5273791", "0.5268278", "0.52661216", "0.5261913", "0.52618504", "0.52560806", "0.5255559", "0.5252394", "0.52509516", "0.5246768", "0.52453834", "0.5241562", "0.5240316", "0.5239046", "0.5234765", "0.5230092", "0.5229936", "0.5228104", "0.5227573", "0.5225348", "0.52163965", "0.5206768", "0.52063423", "0.52006334", "0.5195316", "0.51865315", "0.51795495", "0.517949", "0.5176443", "0.51731175", "0.5172601", "0.5164271", "0.5161899", "0.51568615", "0.51561093", "0.5154407", "0.51537836", "0.515268", "0.51517063", "0.514499", "0.51438105", "0.51437443", "0.512783", "0.5126199", "0.5118725" ]
0.0
-1
create new toplevel menu
function most_recent_posts_create_menu() { add_menu_page('MRP Overview', 'Most Recent Posts', 'administrator', 'MostRecentPostsSettings', 'MRPOverview', 'http://buildautomate.com/favicon.ico'); add_submenu_page('MostRecentPostsSettings', 'Shortcode', 'Shortcode', 'administrator', 'MRPShortcodes', 'MRPShortcodes'); add_submenu_page('MostRecentPostsSettings', 'Registration', 'Registration', 'administrator', 'MRPRegistration', 'MRPRegistration'); add_submenu_page('MostRecentPostsSettings', 'Tech Support', 'Tech Support', 'administrator', 'MRPTechSupport', 'MRPTechSupport'); add_submenu_page('MostRecentPostsSettings', 'Help', 'Help', 'administrator', 'MRPHelp', 'MRPHelp'); //call register settings function add_action( 'admin_init', 'MRPregister_mysettings' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeMenu() {}", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "public static function _NEW(){\n\t\tLibMenuBar::startTable();\n\t\tLibMenuBar::cancel();\n\t\tLibMenuBar::spacer();\n\t\tLibMenuBar::help('screen.menus.new');\n\t\tLibMenuBar::endTable();\n\t}", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public function createMenu()\n {\n $parent = $this->Menu()->findOneBy(['label' => 'Artikel']);\n\n $this->createMenuItem(\n [\n 'label' => 'Custom sort',\n 'controller' => 'CustomSort',\n 'action' => 'Index',\n 'active' => 0,\n 'class' => 'sprite-blue-document-text-image',\n 'parent' => $parent,\n 'position' => 6,\n ]\n );\n }", "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter',\n\t\t\tarray( $this, 'display_submenu_page' ),\n\t\t\t6\n\t\t);\n\t}", "function _NEW()\t{\n\t\tmosMenuBar::startTable();\n\t\tmosMenuBar::preview( 'modulewindow' );\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::save();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::apply();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::cancel();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::help( 'screen.modules.new' );\n\t\tmosMenuBar::endTable();\n\t}", "function v2_mumm_menu_tree__menu_new_main_menu(&$variables) {\n return '<ul>' . $variables['tree'] . '</ul>';\n}", "private function createMenu() {\n $menu = new Menu;\n $menu->name = $this->page['title'];\n if ($this->page['parent_id']) {\n $parent = ModelsPage::findOrFail($this->page['parent_id']);\n $menu->link = env('APP_URL') . '/' . $parent->slug . '/' . $this->page['slug'];\n } else {\n $menu->link = env('APP_URL') . '/' . $this->page['slug'];\n }\n $menu->parent_id = null;\n $order = Menu::select('order')->where('parent_id', null)->orderBy('order', 'desc')->first();\n $menu->order = (($order) ? $order->order : 0) + 1;\n $menu->target = '_self';\n $menu->status = true;\n $menu->save();\n }", "abstract protected function getMenuTree();", "static function create_menu() {\n add_submenu_page('plugins.php', 'Luminous Settings', 'Luminous settings',\n 'administrator', 'luminous-handle', 'luminouswp::settings_view');\n }", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "protected function buildMenu() {\n// $structures = DataSource::factory(Structure::cls());\n// $structures->builder()\n// ->where(\"structure_id=0\")\n// ->order('priority');\n// /** @var Structure[] $aStructures */\n// $aStructures = $structures->findAll();\n// foreach ($aStructures as $oStructure) {\n// $menu->addLeftItem($oStructure->name, $oStructure->path);\n// $this->loadMenuItems($menu->findLeftItemByPath($oStructure->path), $oStructure);\n// }\n//\n// $view = new ViewMMenu();\n// $view->menu = $menu;\n// return $view;\n\n $ViewMainMenu = new ViewMainMenu($this->config['name']);\n $this->setMenuItems($ViewMainMenu->itemsList);\n $currentPath = explode('?', $this->Router->getRoute());\n $ViewMainMenu->currentPath = reset($currentPath);\n\n return $ViewMainMenu;\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function add_menus()\n {\n }", "protected function generateModuleMenu() {}", "protected function makeActionMenu() {}", "public function new_menu () {\n\t\t$this->show_menu();\n\t\n\t\techo <<<EOT\n\t\t\t<div id=\"alert_box\">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t<td><input type=\"text\" id=\"Name\" class=\"input\"><td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Beschreibung</td>\n\t\t\t\t\t<td><input type=\"text\" id=\"Beschreibung\" class=\"input\"><td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<span id=\"insert_menu\" class=\"action_span\">Hinzufügen</span>\n\t\t\t\t\t\t<span id=\"show_menu\" class=\"action_span\">Abbrechen</span>\n\t\t\t\t\t</td>\n\t\t\t</table>\n\t\t\t</div>\nEOT;\n\t}", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "public static function menu(){\n return new sai_module_menu( 1,\n sai_module_menu::POISITION_RIGHT,\n sai_module_menu::DIVIDER_NONE,\n \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_git/tpl/menu.tpl'))->SERVERPATH()));}", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "private static function _createHelpSystemsMenu()\n {\n $html = '<div class=\"Help-systemsMenu\"><ul>';\n $systemInfos = array();\n\n foreach (self::$_docsInfo as $systemName => $docsInfo) {\n $systemTitle = $systemName;\n if (empty($docsInfo['screenTitle']) === FALSE) {\n $systemTitle = $docsInfo['screenTitle'];\n }\n\n $systemInfos[$systemName] = array('title' => $systemTitle);\n\n if ($docsInfo['showInMenu'] === FALSE) {\n // Not shown in the menu so continue.\n continue;\n }\n\n // Small icon for the system.\n $iconURL = '/__web/Systems/'.$systemName.'/Web/icon_'.strtolower($systemName).'_help.png';\n\n $href = 'Help.closeMenu();Help.loadIndexPage(\\''.$systemName.'\\');';\n $html .= '<li onclick=\"'.$href.'\" id=\"Help-dialog-sysMenuItem-'.$systemName.'\" >';\n $html .= '<a href=\"javascript:'.$href.'\">'.$systemTitle.'</a>';\n $html .= '<div class=\"Help-systemsMenu-selectedIcon\"></div>';\n $html .= '</li>';\n }//end foreach\n\n $html .= '</ul></div>';\n\n // Also add script tag that will set the systemName => title array in Help.\n $html .= '<script>Help.setSystems('.json_encode($systemInfos).')</script>';\n\n $filePath = Help::getDocsDirectory().'/_systems_menu.html';\n include_once 'Libs/FileSystem/FileSystem.inc';\n FileSystem::filePutContents($filePath, $html);\n\n }", "protected function createMenu(){\n $menu_name = static::MENU_NAME;\n $menu_tree = \\Drupal::menuTree();\n $parameters = $menu_tree->getCurrentRouteMenuTreeParameters($menu_name);\n \n // if tree is not empty, create the menu\n if ($tree = $menu_tree->load($menu_name, $parameters)){\n $manipulators = [ // Only show links that are accessible for the current user.\n ['callable' => 'menu.default_tree_manipulators:checkAccess'],\n // Use the default sorting of menu links.\n ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],\n ];\n\n $tree = $menu_tree->transform($tree, $manipulators);\n return $menu_tree->build($tree);\n }\n\n // return false if tree is empty\n return false;\n }", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function addMenu()\n {\n $wpMenu = [\n [\n 'Bolsista',\n 'Bolsista',\n 'edit_pages',\n 'bolsista',\n $this,\n 'doAction',\n 'dashicons-format-aside',\n 2\n ]\n ];\n $wpSubMenu = [];\n $this->addMenuItem($wpMenu, $wpSubMenu);\n }", "function usermin_createmenuitems()\n{\n $menubar['user'] = array(\"href\" => \"?user\", \"label\" => \"My Details\");\n $menubar['history'] = array(\"href\" => \"?history\", \"label\" => \"My History\");\n $menubar['logout'] = array(\"href\" => \"?logoff\", \"label\" => \"Logoff\");\n return $menubar;\n}", "function menus();", "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"Create common poll\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"].\"&action=create_poll\",\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "protected function menus()\n {\n\n }", "function polizeipresse_create_admin_menu() {\r\n\tif(current_user_can('manage_options')){\r\n\t\t// Create new top-level menu\r\n\t\tadd_options_page('Polizeipresse-Plugin',\r\n\t\t\t\t\t\t 'Polizeipresse',\r\n\t\t\t\t\t\t 'manage_options',\r\n\t\t\t\t\t\t 'polizeipresse_options',\r\n\t\t\t\t\t\t 'polizeipresse_option_page');\r\n\t}\r\n}", "protected function prepareMenuItemsForRootlineMenu() {}", "function v2_mumm_menu_link__menu_new_main_menu(&$variables) {\n $element = $variables ['element'];\n if (!$element ['#title']) {\n $href_array = explode('/', $element['#href']);\n if ($href_array[0] == 'node' && is_numeric($href_array[1])) {\n $node = node_load($href_array[1]);\n $element['#title'] = $node->title;\n }\n }\n $element['#localized_options']['attributes'] = array(\n 'data-tracking' => '',\n 'data-track-action' => 'click',\n 'data-track-category' => 'header',\n 'data-track-label' => strtolower($element ['#title']),\n 'data-track-type' => 'event',\n );\n $output = l($element ['#title'], $element ['#href'], $element ['#localized_options']);\n\n if (in_array('first', (array)$element['#attributes']['class'])) {\n return '<li class=\"first\">' . $output . '</li>';\n }\n if (in_array('hidden', (array)$element['#localized_options']['attributes']['class'])) {\n return '';\n }\n $class_item_attributes = $element['#original_link']['options']['item_attributes']['class'];\n return '<li class=\"item '.$class_item_attributes.'\">' . $output . '</li>';\n}", "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = 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\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\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$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\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$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "function menuObj($OA) {\n global $curPid;\n if (!isset($OA['mode'])) $OA['mode'] = '';\n \n // menu 'wrap' begin\n echo \"\\n\";\n if (!isset($OA['wrapB'])) echo '<ul>';\n else echo $OA['wrapB'].\"\\n\";\n \n // make default menu\n if ($OA['mode'] == 'default') get_navigation(get_page_slug(false));\n \n // make breadcrumb\n elseif ($OA['mode'] == 'breadcrumb') makeBreadcrumb(return_page_slug(false),1,$OA);\n\n // make language manu\n elseif (isset($OA['language'])) makeLangNav(return_page_slug(false),$OA);\n \n // make hierachical menu\n else makeMenu(return_page_slug(false),$OA);\n\n // menu 'wrap' wrap\n if (!isset($OA['wrapA'])) echo '</ul>';\n else echo $OA['wrapA'].\"\\n\\n\";\n}", "public function create($options=array('wrap'=>'<ul id=\"menu\">%s</ul>')) {\n\n\t\t$controller\t= str_replace('Admin_Controller_', '', Application_Base::getController());\n\t\t$action\t\t= Application_Base::getAction();\n\t\t$url\t\t= Application_Base::getBaseURL();\n\n\t\t$request\t= new Modules_Request_HTTP();\n\t\t$requestURL\t= $request->getRequestURL();\n\t\t$currentURL\t= str_replace(Application_Base::getRelativePath(), '', $request->getURLPart($requestURL, 'path'));\n\n\t\tif(empty($this->JSON)) {\n\t\t\t$this->gatherJSON();\n\t\t}\n\n\t\tusort($this->JSON, 'Admin_Application_View_MenuHelper::sort');\n\n\t\tif(is_array($this->JSON)) {\n\n\t\t\t$user_id = Modules_Session::getInstance()->getVar('userdata')->user_id;\n\n\t\t\t$menu = '';\n\n\t\t\tforeach($this->JSON AS $cnt => $main) {\n\n\t\t\t#\tif((isset($this->app) && $this->app->getGlobal('access')->check('Admin_Controller_' . $main['controller'])) || !isset($this->app)) {\n\n\t\t\t\t\t\n\n\t\t\t\t\t$active\t= $controller == $main['controller'] ? ' active ':'';\n\t\t\t\t\t$id\t\t= $main['id'] ? ' id=\"'. $main['id'] . '\"' : '';\n\t\t\t\t\t$class\t= $main['class'] ? ' ' . $main['class'] . ' ' : '';\n\t\t\t\t\t$open\t= $main['open'] == \"true\" || in_array($main['title'], $this->open) ? ' open ':'';\n\t\t\t\t\t$hasVisibleChildren = false;\n\n\t\t\t\t\t$mainmenu = '<li ' . $id . ' class=\"' . $active . $class . $open . '\"><a href=\"' . $url . $main['link'] . '\">' . __($main['title']) . '</a>';\n\t\t\t\t\tif(isset($main['sub']) && !empty($main['sub'])) {\n\n\t\t\t\t\t\t$subSection = false;\n\t\t\t\t\t\t$submenu = '<ul>';\n\n\t\t\t\t\t\tforeach($main['sub'] AS $sub) {\n\n\t\t\t\t\t\t\tif($this->access->hasLinkAccess($user_id, $sub['link'])) {\n\n\t\t\t\t\t\t\t\t$active\t= (strtolower($controller . '/' . $action) == strtolower($sub['link']) || strpos(ltrim($currentURL, '/'), ltrim($sub['link'])) === 0) ? 'active':'';\n\t\t\t\t\t\t\t\t$id\t\t= $sub['id'] ? ' id=\"'. $sub['id'] . '\"' : '';\n\t\t\t\t\t\t\t\t$submenu .= '<li ' . $id . ' class=\"' . $active . '\"><a href=\"' . $url . $sub['link'] . '\">' . __($sub['title']) . '</a></li>';\n\t\t\t\t\t\t\t\t$subSection = true;\n\t\t\t\t\t\t\t\t$hasVisibleChildren = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$submenu .= '</ul>';\n\n\t\t\t\t\t\tif($subSection == true) {\n\t\t\t\t\t\t\t$mainmenu .= $submenu;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t$mainmenu .= '</li>';\n\n\n\t\t\t\t\tif($hasVisibleChildren == true || $this->access->hasLinkAccess($user_id, $main['link'])) {\n\t\t\t\t\t\t$menu .= $mainmenu;\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t#\t}\n\n\t\t\t}\n\n\t\t\tif(isset($options) && isset($options['wrap'])) {\n\t\t\t\t$menu = sprintf($options['wrap'], $menu);\n\t\t\t}\n\n\t\t}\n\t\treturn $menu;\n\t}", "public static function createMenu(){\n $perms = Security::getPermsFromConnectedUser() ?? [];\n\n $menuData = self::$_menuData;\n\n $actualUri = self::$_actualUri;\n $menuListBuilder = [];\n $html = '';\n foreach ($menuData as $link => $data) {\n if (!empty($data['menuData'])){\n //TODO : check the min-status\n if ($data['menuData']['visible'] \n && (\n array_key_exists(\"all_perms\", $perms) \n || array_key_exists($link, $perms)\n || $link === '/admin/dashboard'\n || $link === '/'\n )) {\n $subSectionSelected = false;\n\n //Create the sub-menu\n $htmlChildren = '';\n if (!empty($data['menuData']['children'])) {\n $htmlChildren = '<ul>';\n foreach ($data['menuData']['children'] as $id => $linkChild) {\n if (array_key_exists(\"all_perms\", $perms) \n || array_key_exists($linkChild, $perms)) {\n if ($actualUri === $linkChild) {\n $subSectionSelected = true;\n }\n $classChildren = $actualUri == $linkChild ? ' class=\"selected\"' : '';\n $htmlChildren .= '<li' . $classChildren . '><a href=\"' . $linkChild . '\">' . $menuData[$linkChild]['label'] . '</li>';\n }\n }\n $htmlChildren .= '</ul>';\n }\n\n $class = ' class=\"'\n . ($actualUri == $link ? 'selected ' : '')\n . ($subSectionSelected ? 'subChildrenSelected ' : '')\n . '\"';\n\n $html = '<li' . $class . '><a href=\"' . $link . '\">'\n . '<img src=\"' . Routing::getBaseUrl() . '/public/images/icons/' . $data['menuData']['icon'] . '.png\" alt=\"\" class=\"icon iconWhite\"><p>' . $data['label'] . '</p></a>'\n . '</a>';\n\n //Adding the sub-menu\n $html .= $htmlChildren;\n\n $html .= '</li>';\n if (array_key_exists($data['menuData']['listId'], $menuListBuilder)) {\n $menuListBuilder[$data['menuData']['listId']] .= $html;\n } else {\n $menuListBuilder[$data['menuData']['listId']] = $html;\n }\n }\n }\n }\n\n $html = '';\n foreach ($menuListBuilder as $listId => $htmlValue) {\n $html.= '<ul id=\"'.$listId.'\">'.$htmlValue.'</ul>';\n }\n\n $htmlMenu = '<nav id=\"back-mainPage-menu\" class=\"d-none d-lg-flex\">'\n . $html . '</nav>'\n . '<nav id=\"back-mainPage-menuResponsive\" class=\"d-block d-lg-none hidden\">'\n . $html . '</nav>';\n echo $htmlMenu;\n }", "public function getMenu();", "function createMenu($sourceArr, $parents = 0) {\r\n\t//recursiveMenu ( $sourceArr, $parents = 0, &$newMenu );\r\n\treturn str_replace ( '<ul></ul>', '', $newMenu );\r\n}", "function create_admin_menu()\n {\n add_menu_page(\n 'Mattevideo Exercises', //page title\n 'Mattevideo Exercises', //menu title\n 'manage_options', //capabilities\n 'mattevideo_exercise', //menu slug\n array($this, 'mattevideo_exercise') //function\n );\n add_submenu_page('mattevideo_exercise', //parent slug\n 'Create Exercise', //page title\n 'Create Exercise', //menu title\n 'manage_options', //capability\n 'create_exercise', //menu slug\n array($this, 'create_exercise')); //function\n }", "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }", "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $MenuItem = new DModuleMenuItem( \"show\" , \"Monedas\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "public static function wpa_add_menu() {\n add_menu_page('Main Menu','Home','manage_options','Sub-menu');\n add_submenu_page('Sub-menu','User List','User List','manage_options','menu-list',array( __CLASS__,'wpa_page_file_path'));\n add_submenu_page('Sub-menu','Add User','Add User','manage_options','menu-add',array(__CLASS__,'wpa_page_file_path'));\n }", "public function create()\n\t{\n\t\t$menuGroups = $this->getMenuGroups();\n\t\treturn view('components.system.menu.create', compact('menuGroups'));\n\t}", "function h_add_menus(array $args) {\n if (!is_admin()) { return;}\n\n $menu = new H_Sidenav($args);\n $menu->add();\n}", "public function menustoreAction() {\n $panel_pages = array();\n $menut = Model_Menu::getInstance();\n $panel_names = $menut->panels();\n $pages = array();\n // at this point have selected all the menus of all active modules\n // return a tree of pages from each top level page sorted by sort_by and label\n foreach($panel_names as $panel):\n $panel_data = array('id' => $panel, 'label' => ucwords(str_replace('_', ' ', $panel)),\n 'children' => array());\n foreach($menut->find(array('panel' => $panel, 'parent' => 0), 'sort_by') as $menu):\n $panel_data['children'][] = $menu->pages_tree();\n endforeach;\n $pages[] = $panel_data;\n endforeach;\n $this->view->data = new Zend_Dojo_Data('id', $pages, 'label');\n $this->_helper->layout->disableLayout();\n }", "public function menu_main_menu()\n {\n return menu_main_menu();\n }", "private function _createMenuParams(){\n\t\t\treturn new YtParams(\n\t\t\t\tarray(\n\t\t\t\t\t'menutype'\t\t=> 'mainmenu',\n\t\t\t\t\t'menustyle'\t\t=> 'basic',\n\t\t\t\t\t'startlevel'\t=> 0,\n\t\t\t\t\t'endlevel'\t\t=> -1,\n\t\t\t\t\t'direction'\t\t=> 'ltr',\n\t\t\t\t\t'basepath'\t\t=> dirname(__FILE__),\n\t\t\t\t\t'cssidsuffix'\t=> ''\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"RAD Facility\", \"LIBRARIES\", \"_rad_facility\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_dxcodes\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function createProfileMenu()\r\n {\r\n $menu = $this->factory->createItem('root', [\r\n 'childrenAttributes' => ['class' => 'vertical medium-horizontal menu']\r\n ]);\r\n\r\n $menu->addChild(\r\n $this->translator->trans('navigation.profile.main', [], 'MinervaAppBundle'),\r\n ['route' => 'fos_user_profile_show']\r\n );\r\n\r\n $menu->addChild(\r\n $this->translator->trans('navigation.profile.battlenet', [], 'MinervaAppBundle'),\r\n ['route' => 'minerva_user_battlenet_overview']\r\n );\r\n\r\n return $menu;\r\n }", "public function buildMenuTree()\n {\n $menu = new Menu\\Menu('menuTree');\n\n // Top level.\n $this->p1 = $menu->addItem(new Menu\\Item('p.1'));\n $this->p2 = $menu->addItem(new Menu\\Item('p.2'));\n\n // First level (p1).\n $this->c11 = $this->p1->addChild(new Menu\\Item('c.1.1'));\n $this->c12 = $this->p1->addChild(new Menu\\Item('c.1.2'));\n\n // First level (p2).\n $this->c21 = $this->p2->addChild(new Menu\\Item('c.2.1'));\n $this->c22 = $this->p2->addChild(new Menu\\Item('c.2.2'));\n $this->c23 = $this->p2->addChild(new Menu\\Item('c.2.3'));\n\n // Second level (c.1.1).\n $this->c111 = $this->c11->addChild(new Menu\\Item('c.1.1'));\n }", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "public function create()\n\t{\n\t\treturn Theme::View('menus::menus.create', $this->menu_repo->create());\n\t}", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "function boj_menuexample_create_menu() {\r\n\t\r\n\t//create a submenu under Settings\r\n\tadd_options_page( 'Leo Plugin Settings Page', 'Menu Example Settings', 'manage_options', 'settings-submenu', 'boj_menuexample_settings_page' );\r\n\t\r\n}", "function show_menu() {\n\n\tglobal $T, $DB, $Global;\n\t\n\t// Define variables\n\t$T->Set( 'command', 'oncommand=\"menuAction (this.id,'. \"'\" . \n\t\t\t $Global[ 'session'] . \"'\" .', ' . \"'\" . $Global['project'] . \n\t\t\t \"'\" . ')\"'); \n\t// Start a xul page\n\t\n\t$Obj = new Y_Engine();\n\n\t$file = \"project/\" . $Global['project'] . \"/data.menu__.base.php\";\n\tinclude_once ( $file );\n\t\n\t$file = \"engine/\".$Global['lang'].\"/data.devmenu__.php\";\n\tif( file_exists( $file )){\n\t\tinclude_once ( $file );\n\t}\n\telse{\n\t\t$file = \"engine/en/data.devmenu__.php\";\n\t\tinclude_once ( $file );\n\t}\n\n\t$T->Set( 'version', $Global['version'] );\n\n\t// Making a menu\n\t$T->Set( 'user'\t\t, $Global['username'] ) ;\n\t$T->Set( 'title' \t, $Obj->GetAlias());\n\t$T->Set( 'project'\t, $Global['project'] );\n\t$T->Show('start_menu');\n\n\n//print_r( $Obj );\n\n\t$key = array_keys( $Obj->element );\n\tfor( $i=0; $i< count( $key ); $i++ ) {\n\t\t$i_element = $key[$i];\n\n\t\tif ( $Global['oper'] != MENU_ONLY_ ) {\n\t\t\t$T->Set( 'disabled', 'disabled=\"true\"' );\n\t\t}\n\t\t\t\t\n\t\t// Menu header\n\t\tif ( $Obj->element[ $key[$i] ] [ F_TYPE_ ] == \"header\" ) {\n\n\t\t\t$headername = $Obj->Get( $i_element, F_ALIAS_ );\n\t\t\tif ( ($Global['oper'] != MENU_ONLY_ ) && \n\t\t\t\t ( $headername != \"+\" ) ) {\n\t\t\t\t$T->Set( 'disabled', 'disabled=\"true\"' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$T->Set( 'disabled', '' );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$T->Set( 'alias', $Obj->Get( $i_element, F_ALIAS_ ) );\n\t\t\t$T->Set( 'name', $Obj->Get( $i_element, F_NAME_ ) );\n\t\t\t\t\n\t\t\t\t// se houver problemas com os popups pode ser NAME\n\t\t\t$T->Set( 'popup', $Obj->Get( $i_element, F_ALIAS_ ) . \".popup\" );\t\n\t\t\t$T->Set( 'help', $Obj->Get( $i_element, F_HELP_ ) );\n\t\t\t$oper = $Obj->Get( $i_element, F_OPER_ );\n\t\t\tif ( empty( $oper ) ) {\n\t\t\t\t$oper = BROWSE_;\n\t\t\t}\n\t\t\t\n\t\t\t$t_oper = explode( \"_\", $oper );\n\t\t\t$oper = $t_oper[0];\n\t\t\t\n\t\t\t\n\t\t\t$T->Set( 'command', 'oncommand=\"menuAction ('.$oper.','. \"'\" . \n\t\t\t\t $Global[ 'session'] . \"'\" .', ' . \"'\" . $Global['project'] . \n\t\t\t\t \"','\" . $Obj->Get( $i_element, F_LINK_ ) . \"',0\" . ')\"'); \n\t\t\t\n\t\t\t// Define trustee\n\t\t\t$trustee['header'] = check_trustee( \n\t\t\t\t\t$Obj->Get( $i_element, G_SHOW_ ) )\t;\t\t\n\t\t\tif ( $trustee['header'] ) {\n\t\t\t\t$T->Show( 'menu_header' );\n\t\t\t}\n\t\t\t\n\t\t\t// Menu Elements\n\t\t\t$header = $Obj->Get( $i_element, F_NAME_) ;\n\t\t\t$element = \"0_\";\n//\t\t\tfor ( $b=$i; $b< count( $Obj->element ); $b++ ){\n\t\t\tfor ( $b=0; $b< count( $Obj->element ); $b++ ){\n\t\t\t\t$b_element = $key[$b];\t\t\t\n\t\t\t\tif ( ($Obj->Get( $b_element, F_TYPE_ ) == \"menu\" ) &&\n\t\t\t\t\t ($Obj->Get( $b_element, R_TABLE_ ) == $header )) {\n\t\t\t\t\t$T->Set( 'e_alias', $Obj->Get( $b_element, F_ALIAS_) );\n\t\t\t\t\t$T->Set( 'e_name', \t$Obj->Get( $b_element, F_NAME_) );\n\t\t\t\t\t$T->Set( 'e_popup', $Obj->Get( $b_element, F_ALIAS_) . \".popup\" );\t\n\t\t\t\t\t$T->Set( 'e_help', \t$Obj->Get( $b_element, F_HELP_ ) );\n\t\t\t\t\t$oper = $Obj->Get( $b_element, F_OPER_ );\n\n\t\t\t\t\t\n\t\t\t\t\tif ( $Global['oper'] != MENU_ONLY_ ) {\n\t\t\t\t\t\tif ( $headername != \"+\" ) {\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif ( empty( $oper ) ) {\n\t\t\t\t\t\t$oper = BROWSE_;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$t_oper = explode( \"_\", $oper );\n\t\t\t\t\t$oper = $t_oper[0];\n\t\n\n\t\n\n// # 162\n\t\t\t\t\t\n\t\t\t\t\t$T->Set( 'command', 'oncommand=\"menuAction ('.$oper.\n\t\t\t\t\t\t','. \"'\" . $Global[ 'session'] . \"'\" .', ' . \n\t\t\t\t\t\t\"'\" . $Global['project'] . \t\"','\" . \n\t\t\t\t\t\t$Obj->Get( $b_element, F_LINK_ ) . \"',0,'\" . \n\t\t\t\t\t\t$Obj->Get( $b_element, F_FILTER_ ).\"'\".')\"'); \n\t\t\t\t\t\n/* OLD\n\t\t\t\t\t$T->Set( 'command', 'oncommand=\"menuAction ('.$oper.\n\t\t\t\t\t\t','. \"'\" . $Global[ 'session'] . \"'\" .', ' . \n\t\t\t\t\t\t\"'\" . $Global['project'] . \n\t\t\t\t\t\t\"','\" . $Obj->Get( $b_element, F_LINK_ ) . \"',0\" . ')\"'); \n*/\n// # 162 end \n\n\n\t\t\t\t\t// Define trustee\n\t\t\t\t\t$trustee['element'] = check_trustee( \n\t\t\t\t\t$Obj->Get( $b_element, G_SHOW_ ) )\t;\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ( ($element == \"0_\") && ( $trustee['header'] )) {\n\t\t\t\t\t\t$T->Show( 'menu_header_startpopup' );\n\t\t\t\t\t}\t\n\n\t\t\t\t\t// Submenus\n\t\t\t\t\t$element = $Obj->Get( $b_element, F_NAME_ );\n\t\t\t\t\t$submenu = \"0_\";\n//\t\t\t\t\tfor ( $c=$b; $c< count( $Obj->element ); $c++ ){\n\t\t\t\t\tfor ( $c=0; $c< count( $Obj->element ); $c++ ){\n\t\t\t\t\t\t$c_element = $key[$c];\t\t\t\t\t\n\t\t\t\t\t\tif (($Obj->Get( $c_element, F_TYPE_) == \"submenu\") &&\n\t\t\t\t\t\t \t\t($Obj->Get( $c_element, R_TABLE_) ==\n\t\t\t\t\t\t\t\t $element)) {\n\t\t\t\t\t\t\t$T->Set( 'alias', $Obj->Get( $c_element, F_ALIAS_) );\n\t\t\t\t\t\t\t$T->Set( 'name', $Obj->Get( $c_element,F_NAME_) );\n\t\t\t\t\t\t\t$T->Set( 'help', $Obj->Get( $c_element, F_HELP_ ) );\n\t\t\t\t\t\t\t$oper = $Obj->Get( $c_element, F_OPER_ );\n\t\t\t\t\t\t\t\n// # 162\n\t\t\t\t\t\t\t$filter = $Obj->Get( $c_element, F_FILTER_ );\n// # 162 \t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif ( empty( $oper ) ) {\n\t\t\t\t\t\t\t\t$oper = BROWSE_;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$t_oper = explode( \"_\", $oper );\n\t\t\t\t\t\t\t$oper = $t_oper[0];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\n// # 162\t\t\n\t\t\t\t\t\t\t$T->Set('command','oncommand=\"menuAction('.$oper.\n\t\t\t\t\t\t\t\t','.\"'\". \n\t\t\t\t\t\t\t \t$Global[ 'session'] . \"'\" .', ' . \"'\" .\n\t\t\t\t\t\t\t \t$Global['project'] . \"','\" . \n\t\t\t\t\t\t\t\t$Obj->Get( $c_element, F_LINK_ ) . \"',0,'\" . \n\t\t\t\t\t\t\t\t$Obj->Get( $c_element, F_FILTER_ ).\"'\".')\"'); \n/*\tOLD\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$T->Set('command','oncommand=\"menuAction('.$oper.\n\t\t\t\t\t\t\t\t','.\"'\". \n\t\t\t\t\t\t\t \t$Global[ 'session'] . \"'\" .', ' . \"'\" .\n\t\t\t\t\t\t\t \t$Global['project'] . \"','\" . \n\t\t\t\t\t\t\t\t$Obj->Get( $c_element, F_LINK_ ) . \"',0\" . ')\"'); \n*/\n// # 162 end\n\t\t\t\t\t\t\t// Define trustee\n\t\t\t\t\t\t\t$trustee['submenu'] = check_trustee( \n\t\t\t\t\t\t\t\t$Obj->Get( $c_element, G_SHOW_ ) )\t;\t\t\n\t\t\t\t\t\t\tif (($submenu == \"0_\") && ($trustee['element'])){\n\t\t\t\t\t\t\t\t$T->Show( 'menu_element' );\t\t\t\n\t\t\t\t\t\t\t\t$T->Show( 'menu_element_startpopup' );\n\t\t\t\t\t\t\t\t$submenu = \"1\";\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif ( $trustee['submenu'] ) {\n\t\t\t\t\t\t\t\t$T->Show( 'submenu' );\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\t\t\t\t\n\t\t\t\t\tif (($submenu != \"0_\") && ($trustee['element'])) {\n\t\t\t\t\t\t$T->Show( 'menu_element_endpopup' );\n\t\t\t\t\t\t$T->Show( 'menu_element_end');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ( $trustee['element'] ) {\t\t\t\t\t\n\t\t\t\t\t\t\t$T->Show( 'menu_element_item' );\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ($element != \"0_\") && ($trustee['header']) ) {\n\t\t\t\t$T->Show( 'menu_header_endpopup' );\n\t\t\t}\n\t\t\tif ( $trustee['header'] ) {\n\t\t\t\t$T->Show( 'menu_header_end' );\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$T->Show('end_menu');\n \n}", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "public static function menu()\n\t\t\t{\n\t\t\t\t// Create menu tab\n\t\t\t\tadd_options_page(HE_PLUGINOPTIONS_NICK.' Plugin Options', HE_PLUGINOPTIONS_NICK, 'manage_options', HE_PLUGINOPTIONS_ID.'_options', array('HiddenEmpirePluginOptions', 'options_page'));\n\t\t\t}", "protected function buildMenuArray() {}", "function wpcron_add_toplevel_menu() {\n\n\tadd_menu_page(\n\t\t'WP-Cron Example',\n\t\t'Cron API',\n\t\t'manage_options',\n\t\t'wpcron-example',\n\t\t'wpcron_display_settings_page',\n\t\t'dashicons-admin-generic',\n\t\tnull\n\t);\n\n}", "function eventoni_create_menu() {\n\n\t//create new top-level menu\n\tadd_menu_page('Eventoni', 'Eventoni', 'administrator', __FILE__, 'eventoni_settings_page');\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_mysettings' );\n}", "function mnu_EchoMainMenu($selmenuid)\n{\n global $menu;\n for ($i = 0; $i < count($menu); $i++) {\n if ($menu[$i]['visible'] == true) {\n if (!isset($menu[$i]['newwindow']))\n $menu[$i]['newwindow'] = false;\n if ($menu[$i]['newwindow'] == true)\n $target_blank = \"target='_blank'\";\n else\n $target_blank = \"\";\n\n if ($menu[$i]['siteid'] == $selmenuid || is_array($menu[$i]['siteid']) && in_array($selmenuid, $menu[$i]['siteid'])) {\n echo '<li><a class=\"selected bg-green06\" href=\"' . $menu[$i]['filename'] . '\">' . htmlspecialchars($menu[$i]['menustring'], ENT_COMPAT, 'UTF-8') . '</a></li>';\n } else {\n echo '<li><a ' . $target_blank . ' href=\"' . $menu[$i]['filename'] . '\">' . htmlspecialchars($menu[$i]['menustring'], ENT_COMPAT, 'UTF-8') . '</a></li>';\n }\n }\n }\n}", "function createParentMenu($g_name,$title,$mod_id) {\n\t\tglobal $DB;\n\t\t$arr_title = @explode(\"|\",$title);\n\t\t$title_vn = trim($arr_title[0]);\n\t\t$title_en = (trim($arr_title[1])) ? trim($arr_title[1]) : $title_vn;\n\t\t\t\t\t\n\t\t$cot['g_name'] = $g_name;\n\t\t$cot['title_vn'] = $title_vn;\n\t\t$cot['title_en'] = $title_en;\n\t\t$cot['mod_id'] = $mod_id;\n\t\t$cot['parentid'] = 0;\n\t\t$cot['displayorder'] = 1;\n\n\t\t$ok = $DB->do_insert(\"admin_menu\",$cot);\n\t\tif(!$ok)\n\t\t{\n\t\t\t$this->setError( 1, $DB->debug() );\n\t\t\treturn false;\n\t\t}\n\t\t$menuid = $DB->insertid();\n\t\treturn $menuid;\n\t}", "function createMenuItems()\n{\n\t// Get new component id.\n\t$db \t= DBHelper::db();\n\n\t$cid = getEblogId();\n\n\tif( !$cid )\n\t{\n\t\treturn false;\n\t}\n\n\t//get the default 'HOME' menu item the menytype.\n\t$query\t= 'SELECT `menutype` FROM ' . $db->nameQuote( '#__menu' ) . ' '\n\t\t\t. 'WHERE ' . $db->nameQuote( 'home' ) . '=' . $db->Quote( '1' );\n\t$db->setQuery( $query );\n\n\t$menuType = $db->loadResult();\n\n\tif( empty( $menuType ) )\n\t{\n\t\treturn false;\n\t}\n\n\t$status = true;\n\tif( getJoomlaVersion() >= '1.6' ) {\n\t\trequire_once( JPATH_ROOT . DS . 'components' . DS . 'com_easyblog' . DS . 'helpers' . DS . 'helper.php' );\n\n\t\t$table \t= JTable::getInstance( 'Menu' , 'JTable' );\n\n\t\t$table->menutype\t\t= $menuType;\n\t\t$table->title \t\t\t= 'EasyBlog';\n\t\t$table->alias \t\t\t= 'easyblog';\n\t\t$table->path \t\t\t= 'easyblog';\n\t\t$table->link \t\t\t= 'index.php?option=com_easyblog&view=latest';\n\t\t$table->type \t\t\t= 'component';\n\t\t$table->published \t\t= '1';\n\t\t$table->parent_id \t\t= '1';\n\t\t$table->component_id\t= $cid;\n\t\t$table->client_id \t\t= '0';\n\t\t$table->language \t\t= '*';\n\n\t\t$table->setLocation('1', 'last-child');\n\n\t\tif(!$table->store()){\n\t\t\t$status = false;\n\t\t}\n\t} else {\n\n\t\t$query \t= 'SELECT ' . $db->nameQuote( 'ordering' ) . ' '\n\t\t\t\t. 'FROM ' . $db->nameQuote( '#__menu' ) . ' '\n\t\t\t\t. 'ORDER BY ' . $db->nameQuote( 'ordering' ) . ' DESC LIMIT 1';\n\t\t$db->setQuery( $query );\n\t\t$order \t= $db->loadResult() + 1;\n\n\t\t// Update the existing menu items.\n\t\t$query \t= 'INSERT INTO ' . $db->nameQuote( '#__menu' )\n\t\t\t. '('\n\t\t\t\t. $db->nameQuote( 'menutype' ) . ', '\n\t\t\t\t. $db->nameQuote( 'name' ) . ', '\n\t\t\t\t. $db->nameQuote( 'alias' ) . ', '\n\t\t\t\t. $db->nameQuote( 'link' ) . ', '\n\t\t\t\t. $db->nameQuote( 'type' ) . ', '\n\t\t\t\t. $db->nameQuote( 'published' ) . ', '\n\t\t\t\t. $db->nameQuote( 'parent' ) . ', '\n\t\t\t\t. $db->nameQuote( 'componentid' ) . ', '\n\t\t\t\t. $db->nameQuote( 'sublevel' ) . ', '\n\t\t\t\t. $db->nameQuote( 'ordering' ) . ' '\n\t\t\t. ') '\n\t\t\t. 'VALUES('\n\t\t\t\t. $db->quote( $menuType ) . ', '\n\t\t\t\t. $db->quote( 'EasyBlog' ) . ', '\n\t\t\t\t. $db->quote( 'easyblog' ) . ', '\n\t\t\t\t. $db->quote( 'index.php?option=com_easyblog&view=latest' ) . ', '\n\t\t\t\t. $db->quote( 'component' ) . ', '\n\t\t\t\t. $db->quote( '1' ) . ', '\n\t\t\t\t. $db->quote( '0' ) . ', '\n\t\t\t\t. $db->quote( $cid ) . ', '\n\t\t\t\t. $db->quote( '0' ) . ', '\n\t\t\t\t. $db->quote( $order ) . ' '\n\t\t\t. ') ';\n\n\t\t$db->setQuery( $query );\n\t\t$db->query();\n\n\t\tif($db->getErrorNum())\n\t\t{\n\t\t\t$status = false;\n\t\t}\n\t}\n\n\treturn $status;\n}", "function createAboutUsMenu () {\n $menu_name = __('About Us',CARE_TEXTDOMAIN);\n $menu_exists = wp_get_nav_menu_object( $menu_name );\n\n if( !$menu_exists) {\n $menu_id = wp_create_nav_menu($menu_name);\n\n // Set up default menu items\n wp_update_nav_menu_item($menu_id, 0, array(\n 'menu-item-title' => __('About Care',CARE_TEXTDOMAIN),\n // 'menu-item-classes' => 'home',\n 'menu-item-url' => home_url( '/about-care-centre/' ), \n 'menu-item-status' => 'publish'));\n }\n}", "function mainMenu()\r\n{\r\n echo \"\\n========= MAIN MENU ============\\n\";\r\n echo \"1.root\\n2.Admin\\n3.customer\\n\";\r\n}", "function make_menu($title) {;\t\n\t$menu = '<ul class=\"nav nav-pills\">';\n $menu .= get_menu_items($title);\n\t$menu .= '</ul>';\n\treturn $menu;\n}", "function rootMenu()\r\n{\r\n echo \"\\n========= ROOT MENU ============\\n\";\r\n echo \"1.ADD ADMIN\\n2.UPDATE COMPANY ADDRESS\\n3.UPADTE ABOUT\\n\";\r\n}", "public function onBuildMainMenu(BuildMenuEvent $event)\n {\n $main = $event\n ->getMenu()\n ->removeChild('Dashboard')\n ->removeChild('Stock')\n ->removeChild('Projects')\n ->removeChild('Email')\n ->removeChild('Scheduler')\n ->removeChild('Calls')\n ->removeChild('Support')\n ->removeChild('Jobs')\n ->removeChild('Purchase orders')\n ->removeChild('Suppliers')\n ->removeChild('Contacts')\n ->removeChild('Clients');\n\n if ($this->security->isGranted(array('ROLE_CLIENT_CONTACT'))) {\n $main->addChild('Orders', array('route' => 'mirsa_sales_order_list'))->setAttribute('icon', 'fa-pencil-square-o');\n $main->addChild('Appointments', array('route' => 'mirsa_appointments_list'))->setAttribute('icon', 'fa-calendar');\n }\n\n if ($this->security->isGranted(array('ROLE_CLIENT_CONTACT_INVENTORY'))) {\n $menu->removeChild('Orders');\n $menu->removeChild('Appointments');\n }\n \n if ($this->security->isGranted(array('ROLE_STAFF'))) {\n $main->addChild('Clients', array('route' => 'mirsa_clients_list'))->setAttribute('icon', 'fa-group');\n $main->addChild('Orders', array('route' => 'mirsa_sales_order_list'))->setAttribute('icon', 'fa-pencil-square-o');\n $main->addChild('Appointments', array('route' => 'mirsa_appointments_list'))->setAttribute('icon', 'fa-calendar');\n }\n\n /* Standard menu items for all users */\n $main->addChild('Work Orders', array('route' => 'mirsa_work_order_list'))->setAttribute('icon', 'fa-cogs');\n $main->addChild('Assembly Activity', array('route' => 'mirsa_activity_assembly_list'))->setAttribute('icon', 'fa-cogs');\n $main->addChild('Inspection Activity', array('route' => 'mirsa_activity_inspection_list'))->setAttribute('icon', 'fa-cogs');\n $main->addChild('Defect Cross Tab', array('route' => 'mirsa_work_order_defect_cross_tab_report_by_template'))->setAttribute('icon', 'fa-cogs');\n $main->addChild('Batch', array('route' => 'mirsa_stock_quantity_list'))->setAttribute('icon', 'fa-cubes');\n $main->addChild('Inventory', array('route' => 'mirsa_stock_list'))->setAttribute('icon', 'fa-cubes');\n $main->addChild('Order Line Items', array('route' => 'mirsa_sales_order_line_item_list'))->setAttribute('icon', 'fa-list-alt');\n }", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function actionCreate()\n {\n $model = new Menu();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n $cat=new MenuTree('',array('id','parent_id','name','fullname'));\n\n print_r($cat);\n $_list=$cat->getTree(Menu::get_menus(true));//获取分类结构\n $list = array('0'=>'顶级菜单');\n foreach($_list as $value){\n $list[$value['id']] = $value['fullname'];\n }\n $model->order=0;\n return $this->render('create', [\n 'model' => $model,\n 'list' => $list\n ]);\n }\n }", "public function add_menu() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=blicki',\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t'edit_others_posts',\n\t\t\t'blicki-show-diff',\n\t\t\tarray( $this, 'admin_suggestion_viewer' )\n\t\t);\n\t\tremove_submenu_page( 'edit.php?post_type=blicki', 'blicki-show-diff' );\n\t}", "public function create()\n {\n // 查询全部一级菜单(parent_button = 0)\n $parent_menu = WechatMenu::where('parent_button', '=', 0)->get();\n return view('admin.wechat.menu.create')->with(['parent_menu' => $parent_menu]);\n }", "function createMenu($arr_menu, $args = array() ){\n krsort($arr_menu);\n foreach ($arr_menu as $k => &$item) {\n if (!empty($item['parent'])) {\n $parent = $item['parent'];\n if (empty($arr_menu[$parent]['childs'])) {\n $arr_menu[$parent]['childs'] = array();\n }\n //2\n array_unshift($arr_menu[$parent]['childs'],$item);\n unset($arr_menu[$k]);\n }\n }\n //3\n ksort($arr_menu);\n\n // filter menu by user role\n $av_menu = menuAvailable($arr_menu);\n foreach ($arr_menu as $key => $value) {\n if(in_array($key, $av_menu))\n unset($arr_menu[$key]);\n }\n\n // echo \"<pre>\";\n // print_r($av_menu);\n // print_r($arr_menu);\n // echo \"</pre>\";\n // exit();\n\n buildMenu($arr_menu, $args);\n\n}", "function\ncreateMenu(&$sitemap, $_pos = 1, $_level = 2 )\n{\n\t$timestamp = time();\n\techo '<ul id=\"'. ($_pos === 1 ? 'menu-stucture' : '') .'\">';\n\t$locrr = 0;\n\tfor($i = $_pos; $i < count($sitemap); $i++)\n\t{\n\t\tif($_level !== intval($sitemap[$i] -> level))\n\t\t{\n\t\t\tif(!CMS_BACKEND)\n\t\t\t\t$locrr = ($sitemap[$i-1] -> offspring ?? 1) - 1;\n\t\t\tbreak;\n\t\t}\n\n\t\tif(\n\t\t\t\t($sitemap[$i] -> hidden_state == 0)\n\t\t\t&&\t(empty($sitemap[$i] -> page_auth) || (!empty($sitemap[$i] -> page_auth) && CSession::instance() -> isAuthed($sitemap[$i] -> page_auth) === true))\n\t\t\t||\t(\t($sitemap[$i] -> hidden_state == 5 && $sitemap[$i] -> publish_from < $timestamp)\n\t\t\t\t&&\t($sitemap[$i] -> hidden_state == 5 && $sitemap[$i] -> publish_until > $timestamp && $sitemap[$i] -> publish_until != 0)\n\t\t\t\t)\n\t\t\t|| CMS_BACKEND\n\t\t ); else\n\t\t {\n\t\t\t$i = $i + $sitemap[$i] -> offspring;\n\t\t\tcontinue;\n\t\t }\n\n\t\tif(CMS_BACKEND)\n\t\t\techo '<li><a href=\"'. CMS_SERVER_URL_BACKEND .'pages/view/'. $sitemap[$i] -> page_language .'/'. $sitemap[$i] -> node_id .'\" title=\"'. $sitemap[$i] -> page_title .'\">'. $sitemap[$i] -> page_name .'</a>';\n\t\telse\n\t\t\techo '<li><a href=\"'. CMS_SERVER_URL . URL_LANG_PRREFIX . substr($sitemap[$i] -> page_path, 1) .'\" title=\"'. $sitemap[$i] -> page_title .'\" '. ($sitemap[$i] -> menu_follow == 0 ? 'rel=\"nofollow\"' : '') .'>'. $sitemap[$i] -> page_name .'</a>';\n\n\t\tif($sitemap[$i] -> offspring != 0)\n\t\t{\n\t\t\t$i = createMenu($sitemap, ($i + 1), ($_level + 1));\n\t\t}\n\n\t\techo '</li>';\n\t}\n\techo '</ul>';\n\n\treturn (!$locrr ? $i - 1 : $i + $locrr);\n}", "public function mainMenu( FactoryInterface $factory, array $options ) {\n\n $menu = $factory->createItem( 'root' );\n $menu->setChildrenAttribute( \"class\", \"tc-main-menu tc-menu\" );\n\n $menu\n ->addChild(\"Overview\")\n ->setAttribute('class', 'tc-menu-header');\n \n $menu\n ->addChild( 'Dashboard', array(\n 'route' => 'dashboard'\n ) )\n ->setExtra( \"icon_classes\", \"glyphicon glyphicon-dashboard\" )\n ->setExtra( \"sub_label\", \"Bird eye view on what's going on\" );\n\n $menu\n ->addChild(\"Outsourcing\")\n ->setAttribute('class', 'tc-menu-header');\n \n // Service Providers\n $menu\n ->addChild( 'Service Providers', array(\n 'route' => 'vendor_index'\n ) )\n ->setExtra( \"icon_classes\", \"icon-relations\" )\n ->setExtra( \"breadcrumbs_icon_classes\", \"icon-relations-dark-lg\" )\n ->setExtra( \"sub_label\", \"Build & manage relationships\" )\n \n ->setExtra( \"routes\", array(\n array( \"route\" => 'vendor_index' ),\n array( \"route\" => 'vendor_overview' ),\n array( \"route\" => 'vendor_new' ),\n array( \"route\" => 'vendor_create' )\n ));\n /*\n // New Relation\n ->addChild('New Service Provider', array(\n 'route' => 'vendor_new'\n ));\n */\n\n // Projects\n $menu\n ->addChild( 'Projects', array(\n 'route' => 'project'\n ) )\n ->setExtra( \"icon_classes\", \"icon-projects\" )\n ->setExtra( \"sub_label\", \"Manage multiple service providers in the same project\" );\n\n $menu\n ->addChild(\"Sales & Work\")\n ->setAttribute('class', 'tc-menu-header');\n \n $menu\n ->addChild( 'Clients', array(\n 'route' => 'client_index'\n ) )\n ->setExtra( \"icon_classes\", \"icon-relations\" )\n ->setExtra( \"breadcrumbs_icon_classes\", \"icon-relations-dark-lg\" )\n ->setExtra( \"sub_label\", \"Build & manage relationships\" )\n \n ->setExtra( \"routes\", array(\n array( \"route\" => 'client_index' ),\n array( \"route\" => 'client_overview' ),\n array( \"route\" => 'client_new' ),\n array( \"route\" => 'client_create' )\n ));\n /*\n // New Relation\n ->addChild('New Client', array(\n 'route' => 'client_new'\n ));\n */ \n $menu\n ->addChild( 'Price Book', array(\n 'route' => 'pricebook'\n ) )\n ->setExtra( \"icon_classes\", \"glyphicon glyphicon-book\" )\n ->setExtra( \"sub_label\", \"Your pricing catalog\" );\n \n return $menu;\n }", "public function init()\n {\n $menus = P4Cms_Menu::fetchAll();\n $menuNames = array();\n foreach ($menus as $menu) {\n $menuNames[$menu->getId()] = $menu->getLabel();\n }\n\n // tack on the various dynamic items so they can\n // pick from those as well\n $group = 'Dynamic';\n $menuNames[$group] = array();\n $dynamicTypes = P4Cms_Navigation_DynamicHandler::fetchAll();\n foreach ($dynamicTypes as $dynamicType) {\n $label = $dynamicType->getLabel();\n $value = 'P4Cms_Navigation_DynamicHandler/' . $dynamicType->getId();\n\n $menuNames[$group][$value] = $label;\n }\n natcasesort($menuNames[$group]);\n\n $this->addElement(\n 'select',\n 'menu',\n array(\n 'label' => 'Menu',\n 'value' => P4Cms_Menu::DEFAULT_MENU,\n 'required' => true,\n 'description' => \"Choose a menu to display\",\n 'multiOptions' => $menuNames,\n 'onChange' => \"p4cms.menu.refreshSubForm(this.form);\"\n )\n );\n\n // add option to select the display root\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_ROOT,\n array(\n 'value' => '',\n 'label' => 'Display Root',\n )\n );\n $this->getElement(P4Cms_Menu::MENU_ROOT)\n ->getDecorator('htmlTag')\n ->setOption('class', 'menu-root');\n $this->_loadRootOptions();\n\n // add option to toggle inclusion of root item, when rooting a menu.\n $this->addElement(\n 'checkbox',\n P4Cms_Menu::MENU_KEEP_ROOT,\n array(\n 'label' => 'Include Root Item',\n 'description' => 'Set the display root (starting point) to display from.<br/>'\n . 'Optionally show the root item in the displayed menu.'\n )\n );\n P4Cms_Form::moveCheckboxLabel($this->getElement(P4Cms_Menu::MENU_KEEP_ROOT));\n $this->getElement(P4Cms_Menu::MENU_KEEP_ROOT)\n ->getDecorator('htmlTag')\n ->setOption('class', 'keep-root');\n $this->getElement(P4Cms_Menu::MENU_KEEP_ROOT)\n ->getDecorator('Description')\n ->setEscape(false);\n\n // add option to limit depth of the displayed menu.\n $options = array('' => 'Unlimited') + range(1, 10);\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_MAX_DEPTH,\n array(\n 'value' => '',\n 'label' => 'Maximum Depth',\n 'description' => 'Set the maximum depth of items to display.',\n 'multiOptions' => $options\n )\n );\n\n // add option to limit depth of the displayed menu.\n $options = array('' => 'Unlimited')\n + array_combine(range(1, 10), range(1, 10))\n + array_combine(range(15, 50, 5), range(15, 50, 5))\n + array_combine(range(60, 100, 10), range(60, 100, 10));\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_MAX_ITEMS,\n array(\n 'value' => '',\n 'label' => 'Maximum Items',\n 'description' => 'Set the maximum number of items to display.',\n 'multiOptions' => $options\n )\n );\n }", "public function create_submenu() {\n\t\tadd_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t__('CHAOS Client','wpchaosclient'),\n\t\t\t__('CHAOS','wpchaosclient'),\n\t\t\t'manage_options',\n\t\t\t$this->menu_page,\n\t\t\tarray(&$this,'create_submenu_page')\n\t\t);\n\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "function ShowMainHorMenu()\n{\n\t$str1=\"select * from menu where vermenu=1 order by menuorder\";\n\t$result=mysql_query($str1) or\n\t\tdie(mysql_error());\n\t$submenucount=0;\n\t$mid=0;\n\techo('<DIV class=ddsmoothmenu id=main-nav><UL>');\n\twhile($row=mysql_fetch_array($result))\n\t{\n\t\tif ($row['parent']==0)\n\t\t{\n\t\t\tif ($submenucount>0) //Ket thuc menu con, bat dau muc menu moi\n\t\t\t{\n\t\t\t\techo('</UL>');\n\t\t\t\techo('</LI>');\n\t\t\t}\t\n\t\t\tif ($row['menutype']==3) //Muc khong co lien ket\n\t\t\t{\n\t\t\t\techo('<LI><A href=\"\">'.$row['menutitle'].'</A>');\n\t\t\t\t$submenucount=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/////////////////////////Cac muc chinh\n\t\t\t\t\n\t\t\t\techo('<LI><A title=\"\" href=\"'.PageLink($row['menutype'],$row['menuid'],$row['parent'],$row['link']));\n\t\t\t\techo('\">'.$row['menutitle'].'</A> </LI>');\n\t\t\t\t$submenucount=0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/////////////////////////// Cac muc con\n\t\t\tif ($submenucount==0)///Muc con dau tien\n\t\t\t{\n\t\t\t\techo('<UL>');\n\t\t\t\techo('<LI><A id=\"cat'.$mid.'\" title=\"\" href=\"'.PageLink($row['menutype'],$row['menuid'],$row['parent'],$row['link']));\n\t\t\t\techo('\">'.$row['menutitle'].'</A> </LI>');\n\t\t\t\t$submenucount++;\n\t\t\t\t$mid++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo('<LI><A id=\"cat'.$mid.'\" title=\"\" href=\"'.PageLink($row['menutype'],$row['menuid'],$row['parent'],$row['link']));\n\t\t\t\techo('\">'.$row['menutitle'].'</A> </LI>');\n\t\t\t\t$submenucount++;\n\t\t\t\t$mid++;\n\t\t\t}\t\n\t\t}\n\t}\n\tmysql_free_result($result);\n\techo('</UL></DIV>');\n}", "public function createMenu()\n {\n\t\t$count = mysql_query(\"SELECT count(*) FROM view_orders \n\t\t\t\t\t\t\t WHERE status >= '\".Status::open.\"' AND status <= '\".Status::ready.\"' AND products_type_id = '1'\n\t\t\t\t\t\t\t GROUP BY bar_time\");\n\t\t\n\t\t$menu = \"<a href='?action=orders'><li>Bestellungen <div id='count_orders' class='count'>\".mysql_num_rows($count).\"</div></li></a> \\n\";\n\t\t$menu .= \"<a href='?action=articleManagement'><li>ProduktList</li></a> \\n\";\n\t\t$menu .= \"<a href='?action=callWaiter&seat_id=\". Backend::KITCHEN_SEAT .\"'><li>Kellner rufen</li></a> \\n\";\n\t\t$menu .= \"<a href='?action=orders'><li>Uhrzeit: \".date('H:i').\"</li></a> \\n\";\n\t\treturn parent::createMenu($menu);\n }", "function makeMenu($what)\n{\n global $language;\n if($what==\"header\") {\n echo \"<a href=\\\"index.php?action=home\\\" target=\\\"main\\\"><div align=\\\"center\\\"><img border=\\\"0\\\" src=\\\"\".AdminMenuLogoLocation.\"\\\"></a></div>\\r\\n\";\n echo \"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"5\\\">\\r\\n\";\n }\n if($what==\"separator\") {\n echo \"<tr><td></td></tr>\\r\\n\";\n }\n if($what==\"footer\") {\n echo \"<tr><td><hr></td></tr>\\r\\n\";\n echo \"</table>\\r\\n\";\n }\n}", "public function menu()\n\t{\n\t\t$this->db->order_by(\"urutan\",\"asc\");\n\t\t$hasil = $this->db->get_where(\"mainmenu\",array(\"aktif\"=>\"Y\"));\n\t\t$output = new myObject();\n\t\tif($hasil->num_rows() > 0){\n\t\t\t$data = $hasil->result();\n\t\t\t$menu = array();\n\t\t\tforeach ($data as $item) {\n\t\t\t\t$row = array();\n\t\t\t\t$row =$item;\n\t\t\t\t$row->submenu = $this->submenu($item->id_main);\n\t\t\t\t$menu[] = $row;\n\t\t\t}\n\t\t\t$output->data = $menu;\n\t\t\t$output->status = true;\n\t\t}else{\n\t\t\t$output->status = false;\n\t\t}\n\t\treturn $output;\n\t}" ]
[ "0.75886714", "0.7500422", "0.7424531", "0.7304863", "0.7302838", "0.7302838", "0.7302838", "0.7302838", "0.7302838", "0.7302838", "0.72914034", "0.72550994", "0.7146139", "0.7123995", "0.6970596", "0.6812264", "0.6773524", "0.67689735", "0.6760772", "0.67488354", "0.67472106", "0.67472106", "0.67466426", "0.6720128", "0.6681438", "0.667936", "0.6672502", "0.6616663", "0.66165626", "0.66147333", "0.660777", "0.6584247", "0.6560213", "0.6539591", "0.653457", "0.6499566", "0.6497939", "0.64967924", "0.64819795", "0.6480959", "0.64765716", "0.6452256", "0.64514273", "0.64412314", "0.6432513", "0.64132094", "0.64041793", "0.6390326", "0.639024", "0.6380109", "0.63681227", "0.63639826", "0.63593376", "0.6350151", "0.6349891", "0.63412625", "0.6340209", "0.6338295", "0.6332676", "0.63247246", "0.6323567", "0.63187104", "0.62738043", "0.6272459", "0.6260911", "0.62605834", "0.62605834", "0.6251182", "0.6251182", "0.6248037", "0.6243532", "0.62379175", "0.6222964", "0.62205094", "0.6211876", "0.61923754", "0.61707735", "0.616974", "0.61689174", "0.6167419", "0.61547685", "0.6149782", "0.6139674", "0.6136655", "0.6135547", "0.61343163", "0.6133282", "0.6133282", "0.6130738", "0.612399", "0.61195135", "0.6114763", "0.61099106", "0.6100844", "0.6098956", "0.60967", "0.6091134", "0.6089795", "0.6086103", "0.60849994", "0.6084306" ]
0.0
-1
register Most Recent Posts settings
function MRPregister_mysettings() { register_setting( 'most-recent-posts-settings-group', 'most_recent_posts_css' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_block_core_latest_posts()\n {\n }", "function control() {\r\n $options = get_option('ace_widget_recent_posts');\r\n \r\n if ( !is_array($options) )\r\n $options = array('title'=>'',\r\n\t\t 'count' => $this->count,\r\n\t\t 'hierarchical' => $this->hierarchical,\r\n\t\t 'dropdown' => $this->dropdown );\r\n \r\n \r\n if ( !empty($_POST['ace-recent-posts-submit']) ) \r\n {\r\n \r\n\t\t\t$options['title'] = trim(strip_tags(stripslashes($_POST['ace-recent-posts-title'])));\r\n\t\t\t$options['number'] = (int) $_POST['ace-recent-posts-number'];\r\n\t\t\t\r\n\t\t\tif ($options['number'] > 15) $options['number'] = 15;//The limit\r\n\r\n\t\t update_option('ace_widget_recent_posts', $options);\r\n } \r\n\r\n\t\t$title = attribute_escape( $options['title'] );\r\n\t\t$number = (int) $options['number'];\r\n\r\n\r\n?>\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"recent-posts-title\">\r\n\t\t\t\t\t<?php _e( 'Title:' ); ?>\r\n\t\t\t\t\t<input class=\"widefat\" id=\"recent-posts-title\" name=\"ace-recent-posts-title\" type=\"text\" value=\"<?php echo $title; ?>\" />\r\n\t\t\t\t</label>\r\n\t\t\t</p>\r\n\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"recent-posts-number\"><?php _e('Number of posts to show:'); ?> <input style=\"width: 25px; text-align: center;\" id=\"recent-posts-number\" name=\"ace-recent-posts-number\" type=\"text\" value=\"<?php echo $number; ?>\" />\r\n\t\t\t\t</label>\r\n\t\t\t\t<br />\r\n\t\t\t\t<small><?php _e('(at most 15)'); ?></small>\r\n\t\t\t</p>\r\n\r\n\t\t\t<input type=\"hidden\" name=\"ace-recent-posts-submit\" value=\"1\" />\r\n<?php\r\n }", "function most_recent_posts_create_menu()\r\n{\r\n\tadd_menu_page('MRP Overview', 'Most Recent Posts', \t\t'administrator', 'MostRecentPostsSettings', 'MRPOverview', 'http://buildautomate.com/favicon.ico');\r\n\tadd_submenu_page('MostRecentPostsSettings', 'Shortcode', \t\t'Shortcode', \t\t'administrator', 'MRPShortcodes',\t\t'MRPShortcodes');\t\r\n\tadd_submenu_page('MostRecentPostsSettings', 'Registration', \t\t'Registration', \t\t'administrator', 'MRPRegistration',\t\t'MRPRegistration');\t\t\t\r\n\tadd_submenu_page('MostRecentPostsSettings', 'Tech Support', \t\t'Tech Support', \t\t'administrator', 'MRPTechSupport', \t\t'MRPTechSupport');\t\r\n\tadd_submenu_page('MostRecentPostsSettings', 'Help', \t\t'Help', \t\t'administrator', 'MRPHelp',\t\t'MRPHelp');\t\t\t\t\r\n\t\t\t\r\n\t//call register settings function\r\n\tadd_action( 'admin_init', 'MRPregister_mysettings' );\r\n}", "function sf_build_lastposts()\n{\n\tglobal $wpdb;\n\n\t$forums = sf_get_forums_all(true);\n\tif($forums)\n\t{\n\t\tforeach($forums as $forum)\n\t\t{\n\t\t\tsf_build_forum_index($forum->forum_id);\n\t\t}\n\t}\n\n\t$topics = sf_get_topics_all(true);\n\tif($topics)\n\t{\n\t\tforeach($topics as $topic)\n\t\t{\n\t\t\tsf_build_post_index($topic->topic_id, $topic->topic_slug);\n\t\t}\n\t}\n\treturn;\n}", "function rwar_latest_posts($limit = 3) {\r\n if( ! Registry::has('rwar_latest_posts')) {\r\n // capture original article if one is set\r\n if($article = Registry::get('article')) {\r\n Registry::set('original_article', $article);\r\n }\r\n }\r\n\r\n if( ! $posts = Registry::get('rwar_latest_posts')) {\r\n $posts = Post::where('status', '=', 'published')->sort('created', 'desc')->take($limit)->get();\r\n\r\n Registry::set('rwar_latest_posts', $posts = new Items($posts));\r\n }\r\n\r\n if($result = $posts->valid()) {\r\n // register single post\r\n Registry::set('article', $posts->current());\r\n\r\n // move to next\r\n $posts->next();\r\n }\r\n else {\r\n // back to the start\r\n $posts->rewind();\r\n\r\n // reset original article\r\n Registry::set('article', Registry::get('original_article'));\r\n\r\n // remove items\r\n Registry::set('rwar_latest_posts', false);\r\n }\r\n\r\n return $result;\r\n}", "function recent_post_widget() {\r\n\tregister_widget( 'recent_posts' );\r\n}", "function jk_recent_posts() {\r\n\t\tparent::__construct( false, \"Joeleen's Recent Posts Widget\" );\r\n\t}", "function RecentPage()\n\t{\n\t\t$this->SetInitialValues();\n\t}", "public function latestAction() {\n\t\t$node = $this->getPluginNode();\n\t\t$postsSourceNode = $this->getPostsSourceNode($node);\n\n\t\t$this->view->assign('hasPostNodes', $postsSourceNode->hasChildNodes('M12.Plugin.Blog:Post'));\n\t\t$this->view->assign('postNodes', $postsSourceNode->getChildNodes('M12.Plugin.Blog:Post', $this->getPostsLimit($node)));\n\t}", "public function registerPosts()\n\t{\n\t\t$this->init->registerPosts();\n\t}", "private function LastPosts(){\n $this->lastrecord = ORM::factory('Posts')->find_all()->count();\n }", "function moments_qodef_like_latest_posts() {\n\t\treturn moments_qodef_like()->add_like();\n\t}", "function sp_last_posts($numberOfPosts = 5 , $thumb = true){\n\tglobal $post;\n\t$orig_post = $post;\n\t\n\t$lastPosts = get_posts('numberposts='.$numberOfPosts);\n\tforeach($lastPosts as $post): setup_postdata($post);\n?>\n<li>\n\t<?php if ( $thumb && sp_post_image('sp-small') ) : ?>\n\t<div class=\"post-thumbnail\">\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php printf( __( 'Permalink to %s', 'sptheme' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\">\n <img src=\"<?php echo sp_post_image('sp-small') ?>\" width=\"110\" height=\"83\" />\n </a>\n </div><!-- post-thumbnail /-->\n <?php endif; ?>\n \n\t<h3><a href=\"<?php the_permalink(); ?>\"><?php the_title();?></a></h3>\n\t<?php //sp_get_score(); ?> <div class=\"entry-meta\"><?php echo sp_posted_on(); ?></div>\n</li>\n<?php endforeach; \n\t$post = $orig_post;\n}", "function tptn_pop_posts( $daily = false , $widget = false ) {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\tif ($daily) $table_name = $wpdb->prefix . \"top_ten_daily\"; \r\n\t\telse $table_name = $wpdb->prefix . \"top_ten\";\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\r\n\tif (!$daily) {\r\n\t\t$sql = \"SELECT postnumber, cntaccess as sumCount, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t} else {\r\n\t\t$daily_range = $tptn_settings[daily_range] - 1;\r\n\t\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\t\r\n\t\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t\t$sql .= \"GROUP BY postnumber \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t}\r\n\t$results = $wpdb->get_results($sql);\r\n\t$output = '';\r\n\r\n\tif (!$widget) {\r\n\t\tif (!$daily) {\r\n\t\t\t$output .= '<div id=\"tptn_related\">'.$tptn_settings['title'];\r\n\t\t} else {\r\n\t\t\t$output .= '<div id=\"tptn_related_daily\">'.$tptn_settings['title_daily'];\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= '<li>Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a></li>';\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\tif (!$widget) $output .= '</div>';\r\n\r\n\treturn $output;\r\n}", "function register_top_posts_widget() {\n register_widget('Top_Posts_Widget');\n}", "function ld_get_latest_posts($limit=30, $poster=0, $page = 1 )\r\n{\r\n\tglobal $bbdb, $bb_last_countable_query;\r\n\r\n\t$page = (int) $page;\r\n\r\n\t$where = 'WHERE post_status = 0';\r\n\r\n\tif ($poster > 0)\r\n\t\t$where .= \" AND poster_id = $poster\";\r\n\r\n\tif ( 1 < $page )\r\n\t\t$limit = ($limit * ($page - 1)) . \", $limit\";\r\n\r\n\t$bb_last_countable_query = \"SELECT post_id,forum_id,topic_id,poster_id,post_title,post_time FROM $bbdb->posts $where ORDER BY post_time DESC LIMIT $limit\";\r\n\r\n\tif ( $ld_latest_posts = $bbdb->get_results($bb_last_countable_query) )\r\n\t\treturn $ld_latest_posts;\r\n\telse\r\n\t\treturn false;\r\n}", "function portfolio_recent_register_widgets() {\n\tregister_widget( 'blog_recent_post' );\n}", "function muumuu_recent_posts($how_many, $how_long, $titleOnly, $begin_wrap, $end_wrap, $categories=array()) {\n global $wpdb;\n $counter = 0;\n \n // get a list of blogs in order of most recent update. show only public and nonarchived/spam/mature/deleted\n $blogs = $wpdb->get_col(\"SELECT blog_id FROM $wpdb->blogs WHERE\n public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND\n last_updated >= DATE_SUB(CURRENT_DATE(), INTERVAL $how_long DAY)\n ORDER BY last_updated DESC\");\n \n if ($blogs) {\n foreach ($blogs as $blog) {\n // we need _posts and _options tables for this to work\n $blogOptionsTable = \"wp_\".$blog.\"_options\";\n $blogPostsTable = \"wp_\".$blog.\"_posts\";\n $termsTable = \"wp_\" . $blog . \"_terms\";\n $taxonomyTable = \"wp_\" . $blog . \"_term_taxonomy\";\n $termRelationshipsTable = \"wp_\" . $blog . \"_term_relationships\";\n \n $categoryWhere = '';\n if (!empty($categories)) {\n $catNames = \"'\" . implode(\"', '\", $categories) . \"'\";\n $query = \"SELECT t.term_id FROM $termsTable AS t INNER JOIN $taxonomyTable AS tt ON tt.term_id = t.term_id INNER JOIN $termRelationshipsTable AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = 'category' AND t.name in ($catNames) AND tr.object_id = p.id\";\n $categoryWhere = \"AND EXISTS (\" . $query . \")\";\n }\n \n $options = $wpdb->get_results(\"SELECT option_value FROM\n $blogOptionsTable WHERE option_name IN ('siteurl','blogname') \n ORDER BY option_name DESC\");\n // we fetch the title and ID for the latest post\n $thispost = $wpdb->get_results(\"SELECT p.ID, p.post_title, p.post_content, p.post_author\n FROM $blogPostsTable as p WHERE p.post_status = 'publish' $categoryWhere\n AND p.post_type = 'post' AND p.post_date >= DATE_SUB(CURRENT_DATE(), INTERVAL $how_long DAY)\n ORDER BY p.id DESC LIMIT 0,1\");\n // if it is found put it to the output\n if($thispost) {\n // get permalink by ID. check wp-includes/wpmu-functions.php\n $thispermalink = get_blog_permalink($blog, $thispost[0]->ID);\n\t\t\t\t$fixedcontent = wpautop($thispost[0]->post_content);\n if ($titleOnly == false) {\n\t\t\t\t\t\n\t\t\t\t\techo $begin_wrap.'\t\n\t\t\t\t\t<div class=\"title-post\">\n\t\t\t\t\t\t<h4><a href=\"'.$options[0]->option_value.'\" title=\"Dine '.$options[1]->option_value.'\">'.$options[1]->option_value.'</a></h4>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p><a href=\"'.$thispermalink.'\" rel=\"bookmark\">'.$thispost[0]->post_title.'</a></p>\n\t\t\t\t\t<a class=\"more\" href=\"'.$thispermalink.'\">More...</a>'.$end_wrap;\n $counter++;\n } else {\n\t\n\t\t\t\t\techo $begin_wrap.'\n\t\t\t\t\t\t<div class=\"title-post\">\n\t\t\t\t\t\t\t<h4><a href=\"'.$options[0]->option_value.'\" title=\"Dine '.$options[1]->option_value.'\">'.$options[1]->option_value.'</a></h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h2><a href=\"'.$thispermalink.'\" rel=\"bookmark\">'.$thispost[0]->post_title.'</a></h2>\n\t\t\t\t\t\t'.$fixedcontent.'\n\t\t\t\t\t\t<p class=\"more\"><a href=\"'.$thispermalink.'\" rel=\"bookmark\" title=\"'.$thispost[0]->post_title.'\">Continue reading...</a></p>\n\t\t\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t\t\t<div class=\"tags\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>'.$end_wrap;\n\t $counter++;\n }\n }\n // don't go over the limit\n if($counter >= $how_many) { \n break; \n }\n }\n }\n}", "function manynewposts_info()\n{\n return array(\n \"name\" => \"Many New Posts\",\n \"description\" => \"This plugin counts how many new posts have been made after the thread had been view by user.\",\n \"website\" => \"https://github.com/jung3o/Many-New-Posts\",\n \"author\" => \"Jung Oh\",\n \"authorsite\" => \"http://jung3o.com\",\n \"version\" => \"2.0.2\",\n \"compatibility\" => \"18*\",\n );\n}", "function LatestPosts() {\n\t\treturn Post::get()\n\t\t\t->filter('AuthorID', (int)$this->urlParams['ID'])\n \t\t\t->limit(0,5)\n\t\t\t->sort(\"Created\", \"DESC\")\n\t\t\t->filterByCallback(function($post){\n\t\t\t\treturn $post->canView();\n\t\t\t});\n\t}", "public function index() {\n\t\t$data['posts'] = $this->post->getLast();\n\t\t$this->set($data);\n\t}", "function wps_recent_posts() {\r\n echo '<ol>'.\"\\n\";\r\n\t\t global $post;\r\n\t\t $args = array( 'numberposts' => 50, 'post_type' => array('hotel', 'restaurant', 'shop', 'activity', 'itinerary', 'library', 'article'), 'orderby' => 'date', 'order' => 'DESC' );\r\n\t\t $myposts = get_posts( $args );\r\n\t\t\t\tforeach( $myposts as $post ) : setup_postdata($post);\r\n\t\t\t\t\t$destinationstree = destinationstree();\r\n\t\t\t\t\t$dest = $destinationstree['dest'];\r\n\t\t\t\t\t$posttype = get_post_type( $post );\r\n\t\t\t\t\t$postobj = get_post_type_object( $posttype );\r\n\t\t\t\t\t$postobjname = $postobj->labels->singular_name;\r\n\t\t\t\t\techo '<li><h4>'.get_the_title().' | <span class=\"details\"><a href=\"/wp-admin/post.php?post='.$post->ID.'&action=edit\">E</a> | <a target=\"_blank\" href=\"'.get_permalink().'\">V</a> | '.$dest->name.' | '.$postobjname.' | '.get_the_author_meta( 'display_name', $post->post_author ).' | <abbr>'.get_the_date('n/d/y').'</abbr></span></h4></li>'.\"\\n\";\r\n\t\t \t\tendforeach;\r\n echo '</ol>'.\"\\n\";\r\n}", "function dailypostlimit_activate(){\r\n\tglobal $db, $mybb, $lang;\r\n\r\n\t$lang->load('dailypostlimit');\r\n\r\n\t$dailypostlimit_group = array(\r\n\t\t'name'\t\t=> 'dailypostlimit',\r\n\t\t'title'\t\t=> $lang->setting_group,\r\n\t\t'description'\t=> $lang->setting_group_desc,\r\n\t\t'disporder'\t=> '2',\r\n\t\t'isdefault'\t=> '0',\r\n\t);\r\n\r\n\t$db->insert_query(\"settinggroups\", $dailypostlimit_group);\r\n\t$gid = $db->insert_id();\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_enable',\r\n\t\t'title'\t\t=> $lang->setting_enabled,\r\n\t\t'description'\t=> $lang->setting_enabled_desc,\r\n\t\t'optionscode'\t=> 'yesno',\r\n\t\t'value'\t\t=> '0',\r\n\t\t'disporder'\t=> '1',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_limit',\r\n\t\t'title'\t\t=> $lang->setting_limit,\r\n\t\t'description'\t=> $lang->setting_limit_desc,\r\n\t\t'optionscode'\t=> 'text',\r\n\t\t'value'\t\t=> '',\r\n\t\t'disporder'\t=> '2',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_min_post',\r\n\t\t'title'\t\t=> $lang->setting_min_post,\r\n\t\t'description'\t=> $lang->setting_min_post_desc,\r\n\t\t'optionscode'\t=> 'text',\r\n\t\t'value'\t\t=> '',\r\n\t\t'disporder'\t=> '3',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_exclude_user',\r\n\t\t'title'\t\t=> $lang->setting_exclude_user,\r\n\t\t'description'\t=> $lang->setting_exclude_user_desc,\r\n\t\t'optionscode'\t=> 'text',\r\n\t\t'value'\t\t=> '',\r\n\t\t'disporder'\t=> '4',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_exclude_group',\r\n\t\t'title'\t\t=> $lang->setting_exclude_group,\r\n\t\t'description'\t=> $lang->setting_exclude_group_desc,\r\n\t\t'optionscode'\t=> 'text',\r\n\t\t'value'\t\t=> '',\r\n\t\t'disporder'\t=> '5',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_exclude_forum',\r\n\t\t'title'\t\t=> $lang->setting_exclude_forum,\r\n\t\t'description'\t=> $lang->setting_exclude_forum_desc,\r\n\t\t'optionscode'\t=> 'text',\r\n\t\t'value'\t\t=> '',\r\n\t\t'disporder'\t=> '6',\r\n\t\t'gid'\t\t=> intval($gid),\r\n\t);\r\n\r\n\t$dailypostlimit_setting[] = array(\r\n\t\t'name'\t\t=> 'dailypostlimit_message',\r\n\t\t'title'\t\t=> $lang->setting_message,\r\n\t\t'description'\t=> $lang->setting_message_desc,\r\n\t\t'optionscode'\t=> 'textarea',\r\n\t\t'value'\t\t=> $lang->setting_message_value,\r\n\t\t'disporder'\t=> '7',\r\n\t\t'gid'\t\t=> intval($gid)\r\n\t);\r\n\r\n\tforeach($dailypostlimit_setting as $setting){\r\n\t\t$db->insert_query(\"settings\", $setting);\r\n\t}\r\n\r\n\trebuild_settings();\r\n}", "function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }", "public function manage_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at' => 'Null'));\n\n\t\t$data['page'] = \"blog/manage_posts\";\n \t$this->template->template_view($data);\t\n\t}", "public function recent_posts()\r\n\t{\r\n\t\t// Set the current page\r\n\t\t$data['current_page'] = 'recent_posts';\r\n\t\t$data['user'] = $this->user;\r\n\r\n\t\t// Load the popular posts for the user\r\n\t\t$this->db->order_by('created_at', 'DESC');\r\n\t\t$data['recent_posts'] = $this->appdotnet->getUserPosts($this->user['id'], array('include_annotations' => 1) );\r\n\r\n\t\t// Load the page\r\n\t\t$this->load->view('layouts/header', array('page_title' => $this->user['username']));\r\n\t\t$this->load->view('profiles/recent_posts', $data);\r\n\t\t$this->load->view('layouts/footer');\r\n\t}", "public function mostRecentPostsForSidebar()\n {\n return $this->where(['status' => 'active'])\n ->order(['date_created' => 'DESC'])\n ->limit(10);\n }", "static function add_recent_only(): void {\r\n self::add_acf_field(self::recent_only, [\r\n 'label' => 'Only show recent articles in these post selectors?',\r\n 'default_value' => 1,\r\n 'message' => '',\r\n 'ui' => 1,\r\n 'type' => 'true_false',\r\n 'instructions' => 'Speeds up article finding, but gives less choice.',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }", "function gc_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings( array(\n\t\t\t'blog_cat_num' => 5,\n\t\t\t'content_archive' => 'excerpts',\n\t\t\t'content_archive_limit' => 0,\n\t\t\t'content_archive_thumbnail' => 1,\n\t\t\t'posts_nav' => 'numeric',\n\t\t\t'site_layout' => 'content-sidebar',\n\t\t) );\n\n\t}\n\tupdate_option( 'posts_per_page', 5 );\n\n}", "function posts_on_front() {\n\n\t// Add setting section\n\tadd_settings_section(\n\t\t'custom_setting_section', // $id\n\t\t'Custome Setting Section', // $title\n\t\t'custom_setting_section_callback', // $callback\n\t\t'reading' // $page\n\t);\n\n\t// Add setting field\n\tadd_settings_field(\n\t\t'posts_on_front', // $id\n\t\t'Number of Posts to show on Front Page', // $title\n\t\t'posts_on_front_callback', // $callback\n\t\t'reading', // $page\n\t\t'custom_setting_section', // $section, or use 'default'\n\t\t[] //$args\n\t);\n\n\t// Register fields\n\tregister_setting('reading', 'posts_on_front');\n}", "protected function setPosts()\n {\n $i = 1;\n if($this->query->post_count > 1){\n foreach ($this->query->posts as $post)\n {\n if($post->ID != $this->feat_post->ID)\n {\n $this->posts[] = new Cltvo_Post( $post );\n $i++;\n }\n\n if($i>$this->posts_per_page)\n break;\n }\n }else{\n $this->posts[0] = new Cltvo_Post( $this->query->post );\n }\n }", "private function addPosts()\n {\n $posts = Post::latest()->publish()->select('slug', 'updated_at', 'id', 'featured_image_id')\n ->with([\n 'featuredImage' => function ($q) {\n $q->select('id', 'variations');\n }\n ])\n ->get();\n\n $posts->each(function ($post) {\n\n $images = [];\n if ($post->featuredImage) {\n $images = [\n ['url' => url($post->featuredImage->variations['large']['path']), 'title' => $post->title],\n ];\n }\n $this->sitemap->add(\n route('post.show', $post->slug),\n $post->updated_at->toAtomString(),\n 0.8,\n 'daily',\n $images\n );\n });\n\n return $this;\n }", "function genesis_sample_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings(\n\t\t\tarray(\n\t\t\t\t'blog_cat_num' => 6,\n\t\t\t\t'content_archive' => 'full',\n\t\t\t\t'content_archive_limit' => 0,\n\t\t\t\t'content_archive_thumbnail' => 0,\n\t\t\t\t'posts_nav' => 'numeric',\n\t\t\t\t'site_layout' => 'content-sidebar',\n\t\t\t)\n\t\t);\n\n\t}\n\n\tupdate_option( 'posts_per_page', 6 );\n\n}", "public function last()\n {\n $last_posts = $this->posts_manager->listLasts(10);\n $this->render('last-posts', ['head'=>['title'=>'Les derniers articles', 'meta_description'=>''], 'page'=>'derniers-articles', 'last_posts'=>$last_posts]);\n }", "public function before(){\n //parent::before();\n $this->LastPosts();\n }", "function sp_popular_posts($pop_posts = 5 , $thumb = true){\n\tglobal $wpdb , $post;\n\t$orig_post = $post;\n\t\n\t$popularposts = \"SELECT ID,post_title,post_date,post_author,post_content,post_type FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY comment_count DESC LIMIT 0,\".$pop_posts;\n\t$posts = $wpdb->get_results($popularposts);\n\tif($posts){\n\t\tglobal $post;\n\t\tforeach($posts as $post){\n\t\tsetup_postdata($post);?>\n\t\t\t<li>\n <?php if ( $thumb && sp_post_image('sp-small') ) : ?>\t\n\t <div class=\"post-thumbnail\">\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $post->ID ) ?>\" title=\"<?php printf( __( 'Permalink to %s', 'sptheme' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\">\n\t\t\t\t\t<img src=\"<?php echo sp_post_image('sp-small') ?>\" width=\"110\" height=\"83\" />\n </a>\n\t\t\t\t</div><!-- post-thumbnail /-->\n <?php endif; ?> \n \n\t\t\t\t<h3><a href=\"<?php echo get_permalink( $post->ID ) ?>\" title=\"<?php echo the_title(); ?>\"><?php echo the_title(); ?></a></h3>\n\t\t\t\t<?php //sp_get_score(); ?> <div class=\"entry-meta\"><?php echo sp_posted_on(); ?></div>\n \n\t\t\t</li>\n\t<?php \n\t\t}\n\t}\n\t$post = $orig_post;\n}", "function wp_cache_set_posts_last_changed()\n {\n }", "private function get_newest_post() {\n\t\t// If set in the admin get the top story.\n\t\t$newest_post = get_option( 'current-top-story' );\n\t\t$title = '' !== $newest_post ? sanitize_text_field( wp_unslash( $newest_post ) ) : '';\n\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t's' => $title,\n\t\t);\n\n\t\t$post_array = wp_get_recent_posts( $args, OBJECT );\n\n\t\treturn $post_array[0];\n\t}", "function accouk_homepage_latest_posts() {\n\n $args = array('post_type' => 'post', 'category_name' => 'blog', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC');\n $query = new WP_Query( $args );\n\n if ( $query->have_posts() ) {\n\n echo '<ul class=\"post-list homepage-post-list\">';\n\n \twhile ( $query->have_posts() ) {\n \t\t$query->the_post(); ?>\n\n <li>\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php the_title(); ?>\">\n <div class=\"main-tile-part\">\n <?php echo accouk_post_tile_image(); ?>\n <span><h3><?php the_title(); ?></h3></span>\n </div>\n <div class=\"sub-tile-part\">\n <span class=\"excerpt\"><?php the_excerpt(); ?></span>\n <span class=\"date\"><?php echo get_the_date(); ?></span>\n <span class=\"cta\">Read Now</span>\n </div>\n </a>\n </li>\n <?php\n \t}\n\n \techo '</ul>';\n\n } else {\n \techo \"<p>Sorry, an error has occurred</p>\";\n }\n\n}", "public function __construct()\n {\n $widget_ops = array(\n 'classname' => 'widget_popular_entries',\n 'description' => esc_html__('Most Recent or Popular Posts with Images, Date and Excerpt', 'mwt'),\n );\n parent::__construct(false, esc_html__('Theme - Posts', 'mwt'), $widget_ops);\n }", "public function limit_post_revisions() {\n\t}", "public function latest() {\n $posts = $this->paginate('Post', array('published' => true));\n if ($this->request->is('requested')) {\n return $posts;\n }\n }", "private function getNewest($count = 5) {\n return Posts::where('status', 'public')->orderBy('id', 'desc')->take($count)->get();\n }", "function widget_sideline_recent_posts($args, $number = 1) {\n extract($args);\n\t$options = get_option(\"widget_sideline_recent_posts\");\n $showcount = $options[$number]['ShowCount'] ? '1' : '0';\n $numposts = empty($options[$number]['NumPosts']) ? __('5') : $options[$number]['NumPosts'];\n\t$title = empty($options[$number]['Title']) ? __('Recent Reads') : $options[$number]['Title'];\n\t$cat = (int) $options[$number]['Category'];\n?>\n\n\t<?php echo $before_widget; ?>\n\t <?php echo $before_title . $title . $after_title;\t?>\n\t<ul>\n\t\t<?php query_posts(\"cat=$cat&showposts=$numposts\"); ?>\n\t\t<?php if (have_posts()) : while (have_posts()) : the_post(); ?>\n\t\t<li><a href=\"<?php the_permalink() ?>\"><?php the_title() ?></a> <?php if ($showcount) echo '<span>' . comments_number('0', '1', '%') . '</span>' ?></li>\n\t\t<?php endwhile; endif; ?>\n\t</ul>\n<?php\n echo $after_widget;\n}", "function Warrior_Recent_Post_By_Category_2() {\n\t\t$widget_ops = array( 'classname' => 'type-2', 'description' => esc_html__('Display recent post by category widget type - 2', 'newmagz') );\n\t\t$control_ops = array( 'id_base' => 'warrior_recent_post_by_category_2' );\n\n\t\tparent::__construct( 'warrior_recent_post_by_category_2', esc_html__('Warrior Recent Post by Category - Type 2', 'newmagz'), $widget_ops, $control_ops );\n\t}", "public function userCanAddMorePosts() {\n $userSubscriptionData = $this->Auth->user('Subscription');\n $Plan = ClassRegistry::init(\"Plan\");\n \n // napravi mnozinu od naziva modela\n $postType = strtolower(Inflector::pluralize($this->modelClass));\n \n $subscribedCountPerMonth = $Plan->numberOfPostTypeToPublish($userSubscriptionData['plans_id'], $postType);\n $publishedForLastSubscribePeriod = $this->{$this->modelClass}->publishedByLocationIdLastMonth($this->userLocation, $userSubscriptionData['start_date']);\n $now = date(\"Y-m-d H:i:s\");\n \n \n \n if ($now > $userSubscriptionData['end_date']) {\n return $this->redirect(array('controller' => 'subscriptions', 'action' => 'expired'));\n } \n else if ($this->{$this->modelClass}->canPostMore ($subscribedCountPerMonth['Plan'][\"{$postType}_quantity\"], $publishedForLastSubscribePeriod)) {\n return $this->redirect(array('controller' => 'subscriptions', 'action' => 'used'));\n }\n }", "function set_global_live_article_publish_limit () {\n\tif ( current_user_can('basic_user') ) {\n\t\t\t$GLOBALS['live_article_limit'] = 3;\n\t\t}\n\t\telse if ( current_user_can('have_pro_user_features') ) {\t\t// have_pro_user_features is for pro_user and administrator role.\n\t\t\t$GLOBALS['live_article_limit'] = 20;\n\t\t}\n}", "public function addActionPosts(){}", "public function getLastPosts() {\n $repository = $this->entityManager->getRepository(\"DUT\\\\Models\\\\Post\");\n return $repository->findBy([], [\"idPost\" => \"DESC\"], 10);\n }", "function bbps_admin_setting_callback_post_count() {\n\t?>\n\t<input id=\"_bbps_enable_post_count\" name=\"_bbps_enable_post_count\" type=\"checkbox\" <?php checked( bbps_is_post_count_enabled(), 1 ); ?> value=\"1\"/>\n\t<label for=\"_bbps_enable_post_count\"><?php _e( 'Show the users post count below their gravatar?', 'bbpress' ); ?></label>\n\t<?php\n}", "public function register() {\n add_action( 'wp_ajax_latest_posts', [ $this, 'latest_posts_callback' ] );\n add_action( 'wp_ajax_nopriv_latest_posts', [ $this, 'latest_posts_callback' ] );\n }", "function _latest_posts2 ( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t?>\n\t\n\t\t\t\t\t\t\t\n\t\t<div class=\"<?php echo $element_size['sizer'];?>\">\n\t\t\t<div class=\" latest_posts style3\">\n\t\t\t\t<h3 class=\"m_title\"><?php echo $options['lp_title'];?></h3>\n\t\t\t\t<?php\n\t\t\t\t\tif ( !empty( $options['lp_blog_page'] ) ) {\n\t\t\t\t\t\techo '<a href=\"'.$options['lp_blog_page'].'\" class=\"viewall\">'. __(\"VIEW ALL\",THEMENAME).' -</a>';\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<ul class=\"posts\">\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\tglobal $post;\n\t\t\t\t\n\t\t\t\t\t// Check what categories were selected..if any \n\t\t\t\t\tif ( isset ( $options['lp_blog_categories'] ) ) {\n\t\t\t\t\t\t$blog_category = implode(',',$options['lp_blog_categories']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$blog_category = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// HOW MANY POSTS\n\t\t\t\t\tif ( isset ( $options['lp_num_posts'] ) ) {\n\t\t\t\t\t\t$num_posts = $options['lp_num_posts'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$num_posts = '2';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Start the query\n\t\t\t\t\tquery_posts( array ( 'posts_per_page' => $num_posts , 'cat' => $blog_category ) );\n\t\t\t\t\t\n\t\t\t\t\t// GET THE NUMBER OF TOTAL POSTS RETURNED\n\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t\n\t\t\t\t\t// Start the loop\n\t\t\t\t\twhile( have_posts() ){\n\n\t\t\t\t\t\tthe_post(); \n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<li class=\"post\">';\t\n\n\t\t\t\t\t\t\t$image = '';\n\t\t\t\t\t\t\t// Create the featured image html\n\t\t\t\t\t\t\tif ( has_post_thumbnail( $post->ID ) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$thumb = get_post_thumbnail_id($post->ID) ;\n\t\t\t\t\t\t\t\t$f_image = wp_get_attachment_url($thumb) ;\n\t\t\t\t\t\t\t\tif ( !empty ( $f_image ) ) {\n\t\t\t\t\t\t\t\t\t$feature_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );\n\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $f_image , 54,54 , true );\n\t\t\t\t\t\t\t\t\t$image = '<a href=\"'.get_permalink().'\" class=\"hoverBorder pull-left\"><img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"\"/></a>';\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// IMAGE\n\t\t\t\t\t\t\techo $image;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\t\techo '<h4 class=\"title\"><a href=\"'.get_permalink().'\">'.get_the_title().'</a></h4>';\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TEXT\n\t\t\t\t\t\t\techo '<div class=\"text\">';\n\t\t\t\t\t\t\t\t$excerpt = get_the_excerpt();\n\t\t\t\t\t\t\t\t$excerpt = strip_shortcodes($excerpt);\n\t\t\t\t\t\t\t\t$excerpt = strip_tags($excerpt);\n\t\t\t\t\t\t\t\t$the_str = mb_substr($excerpt, 0, 95);\n\t\t\t\t\t\t\t\techo $the_str.'...';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\techo '</li>';\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\n\t\t\t\t?>\n\n\t\t\t\t</ul>\n\t\t\t</div><!-- end // latest posts style 2 -->\n\t\t</div>\n\n\t<?php\n\t}", "public function __construct() {\n $this->posts = array();\n }", "function ciniki_blog_web_posts($ciniki, $settings, $tnid, $args, $blogtype) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuoteIDs');\n\n //\n // Load the tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n// $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n// $intl_currency = $rc['settings']['intl-default-currency'];\n\n //\n // Build the query string to get the posts\n //\n $strsql = \"SELECT ciniki_blog_posts.id, \"\n . \"ciniki_blog_posts.publish_date, \"\n . \"ciniki_blog_posts.title, \"\n . \"ciniki_blog_posts.subtitle, \"\n . \"ciniki_blog_posts.permalink, \"\n . \"ciniki_blog_posts.primary_image_id AS image_id, \"\n . \"ciniki_blog_posts.excerpt AS synopsis, \"\n . \"IF(ciniki_blog_posts.content<>'','yes','no') AS is_details \"\n// . \"categories.id AS tag_id, \"\n// . \"categories.tag_name, \"\n// . \"categories.permalink AS tag_permalink \"\n . \"\";\n\n if( isset($args['latest']) && $args['latest'] == 'yes' ) {\n $strsql .= \"FROM ciniki_blog_posts \"\n// . \"LEFT JOIN ciniki_blog_post_tags AS categories ON (\"\n// . \"ciniki_blog_posts.id = categories.post_id \"\n// . \"AND categories.tag_type = 10 \"\n// . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \") \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n $strsql_count = \"SELECT 'posts', COUNT(ciniki_blog_posts.id) AS posts \"\n . \"FROM ciniki_blog_posts \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n } elseif( isset($args['collection_id']) && $args['collection_id'] > 0 ) {\n $strsql .= \"FROM ciniki_web_collection_objrefs \"\n . \"INNER JOIN ciniki_blog_posts ON (\"\n . \"ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \") \"\n// . \"LEFT JOIN ciniki_blog_post_tags AS categories ON (\"\n// . \"ciniki_blog_posts.id = categories.post_id \"\n// . \"AND categories.tag_type = 10 \"\n// . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \") \"\n . \"WHERE ciniki_web_collection_objrefs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_web_collection_objrefs.collection_id = '\" . ciniki_core_dbQuote($ciniki, $args['collection_id']) . \"' \"\n . \"AND ciniki_web_collection_objrefs.object = 'ciniki.blog.post' \"\n . \"\";\n $strsql_count = \"SELECT 'posts', COUNT(ciniki_blog_posts.id) AS posts \"\n . \"FROM ciniki_web_collection_objrefs \"\n . \"INNER JOIN ciniki_blog_posts ON (\"\n . \"ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \") \"\n . \"WHERE ciniki_web_collection_objrefs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_web_collection_objrefs.collection_id = '\" . ciniki_core_dbQuote($ciniki, $args['collection_id']) . \"' \"\n . \"AND ciniki_web_collection_objrefs.object = 'ciniki.blog.post' \"\n . \"\";\n } elseif( isset($args['tag_type']) && $args['tag_type'] != '' && isset($args['tag_permalink']) && $args['tag_permalink'] != '' ) {\n $strsql .= \"FROM ciniki_blog_post_tags \"\n . \"LEFT JOIN ciniki_blog_posts ON (ciniki_blog_post_tags.post_id = ciniki_blog_posts.id \"\n . \"AND ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \") \"\n// . \"LEFT JOIN ciniki_blog_post_tags AS categories ON (\"\n// . \"ciniki_blog_posts.id = categories.post_id \"\n// . \"AND categories.tag_type = 10 \"\n// . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \") \"\n . \"WHERE ciniki_blog_post_tags.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_post_tags.tag_type = '\" . ciniki_core_dbQuote($ciniki, $args['tag_type']) . \"' \"\n . \"AND ciniki_blog_post_tags.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['tag_permalink']) . \"' \"\n . \"\";\n $strsql_count = \"SELECT 'posts', COUNT(ciniki_blog_posts.id) AS posts \"\n . \"FROM ciniki_blog_post_tags \"\n . \"LEFT JOIN ciniki_blog_posts ON (ciniki_blog_post_tags.post_id = ciniki_blog_posts.id \"\n . \"AND ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \") \"\n . \"WHERE ciniki_blog_post_tags.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_post_tags.tag_type = '\" . ciniki_core_dbQuote($ciniki, $args['tag_type']) . \"' \"\n . \"AND ciniki_blog_post_tags.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['tag_permalink']) . \"' \"\n . \"\";\n } elseif( isset($args['year']) && $args['year'] != '' ) {\n if( isset($args['month']) && $args['month'] != '' ) {\n // Build the start and end datetimes\n $tz = new DateTimeZone($intl_timezone);\n $start_date = new DateTime($args['year'] . '-' . $args['month'] . '-01 00.00.00', $tz);\n $end_date = clone $start_date;\n // Find the end of the month\n $end_date->add(new DateInterval('P1M'));\n } else {\n $tz = new DateTimeZone($intl_timezone);\n $start_date = new DateTime($args['year'] . '-01-01 00.00.00', $tz);\n $end_date = clone $start_date;\n // Find the end of the month\n $end_date->add(new DateInterval('P1Y'));\n }\n $start_date->setTimezone(new DateTimeZone('UTC'));\n $end_date->setTimezone(new DateTimeZone('UTC'));\n\n $strsql .= \"FROM ciniki_blog_posts \"\n// . \"LEFT JOIN ciniki_blog_post_tags AS categories ON (\"\n// . \"ciniki_blog_posts.id = categories.post_id \"\n// . \"AND categories.tag_type = 10 \"\n// . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \") \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date >= '\" . $start_date->format('Y-m-d H:i:s') . \"' \"\n . \"AND ciniki_blog_posts.publish_date < '\" . $end_date->format('Y-m-d H:i:s') . \"' \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n $strsql_count = \"SELECT 'posts', COUNT(ciniki_blog_posts.id) AS posts \"\n . \"FROM ciniki_blog_posts \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date >= '\" . $start_date->format('Y-m-d H:i:s') . \"' \"\n . \"AND ciniki_blog_posts.publish_date < '\" . $end_date->format('Y-m-d H:i:s') . \"' \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n } else {\n $strsql .= \"FROM ciniki_blog_posts \"\n// . \"LEFT JOIN ciniki_blog_post_tags AS categories ON (\"\n// . \"ciniki_blog_posts.id = categories.post_id \"\n// . \"AND categories.tag_type = 10 \"\n// . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \") \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n $strsql_count = \"SELECT 'posts', COUNT(ciniki_blog_posts.id) AS posts \"\n . \"FROM ciniki_blog_posts \"\n . \"WHERE ciniki_blog_posts.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_blog_posts.status = 40 \"\n . \"AND ciniki_blog_posts.publish_date < UTC_TIMESTAMP() \"\n . \"\";\n }\n\n if( $blogtype == 'memberblog' ) {\n $strsql .= \"AND (ciniki_blog_posts.publish_to&0x04) > 0 \";\n $strsql_count .= \"AND (ciniki_blog_posts.publish_to&0x04) > 0 \";\n if( isset($settings['page-memberblog-num-past-months']) && $settings['page-memberblog-num-past-months'] > 0 \n && (!isset($args['year']) && !isset($args['month'])) \n ) {\n $dt = new DateTime('now', new DateTimezone('UTC'));\n $dt->sub(new DateInterval('P' . preg_replace('/[^0-9]/', '', $settings['page-memberblog-num-past-months']) . 'M'));\n $strsql .= \"AND ciniki_blog_posts.publish_date > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \";\n $strsql_count .= \"AND ciniki_blog_posts.publish_date > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \";\n }\n } else {\n $strsql .= \"AND (ciniki_blog_posts.publish_to&0x01) > 0 \";\n $strsql_count .= \"AND (ciniki_blog_posts.publish_to&0x01) > 0 \";\n if( isset($settings['page-blog-num-past-months']) && $settings['page-blog-num-past-months'] > 0 \n && (!isset($args['year']) && !isset($args['month'])) \n ) {\n $dt = new DateTime('now', new DateTimezone('UTC'));\n $dt->sub(new DateInterval('P' . preg_replace('/[^0-9]/', '', $settings['page-blog-num-past-months']) . 'M'));\n $strsql .= \"AND ciniki_blog_posts.publish_date > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \";\n $strsql_count .= \"AND ciniki_blog_posts.publish_date > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \";\n }\n }\n\n if( isset($args['year']) && $args['year'] != '' ) {\n $strsql .= \"ORDER BY ciniki_blog_posts.publish_date ASC, ciniki_blog_posts.id \";\n } else {\n $strsql .= \"ORDER BY ciniki_blog_posts.publish_date DESC, ciniki_blog_posts.id \";\n }\n if( isset($args['offset']) && $args['offset'] > 0 && $args['offset'] < 1000000000\n && isset($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . intval($args['offset']) . ', ' . intval($args['limit']);\n } elseif( isset($args['limit']) && $args['limit'] > 0 && $args['limit'] < 1000000000 ) {\n $strsql .= \"LIMIT \" . intval($args['limit']);\n }\n \n //\n // Get the number of posts to be used for navigation\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbCount');\n $rc = ciniki_core_dbCount($ciniki, $strsql_count, 'ciniki.blog', 'num');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['num']['posts']) ) {\n $num_posts = $rc['num']['posts'];\n } else {\n $num_posts = 0;\n }\n\n //\n // Get the list of posts, sorted by publish_date for use in the web CI List Categories\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.blog', array(\n array('container'=>'posts', 'fname'=>'id',\n 'fields'=>array('id', 'title', 'subtitle', 'permalink', 'image_id', 'synopsis', 'is_details', 'publish_date'),\n 'utctotz'=>array('publish_date'=>array('timezone'=>$intl_timezone, 'format'=>'M j, Y')),\n ),\n// array('container'=>'categories', 'fname'=>'tag_id', \n// 'fields'=>array('name'=>'tag_name', 'permalink'=>'tag_permalink')),\n )); \n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['posts']) ) {\n $posts = $rc['posts'];\n } else {\n $posts = array();\n }\n\n //\n // Get the categories for each post\n //\n $ids = array_keys($posts);\n if( count($ids) > 0 ) {\n $strsql = \"SELECT categories.post_id, \"\n . \"categories.id, \"\n . \"categories.tag_name, \"\n . \"categories.permalink AS tag_permalink \"\n . \"FROM ciniki_blog_post_tags AS categories \"\n . \"WHERE post_id IN (\" . ciniki_core_dbQuoteIDs($ciniki, $ids) . \") \"\n . \"AND categories.tag_type = 10 \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"ORDER BY post_id \"\n . \"\";\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.blog', array(\n array('container'=>'posts', 'fname'=>'post_id', 'fields'=>array('id'=>'post_id')),\n array('container'=>'categories', 'fname'=>'id', 'fields'=>array('name'=>'tag_name', 'permalink'=>'tag_permalink')),\n )); \n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['posts']) ) {\n foreach($rc['posts'] as $post) {\n if( isset($posts[$post['id']]) ) {\n $posts[$post['id']]['categories'] = $post['categories'];\n }\n }\n }\n }\n\n return array('stat'=>'ok', 'posts'=>$posts, 'total_num_posts'=>$num_posts);\n}", "function _latest_posts( $options )\n\t{\n\t?>\n\t\n\t\t\t\t\t<div class=\"span12\">\n\t\t\t\t\t\t<div class=\"latest_posts acc-style\">\n\t\t\t\t\t\t\t<h3 class=\"m_title\"><?php echo $options['lp_title'];?></h3>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( !empty( $options['lp_blog_page'] ) ) {\n\t\t\t\t\t\t\t\techo '<a href=\"'.$options['lp_blog_page'].'\" class=\"viewall\">'. __(\"VIEW ALL\",THEMENAME).' -</a>';\n\t\t\t\t\t\t\t}\n\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<div class=\"css3accordion\">\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\tglobal $post;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Check what categories were selected..if any \n\t\t\t\t\t\t\t\t\tif ( isset ( $options['lp_blog_categories'] ) ) {\n\t\t\t\t\t\t\t\t\t\t$blog_category = implode(',',$options['lp_blog_categories']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$blog_category = '';\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\t// Start the query\n\t\t\t\t\t\t\t\t\tquery_posts( array ( 'posts_per_page' => 3 , 'cat' => $blog_category ) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// GET THE NUMBER OF TOTAL POSTS RETURNED\n\t\t\t\t\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t\t\t\t\t$num_posts = $wp_query->post_count;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\t\t\t$cls = '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Start the loop\n\t\t\t\t\t\t\t\t\twhile( have_posts() ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tthe_post(); \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( $i == $num_posts ) {\n\t\t\t\t\t\t\t\t\t\t\t$cls = 'class=\"last\"';\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\techo '<li '.$cls.'>';\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=\"inner-acc\">';\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$image = '';\n\t\t\t\t\t\t\t\t\t\t\t\t// Create the featured image html\n\t\t\t\t\t\t\t\t\t\t\t\tif ( has_post_thumbnail( $post->ID ) ) {\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$thumb = get_post_thumbnail_id($post->ID) ;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$f_image = wp_get_attachment_url($thumb) ;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $f_image ) ) {\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$feature_image = wp_get_attachment_url( $thumb );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $f_image , 370,200 , true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = '<a href=\"'.get_permalink().'\" class=\"thumb hoverBorder plus\"><img class=\"shadow\" src=\"'.$image['url'].'\" alt=\"\"/></a>';\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\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}\n\t\t\t\t\t\t\t\t\t\t\t\techo $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=\"content\">';\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 '<em>'.get_the_time('d F Y').' '.__(\"by\",THEMENAME).' '.get_the_author().', '.__(\"in\",THEMENAME).' ';\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$all_cats = count(get_the_category());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$z = 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach((get_the_category()) as $category) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $category->cat_name;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( $all_cats != $z ) { echo ','; }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$z++;\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\techo '</em>';\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\techo '<h5 class=\"m_title\"><a href=\"'.get_permalink().'\">'.get_the_title().'</a></h5>';\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// TEXT\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"text\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$excerpt = get_the_excerpt();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$excerpt = strip_shortcodes($excerpt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$excerpt = strip_tags($excerpt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$the_str = mb_substr($excerpt, 0, 80);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $the_str.'...';\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\techo '</div>';\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\techo '<a href=\"'.get_permalink().'\">'.__(\"READ MORE\",THEMENAME).' +</a>';\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\techo '</div>';\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>';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '</li>';\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\twp_reset_query();\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div><!-- end CSS3 Accordion -->\n\t\t\t\t\t\t</div><!-- end acc-style -->\n\t\t\t\t\t</div>\n\t\n\t<?php\n\t}", "function RecentPosts()\n{\n\tglobal $txt, $scripturl, $db_prefix, $user_info, $context, $ID_MEMBER, $modSettings, $sourcedir;\n\n\t// They're deleting something... just skip back to it.\n\tif (isset($_GET['delete']))\n\t{\n\t\t// Luckily, removeMessage() checks permissions for us.\n\t\trequire_once($sourcedir . '/RemoveTopic.php');\n\t\tremoveMessage((int) $_GET['delete']);\n\n\t\tredirectexit('action=recent');\n\t}\n\n\tloadTemplate('Recent');\n\t$context['page_title'] = $txt[214];\n\n\t// Find the 10 most recent messages they can *view*.\n\t$request = db_query(\"\n\t\tSELECT m.ID_MSG\n\t\tFROM {$db_prefix}messages AS m, {$db_prefix}boards AS b\n\t\tWHERE b.ID_BOARD = m.ID_BOARD\" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? \"\n\t\t\tAND b.ID_BOARD != $modSettings[recycle_board]\" : '') . \"\n\t\t\tAND $user_info[query_see_board]\n\t\tORDER BY m.ID_MSG DESC\n\t\tLIMIT 10\", __FILE__, __LINE__);\n\t$messages = array();\n\twhile ($row = mysql_fetch_assoc($request))\n\t\t$messages[] = $row['ID_MSG'];\n\tmysql_free_result($request);\n\n\tif (empty($messages))\n\t{\n\t\t$context['posts'] = array();\n\t\treturn;\n\t}\n\n\t// Get all the most recent posts.\n\t$request = db_query(\"\n\t\tSELECT\n\t\t\tm.ID_MSG, m.subject, m.smileysEnabled, m.posterTime, m.body, m.ID_TOPIC, t.ID_BOARD, b.ID_CAT,\n\t\t\tb.name AS bname, c.name AS cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER,\n\t\t\tIFNULL(mem2.realName, m2.posterName) AS firstPosterName, t.ID_FIRST_MSG,\n\t\t\tIFNULL(mem.realName, m.posterName) AS posterName, t.ID_LAST_MSG\n\t\tFROM {$db_prefix}messages AS m, {$db_prefix}messages AS m2, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c\n\t\t\tLEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)\n\t\t\tLEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = m2.ID_MEMBER)\n\t\tWHERE m2.ID_MSG = t.ID_FIRST_MSG\n\t\t\tAND t.ID_TOPIC = m.ID_TOPIC\n\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\tAND c.ID_CAT = b.ID_CAT\n\t\t\tAND m.ID_MSG IN (\" . implode(', ', $messages) . \")\n\t\tORDER BY m.ID_MSG DESC\n\t\tLIMIT 0, 10\", __FILE__, __LINE__);\n\t$counter = 1;\n\t$context['posts'] = array();\n\t$board_ids = array('own' => array(), 'any' => array());\n\twhile ($row = mysql_fetch_assoc($request))\n\t{\n\t\t// Censor everything.\n\t\tcensorText($row['body']);\n\t\tcensorText($row['subject']);\n\n\t\t// BBC-atize the message.\n\t\t$row['body'] = doUBBC($row['body'], $row['smileysEnabled']);\n\n\t\t// And build the array.\n\t\t$context['posts'][$row['ID_MSG']] = array(\n\t\t\t'id' => $row['ID_MSG'],\n\t\t\t'counter' => $counter++,\n\t\t\t'category' => array(\n\t\t\t\t'id' => $row['ID_CAT'],\n\t\t\t\t'name' => $row['cname'],\n\t\t\t\t'href' => $scripturl . '#' . $row['ID_CAT'],\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '#' . $row['ID_CAT'] . '\">' . $row['cname'] . '</a>'\n\t\t\t),\n\t\t\t'board' => array(\n\t\t\t\t'id' => $row['ID_BOARD'],\n\t\t\t\t'name' => $row['bname'],\n\t\t\t\t'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0\">' . $row['bname'] . '</a>'\n\t\t\t),\n\t\t\t'topic' => $row['ID_TOPIC'],\n\t\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'],\n\t\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '\">' . $row['subject'] . '</a>',\n\t\t\t'start' => $row['numReplies'],\n\t\t\t'subject' => $row['subject'],\n\t\t\t'time' => timeformat($row['posterTime']),\n\t\t\t'timestamp' => $row['posterTime'],\n\t\t\t'first_poster' => array(\n\t\t\t\t'id' => $row['ID_FIRST_MEMBER'],\n\t\t\t\t'name' => $row['firstPosterName'],\n\t\t\t\t'href' => empty($row['ID_FIRST_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],\n\t\t\t\t'link' => empty($row['ID_FIRST_MEMBER']) ? $row['firstPosterName'] : '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '\">' . $row['firstPosterName'] . '</a>'\n\t\t\t),\n\t\t\t'poster' => array(\n\t\t\t\t'id' => $row['ID_MEMBER'],\n\t\t\t\t'name' => $row['posterName'],\n\t\t\t\t'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],\n\t\t\t\t'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '\">' . $row['posterName'] . '</a>'\n\t\t\t),\n\t\t\t'message' => $row['body'],\n\t\t\t'can_reply' => false,\n\t\t\t'can_mark_notify' => false,\n\t\t\t'can_delete' => false,\n\t\t\t'delete_possible' => $row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG']\n\t\t);\n\n\t\tif ($ID_MEMBER == $row['ID_FIRST_MEMBER'])\n\t\t\t$board_ids['own'][$row['ID_BOARD']][] = $row['ID_MSG'];\n\t\t$board_ids['any'][$row['ID_BOARD']][] = $row['ID_MSG'];\n\t}\n\tmysql_free_result($request);\n\n\t// There might be - and are - different permissions between any and own.\n\t$permissions = array(\n\t\t'own' => array(\n\t\t\t'post_reply_own' => 'can_reply',\n\t\t\t'remove_own' => 'can_delete',\n\t\t),\n\t\t'any' => array(\n\t\t\t'post_reply_any' => 'can_reply',\n\t\t\t'mark_any_notify' => 'can_mark_notify',\n\t\t\t'remove_any' => 'can_delete',\n\t\t)\n\t);\n\n\t// Now go through all the permissions, looking for boards they can do it on.\n\tforeach ($permissions as $type => $list)\n\t\tforeach ($list as $permission => $allowed)\n\t\t{\n\t\t\t// They can do it on these boards...\n\t\t\t$boards = boardsAllowedTo($permission);\n\n\t\t\t// If 0 is the only thing in the array, they can do it everywhere!\n\t\t\tif (!empty($boards) && $boards[0] == 0)\n\t\t\t\t$boards = array_keys($board_ids[$type]);\n\n\t\t\t// Go through the boards, and look for posts they can do this on.\n\t\t\tforeach ($boards as $board_id)\n\t\t\t{\n\t\t\t\t// Hmm, they have permission, but there are no topics from that board on this page.\n\t\t\t\tif (!isset($board_ids[$type][$board_id]))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Okay, looks like they can do it for these posts.\n\t\t\t\tforeach ($board_ids[$type][$board_id] as $counter)\n\t\t\t\t\t$context['posts'][$counter][$allowed] = true;\n\t\t\t}\n\t\t}\n\n\t// Some posts - the first posts - can't just be deleted.\n\tforeach ($context['posts'] as $counter => $dummy)\n\t\t$context['posts'][$counter]['can_delete'] &= $context['posts'][$counter]['delete_possible'];\n}", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function sr_admin_actions() { \n\tadd_options_page(\"Standards Reader\", \"Standards Reader\", \"edit_published_posts\", \"sr_options\", \"sr_admin\");\n}", "protected function getPosts($limit = null)\n {\n $posts = $this->post->published()->latest()->take($limit)->get();\n\n foreach ($posts as $post)\n {\n Sitemap::addTag(\n route('posts.show', $post->slug),\n $post->updated_at,\n 'daily',\n '0.9'\n );\n }\n }", "function _latest_posts3 ( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t?>\n\t\n\t\t\t\t\t\t\t\n\t\t<div class=\"<?php echo $element_size['sizer'];?>\">\n\t\t\t<div class=\" latest_posts style2\">\n\t\t\t\t<h3 class=\"m_title\"><?php echo $options['lp_title'];?></h3>\n\t\t\t\t<?php\n\t\t\t\t\tif ( !empty( $options['lp_blog_page'] ) ) {\n\t\t\t\t\t\techo '<a href=\"'.$options['lp_blog_page'].'\" class=\"viewall\">'. __(\"VIEW ALL\",THEMENAME).' -</a>';\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<ul class=\"posts\">\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\tglobal $post;\n\t\t\t\t\n\t\t\t\t\t// Check what categories were selected..if any \n\t\t\t\t\tif ( isset ( $options['lp_blog_categories'] ) ) {\n\t\t\t\t\t\t$blog_category = implode(',',$options['lp_blog_categories']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$blog_category = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// HOW MANY POSTS\n\t\t\t\t\tif ( isset ( $options['lp_num_posts'] ) ) {\n\t\t\t\t\t\t$num_posts = $options['lp_num_posts'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$num_posts = '2';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Start the query\n\t\t\t\t\tquery_posts( array ( 'posts_per_page' => $num_posts , 'cat' => $blog_category ) );\n\t\t\t\t\t\n\t\t\t\t\t// GET THE NUMBER OF TOTAL POSTS RETURNED\n\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t\n\t\t\t\t\t// Start the loop\n\t\t\t\t\twhile( have_posts() ){\n\n\t\t\t\t\t\tthe_post(); \n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<li class=\"post\">';\t\n\n\t\t\t\t\t\t\techo '<div class=\"details\">';\n\t\t\t\t\t\t\techo '<span class=\"date\">';\n\t\t\t\t\t\t\t\tthe_time('d/m/Y');\n\t\t\t\t\t\t\techo '</span>';\n\t\t\t\t\t\t\techo '<span class=\"cat\">'.__( 'in ', THEMENAME );\n\t\t\t\t\t\t\t\tthe_category(\", \");\n\t\t\t\t\t\t\techo '</span>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TITLE\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<h4 class=\"title\"><a href=\"'.get_permalink().'\">'.get_the_title().'</a></h4>';\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TEXT\n\t\t\t\t\t\t\techo '<div class=\"text\">';\n\t\t\t\t\t\t\t\t$excerpt = get_the_excerpt();\n\t\t\t\t\t\t\t\t$excerpt = strip_shortcodes($excerpt);\n\t\t\t\t\t\t\t\t$excerpt = strip_tags($excerpt);\n\t\t\t\t\t\t\t\t$the_str = mb_substr($excerpt, 0, 350);\n\t\t\t\t\t\t\t\techo $the_str.'...';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\techo '</li>';\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\n\t\t\t\t?>\n\n\t\t\t\t</ul>\n\t\t\t</div><!-- end // latest posts style 2 -->\n\t\t</div>\n\n\t<?php\n\t}", "function _latest_posts3 ( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t?>\n\t\n\t\t\t\t\t\t\t\n\t\t<div class=\"<?php echo $element_size['sizer'];?>\">\n\t\t\t<div class=\" latest_posts style2\">\n\t\t\t\t<h3 class=\"m_title\"><?php echo $options['lp_title'];?></h3>\n\t\t\t\t<?php\n\t\t\t\t\tif ( !empty( $options['lp_blog_page'] ) ) {\n\t\t\t\t\t\techo '<a href=\"'.$options['lp_blog_page'].'\" class=\"viewall\">'. __(\"VIEW ALL\",THEMENAME).' -</a>';\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<ul class=\"posts\">\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\tglobal $post;\n\t\t\t\t\n\t\t\t\t\t// Check what categories were selected..if any \n\t\t\t\t\tif ( isset ( $options['lp_blog_categories'] ) ) {\n\t\t\t\t\t\t$blog_category = implode(',',$options['lp_blog_categories']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$blog_category = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// HOW MANY POSTS\n\t\t\t\t\tif ( isset ( $options['lp_num_posts'] ) ) {\n\t\t\t\t\t\t$num_posts = $options['lp_num_posts'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$num_posts = '2';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Start the query\n\t\t\t\t\tquery_posts( array ( 'posts_per_page' => $num_posts , 'cat' => $blog_category ) );\n\t\t\t\t\t\n\t\t\t\t\t// GET THE NUMBER OF TOTAL POSTS RETURNED\n\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t\n\t\t\t\t\t// Start the loop\n\t\t\t\t\twhile( have_posts() ){\n\n\t\t\t\t\t\tthe_post(); \n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<li class=\"post\">';\t\n\n\t\t\t\t\t\t\techo '<div class=\"details\">';\n\t\t\t\t\t\t\techo '<span class=\"date\">';\n\t\t\t\t\t\t\t\tthe_time('d/m/Y');\n\t\t\t\t\t\t\techo '</span>';\n\t\t\t\t\t\t\techo '<span class=\"cat\">'.__( 'in ', THEMENAME );\n\t\t\t\t\t\t\t\tthe_category(\", \");\n\t\t\t\t\t\t\techo '</span>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TITLE\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<h4 class=\"title\"><a href=\"'.get_permalink().'\">'.get_the_title().'</a></h4>';\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TEXT\n\t\t\t\t\t\t\techo '<div class=\"text\">';\n\t\t\t\t\t\t\t\t$excerpt = get_the_excerpt();\n\t\t\t\t\t\t\t\t$excerpt = strip_shortcodes($excerpt);\n\t\t\t\t\t\t\t\t$excerpt = strip_tags($excerpt);\n\t\t\t\t\t\t\t\t$the_str = mb_substr($excerpt, 0, 350);\n\t\t\t\t\t\t\t\techo $the_str.'...';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\techo '</li>';\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\n\t\t\t\t?>\n\n\t\t\t\t</ul>\n\t\t\t</div><!-- end // latest posts style 2 -->\n\t\t</div>\n\n\t<?php\n\t}", "function cmb2_get_your_post_type_post_options() {\n return cmb2_get_post_options( array( 'post_type' => 'page', 'numberposts' => 5 ) );\n}", "function jb_register_settings() {\n\tregister_setting( JB_SETTINGS_FIELD, JB_SETTINGS_FIELD );\n\tadd_option( JB_SETTINGS_FIELD , jb_option_defaults() );\n\tadd_settings_section('jb_main','Main Settings', 'jb_main_section_text', JB_SETTINGS_FIELD );\n\tadd_settings_field('jb_featured_cat', 'Featured Category', 'jb_featured_cat_slug_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_featured_content_limit', 'Homepage Featured Post Word Count Limit', 'jb_featured_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_post_content_limit', 'Post Word Count Limit', 'jb_post_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n}", "function get_top_posts( $number = 10, $days = 2 ) {\n _deprecated_function( __FUNCTION__, '2.0.0', 'wpcom_vip_top_posts_array' );\n\n return array();\n}", "public function get_name()\n {\n return 'uap-recent-posts';\n }", "public function save_nav_menus_created_posts($setting)\n {\n }", "function form($instance) {\n\t\n\t // Set any uninitialized args to default values\n $instance = wp_parse_args( (array) $instance, array( 'widget_title' => 'Recent Posts',\n 'recent_number' => 5,\n 'include_author' => true,\n 'recent_title' => 'Untitled Post' ) );\n \n # Get current values or set to defaults \n\t\t$widget_title = esc_attr($instance['widget_title']);\n\t\t$recent_number = absint($instance['recent_number']);\n $include_author = (bool) $instance['include_author'];\t\n $recent_title = esc_attr($instance['recent_title']);\t\n\t\t\n\t\t\n\t\t\n\t\t# Widget Title\n\t\t$output_title = \"<p style='text-align:left'>\";\n $output_title .= '<label for=\"' . $this->get_field_name('widget_title') . '\">' . __('Widget Title: ');\t\t\n\t\t$output_title .= \"<input id='{$this->get_field_id('widget_title')}' name='{$this->get_field_name('widget_title')}'\";\n\t $output_title .= \"type='text' value='{$widget_title}' />\";\n\t $output_title .= \"</label></p>\";\n\t\t\n\t\t\n\t\t# Widget Title\n\t\t$output_name = \"<p style='text-align:left'>\";\n $output_name .= '<label for=\"' . $this->get_field_name('recent_title') . '\">' . __('Default Post Title: ');\t\t\n\t\t$output_name .= \"<input id='{$this->get_field_id('recent_title')}' name='{$this->get_field_name('recent_title')}'\";\n\t $output_name .= \"type='text' value='{$recent_title}' />\";\n\t $output_name .= \"</label></p>\";\t\t\n\t\t\n\t\t# Number of posts to list\n // dropdown: number of blogs to display at one time\n $output_number = '<p style=\"text-align:left;\">';\n $output_number .= '<label for=\"' . $this->get_field_name('recent_number') . '\">' . __('Number of posts to display: ');\n $output_number .= '<select id=\"' . $this->get_field_id('recent_number') . \n '\" name=\"' . $this->get_field_name('recent_number') . '\"> ';\n for( $i = 1; $i <=10; ++$i ){\n $selected = ($recent_number == $i ? ' selected=\"selected\"' : '' );\n $output_number .= '<option value=\"' . $i . '\"' . $selected . '>' . $i . '</option>';\n }\t\t\n $output_number .= '</label></select></p>';\t\n\t\t\n\t\t\n # Include Author\n $output_include_author = '<p style=\"text-align:left;\">'; \n $output_include_author .= '<label for=\"' . $this->get_field_id('include_author') . '\">' . __('Include Author? ');\n $output_include_author .= '<input type=\"checkbox\" id=\"' . $this->get_field_id('include_author') . \n '\" name=\"' . $this->get_field_name('include_author') . '\"';\n if( $include_author ){\n $output_include_author .= ' checked=\"checked\" ';\n }\n $output_include_author .= '/>';\n $output_number .= '</label></p>';\t\n \n \t\t\n\n echo $output_title;\n echo $output_name;\n echo $output_number;\n echo $output_include_author;\n\t\n\t}", "public static function recent($max=10) \n {\n $sql = <<<END_SQL\n select users.user_id, users.first_name, users.last_name, posts.created, posts.text\n from posts\n inner join users on posts.user_id = users.user_id\n order by posts.created desc\n limit $max\nEND_SQL;\n $posts = DB::instance(DB_NAME)->select_rows($sql, \"object\");\n return $posts;\n }", "function phpbb_fetch_new_posts()\n{\n\tglobal $userdata;\n\n\t$result['total'] = 0;\n\n\tif ($userdata['session_logged_in'])\n\t{\n\t\t$sql = 'SELECT COUNT(post_id) AS total\n\t\t\t\t\tFROM ' . POSTS_TABLE . '\n\t\t\t\t\tWHERE post_time >= ' . $userdata['user_lastvisit'];\n\n\t\t$result = phpbb_fetch_row($sql);\n\t}\n\n\treturn $result;\n}", "function torch_tabs_latest_posts( $instance ) \r\n{\r\n\textract( $instance );\r\n\t$the_query = new WP_Query('showposts='. $recent_num .'&orderby=post_date&order=desc');\r\n\t\r\n\twhile ($the_query->have_posts()) : $the_query->the_post(); \r\n\t?>\r\n\t<li>\r\n <?php \r\n if ( has_post_thumbnail() ) {\r\n the_post_thumbnail(\"side-slider\");\r\n } \r\n ?>\r\n <div class=\"tab-inner-box\">\r\n <div><a title=\"<?php the_title(); ?>\" href=\"<?php the_permalink() ?>\"><?php the_title(); ?></a></div>\r\n <div><i class=\"fa fa-comments\"></i>&nbsp;&nbsp;<?php the_date(\"M d.Y\")?></div>\r\n </div>\r\n\t\t <div class=\"clear\"></div>\r\n </li>\r\n\t<?php\r\n\tendwhile; \r\n\twp_reset_postdata() ;\r\n}", "function form( $instance )\r\n {\r\n $instance = wp_parse_args( (array) $instance, array(\r\n 'title' => esc_html__( 'Recent Posts', 'fastway' ),\r\n 'number' => 4,\r\n ) );\r\n\r\n $title = $instance['title'] ? esc_attr( $instance['title'] ) : esc_html__( 'Recent Posts', 'fastway' );\r\n $number = absint( $instance['number'] );\r\n $post_in = isset($instance['post_in']) ? esc_attr($instance['post_in']) : '';\r\n $layout = isset($instance['layout']) ? esc_attr($instance['layout']) : '1';\r\n\r\n ?>\r\n <p>\r\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php esc_html_e( 'Title:', 'fastway' ); ?></label>\r\n <input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\r\n </p>\r\n\r\n <p><label for=\"<?php echo esc_url($this->get_field_id('post_in')); ?>\"><?php esc_html_e( 'Post in', 'fastway' ); ?></label>\r\n <select class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id('post_in') ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name('post_in') ); ?>\">\r\n <option value=\"recent\"<?php if( $post_in == 'recent' ){ echo 'selected=\"selected\"';} ?>><?php esc_html_e('Recent', 'fastway'); ?></option>\r\n <option value=\"featured\"<?php if( $post_in == 'featured' ){ echo 'selected=\"selected\"';} ?>><?php esc_html_e('Featured', 'fastway'); ?></option>\r\n </select>\r\n </p>\r\n <p><label for=\"<?php echo esc_url($this->get_field_id('layout')); ?>\"><?php esc_html_e( 'Layout', 'fastway' ); ?></label>\r\n <select class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id('layout') ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name('layout') ); ?>\">\r\n <option value=\"1\"<?php if( $layout == '1' ){ echo 'selected=\"selected\"';} ?>><?php esc_html_e('Default', 'fastway'); ?></option>\r\n <option value=\"2\"<?php if( $layout == '2' ){ echo 'selected=\"selected\"';} ?>><?php esc_html_e('Layout 2', 'fastway'); ?></option>\r\n </select>\r\n </p>\r\n\r\n <p>\r\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>\"><?php esc_html_e( 'Number of posts to show:', 'fastway' ); ?></label>\r\n <input class=\"tiny-text\" id=\"<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>\" type=\"number\" step=\"1\" min=\"1\" value=\"<?php echo esc_attr( $number ); ?>\" size=\"3\" />\r\n </p>\r\n\r\n <?php\r\n }", "public function recent()\n {\n $this->options['WHERE'] = 'created_at >= ADDDATE( NOW( ) , INTERVAL -1 WEEK )';\n $this->options['ORDER BY'] = 'created_at DESC';\n return $this;\n }", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "public function register_settings(){\n\n\t\t// Register our option\n\t\tregister_setting( 'slack-post-types', 'slack-post-types', array( $this, 'sanitize' ) );\n\n\t\t// Add post post-type as default\n\t\tadd_option( 'slack-post-types', array( 'post' => 1 ) );\n\t}", "function bs_configure_posts_per_page($args)\n{\n function bs_posts_per_page($query)\n {\n global $bs_config;\n\n if (is_admin() || !$query->is_main_query()) {\n return;\n }\n\n if (is_home() && isset($bs_config[\"posts-per-page\"][\"home\"])) {\n $query->set(\"posts_per_page\", $bs_config[\"posts-per-page\"][\"home\"]);\n return;\n }\n\n if (!$query->is_post_type_archive) {\n return;\n }\n\n $post_type = $query->get('post_type');\n if (is_array($post_type)) {\n $post_type = reset($post_type);\n }\n\n $post_type_object = get_post_type_object($post_type);\n\n if (isset($bs_config[\"posts-per-page\"][$post_type_object->name])) {\n $query->set(\"posts_per_page\", $bs_config[\"posts-per-page\"][$post_type_object->name]);\n }\n\n }\n add_action(\"pre_get_posts\", \"bs_posts_per_page\");\n}", "function themeists_likethis_most_liked_posts()\n\t\t\t{\n\t\t\n\t\t\t\t//load_plugin_textdomain( self::locale, false, plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . '/lang/' );\n\n\t\t\n\t\t\t\t$widget_opts = array (\n\n\t\t\t\t\t'classname' => 'themeists_likethis_most_liked_posts', \n\t\t\t\t\t'description' => __( 'The posts which have the most \"likes\" from people clicking on the like links.', self::locale )\n\n\t\t\t\t);\n\n\t\t\t\t$control_options = array(\n\n\t\t\t\t\t'width' => '400'\n\n\t\t\t\t);\n\n\t\t\t\t//Register the widget\n\t\t\t\t$this->WP_Widget( self::slug, __( self::name, self::locale ), $widget_opts, $control_options );\n\t\t\n\t\t \t// Load JavaScript and stylesheets\n\t\t \t$this->register_scripts_and_styles();\n\t\t\n\t\t\t}", "function torch_tabs_popular_posts($instance) \r\n{\r\n\textract( $instance );\r\n\t$popular = new WP_Query('orderby=comment_count&posts_per_page='.$popular_num);\r\n\r\n\twhile ($popular->have_posts()) : $popular->the_post();\r\n\t?>\r\n <li>\r\n <?php \r\n if ( has_post_thumbnail() ) {\r\n the_post_thumbnail(\"side-slider\");\r\n } \r\n ?>\r\n <div class=\"tab-inner-box\">\r\n <div><a title=\"<?php the_title(); ?>\" href=\"<?php the_permalink() ?>\"><?php the_title(); ?></a></div>\r\n <div><i class=\"fa fa-comments\"></i>&nbsp;&nbsp;<?php the_date(\"M d.Y\")?></div>\r\n </div>\r\n\t\t <div class=\"clear\"></div>\r\n </li>\r\n\t<?php\r\n\tendwhile; \r\n\twp_reset_postdata() ;\r\n}", "function widget_tptn_pop($args) {\t\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\r\n\textract($args); // extracts before_widget,before_title,after_title,after_widget\r\n\r\n\t$tptn_settings = tptn_read_options();\r\n\t$title = (($tptn_settings['title']) ? strip_tags($tptn_settings['title']) : __('Popular Posts',TPTN_LOCAL_NAME));\r\n\t\r\n\techo $before_widget;\r\n\techo $before_title.$title.$after_title;\r\n\techo tptn_pop_posts(false,true);\r\n\techo $after_widget;\r\n}", "function kulam_acf_add_local_field_group_top_posts() {\n\n\t/**\n\t * Variables\n\t */\n\t$default_post_types\t\t= get_field( 'acf-option_category_page_post_types', 'option' );\n\t$default_post_types_ids\t= [];\n\n\tif ( ! $default_post_types ) {\n\t\t$default_post_types = [];\n\t}\n\telse {\n\t\tforeach ( $default_post_types as $p ) {\n\t\t\t$default_post_types_ids[] = $p->term_id;\n\t\t}\n\t}\n\n\t$post_types = get_terms( array(\n\t\t'taxonomy'\t=> 'post_types_tax',\n\t\t'exclude'\t=> $default_post_types_ids,\n\t\t'orderby'\t=> 'term_order',\n\t));\n\n\tif ( ( ( ! empty( $default_post_types ) ) || ( ! empty( $post_types ) && ! is_wp_error( $post_types ) ) ) && function_exists( 'acf_add_local_field_group' ) ) {\n\n\t\t// register ACF field group\n\t\tacf_add_local_field_group( array(\n\t\t\t'key'\t\t\t\t\t=> 'kulam_top_posts',\n\t\t\t'title'\t\t\t\t\t=> __( 'Post Types Top Posts', 'kulam-scoop' ),\n\t\t\t'fields'\t\t\t\t=> array(),\n\t\t\t'location'\t\t\t\t=> array(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'param'\t\t=> 'taxonomy',\n\t\t\t\t\t\t'operator'\t=> '==',\n\t\t\t\t\t\t'value'\t\t=> 'category',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'menu_order'\t\t\t=> 99,\n\t\t\t'position'\t\t\t\t=> 'normal',\n\t\t\t'style'\t\t\t\t\t=> 'default',\n\t\t\t'label_placement'\t\t=> 'top',\n\t\t\t'instruction_placement'\t=> 'label',\n\t\t\t'hide_on_screen'\t\t=> '',\n\t\t\t'active'\t\t\t\t=> 1,\n\t\t\t'description'\t\t\t=> '',\n\t\t));\n\n\t\t// register ACF Relationship fields (default post types)\n\t\tif ( ! empty( $default_post_types ) ) {\n\t\t\tforeach ( $default_post_types as $post_type ) {\n\n\t\t\t\tkulam_acf_add_local_field_relationship( $post_type, true );\n\n\t\t\t}\n\t\t}\n\n\t\t$is_default = empty( $default_post_types ) ? true : false;\n\n\t\t// register ACF Relationship fields (rest of post types)\n\t\tif ( ! empty( $post_types ) && ! is_wp_error( $post_types ) ) {\n\t\t\tforeach ( $post_types as $post_type ) {\n\n\t\t\t\tkulam_acf_add_local_field_relationship( $post_type, $is_default );\n\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "function sf_precreate_sflast()\n{\n\tglobal $wpdb;\n\n\t$users = $wpdb->get_results(\"SELECT ID FROM \".SFUSERS);\n\tif($users)\n\t{\n\t\tforeach($users as $user)\n\t\t{\n\t\t\t$check = $wpdb->get_var(\"SELECT umeta_id FROM \".SFUSERMETA.\" WHERE meta_key='\".$wpdb->prefix.\"sflast' AND user_id=\".$user->ID);\n\t\t\tif(!$check)\n\t\t\t{\n\t\t\t\tsf_set_last_visited($user->ID);\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}", "function manynewposts_activate()\n{\n global $db;\n require_once MYBB_ROOT . \"inc/adminfunctions_templates.php\";\n\n $templates = array();\n $templates[] = array(\n \"title\" => \"manynewposts\",\n \"template\" => \"<a href='{newposts_link}' class='newposts'>{newposts} new {posts}</a>\"\n );\n $templates[] = array(\n \"title\" => \"manynewposts_style\",\n \"template\" => \"\n<style>\n a.newposts {\n display:inline-block !important;\n text-decoration:none !important;\n font-size:11px !important;\n font-family:sans-serif !important;\n color:#114477 !important;\n background:#ffff99 !important;\n padding:2px 3px !important;\n border:1px solid #ccc !important;\n }\n a.newposts:hover {\n background:#ffff55 !important;\n border:1px solid #666 !important;\n }\n</style>\"\n );\n\n\n foreach($templates as $template)\n {\n $insert = array(\n \"title\" => $db->escape_string($template['title']),\n \"template\" => $db->escape_string($template['template']),\n \"sid\" => \"-1\",\n \"version\" => \"1600\",\n \"dateline\" => TIME_NOW\n );\n $db->insert_query(\"templates\", $insert);\n }\n\n find_replace_templatesets(\"forumdisplay_thread\", \"#\".preg_quote('{$thread[\\'multipage\\']}').\"#i\", '{$thread[\\'multipage\\']}{$thread[\\'manynewposts\\']}');\n find_replace_templatesets(\"forumdisplay\", \"#\".preg_quote('{$headerinclude}').\"#i\", '{$headerinclude}{$manynewposts_style}');\n\n find_replace_templatesets(\"search_results_threads_thread\", \"#\".preg_quote('{$thread[\\'multipage\\']}').\"#i\", '{$thread[\\'multipage\\']}{$thread[\\'manynewposts\\']}');\n find_replace_templatesets(\"search_results_threads\", \"#\".preg_quote('{$headerinclude}').\"#i\", '{$headerinclude}{$manynewposts_style}');\n}", "function manynewposts_thread() {\n global $thread, $templates, $db, $mybb, $settings;\n\n $query = $db->query(\"\n SELECT\n dateline, pid\n FROM \" . TABLE_PREFIX . \"posts\n WHERE\n tid='\".$db->escape_string($thread['tid']).\"'\n \");\n\n $lastpost = array();\n $lastpost_pid = array();\n\n while($result=$db->fetch_array($query))\n {\n $lastpost[] = $result['dateline'];\n $lastpost_pid[$result['dateline']] = $result['pid'];\n }\n\n $query = $db->query(\"\n SELECT\n tr.dateline AS `tr_dateline`,\n fr.dateline AS `fr_dateline`\n FROM \" . TABLE_PREFIX . \"posts p\n LEFT JOIN\n \" . TABLE_PREFIX . \"threadsread tr\n ON\n tr.tid = p.tid\n LEFT JOIN\n \" . TABLE_PREFIX . \"forumsread fr\n ON\n fr.fid = p.fid\n WHERE\n tr.uid='\".$db->escape_string($mybb->user['uid']).\"' and\n fr.uid='\".$db->escape_string($mybb->user['uid']).\"'\n \");\n\n $userlastview = array();\n $userlastview_forum = array();\n\n while($result=$db->fetch_array($query))\n {\n $userlastview[] = $result['tr_dateline'];\n $userlastview_forum[] = $result['fr_dateline'];\n }\n\n $userlastview = (count($userlastview) > 0) ? max($userlastview) : 0;\n $userlastview_forum = (count($userlastview_forum) > 0) ? max($userlastview_forum) : 0;\n\n $timelimit = $userlastview + ($settings['threadreadcut'] * 24 * 60 * 60);\n $newlastpost = array();\n\n if($userlastview && $timelimit > TIME_NOW) {\n foreach ($lastpost as $lastpost_number) {\n if($lastpost_number > $userlastview_forum && $lastpost_number > $userlastview) {\n $newlastpost[] = $lastpost_number;\n }\n }\n }\n\n $count = count($newlastpost);\n\n if($count == 0) return;\n\n $posts = $count == 1 ? 'post':'posts';\n\n $lastseenpost_pid = $lastpost_pid[min($newlastpost)];\n $manynewposts = \"\";\n\n if($mybb->user['uid']) {\n if($count > 0) {\n $manynewposts = $templates->get('manynewposts');\n $manynewposts = str_replace(\"{newposts_link}\", \"./showthread.php?tid=\".$thread['tid'].\"&pid=\".$lastseenpost_pid.\"#pid\".$lastseenpost_pid, $manynewposts);\n $manynewposts = str_replace(\"{newposts}\", $count, $manynewposts);\n $manynewposts = str_replace(\"{posts}\", $posts, $manynewposts);\n }\n }\n $thread['manynewposts'] = $manynewposts;\n}", "function jr_todays_count_widget( $post_type, $limit ) {\n\tglobal $wpdb;\n\n\t$today_date = date( 'Y-m-d', current_time( 'timestamp' ) );\n\n\t// get all the post view info to display\n\t$sql = $wpdb->prepare( \"SELECT t.postcount, p.ID, p.post_title\n\t\t\tFROM $wpdb->app_pop_daily AS t\n\t\t\tINNER JOIN $wpdb->posts AS p ON p.ID = t.postnum\n\t\t\tWHERE time = %s\n\t\t\tAND t.postcount > 0 AND p.post_status = 'publish' AND p.post_type = %s\n\t\t\tORDER BY t.postcount DESC LIMIT %d\", $today_date, $post_type, $limit );\n\n\t$results = $wpdb->get_results( $sql );\n\n\techo '<ul class=\"pop\">';\n\n\t// must be views today\n\tif ( $results ) {\n\n\t\tforeach ( $results as $result )\n\t\t\techo '<li><a href=\"'.get_permalink($result->ID).'\">'.$result->post_title.'</a> ('.number_format($result->postcount).'&nbsp;'.__('views', APP_TD) .')</li>';\n\n\t} else {\n\n\t\techo '<li>' . __( 'No jobs viewed yet.', APP_TD ) . '</li>';\n\t}\n\n\techo '</ul>';\n\n}", "function post_pagination($query)\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\tif ($query->is_home() && $query->is_main_query()) {\r\n\t\t$query->set('posts_per_page', '5');\r\n\t\t$query->set('post__not_in', get_option('sticky_posts'));\r\n\t}\r\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 index () \n {\n $posts = Post::whereIn('id', function($query){\n $query->selectRaw('max(id)')\n ->from('posts')\n ->groupBy('user_id');\n })->latest()\n ->take(10)\n ->get();\n \n return view('index',[\n /*layout*/\n 'me' => Auth::user(),\n 'themes' => Theme::all(),\n //'owner' => false, //if you own content on this page\n 'main' => true, //if it's main page\n //'myBlog' => false, //if it's your blog page\n /* index */\n 'posts' => $posts, //last posts from 10 different users\n ]);\n }", "function st_blog_home_page_number_post( $query ) {\n\n\t$st_blog_theme = get_theme_mod( SALIENT_CUSTOMIZER_NAME );\n\t$st_blog_number_of_post = isset($st_blog_theme['latest-numbe-of-post-for-blog-section'] ) ? $st_blog_theme['latest-numbe-of-post-for-blog-section'] : '';\n if ( is_admin() || ! $query->is_main_query() )\n return $st_blog_number_of_post;\n\n if ( is_home() ) {\n // Display only 1 post for the original blog archive\n $query->set( 'posts_per_page', $st_blog_number_of_post );\n \n }\n return;\n\n}", "function sp_last_posts_cat($numberOfPosts = 5 , $thumb = true , $cats = 1){\n\tglobal $post;\n\t$orig_post = $post;\n\t\n\tif ($offset)\n\t\t$lastPosts = get_posts('category='.$cats.'&numberposts='.$numberOfPosts.'&offset='.$offset);\n\telse\n\t\t$lastPosts = get_posts('category='.$cats.'&numberposts='.$numberOfPosts);\t\n\tforeach($lastPosts as $post): setup_postdata($post);\n?>\n<li>\n\t<?php if ( $thumb && sp_post_image('sp-small') ) : ?>\t\t\t\n\t\t<div class=\"post-thumbnail\">\n\t\t\t<a href=\"<?php the_permalink(); ?>\" title=\"<?php printf( __( 'Permalink to %s', 'sptheme' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\">\n\t\t\t<img src=\"<?php echo sp_post_image('sp-small') ?>\" width=\"110\" height=\"83\" />\n </a>\n\t\t</div><!-- post-thumbnail /-->\n\t<?php endif; ?>\n\t<h3><a href=\"<?php the_permalink(); ?>\"><?php the_title();?></a></h3>\n\t<?php //sp_get_score(); ?> <div class=\"entry-meta\"><?php echo sp_posted_on(); ?></div>\n</li>\n<?php endforeach;\n\t$post = $orig_post;\n\twp_reset_postdata();\n}", "public function myposts() {\n\t\t$this->template->content = View::instance('v_posts_myposts');\n\t\t$this->template->title = \"My Posts\";\n\n\t\t# only select posts created by the logged in user\n\t\t# the latest modified one is on the top\n\t\t$q = \"SELECT *\n\t\t\tFROM posts where user_id = \" . $this->user->user_id .\n\t\t\t\" ORDER BY modified DESC\";\n\t\t\t\n// echo $q;\t\t\t\n\n\t\t# Run the query\n\t\t$posts = DB::instance(DB_NAME)->select_rows($q);\n\n\t\t# Pass data to the View\n\t\t$this->template->content->posts = $posts;\n\n\t\t# Render the View\n\t\techo $this->template;\n\t}", "public function removeLastPostFromBlog() {}", "function recentpostsindex_deactivate()\r\n{\r\n\tglobal $db;\r\n\t\r\n$db->query(\"DELETE FROM \".TABLE_PREFIX.\"settings WHERE name='enable'\");\t\r\n$db->query(\"DELETE FROM \".TABLE_PREFIX.\"settings WHERE name='limit_posts_nr'\");\r\n\r\nrebuild_settings();\t\r\n\t\r\nrequire_once MYBB_ROOT.\"/inc/adminfunctions_templates.php\";\r\n\r\nfind_replace_templatesets(\"index\", \"#\".preg_quote('{$header}' . \"\\n\" . '{$recentposts}') . \"#i\", '{$header}',0);\r\n\r\n}", "function blogslog_post_choices() {\n $posts = get_posts( array( 'numberposts' => -1 ) );\n $choices = array();\n $choices[0] = esc_html__( '--Select--', 'blogslog' );\n foreach ( $posts as $post ) {\n $choices[ $post->ID ] = $post->post_title;\n }\n return $choices;\n}", "public function post_posts()\n\t{\n\t\t// Simply pass $_GET to the function, it's save as only values we understand will be read\n\t\t$this->fetch_posts($_GET);\n\t\n\t\t// Check which values have been passed and translate them for the faceted seach\n\t\t$search_values = array();\n\t\tforeach ( $this->locals as $varname => $default ) {\n\t\t\tif(isset($_GET[$varname])) {\n\t\t\t\tswitch($varname) {\n\t\t\t\t\tcase 'type':\n\t\t\t\t\t\t$search_values[] = 'type: ' . Post::type_name($_GET['type']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'status':\n\t\t\t\t\t\t$search_values[] = 'status: ' . Post::status_name($_GET['status']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tag':\n\t\t\t\t\t\t$tags = explode(',', $_GET['tag']);\n\t\t\t\t\t\tforeach($tags as $tag) {\n\t\t\t\t\t\t\t$search_values[] = 'tag: ' . $tag;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'author':\n\t\t\t\t\t\t$search_values[] = 'author: ' . User::get($_GET['author'])->username;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$search_values[] = $varname . ': ' . $_GET[$varname];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(count($search_values) > 0) {\n\t\t\t$search_value = implode(' ', $search_values);\n\t\t}\n\t\telse {\n\t\t\t$search_value = '';\n\t\t}\n\n\t\t// Create search controls and global buttons for the manage page\n\t\t$search = FormControlFacet::create('search');\n\t\t$search->set_value($search_value)\n\t\t\t->set_property('data-facet-config', array(\n\t\t\t\t'onsearch' => '$(\".posts\").manager(\"update\", self.data(\"visualsearch\").searchQuery.facets());',\n\t\t\t\t'facetsURL' => URL::get('admin_ajax_facets', array('context' => 'facets', 'page' => 'manage', 'component' => 'facets')),\n\t\t\t\t'valuesURL' => URL::get('admin_ajax_facets', array('context' => 'facets', 'page' => 'manage', 'component' => 'values')),\n\t\t\t));\n\n\t\t$navigation = FormControlStatic::create('navigation')\n\t\t\t->set_static('<a href=\"\" id=\"nav_prev\" class=\"navigation\">' . _t('Previous page') . '</a>'\n\t\t\t. '<a href=\"\" id=\"nav_next\" class=\"navigation\">' . _t('Next page') . '</a>');\n\n\t\t$aggregate = FormControlAggregate::create('selected_items')->set_selector('.post_item')->label('None Selected');\n\n\t\t$page_actions = FormControlDropbutton::create('page_actions');\n\t\t$page_actions->append(\n\t\t\tFormControlSubmit::create('delete')\n\t\t\t\t->set_caption(_t('Delete Selected'))\n\t\t\t\t->set_properties(array(\n\t\t\t\t\t'onclick' => 'itemManage.update(\\'delete\\');return false;',\n\t\t\t\t\t'title' => _t('Delete Selected'),\n\t\t\t\t))\n\t\t);\n\t\tPlugins::act('posts_manage_actions', $page_actions);\n\t\t\n\t\t$form = new FormUI('manage');\n\t\t$form->append($search);\n\t\t$form->append($navigation);\n\t\t$form->append($aggregate);\n\t\t$form->append($page_actions);\n\t\t$this->theme->form = $form;\n\n\t\t$this->theme->admin_page = _t( 'Manage Posts' );\n\t\t$this->theme->admin_title = _t( 'Manage Posts' );\n\n\t\tStack::add('admin_header_javascript', 'visualsearch' );\n\t\tStack::add('admin_header_javascript', 'manage-js' );\n\t\tStack::add('admin_stylesheet', 'visualsearch-css');\n\t\tStack::add('admin_stylesheet', 'visualsearch-datauri-css');\n\n\t\t$this->display( 'posts' );\n\t}", "function cmb2_get_post_options( $query_args ) {\n\n $args = wp_parse_args( $query_args, array(\n 'post_type' => 'post',\n 'numberposts' => 10,\n ) );\n\n $posts = get_posts( $args );\n\n $post_options = array();\n if ( $posts ) {\n foreach ( $posts as $post ) {\n $post_options[ $post->ID ] = $post->post_title;\n }\n }\n\n return $post_options;\n}", "public function attachPostToBlogAtTheEnd() {}", "function my_post_count_queries( $query ) {\n if (!is_admin() && $query->is_main_query()){\n if(is_home()){\n $query->set('posts_per_page', 1);\n }\n }\n }", "function wpsites_query( $query ) {\nif ( $query->is_archive() && $query->is_main_query() && !is_admin() ) {\n $query->set( 'posts_per_page', 100 );\n }\n}", "function wp130512_recent_posts_args($args) {\n $args['post_type'] = array('post', 'candies');\n return $args;\n}", "public function register_post_status() {\n\t\tif ( ! isset( $this->slug ) ) {\n\n\t\t\treturn;\n\t\t} elseif ( ! isset( $this->args ) ) {\n\t\t\t$this->args = $this->create_args();\n\t\t}\n\t\t$this->init();\n\t}" ]
[ "0.6793125", "0.6424826", "0.63540393", "0.6281458", "0.62611973", "0.62170917", "0.6200792", "0.61863565", "0.61093587", "0.60802186", "0.60503894", "0.6026789", "0.59676224", "0.59476745", "0.5885122", "0.58757824", "0.5873912", "0.5816651", "0.5815992", "0.58115077", "0.58101845", "0.5778101", "0.5736231", "0.57361424", "0.5733848", "0.5723508", "0.56676656", "0.56619614", "0.56617236", "0.56344515", "0.56080824", "0.56078553", "0.5591721", "0.5579852", "0.5531846", "0.55055416", "0.5494627", "0.54781973", "0.54733324", "0.5469689", "0.545421", "0.54508966", "0.54451245", "0.54398143", "0.5433352", "0.5429957", "0.54291123", "0.5420445", "0.54092014", "0.54066145", "0.53878057", "0.5382739", "0.5373997", "0.5369117", "0.5358235", "0.53568435", "0.5354741", "0.53431267", "0.534123", "0.5335048", "0.5331542", "0.5331542", "0.53202635", "0.5317333", "0.5305508", "0.52856076", "0.5275126", "0.527445", "0.52643377", "0.5262602", "0.5262116", "0.52571166", "0.52529424", "0.523684", "0.5234126", "0.52321076", "0.52307594", "0.5229303", "0.5227528", "0.5223309", "0.5222169", "0.5222145", "0.5216853", "0.5216805", "0.52153957", "0.5214525", "0.52144915", "0.52073574", "0.52070296", "0.5202774", "0.5200307", "0.5192495", "0.5189216", "0.51882464", "0.5184589", "0.5181622", "0.5178565", "0.5178374", "0.51770985", "0.51746076" ]
0.68615973
0
Display a listing of the resource.
public function index() { $servicios = Servicio::all(); $departamentos = Departamento::all(); $idItems = []; return view('servicio.servicio',['servicios' => $servicios, 'departamentos'=>$departamentos, 'items'=>$idItems]); }
{ "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(Request $request) { $solicitud = $request->except('_token', 'email','user'); $this->store($request, $solicitud); Mail::to($request->email)->send(new EmailServicio($request)); return redirect()->route('servicio.index')->with('status','Se ha enviado la solicitud'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n 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(Request $request, Array $solicitud ) { $tipo = $request->except('_token','user','deps','servs','observacion','email'); $tipoStr = ""; foreach ($tipo as $value) { if($value!= null){ $tipoStr .= ' '. str_replace( '_' , ' ' , key($tipo)).','.' '; } next($tipo); } $solicitudServicio = new SolicitudServicio(); $solicitudServicio->user_id = $request->user; $solicitudServicio->departamento = $solicitud['deps']; $solicitudServicio->servicios = $solicitud['servs']; $solicitudServicio->tiposerv = $tipoStr; $solicitudServicio->observaciones = $request->observacion; $solicitudServicio->status = 0; $solicitudServicio->save(); }
{ "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
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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(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(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(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);", "public function update($request, $id);", "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 }", "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 }", "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);", "abstract public function put($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 updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\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 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 static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "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($id, $input);", "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(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);", "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 put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\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(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() {\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 $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.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445", "0.58630455", "0.58540666", "0.58540666", "0.5851948", "0.5816257", "0.58070177", "0.5752376", "0.5752376", "0.57359827", "0.5723941", "0.57152426", "0.56958807", "0.5691061", "0.56881654", "0.5669518", "0.5655434", "0.5651897", "0.56480426", "0.5636727", "0.56354004", "0.5633156", "0.5632135", "0.5629063", "0.5621358", "0.56089175", "0.5602031", "0.55927175", "0.5582773", "0.558176", "0.5581365", "0.5575607", "0.5571989", "0.55672973", "0.5562929", "0.55623275", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55598706", "0.55560726", "0.55558753", "0.5554241", "0.55534166", "0.5552986", "0.55440396", "0.55438566", "0.5540619", "0.55394524", "0.5536144", "0.5535339", "0.5534803", "0.5524157", "0.55188423", "0.55163455", "0.55135876", "0.5509835", "0.5507501", "0.55068344", "0.55034274", "0.5501476", "0.55010915", "0.5499286", "0.5497852", "0.54958415", "0.54958415", "0.5494513", "0.5494261", "0.54935366", "0.54931587", "0.54917634", "0.54836094", "0.5479455", "0.5478885", "0.5478268", "0.54654354", "0.54645413", "0.5461025", "0.54568535" ]
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 deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Responds to methods such as converEurToRon($amount), which is translated to convert(1, 'EUR', 'RON');
public function __call($method, $args) { $currencies = $this->extractCurrenciesFrom($method); return $this->convert($args[0], $currencies[0], $currencies[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convert($amount, Currency $currency);", "function convertir($devisefrom, $montant)\n\n//verifie sie le montant est numerique sinon il me faut un nombre\n\n{\n\n if(!is_numeric(($montant))) return 'il me faut un nombre';\n if($devisefrom = \"EUR\"){\n $total=$montant*1.15023; //1 EUR =1,15023USD\n }\n else {\n $total=$montant*0.869310; //1 USD = 0,869310 EUR\n }\n return ($total);\n}", "public function convertCurrency($transaction) {\n if (is_array($transaction)) {\nreturn $this->convertCurrencyByArray($transaction);\n} else {\nreturn $this->convertCurrencyByAmount($transaction);\n}\n}", "private function getINRto1USD(){\n $client = new Client();\n\n $crawler = $client->request('GET', 'https://transferwise.com/in/currency-converter/usd-to-inr-rate');\n $USD_IN_1_INR = $crawler->filterXPath(\"//span[contains(@class,'text-success')]\")->text();\n \n //removing , and converting to float\n $USD_IN_1_INR_R = floatval (str_replace(\",\",\"\",$USD_IN_1_INR));\n return($USD_IN_1_INR_R);\n }", "function convertAmount($amount, $sourceCurrency, $destCurrency, $dateOfConversion) {\n\t$rateOfConversion = getExchangeRate($sourceCurrency, $destCurrency, $dateOfConversion);\n\treturn $amount * $rateOfConversion;\n}", "public function convert();", "function bamiiConvertCurrency($amount, $from, $to){\n $conv_id = \"{$from}_{$to}\";\n $string = file_get_contents(\"https://free.currencyconverterapi.com/api/v5/convert?q=$conv_id&compact=y\");\n $json_a = json_decode($string, true);\n\n return $amount * $json_a[strtoupper($conv_id)]['val'];\n}", "abstract protected function doActualConvert();", "public function convertToDollar($amount) {\n\n if (Yii::app()->session['currency'] != \"USD\" && $amount > 0) {\n // Initialize the CURL library\n $api_key = \"a634e1f81617c61308330be500514cbe\";\n $cURL = curl_init();\n\n // Set the URL to execute\n curl_setopt($cURL, CURLOPT_URL, \"http://xmlfeed.theeasyapi.com\");\n\n // Set options\n curl_setopt($cURL, CURLOPT_HEADER, 0);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_POST, 1);\n curl_setopt($cURL, CURLOPT_POSTFIELDS, \"request=<easyapi_wrapper>\n <login>\n <apikey>\" . $api_key . \"</apikey>\n </login>\n <search>\n <service>convert_webxcurrency</service>\n <criteria>\n <amount>$amount</amount>\n <tocur>USD</tocur>\n <fromcur>\" . Yii::app()->session['currency'] . \"</fromcur>\n </criteria>\n </search>\n </easyapi_wrapper>\");\n\n // Execute, saving results in a variable\n $strPage = curl_exec($cURL);\n\n // Close CURL resource\n curl_close($cURL);\n\n // Now the variable $strPage has the returned XML.\n // Parse the XML into something a little more useful\n $xml_ret = simplexml_load_string($strPage);\n return json_decode(json_encode($xml_ret), true);\n }\n\n return $amount;\n }", "public function testConvertMethodWrongAmount()\n {\n \t$currencyExchangeRateMock = $this->getMockBuilder(\"App\\Models\\CurrencyExchangeRateService\")->getMock();\n\t\t$currencyExchangeRateMock->expects($this->any())\n \t\t->method(\"getExchangeRate\")\n \t\t->will($this->returnValue(1.0));\n\n\t\t$currencyConverter = new DefaultCurrencyConverter($currencyExchangeRateMock);\n\n\t\t$this->assertFalse($currencyConverter->convert('€','any'));\n\n }", "function paysto_rub_currency_symbol($currency_symbol, $currency)\n{\n if ($currency == \"RUB\") {\n $currency_symbol = 'р.';\n }\n\n if ($currency == \"USD\") {\n $currency_symbol = '$';\n }\n\n return $currency_symbol;\n}", "public function test_convert_called_callApiAndReturnConversion()\n {\n $rate = 1.324;\n $amount = 100;\n $from_currency_name = 'EUR';\n $to_currency_name = 'USD';\n $this->currencyXchangeApi_double->getRate($from_currency_name, $to_currency_name)->willReturn($rate);\n $sut = new CurrencyConversionService($this->currencyXchangeApi_double->reveal());\n $actual = $sut->convert(new Money($amount, new Currency($from_currency_name)), new Currency($to_currency_name));\n $expected = new Money(132, new Currency($to_currency_name));\n self::assertEquals($expected, $actual);\n }", "private function convertBase()\n {\n // check that defined base currency exists\n if (!isset($this->data['rates'][$this->base])) {\n return false;\n }\n\n // convert currencies\n if ($this->base !== $this->data['base']) {\n $rates = array();\n $base_rate = $this->data['rates'][$this->base];\n foreach($this->data['rates'] as $key => $val) {\n if ($key !== $this->base) {\n // round to 6 decimal places\n $rates[$key] = (float) round($val * (1/$base_rate), 6);\n } else {\n if ($this->source === 'ecb') {\n $rates['EUR'] = (float) round(1/$base_rate, 6);\n } else {\n $rates['USD'] = (float) round(1/$base_rate, 6);\n }\n $rates[$this->base] = (float) 1.00;\n }\n }\n $this->data['base'] = $this->base;\n $this->data['rates'] = $rates;\n }\n return true;\n }", "public function testConvertMethod()\n {\n \t$exchangeRates = ['€'=>1.0, '£'=>0.90, '$'=>1.10, 'other'=>0.0];\n\n \tforeach($exchangeRates as $currencySymbol => $exRate) {\n \t\t// Uses a Mock which returns the exchangeRates\n \t\t$currencyExchangeRateMock = $this->getMockBuilder(\"App\\Models\\CurrencyExchangeRateService\")->getMock();\n \t\t$currencyExchangeRateMock->expects($this->any())\n \t\t->method(\"getExchangeRate\")\n \t\t->will($this->returnValue($exRate));\n\n \t\t$currencyConverter = new DefaultCurrencyConverter($currencyExchangeRateMock);\n\n \t\t$this->assertEquals($exRate, $currencyConverter->convert($currencySymbol,1));\n \t}\n }", "abstract public function getExchangeRate($fromCurrency, $toCurrency);", "public function conversion($from,$to,$amount)\n {\n $endpoint = 'convert';\n $access_key = 'b14850f91909bede5ee174463c195f92';\n\n // initialize CURL:\n $ch = curl_init('https://api.currencylayer.com/'.$endpoint.'?access_key='.$access_key.'&from='.$from.'&to='.$to.'&amount='.$amount.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // get the (still encoded) JSON data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $conversionResult = json_decode($json, true);\n\n // access the conversion result\n return $conversionResult['result'];\n }", "public function convert($amount)\n {\n return money_format('%+n',\n $amount *\n $this->currencyWebservice->getExchangeRate(\n $this->getOriginalCurrency(),\n $this->getTargetCurrency()\n )\n );\n }", "public function convert($from, $to, $amount = 1.0)\n {\n $destiny = \"http://www.google.com/ig/calculator?hl=en&q={$amount}{$from}=?{$to}\";\n $request = new Request($destiny, 'GET');\n \n $response = $this->bind($request);\n \n // Tratamento de dados\n $content = str_replace(array('lhs', 'rhs', 'error', 'icc'), array('\"lhs\"', '\"rhs\"', '\"error\"', '\"icc\"'), $response->getContent());\n $object = json_decode($content);\n \n $value = preg_replace('/[^0-9.]|[0-9]*$/', '', $object->rhs);\n if ('' === $value) {\n throw new \\RuntimeException(sprintf(\n 'The resulted amount \"%s\" is invalid.',\n $value\n ));\n }\n \n return number_format(floatval($value), 5, '.', '');\n }", "public static function _convert($currencyFrom, $currencyTo, $retry=0)\r\n {\r\n $url = str_replace('{{CURRENCY_FROM}}', $currencyFrom, self::$_url);\r\n $url = str_replace('{{CURRENCY_TO}}', $currencyTo, $url);\r\n\r\n try {\r\n $handle = fopen($url, \"r\");\r\n\r\n if($handle !== false) {\r\n $exchange_rate = fread($handle, 2000);\r\n\r\n # there may be spaces or breaks\r\n $exchange_rate = trim($exchange_rate);\r\n $exchange_rate = (float) $exchange_rate;\r\n\r\n fclose($handle);\r\n\r\n if( !$exchange_rate ) {\r\n echo 'Cannot retrieve rate from Yahoofinance';\r\n return false;\r\n }\r\n return (float) $exchange_rate * 1.0; // change 1.0 to influence rate;\r\n }\r\n }\r\n catch (Exception $e) {\r\n if( $retry == 0 ) {\r\n # retry receiving data\r\n self::_convert($currencyFrom, $currencyTo, 1);\r\n } else {\r\n echo 'Cannot retrieve rate from Yahoofinance';\r\n return false;\r\n }\r\n }\r\n }", "public function convertFromTo($from_fcrn_id,$to_fcrn_id,$amt, $date,$round = 6, $source = false) {\n \n \n Yii::log(\"Converting from \".$this->convId2Code($from_fcrn_id).\" to \".$this->convId2Code($to_fcrn_id));\n //default source - syscompany source\n if(!$source){\n $source = $this->getSysCcmpCurrencySource($date);\n }\n \n $from_rate = $this->getCurrencyRate($from_fcrn_id, $date,$source);\n if ($from_rate === FALSE) {\n return FALSE;\n } \n \n $to_rate = $this->getCurrencyRate($to_fcrn_id, $date,$source);\n if ($to_rate === FALSE) {\n return FALSE;\n }\n \n /**\n * @todo add convert type to fcsr_courrency_source as definition\n */\n \n if ($source == self::SOURCE_BANK_RU){\n return round($to_rate*$from_rate * $amt, $round);\n } else {\n return round($to_rate/$from_rate * $amt, $round);\n }\n \n }", "private function convertCurrencyByAmount($transaction) {\nlist($currency, $amount)=explode(\" \", $transaction);\n\n$stmt=$this->mysqli->prepare(\"SELECT currencyType, currencyRate FROM currencyrates WHERE currencyType=?\");\n$stmt->bind_param(\"s\", $currency);\n$stmt->execute();\n$res=$stmt->get_result();\n$row=$res->fetch_assoc();\n$stmt->close();\n\nreturn $this->basecurrency . ' ' . number_format((float)$row['currencyRate'] * (float)$amount, 2);\n}", "public static function convert($from, $to, $amount)\n {\n //get specified currency rates\n $rates = self::getRates();\n\n if (isset($rates[$from.$to])) {\n return $amount * $rates[$from.$to];\n } elseif (isset($rates[$to.$from])) {\n return $amount / $rates[$to.$from];\n } else {\n //if conversation rates not specified, convert using EUR\n return self::convert(\n 'EUR',\n $to,\n self::convert($from, 'EUR', $amount)\n );\n }\n }", "public function actionConvertCurrency($from_currency_ = '', $to_currency_ = '', $amount_ = 0)\n {\n // Recevei the POST params\n $request = Yii::$app->request;\n\n if (strcmp($from_currency_, '') != 0 && strcmp($to_currency_, '') != 0 && $amount_ != 0) {\n $from_currency = $from_currency_;\n $to_currency = $to_currency_;\n $amount = $amount_;\n } else {\n $from_currency = $request->post('from_currency');\n $to_currency = $request->post('to_currency');\n $amount = $request->post('amount');\n }\n\n $result = null;\n\n // Check the mandatory fields\n if (empty($from_currency)) {\n throw new BadRequestHttpException('The origin currency cannot be empty.');\n } else if (empty($to_currency)) {\n throw new BadRequestHttpException('The destiny currency cannot be empty.');\n } else if (empty($amount)) {\n throw new BadRequestHttpException('The amount cannot be empty.');\n } else {\n // Set the opration\n $operation = \"latest\";\n\n // Prepare the input\n $from_currency = strtoupper($from_currency);\n $to_currency = strtoupper($to_currency);\n\n // Check if the both currency are valid\n if (!self::checkCurrencyExists($from_currency)) {\n throw new BadRequestHttpException('The currency ' . $from_currency . ' does not exist.');\n }\n\n if (!self::checkCurrencyExists($to_currency)) {\n throw new BadRequestHttpException('The currency ' . $to_currency . ' does not exist.');\n }\n\n // Prepare the request data\n $conversionData = array();\n $conversionData['base'] = $from_currency;\n $conversionData['symbols'] = $to_currency;\n\n // Call the external API\n $result = self::callAPI('GET', $this->BASE_URL . $operation, $conversionData);\n\n if (isset($result)) {\n // Decode the json to array\n $result = json_decode($result, true);\n $result['amount'] = $amount;\n $result['converted_amount'] = $amount * $result[\"rates\"][$to_currency];\n $result['from_currency'] = $from_currency;\n $result['to_currency'] = $to_currency;\n\n // Log the transaction as complete\n $this->logTransaction(Transaction::CONVERSION, $result['amount'], $result['converted_amount'], '', '',\n $result['from_currency'], $result['to_currency'], Transaction::COMPLETE);\n } else {\n // Log the transaction as incomplete\n $this->logTransaction(Transaction::CONVERSION, $amount, 0, '', '', $from_currency, $to_currency, \n Transaction::INCOMPLETE);\n\n throw new HttpException('It was not possible to contact the currency exchange server.');\n }\n }\n\n return $result;\n }", "protected function translateType($r){\n\t\t$trans = mapGetInjury($r->years);\n\t\t\n\t\treturn $trans;\n\t}", "function convertInterest($interest)\n{\n $converted = $interest * .01;\n return $converted;\n}", "protected static function requestUpdatedRate( $from_iso_code, $to_iso_code ){\n \n $from_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $from_iso_code,\n '$from_iso_code expects non-empty string'\n ); \n \n $to_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $to_iso_code,\n '$to_iso_code expects non-empty string'\n );\n \n // Get exchange rate from yahoo finance.\n $query = \"{$from_iso_code}{$to_iso_code}=X\";\n\n $url = 'http://download.finance.yahoo.com/d/quotes.csv?s=' . $query . '&f=l1&e=.cs';\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n\n $response = \\Altumo\\Validation\\Numerics::assertPositiveDouble(\n trim($http_request->sendAndGetResponseMessage()->getRawMessageBody()),\n 'Unable to update currency exchange rate. Invalid response received.'\n ); \n \n \n return (float)$response;\n \n // Google implementation (unsupported by google, likely unreliable).\n /* $query = \"1{$from_iso_code}=?{$to_iso_code}\";\n\n $url = 'http://www.google.com/ig/calculator?hl=en&q=' . urlencode($query);\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n $response = $http_request->sendAndGetResponseMessage()->getRawMessageBody();\n\n if( preg_match('/^.*?rhs\\\\:.*?([-+]?\\\\b[0-9]+(\\\\.[0-9]+)?\\\\b)/m', $response, $matches) ){\n $rate = $matches[1];\n } else {\n throw new \\Exception( 'Error retrieving an updated currency conversion rate. (unexpected format)' );\n }*/\n\n }", "public function toMoney();", "function convertDevise ($montant,$devise) { // fonction de convertion euro/dollar\n \n if ($devise == 'euro') { // si la devise fourni est l'euro\n $resultat = $montant * 1.08596; \n $retour = array('resultat'=>$resultat,'devise'=>'dollars americains'); // on crée un tableau de retour\n } else {\n $resultat = $montant / 1.08596; // si la devise fourni est le dollar\n $retour = array('resultat'=>$resultat,'devise'=>'euro'); // on crée un tableau de retour\n }\n return $retour; // On renvoit le tableau de retour\n}", "function getExchangeRate($currency);", "function base_convert($number, $source, $target): string\n{\n return Base::convert($number, $source, $target);\n}", "function convertCurToIUSD($url, $amount, $api_key, $currencySymbol) {\n error_log(\"Entered into Convert CAmount\");\n error_log($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n $ch = curl_init($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json')\n );\n\n $result = curl_exec($ch);\n $data = json_decode( $result , true);\n error_log('Response =>'. var_export($data, TRUE));\n // Return the equivalent value acquired from Agate server.\n return (float) $data[\"result\"];\n\n }", "abstract public function convertFromRawValue($value);", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "public function convert(CurrencyRequest $request)\n\t{\n\t\t$convert = new Currency($request->base,$request->target,$request->amount);\n \tif (is_object($convert->convertCurrency())) {\n \t\treturn view('results',['data' => $convert]);\n \t} else {\n \t\treturn redirect()->route('index')->with('apiError','There was a problem retrieving currency conversion information.');\n \t}\n\t}", "function ConvertCurrency($input_value, $input_currency_code, $target_currency_code) {\n // Convert input to base, then to target currency\n $rate_in = GetConversionRate($input_currency_code);\n $rate_out = GetConversionRate($target_currency_code);\n\n $output = ($input_value/$rate_in) * $rate_out;\n return number_format($output, 2, '.', '');\n }", "public function getBaseToOrderRate();", "abstract public function convert($param1, $param2);", "public function convert($amount, $from, $to)\n {\n if (!isset($this->apiKey)) {\n throw new \\Exception('Api Key not found');\n }\n\n $amount = floatval($amount);\n $rate = $this->_getRateToUse($from, $to);\n\n return $this->_formatConvert($rate * $amount);\n }", "public function getCurrency(): string;", "public function getCurrency(): string;", "private function convertToIso($currencyToIso, $amount, $type)\n {\n if (isset($this->currencyManager->getExchangeRateList()[$currencyToIso])) {\n $currencyRate = $this->currencyManager->getExchangeRateList()[$currencyToIso];\n } else {\n\n /**\n * No CurrencyRate can be found\n */\n throw new CurrencyNotConvertibleException();\n }\n\n return $type\n ? $amount * $currencyRate['rate']\n : $amount / $currencyRate['rate'];\n }", "function european_format($amount)\n {\n //return $fmt->formatCurrency($amount, \"EUR\");\n return $amount;\n }", "function convertMoeda(&$valorMoeda){\r\n\t\t$valorMoedaAux = explode('.' , $valorMoeda);\r\n\t\tif(isset ($valorMoedaAux[1])){\r\n\t\t\t$valorMoeda= \"R$ \".$valorMoedaAux[0].','.$valorMoedaAux[1];\r\n\t\t}else{\r\n\t\t\t$valorMoeda = \"R$ \".$valorMoedaAux[0].','.'00';\r\n\t\t}\r\n\t\treturn $valorMoeda;\r\n\t}", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "abstract public function Convert($data);", "private function convertToCurrencyCode($price, $currency){\n\t\t\t\t\t\n\t\t// exchange rates are supplied in EUR so first convert it to GBP\n\t\t$GBPrate = $this->currencyRates['GBP'];\n\t\t\n\t\t$GBPrate = (float)$GBPrate * 100;\n\t\t\n\t\tif(!is_numeric($GBPrate)){\n\t\t\t$this->error = \"ERROR - there was an error converting the data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the amount of euros for £1 sterling\n\t\tif($currency == \"EUR\"){\n\t\t\treturn round(((1 / $GBPrate) * $price) * 100, 2); \n\t\t}\n\t\t\n\t\t// convert the sterling to euro\n\t\t$Euros = 1 / $GBPrate;\n\t\t\n\t\t// multiply the $price var with the euro value\n\t\t$Euros = $Euros * $price;\n\t\t\n\t\t// find the exchange rate for the currency required\n\t\t$currencyRate = $this->currencyRates[$currency];\n\t\t\n\t\t// output the calculation \n\t\treturn round(($Euros * $currencyRate) * 100, 2); \n\t\t\n\t}", "function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}", "function conv_money($uang){\n\t\t$uang_explode = explode('.',$uang);\n\t\tif($uang_explode[0] < '1,000'){\n\t\t\t$uang_res = $uang_explode[0];\n\t\t}else{\n\t\t\t$uang_res = str_replace(',','',$uang_explode[0]);\n\t\t}\n\t\treturn $uang_res;\n\t}", "public function convertTo(Currency|string $to, ?Carbon $date = null): Money;", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "protected function rus2translit($string) {\n $converter = array(\n 'а' => 'a', 'б' => 'b', 'в' => 'v',\n 'г' => 'g', 'д' => 'd', 'е' => 'e',\n 'ё' => 'e', 'ж' => 'zh', 'з' => 'z',\n 'и' => 'i', 'й' => 'y', 'к' => 'k',\n 'л' => 'l', 'м' => 'm', 'н' => 'n',\n 'о' => 'o', 'п' => 'p', 'р' => 'r',\n 'с' => 's', 'т' => 't', 'у' => 'u',\n 'ф' => 'f', 'х' => 'h', 'ц' => 'c',\n 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sch',\n 'ь' => '\\'', 'ы' => 'y', 'ъ' => '\\'',\n 'э' => 'e', 'ю' => 'yu', 'я' => 'ya',\n\t\t'і' => 'i', 'є' => 'ye',\n \n 'А' => 'A', 'Б' => 'B', 'В' => 'V',\n 'Г' => 'G', 'Д' => 'D', 'Е' => 'E',\n 'Ё' => 'E', 'Ж' => 'Zh', 'З' => 'Z',\n 'И' => 'I', 'Й' => 'Y', 'К' => 'K',\n 'Л' => 'L', 'М' => 'M', 'Н' => 'N',\n 'О' => 'O', 'П' => 'P', 'Р' => 'R',\n 'С' => 'S', 'Т' => 'T', 'У' => 'U',\n 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',\n 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sch',\n 'Ь' => '\\'', 'Ы' => 'Y', 'Ъ' => '\\'',\n 'Э' => 'E', 'Ю' => 'Yu', 'Я' => 'Ya',\n\t\t'І' => 'I', 'Є' => 'Ye',\n \n\t);\n return strtr($string, $converter);\n}", "public function getExchangeRate( $convert_amount, $get_currency, $currency_convert)\n {\n \t// Based on the different currency value changes using random function \n \t//to need to convert the amount in the GBP.\n \t\n \tif($get_currency == 'GBP'){\n \t\t$exchange = $convert_amount;\n \t}\n \telseif($get_currency == 'USD'){ \t\n \t\t $exchange = round(rand(10000 , 99999) / $convert_amount,2); \t\n \t}\n elseif($get_currency == 'EUR'){ \t\n \t $exchange = round(rand(1000 , 9999) / $convert_amount ,2); \t\n \t}else{\n \t\t$exchange = '';\n \t}\n return '£'.$exchange;\n }", "public function actionConvert()\n {\n $session = Yii::$app->session;\n if ($session->has('money')){\n $money = $session->get('money');\n User::convertToBalance($money);\n $session->remove('money');\n return $this->redirect('/site/prizes');\n } else {\n return $this->redirect('/site/prizes');\n }\n }", "public function offlineConvertTo(Currency|string $currency, string $rate): Money;", "public function convert(ConvertRequest $request, RateService $service) : ConvertResource\n {\n try {\n $currencyQuery = new CurrencyQuery([\n 'currency_from' => $request->currency_from,\n 'currency_to' => $request->currency_to,\n 'value' => $request->value,\n ]);\n\n if (mb_strtoupper($request->currency_from) === Rate::BTC) {\n /** @var Rate $rate */\n $rate = Rate::firstWhere('name', $request->currency_to);\n\n $result = $service->convertFromBTC($request->value, $rate->buy);\n $currencyQuery->rate = $rate->buy;\n }\n\n if (mb_strtoupper($request->currency_to) === Rate::BTC) {\n /** @var Rate $rate */\n $rate = Rate::firstWhere('name', $request->currency_from);\n\n $result = $service->convertToBTC($request->value, $rate->sell);\n $currencyQuery->rate = $rate->sell;\n }\n\n $currencyQuery->converted_value = $result->value;\n $currencyQuery->commission = $result->commission;\n $currencyQuery->save();\n\n return new ConvertResource($currencyQuery);\n } catch (ConverterException $e) {\n throw new HttpException('422', $e->getMessage());\n } catch (Throwable $t) {\n throw new HttpException(500);\n }\n }", "public static function _convertir($num)\n {\n //formatea el monto original a formato entendido por MySQL\n $_parse = numfmt_create('es_ES',\\NumberFormatter::DECIMAL);\n\n $_result = numfmt_parse($_parse,$num);\n\n return $_result;\n }", "function toMoney($val,$symbol='$',$r=2){\n\n\n $n = $val;\n $c = is_float($n) ? 1 : number_format($n,$r);\n $d = '.';\n $t = ',';\n $sign = ($n < 0) ? '-' : '';\n $i = $n=number_format(abs($n),$r);\n $j = (($j = strlen($i)) > 3) ? $j % 3 : 0;\n\n return $symbol.$sign .($j ? substr($i,0, $j) + $t : '').preg_replace('/(\\d{3})(?=\\d)/',\"$1\" + $t,substr($i,$j)) ;\n\n}", "public function convert(Request $request) {\n $endpoint = 'latest';\n $access_key = 'fc7707a9c9205e823eca9a7ba31968ac';\n\n // Initialize CURL:\n $ch = curl_init('http://data.fixer.io/api/'.$endpoint.'?access_key='.$access_key.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Store the data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $exchangeRates = json_decode($json, true);\n\n // Access the exchange rate values, e.g. GBP:\n //echo $exchangeRates['rates']['GBP'];\n //echo \"<br/>\";\n //echo $exchangeRates['rates']['USD'];\n //echo \"<br/>\";\n //echo $exchangeRates['rates']['EUR'];\n \n $data = [\n 'EUR' => $exchangeRates['rates']['EUR'],\n 'USD' => $exchangeRates['rates']['USD'],\n 'GPB' => $exchangeRates['rates']['GBP'],\n 'LAK' => $exchangeRates['rates']['LAK'],\n 'MUR' => $exchangeRates['rates']['MUR'],\n ];\n \n return response($data);\n }", "public function action2()\n\t{\n//\t\techo \\app\\components\\Number::toNumeric('dua puluh');\n//\t\techo \\app\\components\\Number::toNumeric('dua belas');\n//\t\techo \\app\\components\\Number::toNumeric('dua');\n\t}", "public function convert($value): string;", "public function convertToBaseCurrency($amount) {\n $baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();\n $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n return Mage::helper('directory')->currencyConvert($amount, $currentCurrencyCode, $baseCurrencyCode);\n }", "public function convert(array $conversions)\n {\n $currencies = [];\n $results = [];\n\n $currencies = array_map(function ($c) {\n //c[0] and c[1] are the first and second currencies\n return \"{$c[0]}_{$c[1]}\";\n }, $conversions);\n\n //remove duplicate currency conversion patters via array_unique so you're not saying eg \"convert USD_GBP multiple times\"\n $query = implode(',',array_unique($currencies));\n\n //Build up URL\n\n //sprintf — Return a formatted string\n $convertEndpoint = sprintf($this->convertEndpoint, $query);\n //echo $convertEndpoint; //convert?q=USD_GBP,GBP_USD&compact=y\n\n $url = \"{$this->currencyUrl}/{$convertEndpoint}\";\n //echo $url; //https://free.currencyconverterapi.com/api/v5/convert?q=USD_GBP,GBP_USD&compact=y\n\n //Get response, turn json into an array so we can work with it\n $reponse = json_decode($this->curlRequest($url), true);\n //var_dump($reponse); //array(2) { [\"USD_GBP\"]=> array(1) { [\"val\"]=> float(0.71702) } [\"GBP_USD\"]=> array(1) { [\"val\"]=> float(1.394661) } }\n\n //Build up results\n foreach ($conversions as $c) {\n $key = \"$c[0]_$c[1]\";\n $results[] = isset($reponse[$key]) ? $reponse[$key]['val'] * $c[2] : null;\n }\n\n return $results;\n\n }", "public function convertToBase($amt, $fcrn_id, $date,$round = 6) {\n $source = $this->getSysCcmpCurrencySource($date);\n $rate = $this->getCurrencyRate($fcrn_id, $date,$source);\n if ($rate === FALSE) {\n return FALSE;\n }\n \n /**\n * @todo add convert type to fcsr_courrency_source as definition\n */\n if ($source == 2){\n return round($rate * $amt, $round);\n }\n return round($amt/$rate, $round);\n\n \n }", "public function getCurrency();", "public function getCurrency();", "public function testConverter(): void {\n $this->assertEquals(\n true,\n $this->object->loadController('Converter')\n );\n // Create a Converter Instance\n $converter = new \\controller\\Converter();\n $this->assertInstanceOf(\n \\controller\\Converter::class,\n $converter\n );\n\n $this->assertNotNull(\n $converter->callAPi('EUR', 'USD')\n );\n\n $this->assertEquals(\n null,\n $converter->convert('&1000')\n );\n $this->assertInternalType(\n \"float\",\n $converter->convert('$1000')\n );\n }", "function _wp_iso_convert($matches)\n {\n }", "public function freeConverter($amount, $from_currency, $to_currency)\n {\n\n $from_Currency = urlencode($from_currency);\n $to_Currency = urlencode($to_currency);\n $query = \"{$from_Currency}_{$to_Currency}\";\n\n $json = file_get_contents(\"https://free.currconv.com/api/v7/convert?q={$query}\" . \"&apiKey=259d66e2a7cccb4d60dd\");\n $obj = json_decode($json, true);\n $val = $obj['results'][\"$query\"]['val'];\n $total = $val * $amount;\n return number_format($total, 2, '.', '');\n }", "public function convertCurrency($data)\r\n {\r\n return $this->performRequest('POST', '/currency', $data);\r\n }", "function appliquerTVA($prixHT, $TVA) {\n $prixTTC = $prixHT + ($prixHT * $TVA / 100);\n echo \"Le prix TTC est de \";\n return $prixTTC . \"€\";\n}", "function testarConverter($moeda,$esperado){\r\n\r\n\t$troco = $moeda->converter($moeda);\r\n\r\n\tif($troco === $esperado){\r\n\r\n\t\treturn 'passou no teste , valor do convertido : '.$troco.\"\\n\";\r\n\r\n\t}\r\n\r\n\treturn 'Nao passou no teste , valor do convertido : '.$troco.\"\\n\";\r\n\r\n}", "function erp_get_currencies() {\n return apply_filters( 'erp_currencies', [\n 'AFN' => __( 'Afghan Afghani', 'erp' ),\n 'ALL' => __( 'Albanian Lek', 'erp' ),\n 'DZD' => __( 'Algerian Dinar', 'erp' ),\n 'ADP' => __( 'Andorran Peseta', 'erp' ),\n 'AOA' => __( 'Angolan Kwanza', 'erp' ),\n 'ARA' => __( 'Argentine Austral', 'erp' ),\n 'ARS' => __( 'Argentine Peso', 'erp' ),\n 'AMD' => __( 'Armenian Dram', 'erp' ),\n 'AWG' => __( 'Aruban Florin', 'erp' ),\n 'AUD' => __( 'Australian Dollar', 'erp' ),\n 'ATS' => __( 'Austrian Schilling', 'erp' ),\n 'AZN' => __( 'Azerbaijani Manat', 'erp' ),\n 'BSD' => __( 'Bahamian Dollar', 'erp' ),\n 'BHD' => __( 'Bahraini Dinar', 'erp' ),\n 'BDT' => __( 'Bangladeshi Taka', 'erp' ),\n 'BBD' => __( 'Barbadian Dollar', 'erp' ),\n 'BYR' => __( 'Belarusian Ruble', 'erp' ),\n 'BEF' => __( 'Belgian Franc', 'erp' ),\n 'BZD' => __( 'Belize Dollar', 'erp' ),\n 'BMD' => __( 'Bermudan Dollar', 'erp' ),\n 'BTN' => __( 'Bhutanese Ngultrum', 'erp' ),\n 'BOB' => __( 'Bolivian Boliviano', 'erp' ),\n 'BOV' => __( 'Bolivian Mvdol', 'erp' ),\n 'BOP' => __( 'Bolivian Peso', 'erp' ),\n 'BAM' => __( 'Bosnia-Herzegovina Convertible Mark', 'erp' ),\n 'BWP' => __( 'Botswanan Pula', 'erp' ),\n 'BRL' => __( 'Brazilian Real', 'erp' ),\n 'GBP' => __( 'British Pound Sterling', 'erp' ),\n 'BND' => __( 'Brunei Dollar', 'erp' ),\n 'BGN' => __( 'Bulgarian Lev', 'erp' ),\n 'BUK' => __( 'Burmese Kyat', 'erp' ),\n 'BIF' => __( 'Burundian Franc', 'erp' ),\n 'KHR' => __( 'Cambodian Riel', 'erp' ),\n 'CAD' => __( 'Canadian Dollar', 'erp' ),\n 'CVE' => __( 'Cape Verdean Escudo', 'erp' ),\n 'KYD' => __( 'Cayman Islands Dollar', 'erp' ),\n 'XOF' => __( 'CFA Franc BCEAO', 'erp' ),\n 'XAF' => __( 'CFA Franc BEAC', 'erp' ),\n 'XPF' => __( 'CFP Franc', 'erp' ),\n 'CLP' => __( 'Chilean Peso', 'erp' ),\n 'CNY' => __( 'Chinese Yuan', 'erp' ),\n 'COP' => __( 'Colombian Peso', 'erp' ),\n 'KMF' => __( 'Comorian Franc', 'erp' ),\n 'CDF' => __( 'Congolese Franc', 'erp' ),\n 'CRC' => __( 'Costa Rican Colón', 'erp' ),\n 'HRK' => __( 'Croatian Kuna', 'erp' ),\n 'CUP' => __( 'Cuban Peso', 'erp' ),\n 'CYP' => __( 'Cypriot Pound', 'erp' ),\n 'CZK' => __( 'Czech Republic Koruna', 'erp' ),\n 'DKK' => __( 'Danish Krone', 'erp' ),\n 'DJF' => __( 'Djiboutian Franc', 'erp' ),\n 'DOP' => __( 'Dominican Peso', 'erp' ),\n 'NLG' => __( 'Dutch Guilder', 'erp' ),\n 'XCD' => __( 'East Caribbean Dollar', 'erp' ),\n 'ECS' => __( 'Ecuadorian Sucre', 'erp' ),\n 'EGP' => __( 'Egyptian Pound', 'erp' ),\n 'GQE' => __( 'Equatorial Guinean Ekwele', 'erp' ),\n 'ERN' => __( 'Eritrean Nakfa', 'erp' ),\n 'EEK' => __( 'Estonian Kroon', 'erp' ),\n 'ETB' => __( 'Ethiopian Birr', 'erp' ),\n 'EUR' => __( 'Euro', 'erp' ),\n 'FKP' => __( 'Falkland Islands Pound', 'erp' ),\n 'FJD' => __( 'Fijian Dollar', 'erp' ),\n 'FIM' => __( 'Finnish Markka', 'erp' ),\n 'FRF' => __( 'French Franc', 'erp' ),\n 'GMD' => __( 'Gambian Dalasi', 'erp' ),\n 'GEL' => __( 'Georgian Lari', 'erp' ),\n 'DEM' => __( 'German Mark', 'erp' ),\n 'GHS' => __( 'Ghanaian Cedi', 'erp' ),\n 'GIP' => __( 'Gibraltar Pound', 'erp' ),\n 'GRD' => __( 'Greek Drachma', 'erp' ),\n 'GTQ' => __( 'Guatemalan Quetzal', 'erp' ),\n 'GWP' => __( 'Guinea-Bissau Peso', 'erp' ),\n 'GNF' => __( 'Guinean Franc', 'erp' ),\n 'GYD' => __( 'Guyanaese Dollar', 'erp' ),\n 'HTG' => __( 'Haitian Gourde', 'erp' ),\n 'HNL' => __( 'Honduran Lempira', 'erp' ),\n 'HKD' => __( 'Hong Kong Dollar', 'erp' ),\n 'HUF' => __( 'Hungarian Forint', 'erp' ),\n 'ISK' => __( 'Icelandic Króna', 'erp' ),\n 'INR' => __( 'Indian Rupee', 'erp' ),\n 'IDR' => __( 'Indonesian Rupiah', 'erp' ),\n 'IRR' => __( 'Iranian Rial', 'erp' ),\n 'IQD' => __( 'Iraqi Dinar', 'erp' ),\n 'IEP' => __( 'Irish Pound', 'erp' ),\n 'ILS' => __( 'Israeli New Sheqel', 'erp' ),\n 'ITL' => __( 'Italian Lira', 'erp' ),\n 'JMD' => __( 'Jamaican Dollar', 'erp' ),\n 'JPY' => __( 'Japanese Yen', 'erp' ),\n 'JOD' => __( 'Jordanian Dinar', 'erp' ),\n 'KZT' => __( 'Kazakhstani Tenge', 'erp' ),\n 'KES' => __( 'Kenyan Shilling', 'erp' ),\n 'KWD' => __( 'Kuwaiti Dinar', 'erp' ),\n 'KGS' => __( 'Kyrgystani Som', 'erp' ),\n 'LAK' => __( 'Laotian Kip', 'erp' ),\n 'LVL' => __( 'Latvian Lats', 'erp' ),\n 'LBP' => __( 'Lebanese Pound', 'erp' ),\n 'LSL' => __( 'Lesotho Loti', 'erp' ),\n 'LRD' => __( 'Liberian Dollar', 'erp' ),\n 'LYD' => __( 'Libyan Dinar', 'erp' ),\n 'LTL' => __( 'Lithuanian Litas', 'erp' ),\n 'LTT' => __( 'Lithuanian Talonas', 'erp' ),\n 'LUF' => __( 'Luxembourgian Franc', 'erp' ),\n 'MOP' => __( 'Macanese Pataca', 'erp' ),\n 'MKD' => __( 'Macedonian Denar', 'erp' ),\n 'MGA' => __( 'Malagasy Ariary', 'erp' ),\n 'MWK' => __( 'Malawian Kwacha', 'erp' ),\n 'MYR' => __( 'Malaysian Ringgit', 'erp' ),\n 'MVR' => __( 'Maldivian Rufiyaa', 'erp' ),\n 'MLF' => __( 'Malian Franc', 'erp' ),\n 'MTL' => __( 'Maltese Lira', 'erp' ),\n 'MRO' => __( 'Mauritanian Ouguiya', 'erp' ),\n 'MUR' => __( 'Mauritian Rupee', 'erp' ),\n 'MXN' => __( 'Mexican Peso', 'erp' ),\n 'MDL' => __( 'Moldovan Leu', 'erp' ),\n 'MCF' => __( 'Monegasque Franc', 'erp' ),\n 'MNT' => __( 'Mongolian Tugrik', 'erp' ),\n 'MAD' => __( 'Moroccan Dirham', 'erp' ),\n 'MZN' => __( 'Mozambican Metical', 'erp' ),\n 'MMK' => __( 'Myanmar Kyat', 'erp' ),\n 'NAD' => __( 'Namibian Dollar', 'erp' ),\n 'NPR' => __( 'Nepalese Rupee', 'erp' ),\n 'ANG' => __( 'Netherlands Antillean Guilder', 'erp' ),\n 'TWD' => __( 'New Taiwan Dollar', 'erp' ),\n 'NZD' => __( 'New Zealand Dollar', 'erp' ),\n 'NIO' => __( 'Nicaraguan Córdoba', 'erp' ),\n 'NGN' => __( 'Nigerian Naira', 'erp' ),\n 'KPW' => __( 'North Korean Won', 'erp' ),\n 'NOK' => __( 'Norwegian Krone', 'erp' ),\n 'OMR' => __( 'Omani Rial', 'erp' ),\n 'PKR' => __( 'Pakistani Rupee', 'erp' ),\n 'PAB' => __( 'Panamanian Balboa', 'erp' ),\n 'PGK' => __( 'Papua New Guinean Kina', 'erp' ),\n 'PYG' => __( 'Paraguayan Guarani', 'erp' ),\n 'PEI' => __( 'Peruvian Inti', 'erp' ),\n 'PHP' => __( 'Philippine Peso', 'erp' ),\n 'PLN' => __( 'Polish Zloty', 'erp' ),\n 'PTE' => __( 'Portuguese Escudo', 'erp' ),\n 'QAR' => __( 'Qatari Rial', 'erp' ),\n 'RHD' => __( 'Rhodesian Dollar', 'erp' ),\n 'RON' => __( 'Romanian Leu', 'erp' ),\n 'RUB' => __( 'Russian Ruble', 'erp' ),\n 'RWF' => __( 'Rwandan Franc', 'erp' ),\n 'SVC' => __( 'Salvadoran Colón', 'erp' ),\n 'WST' => __( 'Samoan Tala', 'erp' ),\n 'STD' => __( 'São Tomé & Príncipe Dobra', 'erp' ),\n 'SAR' => __( 'Saudi Riyal', 'erp' ),\n 'RSD' => __( 'Serbian Dinar', 'erp' ),\n 'SCR' => __( 'Seychellois Rupee', 'erp' ),\n 'SLL' => __( 'Sierra Leonean Leone', 'erp' ),\n 'SGD' => __( 'Singapore Dollar', 'erp' ),\n 'SKK' => __( 'Slovak Koruna', 'erp' ),\n 'SIT' => __( 'Slovenian Tolar', 'erp' ),\n 'SBD' => __( 'Solomon Islands Dollar', 'erp' ),\n 'SOS' => __( 'Somali Shilling', 'erp' ),\n 'ZAR' => __( 'South African Rand', 'erp' ),\n 'KRW' => __( 'South Korean Won', 'erp' ),\n 'SSP' => __( 'South Sudanese Pound', 'erp' ),\n 'ESP' => __( 'Spanish Peseta', 'erp' ),\n 'LKR' => __( 'Sri Lankan Rupee', 'erp' ),\n 'SHP' => __( 'St. Helena Pound', 'erp' ),\n 'SDG' => __( 'Sudanese Pound', 'erp' ),\n 'SRD' => __( 'Surinamese Dollar', 'erp' ),\n 'SZL' => __( 'Swazi Lilangeni', 'erp' ),\n 'SEK' => __( 'Swedish Krona', 'erp' ),\n 'CHF' => __( 'Swiss Franc', 'erp' ),\n 'SYP' => __( 'Syrian Pound', 'erp' ),\n 'TJS' => __( 'Tajikistani Somoni', 'erp' ),\n 'TZS' => __( 'Tanzanian Shilling', 'erp' ),\n 'THB' => __( 'Thai Baht', 'erp' ),\n 'TPE' => __( 'Timorese Escudo', 'erp' ),\n 'TOP' => __( 'Tongan Paʻanga', 'erp' ),\n 'TTD' => __( 'Trinidad & Tobago Dollar', 'erp' ),\n 'TND' => __( 'Tunisian Dinar', 'erp' ),\n 'TRY' => __( 'Turkish Lira', 'erp' ),\n 'TMT' => __( 'Turkmenistani Manat', 'erp' ),\n 'UGX' => __( 'Ugandan Shilling', 'erp' ),\n 'UAH' => __( 'Ukrainian Hryvnia', 'erp' ),\n 'AED' => __( 'United Arab Emirates Dirham', 'erp' ),\n 'UYU' => __( 'Uruguayan Peso', 'erp' ),\n 'USD' => __( 'US Dollar', 'erp' ),\n 'UZS' => __( 'Uzbekistan Som', 'erp' ),\n 'VUV' => __( 'Vanuatu Vatu', 'erp' ),\n 'VEF' => __( 'Venezuelan Bolívar', 'erp' ),\n 'VND' => __( 'Vietnamese Dong', 'erp' ),\n 'YER' => __( 'Yemeni Rial', 'erp' ),\n 'ZMW' => __( 'Zambian Kwacha', 'erp' ),\n 'ZWL' => __( 'Zimbabwean Dollar', 'erp' ),\n ] );\n}", "function conversion($monto, $tasa, $moneda_transaccion, $moneda_proveedor)\n{\n\n if ($moneda_transaccion != $moneda_proveedor) {\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n } else {\n $monto_pago = $monto;\n }\n\n return $monto_pago;\n}", "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "public function getOrderCurrencyCode();", "public function getBaseCurrencyCode();", "public function testConvertProductPrice()\n {\n $priceEur = 1000;\n $product = new Product();\n $product->setName('Product test');\n $product->setPrice(1000);\n $product->setCurrency('EUR');\n\n //test exchange method\n $conversorManager = new ConversorManager($this->entityManager);\n $response = $conversorManager->convertProductPrice($product, 'USD');\n\n //asserst\n $this->assertGreaterThan($priceEur ,$response);\n }", "public function testRomanNumbersConverter()\n {\n $converter = new \\App\\Converter();\n // 1 -> I\n // 2 -> II\n // 3 -> III\n // 4 -> IV\n // 5 -> V\n // 6 -> VI\n // 7 -> VII\n // 8 -> VIII\n // 9 -> IX\n // 10 -> X\n // 20 -> XX\n // 50 -> L\n // 100 -> C\n // 500 -> D\n // 1000 -> M\n\n $this->assertEquals('I', $converter->convert(1));\n $this->assertEquals('II', $converter->convert(2));\n $this->assertEquals('III', $converter->convert(3));\n $this->assertEquals('V', $converter->convert(5));\n $this->assertEquals('VI', $converter->convert(6));\n $this->assertEquals('VIII', $converter->convert(8));\n $this->assertEquals('XI', $converter->convert(11));\n $this->assertEquals('XIII', $converter->convert(13));\n $this->assertEquals('XVII', $converter->convert(17));\n $this->assertEquals('XIV', $converter->convert(14));\n $this->assertEquals('LXXXVI', $converter->convert(86));\n\n }", "public function getTargetCurrency();", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "public function priceToEur($price,$currency){\r\n \t\t$from = $currency;\r\n\t\t$to = Mage::app()->getStore()->getCurrentCurrencyCode();\r\n\t\t$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies(); \r\n\t\t$currencyRates = Mage::getModel('directory/currency')->getCurrencyRates('EUR', array_values($allowedCurrencies));\r\n\t\t$rate = 1/$currencyRates['USD'];\r\n\t\t$newPrice = $price*$rate;\r\n\t\treturn $newPrice;\r\n }", "public function getSourceCurrency();", "public function getToCurrency()\n {\n return $this->toCurrency;\n }", "public static function convert($amount, $from, $to){\n $data = file_get_contents(\"https://www.google.com/finance/converter?a=$amount&from=$from&to=$to\");\n preg_match(\"/<span class=bld>(.*)<\\/span>/\",$data, $converted);\n $converted = preg_replace(\"/[^0-9.]/\", \"\", $converted[1]);\n \n return round($converted, 2);\n }", "public function formatCurrency($amount);", "public function convert($name);", "function valorPorExtenso($valor = 0) {\r\n \r\n $valor = str_replace(\".\", \"\", $valor);\r\n \r\n $valor = str_replace(\",\", \".\", $valor);\r\n \r\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\r\n \r\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\", \"quatrilhões\");\r\n \r\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\r\n \r\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\r\n \r\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\r\n \r\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\");\r\n \r\n $z = 0;\r\n \r\n $valor = number_format($valor, 2, \".\", \".\");\r\n \r\n $inteiro = explode(\".\", $valor);\r\n \r\n for($i = 0; $i < count($inteiro); $i++) {\r\n \r\n for($ii = strlen($inteiro[$i]); $ii < 3; $ii++) {\r\n \r\n $inteiro[$i] = \"0\".$inteiro[$i];\r\n }\r\n }\r\n \r\n $fim = count($inteiro) - ($inteiro[count($inteiro) - 1] > 0 ? 1 : 2);\r\n \r\n for ($i = 0; $i < count($inteiro); $i++) {\r\n \r\n $valor = $inteiro[$i];\r\n \r\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\r\n \r\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\r\n \r\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\r\n \r\n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\r\n \r\n $t = count($inteiro) - 1 - $i;\r\n \r\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\r\n \r\n if ($valor == \"000\") \r\n $z++; \r\n elseif ($z > 0) \r\n $z--;\r\n \r\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) \r\n $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\r\n \r\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\r\n }\r\n\r\n return $rt ? trim($rt) : \"zero\";\r\n }", "public function convert($data);", "function normalize_phone_to_E164($phone) {\n\t$phone = preg_replace('/[^0-9+]/', '', $phone);\n\n\t// validate intl 10\n\tif(preg_match('/^\\+([2-9][0-9]{9})$/', $phone, $matches)){\n\t\treturn \"+{$matches[1]}\";\n\t}\n\n\t// validate US DID\n\tif(preg_match('/^\\+?1?([2-9][0-9]{9})$/', $phone, $matches)){\n\t\treturn \"+1{$matches[1]}\";\n\t}\n\n\n\t// validate INTL DID\n\tif(preg_match('/^\\+?([2-9][0-9]{8,14})$/', $phone, $matches)){\n\t\treturn \"+{$matches[1]}\";\n\t}\n\n\t// premium US DID\n\tif(preg_match('/^\\+?1?([2-9]11)$/', $phone, $matches)){\n\t\treturn \"+1{$matches[1]}\";\n\t}\n\n\treturn $phone;\n}", "public function convert(\n $fromValue,\n $fromType,\n $toType\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/convert';\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'user-id' => Configuration::$userId,\n 'api-key' => Configuration::$apiKey,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json'\n );\n\n //prepare parameters\n $_parameters = array (\n 'output-case' => 'camel',\n 'from-value' => $fromValue,\n 'from-type' => $fromType,\n 'to-type' => $toType\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl, $_parameters);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::post($_queryUrl, $_headers, Request\\Body::Form($_parameters));\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'NeutrinoAPILib\\\\Models\\\\ConvertResponse');\n }", "function convertToDryOz ($inputUnit, $inputValue) {\n\t\tswitch ($inputUnit) {\n\t\t\tcase 'lb':\n\t\t\t\t$valueConverted = $inputValue * 16;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t}\n\n}", "function GetConversionRate($currency_code) {\n $query = \"SELECT rate FROM conversion_rates WHERE currency='$currency_code';\";\n $result = $GLOBALS['conn']->query($query);\n\n $output = $result->fetch_row();\n return $output[0];\n }", "function translate2id($value) {\n switch($value) {\n //payment instruments\n case \"Überweisung\":\n return 4;\n case \"Bankeinzug\":\n return 2;\n case \"Bar\":\n return 3;\n \n //financial types\n case \"Erstattung Rücklastschriftgebühr\":\n return 12;\n case \"Mitgliedsbeitrag\":\n return 2; \n case \"Patenschaft\":\n return 7;\n case \"Spende\":\n return 10;\n }\n \n return $value;\n}", "public function convert($from, $to);", "public function getCurrency(): Currency;", "function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}" ]
[ "0.6376113", "0.6015519", "0.5948061", "0.5915423", "0.5866576", "0.5824682", "0.5818584", "0.5641872", "0.56192553", "0.557936", "0.5528508", "0.5499438", "0.5491809", "0.5453955", "0.5451526", "0.5445158", "0.5407453", "0.5381026", "0.536979", "0.53556776", "0.5346051", "0.5343367", "0.5332912", "0.5332828", "0.5332614", "0.5329131", "0.53095096", "0.52486354", "0.5244791", "0.52353483", "0.5226557", "0.522578", "0.5217658", "0.5209177", "0.520914", "0.52032596", "0.5202815", "0.51915133", "0.5169662", "0.5169662", "0.51619446", "0.50930977", "0.5089312", "0.5067905", "0.5066943", "0.50521827", "0.50521827", "0.50521827", "0.5045622", "0.5036125", "0.50205183", "0.500879", "0.50011605", "0.49844322", "0.4981875", "0.49799377", "0.49679554", "0.49670395", "0.49582937", "0.49485406", "0.49466237", "0.49383777", "0.48953363", "0.48891306", "0.487876", "0.48710507", "0.48621422", "0.4860692", "0.4860692", "0.48502558", "0.48490766", "0.48466498", "0.48401013", "0.483231", "0.48302948", "0.4828622", "0.4827986", "0.48257193", "0.48220995", "0.48086306", "0.48027492", "0.47954035", "0.47864896", "0.4781187", "0.47801545", "0.47784695", "0.4775327", "0.47686246", "0.4764118", "0.47527465", "0.47480533", "0.47447252", "0.47372326", "0.4721512", "0.4713911", "0.471167", "0.4707075", "0.47067067", "0.4704167", "0.47019416" ]
0.4912208
62
Returns whether $code appears in the OrigCurrency element of the XML.
public function isOriginalCurrency($code) { return $this->getOriginalCurrency() === strtoupper($code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInISO($code) {\n $xml = simplexml_load_file('http://www.currency-iso.org/dam/downloads/lists/list_one.xml');\n $result = $xml -> xpath(\"//CcyNtry[Ccy='{$code}']\");\n if($result != null) {\n return true;\n } else {\n return false;\n }\n }", "public function has($code) {\n\t\treturn array_key_exists(strtoupper($code), $this->currencies);\n\t}", "private function findElByCode($code) {\n\t $result = false;\n\n\t foreach ($this->currencies as $el) {\n\t\t if ((string) $el->code === strtoupper($code)) {\n\t\t\t $result = $el;\n\t\t }\n\t }\n\n return $result;\n }", "function tep_currency_exists($code) {\n $code = tep_db_prepare_input($code);\n\n $currency_code = tep_db_query(\"select currencies_id from \" . TABLE_CURRENCIES . \" where code = '\" . tep_db_input($code) . \"'\");\n if (tep_db_num_rows($currency_code)) {\n return $code;\n } else {\n return false;\n }\n }", "public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "static function codeExists($code)\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_discount_coupon`\n WHERE `code`='\".addslashes($code).\"'\";\n $objResult = $objDatabase->Execute($query);\n // Failure or none found\n if (!$objResult) {\n // Failure! Assume that the code exists.\n return true;\n }\n if ($objResult->EOF) {\n return false;\n }\n return true;\n }", "function has_discount( $code ) {\n\t\t\tif (in_array($code, $this->applied_coupons)) return true;\n\t\t\treturn false;\n\t\t}", "static function get_country($code) {\n $countries = self::get_countries();\n foreach($countries as $c) {\n if($c->code == $code || $c->code2l == $code) {\n return $c;\n }\n }\n return FALSE;\n }", "public function getNamespaceFromSource($code)\n {\n if (preg_match('/namespace\\s*([^;]+);/', $code, $m)==1) {\n return trim($m[1]);\n }\n\n return false;\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function getCurrencyIdByCode($code) {\n $this->sError = FALSE;\n\n if ($this->_currencyCode2Id === FALSE) {\n $this->_loadCurrencyCodes();\n }\n\n if (!isset($this->_currencyCode2Id[$code])) {\n $this->sError = 'Incorect currency code: ' . $code;\n return FALSE;\n }\n\n return $this->_currencyCode2Id[$code];\n }", "public static function isCertificateCode($code)\n\t{\n\t\treturn preg_match('#^[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}$#', $code) && gzte11(ISC_LARGEPRINT);\n\t}", "public static function isValid( $code )\n {\n return in_array(\n strtoupper( $code ),\n [\n self::AFRICA,\n self::ASIA,\n self::EUROPE,\n self::NORTH_AMERICA,\n self::OCEANIA,\n self::SOUTH_AMERICA,\n self::ANTARCTICA,\n ]\n );\n }", "public function codeExists($code) {\n $res = $this->createQuery(\"c\")\n ->select(\"c.*\")\n ->where(\"c.code_num = ?\", array($code))\n ->limit(1)\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n\n return (bool) $res;\n }", "protected function getCountryByCode(string $code)\n {\n global $db;\n require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';\n $pays = new \\Ccountry($db);\n if ($pays->fetch(0, $code) > 0) {\n return $pays->id;\n }\n\n return false;\n }", "public function hasCodeType(){\n return $this->_has(3);\n }", "function CheckIfCurrencyExists($currency_code) {\n $query = \"SELECT * FROM conversion_rates WHERE currency='$currency_code';\";\n $result = mysqli_num_rows($GLOBALS['conn']->query($query));\n\n return ($result != 0) ? true : false;\n }", "public function couponExists($code)\n\t{\n\t\t$sql = \"SELECT cnId FROM `#__storefront_coupons` WHERE `cnCode` = \" . $this->_db->quote($code);\n\n\t\t$this->_db->setQuery($sql);\n\t\t$cnId = $this->_db->loadResult();\n\n\t\treturn $cnId;\n\t}", "private function code_exists($code) {\n\t\t$code = $this->db->escape_str($code);\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as num_rows FROM exp_shortee_urls WHERE BINARY code = '$code'\");\n\n\t\t$row = $query->row_array();\n\n\t\treturn ($row['num_rows'] > 0) ? true : false;\n\t}", "public function isCode(int $code): bool\n {\n return $this->code === $code;\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCreditProduct(){\n foreach($this->cart->getQuote()->getAllItems() as $item){\n if($item->getProductType() == \\Vnecoms\\Credit\\Model\\Product\\Type\\Credit::TYPE_CODE)\n return true;\n }\n \n return false;\n }", "public function isCredit()\r\n\t{\r\n\t\treturn $this->root->getAttribute('credit') == 'oui';\r\n\t}", "public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }", "function codeUsed($a_cp_id, $a_code)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\" FROM adn_ep_assignment\".\n\t\t\t\" WHERE cp_professional_id = \".$ilDB->quote($a_cp_id, \"integer\").\n\t\t\t\" AND access_code = \".$ilDB->quote($a_code, \"text\")\n\t\t\t);\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function get_coupon( $code ) {\n\t\t$this->code = apply_filters( 'woocommerce_coupon_code', $code );\n\n\t\t// Coupon data lets developers create coupons through code\n\t\tif ( $coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $this->code ) ) {\n\t\t\t$this->populate( $coupon );\n\t\t\treturn true;\n\t\t}\n\n\t\t// Otherwise get ID from the code\n\t\t$this->id = $this->get_coupon_id_from_code( $this->code );\n\n\t\tif ( $this->code === apply_filters( 'woocommerce_coupon_code', get_the_title( $this->id ) ) ) {\n\t\t\t$this->populate();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function isKnown($code)\n\t{\n\t\treturn !empty(self::getClass($code));\n\t}", "public function hasCode(){\n return $this->_has(3);\n }", "public function hasCode(int $code): bool\n {\n try {\n $code = $this->filterCode($code);\n } catch (InvalidArgumentException $e) {\n return false;\n }\n\n return isset($this->values[$code]);\n }", "public function equals(Currency $currency): bool\n {\n return $currency->getCode() === $this->code;\n }", "function checkIfCodeExists() {\n $voucher = new Voucher();\n $voucher->where('code', $this->getCode());\n return $voucher->count() > 0;\n }", "function getCheese($code)\n {\n foreach( $this->xml->cheeses->cheese as $cheese )\n {\n if( $cheese['code'] == $code )\n {\n $result['code'] = (string) $cheese['code'];\n $result['price'] = (string) $cheese['price'];\n $result['name'] = (string) $cheese;\n\n return $result;\n }\n }\n\n return 1;\n }", "public function current($code = null)\n {\n if (!$code) {\n if (!$this->current) {\n if (!$this->current(Cookie::get('currency') ?? $this->getDefault())) {\n if (($cookie = Cookie::get('currency')) && !$this->findByCode($cookie)) {\n $this->current($this->getDefault());\n } else {\n $this->setDefault(null)->current();\n }\n }\n }\n return $this->current;\n }\n\n if (($currency = $this->findByCode($code)) && data_get($this->current, 'code') != $currency->code) {\n $this->current = $currency;\n if (Cookie::get('currency') != data_get($this->current, 'code')) {\n Cookie::queue(Cookie::forever('currency', $code));\n $this->events->fire('currency.changed');\n }\n return true;\n }\n\n return false;\n }", "public function isPostcodeIncluded(int $postcode): bool;", "public static function pre_use_voucher($voucher_code)\n {\n if($voucher_code) Session::instance()->set(\"vchc\", $voucher_code); \n \n $voucher=static::get_voucher();\n \n return (is_object($voucher) && $voucher->id)?true:false;\n }", "function getSauce( $code )\n {\n foreach( $this->xml->sauces->sauce as $sauce )\n {\n if( $sauce['code'] == $code )\n {\n $result['code'] = (string) $sauce['code'];\n $result['price'] = (string) $sauce['price'];\n $result['name'] = (string) $sauce;\n\n return $result;\n }\n }\n\n return 1;\n }", "public function checkPinterestCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Pinterest is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }", "public function includesCountryCode($vatNumber)\n {\n $countryCode = substr(str_replace(' ', '', trim($vatNumber)), 0, 2);\n if (array_key_exists(strtoupper($countryCode), Mage::helper('multibyte_vatfix/countries')->getCountries())) {\n return true;\n }\n\n return;\n }", "public function GetRate($code)\n\t{\n\t\tif (is_string($code))\n\t\t{\n\t\t\t$code = strtoupper(trim($code));\n\t\t\treturn (isset($this->rates['byChCode'][$code])) ? $this->rates['byChCode'][$code] : false;\n\t\t\n\t\t}\n\t\telseif (is_numeric($code))\n\t\t{\n\t\t\treturn (isset($this->rates['byCode'][$code])) ? $this->rates['byCode'][$code] : false;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\t\t\n\t\t}\n\t}", "function check_category_code($category_code){\n\t\t\tif($this->db->get_where('category',array('code'=>$category_code))->num_rows()>0 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private function verify_purchase_code($code)\n { \n if( !empty($this->get_option('integrationsEnvatoAPIKey')) && (!empty($this->get_option('integrationsEnvatoUsername'))) ) {\n $token = $this->get_option('integrationsEnvatoAPIKey');\n $username = $this->get_option('integrationsEnvatoUsername');\n } else {\n return false;\n }\n\n $envato = new DB_Envato($token);\n\n $purchase_data = $envato->call('/market/author/sale?code=' . $code);\n \n if(isset($purchase_data->error)) {\n return false;\n }\n\n return $purchase_data;\n }", "public function isWithoutCurrencyCode(): bool\n {\n return self::ISO_STATUS_WITHOUT_CURRENCY_CODE === $this->isoStatus;\n }", "function isCNRQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cnr\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isCNPQuote($quote){\n\t\n\tif(strtolower($quote->quoteType) == \"cnp\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function canDisplayCustomValue()\n {\n $carrierCode = $this->getShipment()->getCarrierCode();\n\n if (!$carrierCode) {\n return false;\n }\n\n return in_array($carrierCode, $this->carrierCodeList);\n }", "private function getCurrencyExchangeRates(){\n\t\t\n\t\t//function needs ini to allow_url_fopen\n\t\tif(!ini_get('allow_url_fopen')){\n\t\t\t$this->error = \"ERROR - PHP.ini needs allow_url_fopen set to on\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$XML = $this->returnCurrencyXML()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->createCurrencyArray($XML)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!isSet($this->currencyRates) || empty($this->currencyRates)){\n\t\t\t$this->error = \"ERROR - there was an error converting the XML data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private function hasInvitationCode()\n {\n if (isset($this->data['invitation_code']) && !empty($this->data['invitation_code'])) {\n return true;\n }\n\n return false;\n }", "private function searchCodeThreeLevels($code){\n\t \t$codigosTresNiveles = array('020.010.010','020.010.020','020.010.030','050.020.010','050.020.020',\n\t\t\t\t\t\t\t\t\t'050.020.030','050.030.010','050.030.020','060.010.010','060.010.020',\n\t\t\t\t\t\t\t\t\t'060.010.030','060.010.040','060.010.050','060.020.010','060.020.020',\n\t\t\t\t\t\t\t\t\t'060.020.030','060.020.040','060.020.050','060.020.060','060.030.010',\n\t\t\t\t\t\t\t\t\t'060.030.020');\n\t\treturn in_array($code, $codigosTresNiveles);\n\t}", "function check_code($str)\n\t{\n\t\t$code = $this->Coupon_model->check_code($str, $this->coupon_id);\n if ($code)\n \t{\n\t\t\t$this->form_validation->set_message('check_code', lang('error_already_used'));\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function isExcludedWith($adjustmentCode);", "public function getClassnameFromSource($code)\n {\n if (preg_match('/\\bclass[\\s\\r\\n]*([a-zA-Z0-9_]+)\\b/', $code, $m)==1) {\n return $m[1];\n }\n\n return false;\n }", "function is_competency_node($key) {\n\tif (strpos($key,\"http://asn.desire2learn.com/resources/\") !== false && strpos($key, \".xml\") === false)\n\t\treturn true;\n\telse return false;\t\n}", "public function hasScoreCode(){\n return $this->_has(3);\n }", "public function checkCurrency()\n {\n $idCurrency = $this->context->cart->id_currency;\n\n $currency = new Currency($idCurrency);\n $moduleCurrencies = $this->getCurrency($idCurrency);\n\n if (is_array($moduleCurrencies)) {\n foreach ($moduleCurrencies as $moduleCurrency) {\n if ($currency->id == $moduleCurrency['id_currency']) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function isCurrencyValid($str)\n {\n if ($str === 'XTS' || strlen($str) !==3 || empty($this->repository->supplemental['codeMappings'][$str])) {\n return false;\n }\n\n return true;\n }", "public function issetProductCode(): bool\n {\n return isset($this->productCode);\n }", "public function issetProductCode(): bool\n {\n return isset($this->productCode);\n }", "function isCNSQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cns\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function displayCustomsValue()\n {\n $storeId = $this->getRma()->getStoreId();\n $order = $this->getRma()->getOrder();\n $carrierCode = $this->getShipment()->getCarrierCode();\n if (!$carrierCode) {\n return false;\n }\n $address = $order->getShippingAddress();\n $shipperAddressCountryCode = $address->getCountryId();\n $recipientAddressCountryCode = $this->_rmaData->getReturnAddressModel($storeId)->getCountryId();\n\n return $shipperAddressCountryCode != $recipientAddressCountryCode && $this->canDisplayCustomValue();\n }", "public function setStoreCurrencyCode($code);", "function check_coupon($code, $blog_id = false, $level = false) {\r\n $coupon_code = preg_replace('/[^A-Z0-9_-]/', '', strtoupper($code));\r\n\r\n //empty code\r\n if (!$coupon_code)\r\n return false;\r\n\r\n $coupons = (array)get_site_option('psts_coupons');\r\n\t\t\r\n\t\t//allow plugins to override coupon check by returning a boolean value\r\n\t\tif ( is_bool( $override = apply_filters('psts_check_coupon', null, $coupon_code, $blog_id, $level, $coupons) ) )\r\n\t\t\treturn $override;\r\n\t\t\r\n //no record for code\r\n if (!isset($coupons[$coupon_code]) || !is_array($coupons[$coupon_code]))\r\n return false;\r\n\r\n //if specific level and not proper level\r\n if ($level && $coupons[$coupon_code]['level'] != 0 && $coupons[$coupon_code]['level'] != $level)\r\n return false;\r\n\r\n //start date not valid yet\r\n if (time() < $coupons[$coupon_code]['start'])\r\n return false;\r\n\r\n //if end date and expired\r\n if (isset($coupons[$coupon_code]['end']) && $coupons[$coupon_code]['end'] && time() > $coupons[$coupon_code]['end'])\r\n return false;\r\n\r\n //check remaining uses\r\n if (isset($coupons[$coupon_code]['uses']) && $coupons[$coupon_code]['uses'] && (intval($coupons[$coupon_code]['uses']) - intval(@$coupons[$coupon_code]['used'])) <= 0)\r\n return false;\r\n\t\t\r\n\t\t//check if the blog has used the coupon before\r\n\t\tif ($blog_id) {\r\n\t\t\t$used = get_blog_option($blog_id, 'psts_used_coupons');\r\n\t\t\tif (is_array($used) && in_array($coupon_code, $used))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n //everything passed so it's valid\r\n return true;\r\n }", "private function returnCurrencyXML(){\n\t\t\n\t\t// ****************** POSSIBLE SECURITY RISK!!!! *********************\n\t // Get xml of currency exchange rates\n\t $XML=simplexml_load_file(\"http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml\");\n\t //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET\n\t\t\n\t\t// check it is XML\n\t\tif($XML === false){\n\t\t\t$this->error = \"ERROR - there was an error parsing the XML from the provider\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $XML;\n\t}", "public function isInstalled($code) {\n\t\t$extension_data = array();\n\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension WHERE `code` = '\" . $this->db->escape($code) . \"'\");\n\t\tif($query->row) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\t\n\t}", "public function codeIsValid(string $code): bool\n {\n return $this->constantValueExists($code);\n }", "public function checkSalesCenterCode($code) {\n $count = Salescenter::where('code', $code)->count();\n return $count;\n }", "public function getCouponByCode($code)\n {\n CI::db()->where('code', $code);\n $return = CI::db()->get('coupons')->row();\n \n if(!$return)\n {\n return false;\n }\n $return->product_list = $this->getProductIds($return->id);\n return $return;\n }", "public function hasExceptionOfCode($code)\n {\n $code = (int) $code;\n foreach ($this->_exceptions as $e) {\n if ($code == $e->getCode()) {\n return true;\n }\n }\n\n return false;\n }", "protected function IsValidCode($code)\n\t\t{\n\t\t\tif (preg_match('/^[a-z]{3}$/i', $code)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function isSameCurrency(Money $money): bool;", "private function checkCurrency()\n {\n $currency_order = new Currency($this->context->cart->id_currency);\n $currencies_module = $this->module->getCurrency($this->context->cart->id_currency);\n // Check if cart currency is one of the enabled currencies\n if (is_array($currencies_module)) {\n foreach ($currencies_module as $currency_module) {\n if ($currency_order->id == $currency_module['id_currency']) {\n return true;\n }\n }\n }\n // Return false otherwise\n return false;\n }", "public static function getCurrencyForCode($code)\r\n {\r\n\treturn self::getCurrencySource()->getCurrencyForCode($code);\r\n }", "public function isUsedInForm($attributeCode, $formCode = 'customer_register_address', $entityType = \\Magento\\Customer\\Api\\AddressMetadataInterface::ENTITY_TYPE_ADDRESS)\n {\n $attributeId = $this->eavAttribute->getIdByCode( $entityType, $attributeCode);\n $bind = ['attribute_id' => $attributeId, 'form_code' => $formCode];\n $select = $this->resource->getConnection()->select()->from(\n $this->resource->getTableName('customer_form_attribute'),\n 'attribute_id'\n )->where(\n 'attribute_id = :attribute_id AND form_code = :form_code'\n );\n return $this->resource->getConnection()->fetchRow($select, $bind);\n }", "public function removeCODCharge()\n {\n return (1 == $this->getConfig('packages/remove_cod_charge'));\n }", "public function isDifferentCurrency(Money $money): bool;", "public function exists(string $code, array $codes = []): bool\n {\n return \\in_array($code, $codes) || $this->vouchers()->code($code)->exists();\n }", "public function hasActivateCode(){\n return $this->_has(10);\n }", "public function hasActivateCode(){\n return $this->_has(10);\n }", "public function isCurrencyEuro()\n {\n $currency = Shopware()->Shop()->getCurrency()->getCurrency();\n\n if ($currency != 'EUR') {\n return false;\n }\n return true;\n }", "public function checkCodeExist($id, $code) {\n\t\t$query = $this->db->get_where ( \"languages\", array (\n\t\t\t\t\"code\" => $code\n\t\t) );\n\t\t$lang1 = $this->getLangById ( $id );\n\t\tif ($query->num_rows () > 0) {\n\t\t\t$lang = $query->row ();\n\t\t\tif ($lang->code == $lang1->code)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function issetProductNumberCode(): bool\n {\n return isset($this->productNumberCode);\n }", "function is_include_operator($code) {\n return $code === \"include\";\n }", "public function checkEnabledByCode($urlCode) {\r\n\t\t$sql = \"Select Count(*) As cnt From `#languages` Where `url_code` = '$url_code' And is_enabled = 1\"; \r\n\t\t$rs = $this->_get($sql); \r\n\t\tif ($rs !== false){\r\n\t\t\tif ($rs->cnt != 0) return true; \r\n\t\t}\r\n\t\treturn false; \r\n\t}", "function isCNSPQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cnsp\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function has_discount( $coupon_code = '' ) {\n\t\treturn $coupon_code ? in_array( wc_format_coupon_code( $coupon_code ), $this->applied_coupons, true ) : count( $this->applied_coupons ) > 0;\n\t}", "public function hasActivateCode(){\n return $this->_has(3);\n }", "function getNumericCountryCode($iso2Code){\r\n\t\t$resource = \"countries\";\r\n\t\t$countriesArray = $this->getResource($resource, null, 'All');\r\n\t\tif($countriesArray){\r\n\t\t\tforeach ($countriesArray as $country) {\r\n\t\t\t\tif($country->Alpha2Code == $iso2Code){\r\n\t\t\t\t\treturn $country->NumericCode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function hasEthnicOrigin() {\n return $this->_has(7);\n }", "public function hasField($fieldCode)\n {\n if($this->getFieldValue($fieldCode)){\n \treturn true;\n }\n return false;\n }", "public function setOrderCurrencyCode($code);", "public static function isEuCountry($countryCode)\n {\n return in_array(strtoupper($countryCode), self::$euCountries) ? true : false;\n }", "public function is_exists($code)\n {\n $ext = $this->receive_po_request_model->is_exists($code);\n if($ext)\n {\n echo 'เลขที่เอกสารซ้ำ';\n }\n else\n {\n echo 'not_exists';\n }\n }", "public function checkgiftcardcode() {\n global $loguser;\n $curr_email = $loguser['email'];\n $code = $_GET['gfcode_value'];\n $getgfcardval = TableRegistry::get('Giftcards')->find()->where(['giftcard_key' => $code])->first();\n if (!empty($getgfcardval)) {\n $recEmail = $getgfcardval->reciptent_email;\n $gfcardId = $getgfcardval->id;\n $gfcardAmt = $getgfcardval->avail_amount;\n if ($gfcardAmt <= 0) {\n echo \"2\";\n die;\n } else if ($recEmail == $curr_email) {\n echo '1' . '*|*' . $gfcardId;\n die;\n } else {\n echo '0';\n die;\n }\n } else {\n echo '0';\n die;\n }\n }", "private function IsProperty($code) {\n\t\t$parent = '/^' . $this->bxPrefix . '[A-z\\d\\[\\]]+$/';\n\n\t\treturn preg_match($parent, $code);\n\t}", "public function find_in_cache( $code_id ) {\n\n\t\tforeach ( $this->found_codes as $code ) {\n\t\t\tif ( absint( $code->get_prop( 'ID' ) ) === absint( $code_id ) ) {\n\t\t\t\treturn $code;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function equalsTo(Currency $currency)\n {\n return $this->getCode() == $currency->getCode();\n }", "static public function isZipCodeFormat($zip_code)\n {\n if (!empty($zip_code))\n return preg_match('/^[NLCnlc -]+$/', $zip_code);\n return true;\n }" ]
[ "0.7249582", "0.6548625", "0.63530695", "0.616148", "0.613512", "0.581938", "0.581938", "0.5816914", "0.5813855", "0.580396", "0.5651243", "0.56309867", "0.56309867", "0.55289704", "0.55249566", "0.55030996", "0.5494372", "0.5493275", "0.5476785", "0.54743254", "0.5421173", "0.53593016", "0.53410965", "0.53358907", "0.53358907", "0.5327403", "0.5276778", "0.52452785", "0.5212519", "0.51665616", "0.5145369", "0.5132615", "0.51034427", "0.50688255", "0.5059489", "0.5002158", "0.50004417", "0.49936053", "0.49936047", "0.49920782", "0.4987976", "0.49869812", "0.49748823", "0.49639738", "0.49556944", "0.49544984", "0.49459773", "0.49345464", "0.4926477", "0.48925892", "0.48721272", "0.4867257", "0.48643196", "0.4860798", "0.4834508", "0.48330918", "0.48279017", "0.48274142", "0.48146188", "0.480855", "0.480855", "0.47859934", "0.47747508", "0.47740763", "0.47586995", "0.47547558", "0.47528723", "0.47518817", "0.4748419", "0.47364792", "0.4725948", "0.4713148", "0.4711702", "0.47063234", "0.46997255", "0.46963298", "0.4682448", "0.46819064", "0.46803835", "0.46718812", "0.46718812", "0.46679264", "0.46674", "0.46577123", "0.4656831", "0.46508774", "0.46502966", "0.46394816", "0.46375707", "0.4633802", "0.4611633", "0.4609543", "0.46047756", "0.4603", "0.4601181", "0.45975003", "0.45973706", "0.45967266", "0.4594998", "0.45935538" ]
0.7188052
1
Get the stub file for the generator.
public function getPublishedStubFileName(): ?string { return 'console.stub'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'seeder.stub');\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().'/default.stub');\n }", "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'console.stub');\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__ . '/stubs/view.stub';\n }\n\n return __DIR__ . '/stubs/table.stub';\n }", "private function getStub()\n {\n return $this->files->get($this->stubPath);\n }", "protected function getStub()\n {\n if ($stub = $this->option('stub')) {\n return $stub;\n }\n\n if ($this->option('model')) {\n return __DIR__.'/stubs/controller.stub';\n }\n\n return __DIR__.'/stubs/blank.stub';\n }", "protected function getStub()\n {\n return config('crudgenerator.custom_template')\n ? config('crudgenerator.path') . '/acl-migration.stub'\n : __DIR__ . '/../stubs/acl-migration.stub';\n }", "protected function getStub()\n {\n return $this->collection()\n ? __DIR__.'/stubs/resource-collection.stub'\n : __DIR__.'/stubs/resource.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/partial_stubs/model.stub';\n }", "protected function getStub() {\n $stub = null;\n\n if ($this->option('crud')) {\n return __DIR__ . '/stubs/schema.crud.stub';\n }else if ($this->option('progressive')) {\n return __DIR__ . '/stubs/schema.progressive.stub';\n }else if ($this->option('report')) {\n return __DIR__ . '/stubs/schema.report.stub';\n }else if ($this->option('chart')) {\n return __DIR__ . '/stubs/schema.chart.stub';\n }\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/form.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n if ($this->option('validator')) {\n return __DIR__.'/stubs/factory-validator.stub';\n } else {\n return __DIR__.'/stubs/factory-no-validator.stub';\n }\n }", "protected function getStub()\n {\n return base_path() . '/resources/stubs/model.stub';\n }", "protected function getStub()\n {\n return resource_path('stubs/view.stub');\n }", "protected function getStub()\n {\n return $this->option('model')\n ? __DIR__ . '/stubs/service.stub'\n : __DIR__ . '/stubs/service_default.stub';\n }", "protected function getStub()\n {\n $stub = __DIR__.'/../stubs/contracts/contract';\n\n if ($this->option('extends')) {\n $stub .= '.extends';\n }\n\n return $stub.'.stub';\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().\"/create.attribute.stub\");\n }", "protected function getStub()\n {\n $dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';\n// if ($this->option('unit')) {\n// return $dir.'/stubs/unit-test.stub';\n// }\n\n return $dir. DIRECTORY_SEPARATOR .'stubs'. DIRECTORY_SEPARATOR .'test.stub';\n }", "protected function getStub()\n {\n if ($this->option('component')) {\n return __DIR__ . '/Stubs/FacadeComponent.stub';\n }\n return __DIR__ . '/Stubs/Facade.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/views/plain.stub';\n }", "protected function getStub()\n {\n return $this->getStubDir() . '/model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/Factory.stub';\n }", "protected function getStub()\n {\n if ($this->option('plain')) {\n return __DIR__.'/stubs/base-controller.plain.stub';\n }\n\n return __DIR__.'/stubs/base-controller.stub';\n }", "protected function getStub()\n {\n $stub = null;\n\n if ($this->option('parent')) {\n $stub = '/stubs/controller.nested.stub';\n } elseif ($this->option('model')) {\n $stub = '/stubs/controller.model.stub';\n } elseif ($this->option('resource')) {\n $stub = '/stubs/controller.stub';\n }\n\n if ($this->option('api') && is_null($stub)) {\n $stub = '/stubs/controller.api.stub';\n } elseif ($this->option('api') && ! is_null($stub)) {\n $stub = str_replace('.stub', '.api.stub', $stub);\n }\n\n $stub = $stub ?? '/stubs/controller.plain.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub(): string\n {\n return $this->resolveStubPath(\n $this->option('markdown') !== false\n ? '/stubs/markdown-mail.stub'\n : '/stubs/mail.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/kompo-'.($this->option('demo') ? 'demo-' : '').'form.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../../../resources/stubs/views/view.stub';\n }", "protected function getStub()\n {\n $type = (!is_null($this->option('type')) && in_array($this->option('type'), ['plain', 'extended']))\n ? $this->option('type')\n : 'plain';\n\n return __DIR__ . \"/stubs/responder/{$type}.stub\";\n }", "protected function getStub()\n {\n if ($this->option('pivot')) {\n return parent::getStub();\n }\n\n return __DIR__ . '/stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/interface.php.stub';\n }", "protected function getStub()\n {\n if ($this->option('trait')) {\n return __DIR__.'/../Stubs/Trait.stub';\n }\n if ($this->option('interface')) {\n return __DIR__.'/../Stubs/Interface.stub';\n }\n\n return __DIR__.'/../Stubs/Class.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/seed.stub';\n }", "protected function getStub()\n\t{\n\t\treturn $this->resolveStubPath('/stubs/integration-manifest.stub');\n\t}", "protected function getStub()\n {\n return config('laravel-crud-generator.custom_template')\n ? config('laravel-crud-generator.path') . '/model.stub'\n : __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/bfg-component.stub');\n }", "protected function getStub()\n {\n if ($this->option('request')) {\n return __DIR__.'/stubs/mutator-request.stub';\n } elseif ($this->option('clean')) {\n return __DIR__.'/stubs/mutator-clean.stub';\n } else {\n return __DIR__.'/stubs/mutator.stub';\n }\n }", "protected function getStub()\n {\n if ($this->option('service')) {\n return __DIR__.'/stubs/controller.service.stub';\n } elseif($this->option('base')) {\n return __DIR__.'/stubs/controller.base.stub';\n } elseif($this->option('otp')) {\n return __DIR__.'/stubs/controller.service.otp.stub';\n }\n return __DIR__.'/stubs/controller.plain.stub';\n }", "protected function getStub()\n {\n return file_get_contents(__DIR__ . '/../../Stubs/' . ucfirst($this->type() . 'Task.php'));\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "public function getStub()\n {\n return File::get(__DIR__.'/../stubs/migrations/migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/bond.stub';\n }", "private function getStub()\n {\n return app_path() . '\\Stubs\\repository_contract.stub';\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__.'/stubs/controller/controller.view.stub';\n }\n\n return __DIR__.'/stubs/controller/controller.api.stub';\n }", "protected function getStub()\n {\n return realpath(__DIR__) .str_replace('/', DS, '/stubs/reminders.stub');\n }", "protected function getStub()\n {\n return $this->getStubsPath() . 'controller.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../stubs/abstract/iservice.stub';\n }", "protected function getStub()\n {\n if ($this->option('model')) {\n return __DIR__ . '/Stubs/CrudRepository.stub';\n }\n\n return __DIR__ . '/Stubs/Repository.stub';\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/php_cs.stub';\n }", "protected function getStub()\n {\n return app_path('Console/Commands/stubs/form-request.stub');\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/service.stub');\n }", "protected function getStub()\n {\n return $this->option('pivot')\n ? $this->resolveStubPath('/stubs/base_stubs/model.pivot.stub')\n : $this->resolveStubPath('/stubs/base_stubs/model.stub');\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/interaction.stub';\n }", "protected function getStub(): string\n\t{\n\t\treturn __DIR__ . '/../../../stubs/action.interface.stub';\n\t}", "protected function getStub():string\n {\n return __DIR__ . '/stubs/controller.stub';\n }", "protected function getStub()\n {\n return $this->option('model')\n ? $this->resolveStubPath('/stubs/observer.stub')\n : $this->resolveStubPath('/stubs/observer.plain.stub');\n }", "protected function getStub()\n {\n return app_path() . '\\Console\\stubs\\controller.stub';\n }", "public function getStub()\n {\n if ($this->option('pivot')) {\n return __DIR__.'/../../stubs/pivot.model.stub';\n }\n\n return __DIR__.'/../../stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n if (!$this->option('pivot')) {\n return __DIR__.'/stubs/model.stub';\n }\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/repository-interface.stub';\n }", "protected function getStub()\n {\n return base_path('resources' . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'SystemParameter.stub');\n }", "protected function getStub(): string\n {\n return base_path('stubs/vue-component.stub');\n }", "protected function getStub()\n {\n return app_path('Core/Stub/Migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/form-request.stub';\n }", "protected function getStub()\n {\n return base_path('stubs\\service.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/service.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'request.stub';\n }", "protected function getStub()\n {\n if ($this->option('array')) {\n return $this->copyFrom('/stubs/export.array.stub');\n } elseif ($this->option('model')) {\n return $this->copyFrom('/stubs/export.model.stub');\n } elseif ($this->option('query')) {\n return $this->copyFrom('/stubs/export.query.stub');\n }\n\n return $this->copyFrom('/stubs/export.collection.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/transformer.stub';\n }", "protected function getStub()\n\t{\n\t\treturn __DIR__.'/stubs/api.stub';\n\t}", "protected function getStub()\n {\n return __DIR__ . '/../stubs/repository.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/api-consumer-endpoint.stub';\n }", "protected function getStub()\n {\n return app_path('Stubs/migration.stub');\n }", "protected function getStub()\n {\n return realpath(__DIR__.'/stubs/dashboard.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/authServiceProvider.stub';\n }", "public function getStub()\n {\n return app()->basePath('vendor/samuel-nunes/lumen-form-request-validation/src/Console/Stubs/'.$this->stubName.'.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/entity_controller.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/action.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/serviceProvider.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub() {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../../stubs/modelValidator.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/cast.stub');\n }", "public function generate()\n {\n return $this->templateStub;\n }", "protected function getStub()\n {\n return realpath(__DIR__ . '/../stubs/Filter.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/factory.stub';\n }", "protected function getStub()\n {\n return app_path('Core/Stub/HTML/Views/index.stub');\n }", "protected function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Service.stub');\n\t}", "protected function getStub()\n {\n return __DIR__. '/stubs/facade.base.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/RepositoryInterface.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/LICENSE.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/filter.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/ServiceInterface.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/Stubs/ServiceProvider.stub';\n }", "public function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Policy.stub');\n\t}", "protected function getStub()\n {\n return __DIR__.'/stubs/make/request.stub';\n }" ]
[ "0.83579874", "0.81962", "0.81657106", "0.81294554", "0.8034034", "0.8003708", "0.7957607", "0.7940772", "0.791021", "0.78739566", "0.7869222", "0.78581053", "0.78546983", "0.78499", "0.7845703", "0.78435755", "0.7828027", "0.78246325", "0.7816588", "0.78110945", "0.77891546", "0.7786513", "0.7783244", "0.7760165", "0.7757948", "0.77544445", "0.77448595", "0.773728", "0.7732082", "0.7719267", "0.77091295", "0.7707239", "0.7706461", "0.77058613", "0.7698255", "0.7692912", "0.76786256", "0.767678", "0.7665964", "0.7665964", "0.7659914", "0.76574355", "0.76535165", "0.76474905", "0.7641605", "0.7632804", "0.76277244", "0.76234394", "0.75966865", "0.75915", "0.7583372", "0.75785273", "0.7578146", "0.7577017", "0.75716925", "0.7560862", "0.75464046", "0.7538604", "0.7537457", "0.7527074", "0.752142", "0.751407", "0.7509682", "0.75060624", "0.75010043", "0.74957216", "0.7489094", "0.748748", "0.7483378", "0.7478848", "0.74743825", "0.74678874", "0.7428785", "0.7424386", "0.7411584", "0.7402606", "0.73905957", "0.738621", "0.73782295", "0.73641366", "0.7355695", "0.73508584", "0.7328934", "0.7328934", "0.73182076", "0.731232", "0.730136", "0.72972596", "0.72850037", "0.7274041", "0.7273573", "0.72627336", "0.72602755", "0.72601163", "0.72417486", "0.7224306", "0.7224125", "0.7172848", "0.71588343", "0.7156872", "0.71530455" ]
0.0
-1
Get the stub file for the generator.
public function getStubFile(): string { return $this->getStubFileFromPresetStorage($this->preset, 'console.stub'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'seeder.stub');\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().'/default.stub');\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__ . '/stubs/view.stub';\n }\n\n return __DIR__ . '/stubs/table.stub';\n }", "private function getStub()\n {\n return $this->files->get($this->stubPath);\n }", "protected function getStub()\n {\n if ($stub = $this->option('stub')) {\n return $stub;\n }\n\n if ($this->option('model')) {\n return __DIR__.'/stubs/controller.stub';\n }\n\n return __DIR__.'/stubs/blank.stub';\n }", "protected function getStub()\n {\n return config('crudgenerator.custom_template')\n ? config('crudgenerator.path') . '/acl-migration.stub'\n : __DIR__ . '/../stubs/acl-migration.stub';\n }", "protected function getStub()\n {\n return $this->collection()\n ? __DIR__.'/stubs/resource-collection.stub'\n : __DIR__.'/stubs/resource.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/partial_stubs/model.stub';\n }", "protected function getStub() {\n $stub = null;\n\n if ($this->option('crud')) {\n return __DIR__ . '/stubs/schema.crud.stub';\n }else if ($this->option('progressive')) {\n return __DIR__ . '/stubs/schema.progressive.stub';\n }else if ($this->option('report')) {\n return __DIR__ . '/stubs/schema.report.stub';\n }else if ($this->option('chart')) {\n return __DIR__ . '/stubs/schema.chart.stub';\n }\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/form.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n if ($this->option('validator')) {\n return __DIR__.'/stubs/factory-validator.stub';\n } else {\n return __DIR__.'/stubs/factory-no-validator.stub';\n }\n }", "protected function getStub()\n {\n return base_path() . '/resources/stubs/model.stub';\n }", "protected function getStub()\n {\n return resource_path('stubs/view.stub');\n }", "protected function getStub()\n {\n return $this->option('model')\n ? __DIR__ . '/stubs/service.stub'\n : __DIR__ . '/stubs/service_default.stub';\n }", "protected function getStub()\n {\n $stub = __DIR__.'/../stubs/contracts/contract';\n\n if ($this->option('extends')) {\n $stub .= '.extends';\n }\n\n return $stub.'.stub';\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().\"/create.attribute.stub\");\n }", "protected function getStub()\n {\n $dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';\n// if ($this->option('unit')) {\n// return $dir.'/stubs/unit-test.stub';\n// }\n\n return $dir. DIRECTORY_SEPARATOR .'stubs'. DIRECTORY_SEPARATOR .'test.stub';\n }", "protected function getStub()\n {\n if ($this->option('component')) {\n return __DIR__ . '/Stubs/FacadeComponent.stub';\n }\n return __DIR__ . '/Stubs/Facade.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/views/plain.stub';\n }", "protected function getStub()\n {\n return $this->getStubDir() . '/model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/Factory.stub';\n }", "protected function getStub()\n {\n if ($this->option('plain')) {\n return __DIR__.'/stubs/base-controller.plain.stub';\n }\n\n return __DIR__.'/stubs/base-controller.stub';\n }", "protected function getStub()\n {\n $stub = null;\n\n if ($this->option('parent')) {\n $stub = '/stubs/controller.nested.stub';\n } elseif ($this->option('model')) {\n $stub = '/stubs/controller.model.stub';\n } elseif ($this->option('resource')) {\n $stub = '/stubs/controller.stub';\n }\n\n if ($this->option('api') && is_null($stub)) {\n $stub = '/stubs/controller.api.stub';\n } elseif ($this->option('api') && ! is_null($stub)) {\n $stub = str_replace('.stub', '.api.stub', $stub);\n }\n\n $stub = $stub ?? '/stubs/controller.plain.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub(): string\n {\n return $this->resolveStubPath(\n $this->option('markdown') !== false\n ? '/stubs/markdown-mail.stub'\n : '/stubs/mail.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/kompo-'.($this->option('demo') ? 'demo-' : '').'form.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../../../resources/stubs/views/view.stub';\n }", "protected function getStub()\n {\n $type = (!is_null($this->option('type')) && in_array($this->option('type'), ['plain', 'extended']))\n ? $this->option('type')\n : 'plain';\n\n return __DIR__ . \"/stubs/responder/{$type}.stub\";\n }", "protected function getStub()\n {\n if ($this->option('pivot')) {\n return parent::getStub();\n }\n\n return __DIR__ . '/stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/interface.php.stub';\n }", "protected function getStub()\n {\n if ($this->option('trait')) {\n return __DIR__.'/../Stubs/Trait.stub';\n }\n if ($this->option('interface')) {\n return __DIR__.'/../Stubs/Interface.stub';\n }\n\n return __DIR__.'/../Stubs/Class.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/seed.stub';\n }", "protected function getStub()\n\t{\n\t\treturn $this->resolveStubPath('/stubs/integration-manifest.stub');\n\t}", "protected function getStub()\n {\n return config('laravel-crud-generator.custom_template')\n ? config('laravel-crud-generator.path') . '/model.stub'\n : __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/bfg-component.stub');\n }", "protected function getStub()\n {\n if ($this->option('request')) {\n return __DIR__.'/stubs/mutator-request.stub';\n } elseif ($this->option('clean')) {\n return __DIR__.'/stubs/mutator-clean.stub';\n } else {\n return __DIR__.'/stubs/mutator.stub';\n }\n }", "protected function getStub()\n {\n if ($this->option('service')) {\n return __DIR__.'/stubs/controller.service.stub';\n } elseif($this->option('base')) {\n return __DIR__.'/stubs/controller.base.stub';\n } elseif($this->option('otp')) {\n return __DIR__.'/stubs/controller.service.otp.stub';\n }\n return __DIR__.'/stubs/controller.plain.stub';\n }", "protected function getStub()\n {\n return file_get_contents(__DIR__ . '/../../Stubs/' . ucfirst($this->type() . 'Task.php'));\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "public function getStub()\n {\n return File::get(__DIR__.'/../stubs/migrations/migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/bond.stub';\n }", "private function getStub()\n {\n return app_path() . '\\Stubs\\repository_contract.stub';\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__.'/stubs/controller/controller.view.stub';\n }\n\n return __DIR__.'/stubs/controller/controller.api.stub';\n }", "protected function getStub()\n {\n return realpath(__DIR__) .str_replace('/', DS, '/stubs/reminders.stub');\n }", "protected function getStub()\n {\n return $this->getStubsPath() . 'controller.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../stubs/abstract/iservice.stub';\n }", "protected function getStub()\n {\n if ($this->option('model')) {\n return __DIR__ . '/Stubs/CrudRepository.stub';\n }\n\n return __DIR__ . '/Stubs/Repository.stub';\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/php_cs.stub';\n }", "protected function getStub()\n {\n return app_path('Console/Commands/stubs/form-request.stub');\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/service.stub');\n }", "protected function getStub()\n {\n return $this->option('pivot')\n ? $this->resolveStubPath('/stubs/base_stubs/model.pivot.stub')\n : $this->resolveStubPath('/stubs/base_stubs/model.stub');\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/interaction.stub';\n }", "protected function getStub(): string\n\t{\n\t\treturn __DIR__ . '/../../../stubs/action.interface.stub';\n\t}", "protected function getStub():string\n {\n return __DIR__ . '/stubs/controller.stub';\n }", "protected function getStub()\n {\n return $this->option('model')\n ? $this->resolveStubPath('/stubs/observer.stub')\n : $this->resolveStubPath('/stubs/observer.plain.stub');\n }", "protected function getStub()\n {\n return app_path() . '\\Console\\stubs\\controller.stub';\n }", "public function getStub()\n {\n if ($this->option('pivot')) {\n return __DIR__.'/../../stubs/pivot.model.stub';\n }\n\n return __DIR__.'/../../stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n if (!$this->option('pivot')) {\n return __DIR__.'/stubs/model.stub';\n }\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/repository-interface.stub';\n }", "protected function getStub()\n {\n return base_path('resources' . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'SystemParameter.stub');\n }", "protected function getStub(): string\n {\n return base_path('stubs/vue-component.stub');\n }", "protected function getStub()\n {\n return app_path('Core/Stub/Migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/form-request.stub';\n }", "protected function getStub()\n {\n return base_path('stubs\\service.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/service.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'request.stub';\n }", "protected function getStub()\n {\n if ($this->option('array')) {\n return $this->copyFrom('/stubs/export.array.stub');\n } elseif ($this->option('model')) {\n return $this->copyFrom('/stubs/export.model.stub');\n } elseif ($this->option('query')) {\n return $this->copyFrom('/stubs/export.query.stub');\n }\n\n return $this->copyFrom('/stubs/export.collection.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/transformer.stub';\n }", "protected function getStub()\n\t{\n\t\treturn __DIR__.'/stubs/api.stub';\n\t}", "protected function getStub()\n {\n return __DIR__ . '/../stubs/repository.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/api-consumer-endpoint.stub';\n }", "protected function getStub()\n {\n return app_path('Stubs/migration.stub');\n }", "protected function getStub()\n {\n return realpath(__DIR__.'/stubs/dashboard.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/authServiceProvider.stub';\n }", "public function getStub()\n {\n return app()->basePath('vendor/samuel-nunes/lumen-form-request-validation/src/Console/Stubs/'.$this->stubName.'.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/entity_controller.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/action.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/serviceProvider.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub() {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../../stubs/modelValidator.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/cast.stub');\n }", "public function generate()\n {\n return $this->templateStub;\n }", "protected function getStub()\n {\n return realpath(__DIR__ . '/../stubs/Filter.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/factory.stub';\n }", "protected function getStub()\n {\n return app_path('Core/Stub/HTML/Views/index.stub');\n }", "protected function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Service.stub');\n\t}", "protected function getStub()\n {\n return __DIR__. '/stubs/facade.base.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/RepositoryInterface.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/LICENSE.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/filter.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/ServiceInterface.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/Stubs/ServiceProvider.stub';\n }", "public function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Policy.stub');\n\t}", "protected function getStub()\n {\n return __DIR__.'/stubs/make/request.stub';\n }" ]
[ "0.83587843", "0.8197345", "0.8130298", "0.8035397", "0.8004965", "0.79579943", "0.7941812", "0.79107773", "0.7874845", "0.78700566", "0.78591037", "0.7855985", "0.7850807", "0.7846723", "0.7844069", "0.7829329", "0.7825565", "0.7817247", "0.78118134", "0.7790396", "0.77875865", "0.7784116", "0.77610373", "0.7758059", "0.77548325", "0.77454346", "0.77373844", "0.7733262", "0.7720347", "0.7709531", "0.77081543", "0.77073765", "0.7706767", "0.76991785", "0.76935244", "0.7679512", "0.7678199", "0.7666921", "0.7666921", "0.76611716", "0.7658625", "0.7654494", "0.7648539", "0.76426315", "0.7633573", "0.7628709", "0.7624028", "0.7597516", "0.7592712", "0.75846195", "0.7579714", "0.7579275", "0.7578249", "0.75727135", "0.7561901", "0.7547708", "0.7539559", "0.7538696", "0.75279796", "0.75222874", "0.7514849", "0.75100684", "0.7507203", "0.7502122", "0.7496754", "0.74902856", "0.7488747", "0.748504", "0.74796486", "0.74755913", "0.7468823", "0.74300104", "0.7425341", "0.7412838", "0.7403996", "0.7390984", "0.7386832", "0.73792404", "0.7365735", "0.7356956", "0.73517334", "0.7330133", "0.7330133", "0.731903", "0.73134", "0.7302865", "0.7296117", "0.7286529", "0.72756714", "0.72742844", "0.7263705", "0.72615147", "0.7260993", "0.72422516", "0.7225233", "0.7225135", "0.7173852", "0.7159841", "0.71574277", "0.71543056" ]
0.8166353
2
Get the default namespace for the class.
public function getDefaultNamespace(string $rootNamespace): string { return $this->preset->config('console.namespace', $rootNamespace.'\Console\Commands'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultNamespace()\n\t{\n\t\treturn $this->default_namespace;\n\t}", "public function getDefaultNamespace();", "abstract public function getDefaultNameSpace();", "public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', 'default');\n }", "public function getNamespace($defaultNs) {\n return CLIUtils::readNamespace($this->getOwner(), $defaultNs, 'Enter an optional namespace for the class:');\n }", "public function getClassNamespace() {\n\t\tif ($this->classNamespace === NULL) {\n\t\t\t$this->classNamespace = $this->findClassNamespace();\n\t\t}\n\t\treturn $this->classNamespace;\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "private function _getNamespace() {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }", "final protected static function getNamespace() {\r\n $classNameParts = explode('\\\\', get_called_class());\r\n array_pop($classNameParts);\r\n return join('\\\\', $classNameParts);\r\n }", "public function getNamespace()\n {\n return isset($this->namespace) ? $this->namespace : '';\n }", "public function getBaseNamespace()\n {\n return $this->baseNamespace;\n }", "public function getRootNamespace()\n {\n return $this->rootNameSpace;\n }", "public function get_namespace() : string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return is_null($this->config) ? null : get_class($this->config);\n }", "public function getNamespace()\n {\n $className = $this->testMetaData->getTestClassName();\n $fqdn = $this->testMetaData->getTestFullyQualifiedClassName();\n\n $namespace = str_replace('\\\\'.$className, '', $fqdn);\n\n return $namespace;\n }", "protected function getNamespace()\n {\n $namespace = Container::getInstance()->getNamespace();\n return rtrim($namespace, '\\\\');\n }", "protected function getDefaultNamespace($rootNamespace) //phpcs:ignore\n {\n return $rootNamespace.'\\Services';\n }", "protected function getNamespace()\n {\n return $this->wrapped->getNamespace();\n }", "protected function getNamespace()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getNamespaceName());\n }", "protected function getDefaultNamespaces()\n {\n $resourceBundles = new LegacyBasicBundles();\n return $resourceBundles->getPackageNamespaces();\n }", "public static function getNamespace($class)\n {\n return static::splitClassName($class)[0];\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n $this->_init();\n return unserialize($this->_list_cache->getNamespace());\n }", "public function getNamespace()\n {\n return null;\n }", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "protected function getNamespaceReplacement()\n {\n if ($this->runningAsRootDir) {\n return Str::beforeLast($this->buildClassName, '\\\\');\n }\n\n $namespace = $this->theme->getClassNamespace();\n\n return str_replace('\\\\\\\\', '\\\\', $namespace);\n }", "private function getNamespaceName() {\n if ($this->getTypeName() != 'n_NAMESPACE') {\n return null;\n }\n\n $namespace_name = $this->getChildByIndex(0);\n if ($namespace_name->getTypeName() == 'n_EMPTY') {\n return null;\n }\n\n return '\\\\'.$namespace_name->getConcreteString();\n }", "public static function getRootNamespace()\n {\n $config = Config::getInstance();\n\n if ($config->has(['namespaces', 'root'])) {\n return $config->namespaces->root;\n }\n\n return 'App';\n }", "protected function getDefaultClassToExtend()\n {\n $base = $this->getControllerPath();\n\n return Helpers::fixNamespace(Helpers::getAppNamespace($base, 'Controller'));\n }", "public function getNamespace(): string;", "public function getNamespaceName();", "public function getNamespace()\n {\n return $this->_namespace;\n }", "public function getNamespace() {\n\t\treturn $this->config->get('namespace');\n\t}", "public function getNamespace()\n {\n return $this->getNamespaceName();\n }", "public function getNamespace() {\n\t\treturn $this->rootNS;\n\t}", "public function getNamespace()\n\t{\n\t\treturn $this->nameSpace;\n\t}", "public function getNamespace()\n {\n // TODO: Implement getNamespace() method.\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace()\n\t{\n\t\treturn $this->_namespace;\n\t}", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Services';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Services';\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace() {\n return $this->namespace;\n }", "public function getNamespace()\n {\n if (null === $this->reflected) {\n $this->reflected = new \\ReflectionObject($this);\n }\n\n return $this->reflected->getNamespaceName();\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $this->repository->getModuleNamespace($this->module);\n }", "function getNamespace ();", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Service';\n }", "public function getNamespace() {\n $namespaces = $this\n ->getTree()\n ->getRootNode()\n ->selectDescendantsOfType('n_NAMESPACE')\n ->getRawNodes();\n\n foreach (array_reverse($namespaces) as $namespace) {\n if ($namespace->isAfter($this)) {\n continue;\n }\n\n $body = $namespace->getChildByIndex(1);\n if ($body->getTypeName() != 'n_EMPTY') {\n if (!$body->containsDescendant($this)) {\n continue;\n }\n }\n\n return $namespace->getNamespaceName();\n }\n\n return null;\n }", "public function rootNamespace()\n {\n return $this->laravel->getNamespace();\n }", "public function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.$this->namespace;\n }", "function getNamespace();", "function getNamespace();", "protected function getDefaultNamespace($rootNamespace): string\n {\n return $rootNamespace.'\\\\Mail';\n }", "public function getElementNamespace(): string\n {\n return $this->class_fqsen->getNamespace() ?: '\\\\';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Lib\\Factories';\n }", "public function getNamespace()\n {\n if (is_null($this->_namespace)) {\n $namespace = $this->getConfiguration()\n ->get('router.namespace', 'Controllers');\n if (isset($this->_params['namespace'])) {\n $namespace = $this->_params['namespace'];\n }\n $this->_namespace = trim($namespace, '\\\\');\n }\n return $this->_namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\\\Jobs';\n }", "public function getNamespace()\r\n {\r\n return $this->Namespace;\r\n }", "protected function findClassNamespace() {\n\t\t$matches = array();\n\t\tpreg_match(self::PATTERN_NAMESPACE_DECLARATION, $this->originalClassCode, $matches);\n\t\treturn $matches['namespace'];\n\t}", "public function getNamespaceName() {\n\n\t\treturn $this->_namespace;\n\t}", "public function classNamespace() {}", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "public function getNamespace(){\n \n return $this->namespace;\n \n }", "public function getNamespace(): string\n {\n return (string) SocketIORouter::getNamespace(static::class);\n }", "function getNameSpace() { return $this->_namespace; }", "public function getContainerNamespace();", "public function getNamespace(){\n //base namepace\n $namespace = 'App\\Controllers\\\\';\n //if the namepace is defined\n if(array_key_exists('namespace', $this->params)){\n $namespace .= $this->params['namespace'] . '\\\\';\n }\n return $namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n\t{\n\t\treturn $rootNamespace;\n\t}", "public function getNamespaceName()\n\t{\n\t\t$pos = strrpos($this->name, '\\\\');\n\t\treturn false === $pos ? '' : substr($this->name, 0, $pos);\n\t}", "protected function getDefaultNamespace($rootNamespace)\n {\n if ($this->option('view')) {\n return \"{$rootNamespace}\\Definitions\\View\";\n };\n\n return \"{$rootNamespace}\\Definitions\\Table\";\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Http\\Services';\n }", "public function getFullNamespace(): string\n {\n if (empty($this->childNamespace)) {\n return $this->namespace;\n }\n\n return $this->namespace . '\\\\' . $this->childNamespace;\n }", "public abstract function getApplicationNamespace();", "protected function getDefaultNamespace($rootNamespace) {\n return $rootNamespace . '\\Traits';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Contracts';\n }", "public static function view_namespace()\n\t{\n\t\treturn __NAMESPACE__;\t\n\t}", "protected static function getNamespace()\n {\n $namespace = 'App\\Controllers\\\\';\n if (array_key_exists('namespace', self::$params)) {\n $namespace .= self::$params['namespace'] . '\\\\';\n } \n return $namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Http\\Responder';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.config('ac-developers.repository.generator.namespaces.services', '\\Services');\n }", "abstract protected function namespace(): string;", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Lib\\Data';\n }", "public static function getBaseNamespace($class)\n {\n if (is_object($class)) $class = get_class($class);\n $list = explode('\\\\', $class);\n return current($list);\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Http';\n }" ]
[ "0.8448936", "0.821764", "0.7800281", "0.74542356", "0.74156207", "0.7397914", "0.7362119", "0.7336174", "0.72904134", "0.7272925", "0.723129", "0.72085345", "0.7196747", "0.7127158", "0.7018227", "0.7012884", "0.69916", "0.6979542", "0.69777244", "0.6956813", "0.6936764", "0.6912258", "0.6912258", "0.69056207", "0.68654", "0.6861722", "0.6861722", "0.6861722", "0.6858318", "0.6854727", "0.6854387", "0.6842529", "0.68400055", "0.6813656", "0.6806945", "0.68033427", "0.67967427", "0.6793288", "0.6754474", "0.67399555", "0.6733586", "0.6731292", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.67211396", "0.67211396", "0.672033", "0.67066574", "0.66961795", "0.6663625", "0.66297996", "0.6626974", "0.6617549", "0.6615463", "0.65963733", "0.6593061", "0.6593061", "0.65854853", "0.65686876", "0.6566701", "0.6559817", "0.65577304", "0.6557363", "0.6546255", "0.65450746", "0.653927", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.6536637", "0.6532873", "0.6527016", "0.65192974", "0.6514792", "0.6514162", "0.6510188", "0.64932233", "0.6490978", "0.64795786", "0.64747727", "0.64678067", "0.64551157", "0.64396554", "0.6427564", "0.64247316", "0.64170855", "0.6408603", "0.6398796", "0.6396114", "0.6388626" ]
0.0
-1
Get the console command options.
protected function getOptions() { return [ ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['testMode', null, InputOption::VALUE_OPTIONAL, 'Runs the command in Test Mode.', false],\n\t\t];\n\t}", "protected function getOptions()\n {\n $options = [];\n\n // Here we will gather all of the command line options that have been specified with\n // the double hyphens in front of their name. We will make these available to the\n // Blade task file so they can be used in echo statements and other structures.\n foreach ($_SERVER['argv'] as $argument) {\n if (! Str::startsWith($argument, '--') || in_array($argument, $this->ignoreOptions)) {\n continue;\n }\n\n $option = explode('=', substr($argument, 2), 2);\n\n if (count($option) == 1) {\n $option[1] = true;\n }\n\n $optionKey = $option[0];\n\n $options[Str::camel($optionKey)] = $option[1];\n $options[Str::snake($optionKey)] = $option[1];\n }\n\n return $options;\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'],\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'],\n\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['native-import', null, InputOption::VALUE_NONE, 'Use the native importer'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),\n array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),\n array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),\n array('force', null, InputOption::VALUE_NONE, 'Force the operation to run while in production.'),\n );\n }", "protected function getOptions()\n {\n return [\n ['port', null, InputOption::VALUE_OPTIONAL, 'The server port to use.', \\config('minions-server.port', 8085)],\n ];\n }", "protected function getOptions()\n {\n return [\n ['facade', '', InputOption::VALUE_NONE, 'Generate facade for current repository'],\n\n ['model', 'm', InputOption::VALUE_REQUIRED, 'Generate a resource repository for the given model'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null],\n\t\t\t['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null],\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public final function getOptions()\n {\n return $this->_getOptions();\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function options()\n\t{\n\t\treturn [];\n\t}", "protected static abstract function getOptions();", "public function options()\n {\n return $this->options ?: [];\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n\n return [\n ['dry-run' , 'd', InputOption::VALUE_NONE, 'Dry Run'],\n ['payment' , 'p', InputOption::VALUE_NONE, 'Payment Address Only'],\n ['public' , 'u', InputOption::VALUE_NONE, 'Public Address Only'],\n ];\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}", "function get_options()\n{\n return php_sapi_name() == 'cli' ? get_options_cli() : get_options_url();\n}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n {\n return [\n ['format', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The names of formats you would like to generate.', null],\n ['regenerate', 'r', InputOption::VALUE_NONE, 'Whether all files must be regenerated even if exist.', null],\n ['temp', 't', InputOption::VALUE_NONE, 'Whether the temporary storage must be processed.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('dry-run', null, InputOption::VALUE_NONE, 'Displays the new cron without making any changes.', null),\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function _getCliOptions()\n {\n $cliOptions = array();\n\n foreach ($_SERVER['argv'] as $arg) {\n if (substr($arg, 0, 2) == '--' && strpos($arg, '=') !== false) {\n $option = substr($arg, 2);\n $option = explode('=', $option);\n\n $cliOptions[$option[0]] = $option[1];\n }\n }\n\n return $cliOptions;\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "public function getOpts(): array\n {\n return $this->opts;\n }", "public function getOpts(): array\n {\n return $this->opts;\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a repository for the given model.'],\n ];\n }", "public function getOptions()\n {\n return $this->options->getOptions();\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Inject a model to the controller.'],\n ['repository', 'r', InputOption::VALUE_OPTIONAL, 'Inject a repository to the controller.'],\n ['view', '', InputOption::VALUE_OPTIONAL, 'Generate a view controller class.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['show', null, InputOption::VALUE_NONE, 'Simply display the key instead of modifying files.'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('dry-run', null, InputOption::VALUE_NONE, 'Only shows which files would have been modified.'),\n array('force', 'f', InputOption::VALUE_NONE, 'Do not confirm before editing files.'),\n array('path', null, InputOption::VALUE_OPTIONAL, 'Path containing the files to be fixed.', 'app')\n );\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }" ]
[ "0.7800682", "0.751765", "0.7345173", "0.73404354", "0.7306238", "0.72790045", "0.7268271", "0.7237944", "0.71917665", "0.715652", "0.7155546", "0.7137", "0.71122515", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.70998144", "0.70998144", "0.7099153", "0.7092979", "0.7084178", "0.70818704", "0.70631355", "0.7055609", "0.7040382", "0.7040382", "0.7040382", "0.7036282", "0.70356953", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70281166", "0.70248216", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.7022473", "0.70166355", "0.70108926", "0.70108926", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.6996981", "0.6996434", "0.6994164", "0.6993292", "0.6984455", "0.69844353", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616" ]
0.77591324
1
Used to get a specific field from the given resource
public function __get($field) { $this->checkForNecessaryProperties(); $unmodifiedField = lcfirst(str_replace('unmodified', '', $field)); if (!array_key_exists($unmodifiedField, $this->data)) { return NULL; } $attributeMutator = 'get' . str_replace('_', '', ucwords($field, '_')) . 'Attribute'; return (method_exists($this, $attributeMutator)) ? call_user_func([$this, $attributeMutator]) : $this->data[$unmodifiedField]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($field);", "public function get($field);", "public function getField($field_name);", "public function get_field(/* .... */)\n {\n return $this->_field;\n }", "public function fetchField();", "public abstract function FetchField();", "public function getField($fieldName) {}", "public function getProperty($field);", "public function getField();", "public function getField();", "public function getField();", "public function getField($slug);", "public function get($field) {\r\n\t\treturn $this -> fields[$field];\r\n\t}", "function get_field($id=false, $field=false) {\n\t\tif(!$id && !$field) return false;\n\t\tglobal $wpdb;\n\t\t$query = \"SELECT wposts.$field FROM $wpdb->posts wposts WHERE wposts.ID=$id\";\n\t\t$results = $this->query($query);\n\t\tif(isset($results[0])) return $results[0]->$field;\n\t}", "function getFieldValue($field);", "public function getField($fieldKey){\n $fields = $this->getFields();\n return $fields->{$fieldKey};\n }", "function get($field) {\n\t\tif(!is_string($field)) {\n\t\t\ttrigger_error(\"Parameter for model->get() must be a string\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (method_exists($this, 'get_'.$field)) {\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\treturn call_user_func_array(array(& $this, 'get_'.$field), $args);\n\t\t}\n\n\t\t$result = $this->find_associated($field);\n\n\t\tif (!is_null($result)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif (isset($this->data[$field])) {\n\t\t\treturn $this->data[$field];\n\t\t}\n\n\t}", "public function __get($field){\n if ($field == 'usuario_id'){\n return $this->codigo;\n }\n else{\n return $this->fields[$field];\n }\n }", "public function __get($field)\n\t{\n\t\treturn $this->get($field);\n\t}", "function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}", "function getField($campo)\n{\n\treturn $this->res2[$campo];\n}", "public function getField($field, $default = \"\", $filter = false)\n {\n return Data::get($field, static::FIELD_PREFIX . $this->getID(), $default, $filter);\n }", "public function getField(){\n return $this->field;\n }", "public function getFrom($resource);", "public function __get($field) {\n\t\tif(array_key_exists($field, $this->_data)) {\n\t\t\treturn $this->_data[$field];\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The specified field \"' . $field . '\" was not found.');\n\t\t}\n\t}", "public function __get($field)\n {\n if ($field == 'userId')\n {\n return $this->uid;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "function sage_get_field( $key, $id=false, $format=true ) {\n\n global $post;\n\n $key = trim( filter_var( $key, FILTER_SANITIZE_STRING ) );\n $result = '';\n\n if ( function_exists( 'get_field' ) ) {\n if ( isset( $post->ID ) && !$id )\n $result = get_field( $key, $post->ID, $format);\n else\n $result = get_field( $key, $id, $format );\n }\n\n return $result;\n}", "public function getField(string $key);", "public function getField($name) { return $this->fields[$name]; }", "public function getField()\n {\n return $this->_field;\n }", "function get($field)\n {\n $fieldLc = strtolower($field);\n if (array_key_exists($fieldLc, self::$translate))\n $fieldLc = self::$translate[$fieldLc];\n\n switch($fieldLc)\n { // act on field name\n case 'name':\n {\n return $this->getName();\n }\n\n case 'nativename':\n {\n return $this->getNativeName();\n }\n\n case 'sorry':\n {\n return $this->getSorry();\n }\n\n case 'cc':\n {\n if (array_key_exists('cc', $this->extras))\n return $this->extras['cc'];\n else\n return null;\n }\n\n\n default:\n { // other fields\n return parent::get($fieldLc);\n } // other fields\n } // act on field name\n }", "function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}", "public function __get(string $field)\n\t{\n\t\treturn $this->getValue($field);\n\t}", "public function __get ($field) {\n return $this->__fields[$field]['data'];\n }", "public function getField(Request $request, $field_id)\n {\n return $this->field;\n if (! $this->field instanceof LaravelRelationField) {\n abort(404);\n }\n\n return $this->field->form->findField($field_id)\n ?: abort(404, debug(\"Coulnd't find field [$field_id]\"));\n }", "public function getLookupField() {}", "function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function _get($field) {\n\t\tif(property_exists($this, $field)) return $this->{$field}; \n\t\telse return NULL;\n\t}", "public function getField() {\n\t\treturn $this->field; \n\t}", "public function getField($id)\r\n {\r\n return $this->_fetch($id);\r\n }", "public function getField() {\n\t\treturn $this->field;\n\t}", "function field($id, $field, $default=null) {\n\t\tif(array_key_exists($field, $this->schema())) {\n\t\t\t$res = $this->query('SELECT `'.$field.'` FROM `'.$this->table.'` WHERE `'.$this->primaryKey.'` = \\''.$this->escape($id).'\\' LIMIT 1');\n\t\t\tif($row = $res->fetch_row()) {\n\t\t\t\t$res->free();\n\t\t\t\treturn $row[0];\n\t\t\t}\n\t\t} else { /* throw error? */ }\n\t\treturn $default;\n\t}", "public function get($field) {\n return key_exists($field, $this->_properties) ? $this->_properties[$field] : null;\n }", "function getField(){\n\t\treturn $this->Field;\n\t}", "public function getField(): string;", "public function getField()\n {\n return $this->belongsTo(Field::class, 'field_id')->first();\n }", "public function __get( $field ) {\r\n\t\tswitch ( $field ) {\r\n\t\t\tcase 'version':\r\n\t\t\t\treturn self::VERSION;\r\n\t\t\tcase 'basename':\r\n\t\t\tcase 'url':\r\n\t\t\tcase 'path':\r\n\t\t\tcase 'filesystem':\r\n\t\t\tcase 'constants':\r\n\t\t\tcase 'bootstrap':\r\n\t\t\tcase 'auth':\r\n\t\t\tcase 'api':\r\n\t\t\tcase 'plugins':\r\n\t\t\tcase 'installed':\r\n\t\t\tcase 'cases':\r\n\t\t\tcase 'clues':\r\n\t\t\tcase 'detective':\r\n\t\t\t\treturn $this->$field;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception( 'Invalid ' . __CLASS__ . ' property: ' . $field );\r\n\t\t}\r\n\t}", "public function getField($name) {\n return $this->body->getField($name);\n }", "public function getField() {\n\t\treturn $this->_field;\n\t}", "public function __get($field){\n if ($field == 'ENTIDAD_ID'){\n return $this->codigo;\n }\n else{\n return $this->fields;\n }\n }", "public function get(string $name): FieldContract;", "public function __get($field) {\n\t\tif($field == 'userId'){\n\t\t\treturn $this-uid;\n\t\t}else{\n\t\t\treturn $this->fields($field);\n\t\t}\n\t}", "public function __get($field) {\n\n if (array_key_exists($field, $this->_fields)) {\n return $this->_fields[$field];\n } else if (in_array($field, ApplicationSql::tablenames())) { // Büyükten -> Küçüğe\n\n $belong_table = $field; // user\n $foreign_key = $field . \"_id\"; //user_id\n\n if (!in_array($foreign_key, ApplicationSql::fieldnames($this->_table)))\n throw new BelongNotFoundException(\"Tabloya ait olan böyle foreign key yok\", $foreign_key);\n\n return $belong_table::find($this->_fields[$foreign_key]);\n } else {\n preg_match_all(\"/all_of_.*/\", $field, $matches);\n $matches = $matches[0];\n\n if ($matches) {\n $field = substr($field, 7);\n if (in_array($field, ApplicationSql::tablenames())) {\n\n $owner_table = ucfirst($field); // model name\n $owner_key = strtolower($this->_table) . \"_id\";\n\n // return $owner_table::load()->where([$owner_key => $this->_fields[\"id\"]])->take();\n return $owner_table::load()->where($owner_key, $this->_fields[\"id\"])->take();\n }\n }\n }\n\n throw new FieldNotFoundException(\"Tabloda getirilecek böyle bir anahtar mevcut değil\", $field);\n }", "function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}", "public function __get($field)\n {\n if ($field == 'taskId')\n {\n return $this->tid;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "function tk_template_get_field (&$this, &$res, $field)\n{\n $ui =& $app->ui;\n\n $res[\"form_$field\"] = $ui->new_formfield ($field);\n $res[$field] = $ui->value ($field);\n}", "function news_get_field( $p_news_id, $p_field_name ) {\r\n\t\t$row = news_get_row( $p_news_id );\r\n\t\treturn ( $row[$p_field_name] );\r\n\t}", "public function get_resource();", "function brag_rest_get_flamingo( $object, $field_name, $request ) {\n\n\treturn get_post_meta( $object[ 'id' ] );\n}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getField($pk = null)\n\t{\n\t\treturn parent::getRecord($pk);\n\t}", "function get_field($type, $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array(\n $type . '_id' => $type_id\n ));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }\n }\n }", "function get_post_field($field, $post = \\null, $context = 'display')\n {\n }", "public function get(Resource $resource);", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getField(string $name, string $class=null): Field;", "private function get_resource_value($field,$default) {\n\n\t\tif(!isset($this->settings[$field])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch($this->settings[$field]) {\n\n\t\t\tcase 'EECK_DEFAULT':\n\t\t\t\treturn $default;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn $this->settings[$field];\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "public function getField(): string\n {\n return $this->field;\n }", "public function Get ($field) {\n if ($this->structuredResult === null) return null;\n foreach ($this->structuredResult as $info) {\n if ($info['field'] == $field) {\n return $info['data'];\n }\n }\n return null;\n }", "public function getUserfield();", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }", "public function getField($name) {\n return $this->getFields()[$name];\n }", "public function __get( $field ) {\n\t\tswitch ( $field ) {\n\t\t\tcase 'version':\n\t\t\t\treturn self::VERSION;\n\t\t\tcase 'basename':\n\t\t\tcase 'url':\n\t\t\tcase 'path':\n\t\t\tcase 'options':\n\t\t\tcase 'helpers':\n\t\t\tcase 'core':\n\t\t\t\treturn $this->$field;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception( 'Invalid '. __CLASS__ .' property: ' . $field );\n\t\t}\n\t}", "public function __get( $field ) {\r\n\t\t// Allowed fields to retrieve\r\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', $this->key ), true ) ) {\r\n\t\t\treturn $this->{$field};\r\n\t\t}\r\n\t\tthrow new Exception( 'Invalid property: ' . $field );\r\n\t}", "public function getField($field_name) {\n $retval = NULL;\n // if field exists\n if (array_key_exists($field_name,$this->form_fields)) {\n $retval = $this->form_fields[$field_name];\n }\n return $retval;\n }", "public function get($field)\n\t{\n\t\t$parsedBody = (array) $this->getParsedBody();\n\t\t\n\t\tif ($this->getRequestMethod() === Request::GET && isset($this->getQueryParams()[$field])) {\n\t\t\treturn $this->getQueryParams()[$field];\n\t\t}\n\n\t\tif (isset($parsedBody[$field])) {\n\t\t\treturn $parsedBody[$field];\n\t\t}\n\t}", "public function getSearchField($class, $field);", "public function retrieve(Resource $resource);", "public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }", "public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}", "public function get_field( string $field ) {\n\t\tif ( array_key_exists( $field, $this->data ) ) {\n\t\t\treturn $this->data[ $field ];\n\t\t}\n\n\t\treturn '';\n\t}", "protected abstract function get_rest_field_type();", "public abstract function GetCurrentField();", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}", "protected function resolveAttribute($resource, $attribute)\n {\n return data_get($resource, str_replace('->', '.', $attribute));\n }", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function get_field_name();", "public function getFieldValue($fieldname)\n {\n return $this->{'get'.$fieldname}();\n }", "function &getField($name){\n\t\t$fields =& $this->fields();\n\t\tif ( !isset($fields[$name]) ){\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $fields[$name];\n\t\t}\n\t}", "public function getField($code_of_field) {\r\n\r\n\t\tif (isset ( $this->_data [\"details\"] ) && array_key_exists ( $code_of_field, $this->_data [\"details\"] )) {\r\n\t\t\treturn $this->_data [\"details\"] [$code_of_field] [\"value\"];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function getFieldFromModel($field)\n {\n return Data::getAdvanced(\n $this->model->fieldsIndex[$field],\n $this->model->fields[$this->model->fieldsIndex[$field]],\n static::FIELD_PREFIX . $this->getID(),\n $this,\n );\n }", "public function get(string $field_name)\n {\n return $this->field(INPUT_GET, $field_name);\n }", "private function get_resource_value($field,$default) {\n\n\t\tif(!isset($this->eeck_settings[$field])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch($this->eeck_settings[$field]) {\n\n\t\t\tcase 'EECK_DEFAULT':\n\t\t\t\treturn $default;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn $this->eeck_settings[$field];\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "public function getField()\n {\n if ($this->field) return $this->field;\n\n if (!($field = $this->fieldAble->getField($this->fieldTemplate->program_name))) {\n\n $field = new Field();\n $field->common_fields_template_id = $this->fieldTemplate->id;\n $field->field_reference = $this->fieldAble->getFieldReference();\n $field->visible = true;\n $field->editable = true;\n\n $field->save(false);\n\n $this->fieldAble->getFieldHandler()->setToCache($this->fieldTemplate->program_name, $field);\n }\n\n $this->field = $field;\n\n return $this->field;\n }" ]
[ "0.7451867", "0.7451867", "0.688825", "0.6779977", "0.67769057", "0.6753417", "0.672195", "0.66417986", "0.6611796", "0.6611796", "0.6611796", "0.658248", "0.6569627", "0.6519403", "0.64878833", "0.6483047", "0.64712405", "0.6429632", "0.6422956", "0.6401098", "0.6377754", "0.6371165", "0.6365815", "0.636084", "0.63461393", "0.63185865", "0.6297526", "0.62883765", "0.6282997", "0.62763256", "0.62736386", "0.62678105", "0.6265391", "0.6258672", "0.6256276", "0.62447053", "0.6244002", "0.62230486", "0.62230486", "0.62230486", "0.62230486", "0.6222239", "0.6207969", "0.6202131", "0.6192586", "0.61871713", "0.6184396", "0.6181713", "0.6174681", "0.6167846", "0.616459", "0.61427754", "0.6133193", "0.6121366", "0.609851", "0.60929066", "0.6085562", "0.60664105", "0.6064146", "0.606327", "0.6051834", "0.604883", "0.6048487", "0.6039999", "0.6037263", "0.60366136", "0.6026404", "0.6022977", "0.6015774", "0.60079074", "0.60046196", "0.5991271", "0.5989151", "0.5984182", "0.5979277", "0.59662855", "0.5965597", "0.59595513", "0.59585816", "0.5940275", "0.5938763", "0.593542", "0.59341586", "0.5924653", "0.5920732", "0.59205824", "0.59160423", "0.589522", "0.5886172", "0.5884008", "0.58668673", "0.5864488", "0.58634996", "0.5851078", "0.58447", "0.58214986", "0.58214986", "0.5816532", "0.5803603", "0.57986355", "0.5797861" ]
0.0
-1
Used to set the value of a specific field on the given resource
public function __set($field, $value) { $this->checkForNecessaryProperties(); $this->data[$field] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setField($field);", "public function setField($field);", "public function set($field, $value);", "public function set($field, $value);", "public function setField(string $name, $value);", "public function setField($name, $value);", "public function setField(string $name, Field $field);", "public function setValue($fieldname, $value);", "function setField($field) {\r\r\n\t\t$this->field = $field;\r\r\n\t}", "public function setField($value) {\n\t\t$this->_field = $value;\n\t}", "public function set_field( string $field, $data ) {\n\t\t$this->data[ $field ] = $data;\n\t}", "public function setFieldValue(Field $field, $model, $value);", "function setValue(int $field, $value) : void;", "public function setFieldValue($fieldSlug, $value);", "public function setField($field) {\n\t\t$this->_field = $field;\n\t}", "function set_post_field ($field, $value, $post_id) {\n\t\tglobal $wpdb;\n\n\t\t$post_id = absint($post_id);\n\t\t// sigh ... when FWP is active, I need to avoid avoid_kses_munge\n\t\t// $value = sanitize_post_field($field, $value, $post_id, 'db');\n\t\treturn $wpdb->update($wpdb->posts, array($field => $value), array('ID' => $post_id));\n\t}", "function setField($field, $value)\n {\n $this->_data[$field] = $value;\n }", "public function setField(Field $field) {\n\t\t$this->field = $field; \n\t}", "public function setField($field)\n {\n $this->_field = $field;\n }", "public function __set($field, $value) {\r\n $this->$field = $value;\r\n }", "public function __set($field, $value) {\r\n $this->$field = $value;\r\n }", "public function __set($field, $value){\n if (array_key_exists($field, $this->fields)){\n $this->fields[$field] = $value;\n }\n }", "public function __set($field, $value){\n if (array_key_exists($field, $this->fields)){\n $this->fields[$field] = $value;\n }\n }", "public function set($field, $value) {\r\n\t\t$this -> fields[$field] = $value;\r\n\t}", "private function setAttributeValueFromField(string $field_name) {\n // We need to unaltered field data value here not the field value returned\n // by $this->get($field_name)->value (magic getter).\n $field_value = $this->get($field_name)->getValue();\n // Property not found so let's save it as an attribute value.\n $attribute_value = $this->fieldAttributeConverter()->getAttributeValueFromField($this->entityTypeId, $field_name, $field_value);\n if ($attribute_value !== NULL) {\n $attribute_name = $this->fieldAttributeConverter()->getAttributeName($field_name);\n // Do not leave empty attributes. If generated attribute value is an\n // empty string let's remove it from the entity.\n // (Apigee Edge MGMT UI does not allow to save an entity with empty\n // attribute value, the API does.)\n if ($attribute_value === '') {\n $this->decorated->deleteAttribute($attribute_name);\n }\n else {\n $this->decorated->setAttribute($attribute_name, $attribute_value);\n }\n }\n }", "public function set($field, $value) {\n $this->$field = $value;\n }", "public function __set($fieldName, $fieldValue) {\n\t\t$this->document->$fieldName = json_decode(json_encode($fieldValue));\n\t}", "public function __set($field, $value){\n\t\tif(array_key_exists($field, $this->fields)){\n\t\t\t$this->fields[$field]=$value;\n\t\t}\n\t}", "public function __set ($field, $val) {\n if (isset($this->__fields[$field]['set'])) {\n $this->__fields[$field]['data'] = $this->__fields[$field]['set']($val);\n } else {\n $this->__fields[$field]['data'] = $val;\n }\n }", "protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }", "public function setField(string $field): void\n {\n $this->field = $field;\n }", "public function setField( WebLab_Data_Field $field ) {\n $this->_field = $field;\n }", "public function SetField($val, $field)\n {\n $this->{$field} = $val;\n //echo $field.'<br>';\n }", "public function __set($field, $value) {\n\t\tif(array_key_exists($field, $this->_data)) {\n\t\t\t$this->_data[$field] = $value;\n\t\t\t\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$this->_state = self::STATE_CHANGED;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The specified field \"' . $field . '\" was not found.');\n\t\t}\n\t}", "public function __set($field, $value)\n {\n if (array_key_exists($field, $this->fields))\n {\n $this->fields[$field] = $value;\n }\n }", "public function __set($field, $value)\n {\n if (array_key_exists($field, $this->fields))\n {\n $this->fields[$field] = $value;\n }\n }", "public function setPropertyValue(string $field_name, $value): void;", "public function setValue($field, $value){\n $this->values[$field] = $value;\n }", "function setField($Field){\n\t\t$this->Field = $Field;\n\t}", "public function set_resource_data($resource_id, $resource_data) {\n $sql = 'UPDATE resources\n SET internal_data = :internal_data\n WHERE id = :id';\n\n $data = [\n ':id' => $resource_id,\n ':internal_data' => serialize($resource_data),\n ];\n\n $query = $this->pdo->prepare($sql);\n $query->execute($data);\n }", "public function setField(string $field): static;", "protected function _setValueInVariable($varName, $resource)\n {\n $controller = $this->getActionController();\n \n // Init variable\n $obj = new ReflectionObject($controller);\n $prop = $obj->getProperty($varName);\n $prop->setAccessible(true);\n\n // change value\n $prop->setValue($controller, $resource);\n \n }", "public function setValueField($valueField) {\n\t\t$this->valueField = $valueField;\n\t}", "public function set_id_field_and_value($fieldname,$value) {\n $this->id_field=$fieldname;\n $this->id_field_value=$value;\n }", "public function __set(string $field, $value): void\n\t{\n\t\t$this->setValue($field, $value);\n\t}", "public function setUserfield($value);", "public function bis2HsSetProperty( $field, $value ) {\r\n\t\t$this->record[$field] = $value;\r\n\t\treturn( true );\r\n\t}", "function setRemoteField($field){\n\t\t$this->remote_field = $field;\n\t}", "public function setResource($resource);", "protected abstract function setFields();", "function updateProductField($id, $field, $value){\r\n $query = \"UPDATE \".TBL_PRODUCTS.\" SET \".$field.\" = :value WHERE product_id = :id\";\r\n\t $stmt = $this->connection->prepare($query);\r\n\t return $stmt->execute(array(\":value\" => $value, ':id' => $id));\r\n }", "public function setValue($field, $value): int {\n if (in_array($field, static::fields, TRUE)){\n $this->{$field}->setValue($value);\n return 1;\n }\n return 0;\n }", "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 }", "public function setValue($fieldName, $value, $encoding = 'UTF-8') {}", "private function setValue($value, $field)\n {\n // Is this a subitems property?\n if (in_array($this->object->properties[$field]->type, self::$_subitems_types)) {\n\n // Ignore if we don't have an object\n $subitemsobjectname = $this->object->properties[$field]->initialization_refobject;\n if (empty($subitemsobjectname)) return;\n\n // Ignore if the record is a null (by way of the primary index)\n $subitemsobject = $this->object->properties[$field]->subitemsobject;\n if ($value[$subitemsobjectname . \"_\" . $subitemsobject->primary] == null) return;\n\n // Assign the appropriate value to each of the subitemsobjct's properties\n $subfieldlist = $subitemsobject->getFieldList();\n foreach ($subfieldlist as $subfield) {\n // If the property is again a subitems property, recall the function\n if (in_array($subitemsobject->properties[$subfield]->type, self::$_subitems_types)) {\n $this->setValue($value, $field);\n } else {\n // Convert the source field name to this property's name and assign\n $sourceparts = explode('.',$subitemsobject->properties[$subfield]->source);\n $subitemsobject->properties[$subfield]->setValue($value[$subitemsobjectname . \"_\" . $sourceparts[1]]); \n }\n }\n } elseif (empty($this->object->properties[$field]->source)){\n // This is some other property with a virtual datasource, ignore it\n } else {\n // This is not a subitems property: assign the value in the usual way\n try {\n $this->object->properties[$field]->value = $value[$this->object->properties[$field]->name];\n } catch(Exception $e) { \n throw new Exception(xarML('Could not assign a value to field #(1). Its source may overlap with another field.', $field)); \n }\n }\n }", "function update_field($field)\n {\n }", "function update_field($field)\n {\n }", "function update_field($field)\n {\n }", "function update_field($field)\n {\n }", "function setFieldParam($fieldname, $name, $value)\n\t{\n\t\tif (is_array($fieldname))\n\t\t\tforeach ($fieldname as $fieldn)\n\t\t\t{\n\t\t\t\tif (isset($this->table->fields[$fieldn]))\n\t\t\t\t\t$this->table->fields[$fieldn]->$name = $value;\n\t\t\t\telse\n\t\t\t\t\ttrigger_error(\"No field exists with the name: $fieldn\");\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($this->table->fields[$fieldname]))\n\t\t\t{\n\t\t\t\t$this->table->fields[$fieldname]->$name = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttrigger_error(\"No field exists with the name: $fieldname\");\n\t\t}\n\t}", "abstract protected function setResource(): String;", "public function set_custom_field($member, $field, $value)\n {\n $this->connection->query_update('users', array('cms_' . $field => $value), array('uid' => $member), '', null, null, false, true);\n }", "function updateField($table,$field,$value,$id){\n\n global $db;\n\n $sql = \"UPDATE $table SET $field='$value' WHERE id='$id'\";\n //Basic::EventLog(\"Product->updateField: \".$sql);\n $res =& $db->query($sql);\n return $res;\n\n }", "public function __set($field, $value) {\n\t\t$this[$field] = $value;\n\t}", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "function update_value($value, $post_id, $field)\n {\n }", "private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }", "public function update( $field, $value ) {\n\t\tif ( isset($this->ID) ) {\n\t\t\tupdate_post_meta($this->ID, $field, $value);\n\t\t\t$this->$field = $value;\n\t\t}\n\t}", "public function setResource($resource) {\n\n $this->resource = $resource;\n }", "function update_value($post_id, $field, $value)\n\t{\n\t\t// do stuff with value\n\t\t\n\t\t// save value\n\t\tparent::update_value($post_id, $field, $value);\n\t}", "function setField (&$data, $key, $value)\n{\n if (is_object ($data))\n $data->$key = $value;\n else if (is_array ($data))\n $data[$key] = $value;\n else throw new \\InvalidArgumentException;\n}", "public function __set($name, $value) {\n if($value instanceof Field){\n if(!isset($value->name)){\n $value->name = $name;\n }\n if(!isset($value->id)){\n $value->id = $name;\n }\n $this->{$name} = $value;\n }\n }", "protected function setLocalField($field, $value) {\n if ($field == 'union_name') {\n $field = 'organization_name';\n }\n #converts phone field so it's found in union's telecommunication_number\n if ($field == 'union_phone_no') {\n $field = 'contact_number';\n }\n return parent::setLocalField($field, $value);\n }", "public function setPatternedField(string $field, $value): ObjectInterface;", "public function setField(FieldInterface $field);", "function setField($data,$field,$table,$id,$chk_field)\n\t{\n\t\tif(strlen($field))\n\t\t{\n\t\t\tif(strlen($table))\n\t\t\t{\n\t\t\t\t$where=$this->WhereClause($chk_field,$id);\n\t\t\t\t$t_data=$this->sqlFormatField($data);\n // $t_field=$this->sqlFormatField($field);\n\t\t\t\tif(strlen($where))\n\t\t\t\t{\n\t\t\t\t\t$sql=\"update $table set $field=$t_data where $where\";\n\t\t\t\t\t$this->query($sql);\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t}", "private static function _setProperty(BaseEntityAbstract $entity, $field, $value)\n {\n $method = 'set' . ucwords($field);\n if (method_exists($entity, $method))\n {\n $entity->$method($value);\n return $entity;\n }\n $property = strtolower(substr($field, 0, 1)) . substr($field, 1);\n $entity->$property = &$value;\n return $entity;\n }", "public function testGeneralResourceSetters()\n {\n $valueForLibrary = 'Hannover Stadtbibliothek';\n $this->resource->set('library', $valueForLibrary);\n $newValue = $this->resource->get('library');\n $this->assertEquals($valueForLibrary, $newValue,\n 'set() does not fill in values, resource might not be reference');\n $valueForAuthor = 'John Ronald Reuel Tolkien';\n $this->resource->setRecursive('books/0/author', $valueForAuthor);\n $newRecursiveValue = $this->resource->getRecursive('books/0/author');\n $this->assertEquals($valueForAuthor, $newRecursiveValue,\n 'setRecursive() does not fill in values, resource might not be reference');\n $marvinIsTiredOfYourTests = 'I am not in the mood for this... sight...';\n $this->resource->setRecursive('books/1', $marvinIsTiredOfYourTests);\n $marvinsValue = $this->resource->getRecursive('books/1');\n $this->assertEquals($marvinIsTiredOfYourTests, $marvinsValue,\n 'setRecursive() does not fill in values if they are not the final node');\n $newPrice = 32.90;\n $pricePath = 'books/0/price';\n $pathObj = new Path($pricePath);\n $this->resource->setRecursive($pathObj, $newPrice);\n $this->assertEquals($newPrice, $this->resource->getRecursive($pricePath),\n 'setRecursive() does not fill in values if its written by a Path object');\n }", "public function forwardValueToRelated($value, \\SetaPDF_FormFiller_Field_FieldInterface $field, $encoding = 'UTF-8', $method = 'setValue') {}", "public function set_field($field_slug, $args) {\n\n // Verify if the field has valid parameters\n if ( isset($args['field_name']) && isset($args['field_type']) ) {\n\n self::$the_fields[$field_slug] = $args;\n \n }\n\n }", "public function geographySetProperty( $field, $value ) {\n\t\t$this->{$field} = $value;\n\t\treturn( true );\n\t}", "public function eventsSetProperty( $field, $value ) {\r\n\t\t$this->{$field} = $value;\r\n\t\treturn( true );\r\n\t}", "function setFieldID($iNewVale) {\n\t\t$this->iFieldID = $iNewValue;\n\t}", "public function __set($name, $value)\n {\n if (method_exists($this, \"set\" . ucfirst($name)))\n call_user_func\n (array($this, \"set\" . ucfirst($name)), $value);\n else {\n require_once(\"ID3/Exception.php\");\n throw new ID3_Exception(\"Unknown field: \" . $name);\n }\n }", "protected function _updatefields() {}", "public function setByKey($field, $key)\n {\n \n if (isset(static::$links[$field])) {\n \n $this->data[$field] = $this->orm->getIdByKey(\n SFormatStrings::subToCamelCase(static::$links[$field]),\n $key\n );\n \n } else {\n throw new LibDb_Exception('Invalid Route '.$field);\n }\n \n }", "function acf_update_field($field, $specific = array())\n{\n}", "public function fill_field($field, $value) {\n $field = $this->fixStepArgument($field);\n $value = $this->fixStepArgument($value);\n $this->getSession()->getPage()->fillField($field, $value);\n }" ]
[ "0.6949564", "0.6949564", "0.68256503", "0.68256503", "0.67060316", "0.66779286", "0.65512824", "0.654686", "0.6498879", "0.64150304", "0.6380653", "0.636792", "0.63626605", "0.632807", "0.62765604", "0.6271844", "0.62673426", "0.6231689", "0.62130666", "0.6188793", "0.6188793", "0.6185577", "0.6185577", "0.6180706", "0.6179935", "0.6139182", "0.6053599", "0.6046245", "0.60462034", "0.6038373", "0.60338974", "0.6028949", "0.59981716", "0.59632486", "0.59511906", "0.59511906", "0.5950856", "0.5940344", "0.59201676", "0.5882926", "0.58756965", "0.58667666", "0.58573294", "0.5856346", "0.5828404", "0.58233154", "0.5813656", "0.5800209", "0.5786281", "0.57644194", "0.5761779", "0.5745079", "0.5743765", "0.57339853", "0.5725905", "0.572271", "0.572271", "0.572271", "0.572271", "0.5722209", "0.57181805", "0.56817615", "0.56626165", "0.5661304", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.5637216", "0.56317717", "0.5630672", "0.56199676", "0.5606812", "0.55964774", "0.5590789", "0.5582275", "0.55756944", "0.5573189", "0.5562737", "0.5545665", "0.5538829", "0.55269957", "0.55044943", "0.548167", "0.5475791", "0.54727614", "0.5472746", "0.54719347", "0.5471438", "0.54627204", "0.5456735" ]
0.58239037
45
Get a specific attribute, without going through any mutators or anything Pretty sure this needs to move to the redis DataAccessor
protected function getAttribute($field) { $this->checkForNecessaryProperties(); if (!array_key_exists($field, $this->data)) { return NULL; } return $this->data[$field]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($attribute);", "public function __GET($attr){\n\n\t\t return $this->$attr;\n\t\t}", "public function __get($attr)\n {\n return $this->get($attr);\n }", "public function readAttribute($attribute) {}", "public function get($attr = null);", "public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }", "public function __get($attr)\n {\n if (isset($this->{$attr})) {\n return $this->{$attr};\n } elseif (method_exists($this, 'get'.camel_case($attr).'Attribute')) {\n $methodName = camel_case('get_'.$attr.'Attribute');\n\n return $this->$methodName();\n }\n }", "public function __get($attr)\n\t{\n\t\t$functionName = \"get\".$attr;\n\t\treturn $this->$functionName();\n\t}", "public function get($attributeName);", "public function __get($attribute) {\n return $this->getAttribute($attribute);\n }", "public function get($attr) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] : null;\n }", "public function __get( string$attribute )\n\t{\n\t\t$getter= \"__get__$attribute\";\n\t\t\n\t\tif( is_callable( [ $this, $getter ] ) )\n\t\t\treturn $this->$getter();\n\t\telse\n\t\tif( get_parent_class( self::class ) && is_callable( [ $this, parent::__get, ] ) )\n\t\t\treturn parent::__get( $attribute );\n\t\telse\n\t\t\treturn null;\n\t}", "public function readAttribute($attribute){\n\t\t#if[compile-time]\n\t\tCoreType::assertString($attribute);\n\t\t#endif\n\t\t$this->_connect();\n\t\treturn $this->$attribute;\n\t}", "public function __get($attribute)\n {\n return array_get($this->attributes, $attribute);\n }", "public function __get($attribute)\r\n\t{\r\n\t\tif (isset($this->{\"_\".$attribute}))\r\n\t\t{\r\n\t\t\treturn $this->{\"_\".$attribute};\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function __get($attribute)\n\t{\n\t\tif (isset($this->{\"_\".$attribute}))\n\t\t{\n\t\t\treturn $this->{\"_\".$attribute};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function __get($attribute) {\n\t\tif (array_key_exists($attribute, $this->_data)) {\n\t\t\treturn $this->_data[$attribute];\n\t\t}\n\n\t\tthrow new Exception(\"unknown attribute {$attribute}\");\n\t}", "public function __get($attribute)\n {\n if(property_exists($this, $attribute)) {\n return $this->{$attribute};\n }\n return null;\n }", "public function __get($attr) {\n if ($this->isMeta($attr)) {\n return isset($this->meta()->$attr) ? $this->meta()->$attr : null;\n } else {\n return parent::__get($attr);\n }\n }", "public function getAttribute($attribute)\n {\n return $this->{$attribute};\n }", "abstract public function getAttribute($key);", "private function getAttributeValue($attribute)\n {\n return array_key_exists($attribute, $this->data) ? $this->data[$attribute] : null;\n }", "public function __get(string $attribute)\n {\n $getter = 'get' . ucfirst(preg_replace_callback('/_[a-zA-Z0-9]/', function ($matches) {\n $str = '';\n\n foreach ($matches as $match) {\n $str .= ucfirst(str_replace('_', '', $match));\n }\n\n return $str;\n }, $attribute));\n\n if (!method_exists($this, $getter)) {\n return null;\n }\n\n return $this->$getter();\n }", "function get_attribute($attribute)\n\t{\n\t\t$attribute = $this->db->getAttribute(constant(\"PDO::\".$attribute.\"\"));\n\n\t\treturn $attribute;\n\t}", "public function aGet( $attr ) // Cambie el nombre de get xq se choca con el get que quiero poner de wrapper del PM.\n {\n //Logger::getInstance()->po_log(\"PO:aGet $attr\");\n\n // Si no es un atributo simple tengo que ver si hago lazy load...\n if ( !array_key_exists($attr, $this->attributeTypes) )\n {\n // Si llega aqui estoy seguro de que no pide un atributo simple, se pide uno complejo.\n // Podria ser simple pero se paso un nombre normalizado para una columna.\n\n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attr = $this->getRoleWithAssocName( $attr );\n\n // Soporte para lazy loading para hasOne y hasMany\n // No verifico que tenga valor porque deberia venir inicializado\n //if ( isset($this->attributeValues[$attr]) && $this->attributeValues[$attr] === self::NOT_LOADED_ASSOC )\n if ($this->attributeValues[$attr] === self::NOT_LOADED_ASSOC)\n {\n // Si no tiene ID todavia no se guardo, entonces no puede cargar lazy algo que no se ha guardado.\n if (!isset($this->attributeValues['id']))\n {\n return NULL;\n }\n\n $pm = PersistentManager::getInstance();\n\n if ( array_key_exists($attr, $this->hasMany) )\n {\n $pm->get_many_assoc_lazy($this, $attr); // El atributo se carga, no tengo que setearlo...\n\n // Se marca el dirtyMany al pedir hasMany porque no se tiene control\n // sobre como se van a modificar las instancias de la relacion solicitadas,\n // si dirtyMany esta en false y las intancias son modificadas, al salvar esta\n // intancia, las hasMany no se van a salvar en cascada.\n $this->dirtyMany = true;\n }\n else if ( array_key_exists($attr, $this->hasOne) )\n {\n // Si hay id de asociacion, lo cargo, si no lo pongo en NULL\n $assocAttr = DatabaseNormalization::simpleAssoc( $attr ); // email_id\n $assocId = $this->attributeValues[ $assocAttr ];\n if ( $assocId != NULL )\n {\n $this->attributeValues[ $attr ] = $pm->get_object( $this->hasOne[$attr], $assocId );\n\n // Se marca el dirtyOne al pedir hasOne porque no se tiene control sobre como se va a modificar la instancia solicitada.\n $this->dirtyOne = true;\n }\n else $this->attributeValues[ $attr ] = NULL;\n }\n else // Busca por similares\n {\n // Aun puede ser simple porque se pide por el nombre de la columna en lugar del nombre del atributo,\n // entonces primero hay que buscar si no se pide por el nombre de la columna. Idem a lo que hago en aSet.\n foreach ( $this->attributeTypes as $classAttr => $type )\n {\n if ( DatabaseNormalization::col($classAttr) == $attr ) // Busca con normalizacion\n {\n if (isset($this->attributeValues[ $classAttr ])) // Encuentra con normalizacion\n {\n return $this->attributeValues[ $classAttr ];\n }\n else return NULL;\n }\n }\n\n throw new Exception(\"El atributo \". $attr .\" no existe en la clase (\" . get_class($this) . \")\");\n }\n } // si no esta cargada\n } // si no es simple\n\n // Devuelve atributo hasOne o hasMany (la devolucion de atributos simples se hace arriba).\n // Si el hasOne o hasMany no estaban cargados, fueron cargados bajo demanda y devueltos aqui.\n if (isset($this->attributeValues[$attr]))\n {\n return $this->attributeValues[$attr];\n }\n\n return NULL;\n\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute($attribute)\n {\n }", "function __get($attribute)\n {\n if(method_exists($this,$attribute)){\n return $this->{$attribute}();\n }\n return $this->model->{$attribute};\n }", "public function get_attribute($key, $defaut = NULL);", "public function getIdentifyingAttribute();", "public function get($attr) {\n if (!isset($this->attrs[$attr])) {\n return null;\n }\n return $this->attrs[$attr];\n }", "public function getAttribute(string $attribute): string;", "public function __get($name)\n\t{\n\t\tif(array_key_exists($name, $this->_attributes))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}", "public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}", "public function __get($name) {\n // attribute-reader value\n if(in_array($name, $this->_attrReaders)) {\n return $this->_get($name);\n }\n // call overloading for subclass\n if(method_exists($this, '_get')) {\n return $this->_get($name);\n }\n show_error(\"Unrecognized attribute '$name'\");\n }", "public function getAttribute($key);", "public function getAttribute($attribute)\n {\n return $this->attributes[$attribute];\n }", "public function getValue($attribute = 'id')\n {\n \n $sticky_id = $this->getID();\n\n $query = \"SELECT *\n FROM stickies\n WHERE id = $sticky_id\";\n\n $result = DB::mysqli()->query($query);\n\n $content = mysqli_fetch_assoc($result);\n\n \n return $content[$attribute];\n }", "public function get() {\r\n return apc_fetch($this->key);\r\n }", "private function getAttribute($attribute)\n\t{\n\t\treturn isset($this->_data->{$attribute}) ? $this->_data->{$attribute} : '';\n\t}", "public function read_attribute($attribute)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]) )\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'R')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\treturn $this->$var;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' not readable');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function __get($key)\n {\n return $this->attributes[$key];\n }", "public function getAttribute($attribute) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t'*', tx_newspaper::getTable($this), $this->getCondition()\n\t\t\t);\n\t\t\t$this->setUid($this->attributes['uid']);\n\t\t}\n\n \t\tif (!array_key_exists($attribute, $this->attributes)) {\n \tthrow new tx_newspaper_WrongAttributeException($attribute);\n \t\t}\n \t\treturn $this->attributes[$attribute];\n \t}", "public function get_attribute($field){\n\t\treturn $this->{$field};\n\t}", "public function __get($key)\n\t{\n\t\treturn $this->getAttribute($key);\n\t}", "public function __get($key){\r\n\t\tif(array_key_exists($key, $this->_attributes)){\r\n\t\t\treturn $this->_attributes[$key];\r\n\t\t}\r\n\t\t/* else {\r\n\t\t\ttrigger_error(sprintf('Property %s does not exist in class %s.', $key, get_class($this)), E_USER_NOTICE);\r\n\t\t\treturn null;\r\n\t\t} */\r\n\t\t\r\n\t}", "public function getAttribute($name) {\n\t\tif (isset ( $this->$name ))\treturn $this->$name;\n\t}", "public function getAttribute($name)\n\t{\n\t\tif(property_exists($this,$name))\n\t\t\treturn $this->$name;\n\t\telseif(isset($this->_attributes[$name])) {\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t}", "public function __get($key)\n {\n // is the requested keyiable in the fields array?\n if(isset($this->fields[$key]))\n {\n // if so, find out what it's database column name is\n $db_column_name = $this->fields[$key]['name'];\n // return $this->attributes->string1 (or text3, decimal5 etc.)\n if(isset($this->attributes[$db_column_name]))\n return $this->attributes[$db_column_name];\n \n // otherwise, check if its in the attributes as named (such as $this->id)\n }elseif(isset($this->attributes[$key])){\n return $this->attributes[$key];\n }\n\n return parent::__get($key);\n }", "public function __get($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}", "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "public function __get($field)\n {\n $this->checkForNecessaryProperties();\n\n $unmodifiedField = lcfirst(str_replace('unmodified', '', $field));\n\n if (!array_key_exists($unmodifiedField, $this->data)) {\n return NULL;\n }\n\n $attributeMutator = 'get' . str_replace('_', '', ucwords($field, '_')) . 'Attribute';\n return (method_exists($this, $attributeMutator)) ? call_user_func([$this, $attributeMutator]) : $this->data[$unmodifiedField];\n }", "public function __get($name)\n {\n return $this->attributes[$name];\n }", "public function __get($atrib){\n\t\treturn $this->$atrib;\n\t}", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function get($name) {\n\t\t// See if its in our base attribute\n\t\tif (array_key_exists($name, $this->attributes)) {\n\t\t\treturn $this->attributes[$name];\n\t\t}\n\n\t\t// No, so see if its in the private data store.\n\t\t$meta = $this->getPrivateSetting($name);\n\t\tif ($meta) {\n\t\t\treturn $meta;\n\t\t}\n\n\t\t// Can't find it, so return null\n\t\treturn null;\n\t}", "public function get($attr = \"\") {\r\n\t\t$mysqli = $GLOBALS['mysqli'];\r\n\t\t$query = \"SELECT * FROM boards WHERE id=\" . $mysqli->real_escape_string($this->id);\r\n\t\t$result = $mysqli->query($query);\r\n\t\tif (!$result) {\r\n\t\t\tthrow new Exception($mysqli->error);\r\n\t\t}\r\n\t\tif ($result->num_rows > 0) {\r\n\t\t\t$row = $result->fetch_assoc();\r\n\t\t\tif ($attr == \"\") {\r\n\t\t\t\treturn $row;\r\n\t\t\t} else {\r\n\t\t\t\treturn $row[$attr];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception('Board not found');\r\n\t\t}\r\n\t}", "public function __get($name)\n {\n // if the property is declared (automatically not public), we can take it\n if (property_exists($this, $name)) {\n return $this->$name;\n } else {\n // otherwise we indicate that we must go through the getter or attribute does not exist\n trigger_error(\"You are trying to read an existing protected or private attribute without going through its getter! (__get) or a non-existent attribute\", E_USER_NOTICE);\n }\n }", "function get_attribute( $key ) {\n\t\treturn isset( $this->attributes[$key] ) ? $this->attributes[$key] : null;\n\t}", "public function __get($attribute)\r\n {\r\n if ($attribute == 'tag') {\r\n return $this->attributes[0];\r\n }\r\n return array_key_exists($attribute, $this->attributes) ? $this->attributes[$attribute] : null;\r\n }", "public function attr($attribute) {\n if (array_key_exists($attribute, $this->attributes)) {\n return $this->attributes[$attribute];\n } else {\n return 'PopShops API Error: Invalid attribute passed to ' . get_class($this) . '->attr: ' . $attribute;\n }\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($key)\n {\n return $this->getAttribute($key);\n }", "public function __get($attribute)\n {\n if (!isset($this->{$attribute})) {\n Error::set(Error::ERROR_INVALID_PROPERTY, [$attribute], Error::ERROR);\n }\n return $this->{$attribute};\n }", "abstract public function get() ;", "public function getAttribute($name) {\n\t\tif (property_exists($this, $name))\n\t\t\treturn $this->$name;\n\t\telse if ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t}", "public function __get($key) {\n if (key_exists($key, $this->getCachedProperties())) {\n return $this->castAttribute($key, $this->getCachedProperties()[$key]);\n }\n\n return parent::__get($key);\n }", "public function getRawAttribute($key);", "public function getValue(string $attr)\n {\n $this->checkAttribute($attr);\n return $this->attributes[$attr];\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "function umnshib_getAttributeValue($name, $use_headers = false, $prefix = '')\n{\n $shib = _umnshib_get_object($use_headers, $prefix);\n return $shib->getAttributeValue($name);\n}", "abstract function get();", "public function get($attr = null, $forStorage = false)\n {\n if ($attr === null) {\n $attr = self::SECURE_STORE;\n } else {\n $attr = $this->_lookupAttribute($attr);\n }\n\n /* This value can only be retrieved encrypted */\n if ($attr == self::SECURE_STORE) {\n $forStorage = true;\n }\n\n if ($forStorage) {\n return $this->getForStorage($attr);\n } else {\n return isset($this->_attr[$attr]) ? $this->_attr[$attr] : null;\n }\n }", "function __get($property)\n {\n if($property == \"id\")\n {\n return $this->id;\n }\n else\n {\n return call_user_func_array(array($this, \"getAttribute\"), array($property));\n }\n }", "public function getAttribute(): string\n {\n return $this->attribute;\n }", "public function _get($field) {\n\t\tif(property_exists($this, $field)) return $this->{$field}; \n\t\telse return NULL;\n\t}", "public function getAttribute($attribute)\n\t{\n\t\tif(isset($this->attributes[$attribute]))\n\t\t\treturn $this->attributes[$attribute];\n\n\t\treturn null;\n\t}", "public function getAttribute($name)\r\n\t{\r\n\t\treturn $this->__get($name);\r\n\t}", "public function __get($key)\n {\n $value = $this->getAttribute($key);\n \n if ($value === null && $this->channel) {\n return $this->channel->getAttribute($key);\n }\n \n return $value;\n }", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "function get( $key ){\r\n\t\treturn $this->$key;\r\n\t}", "public final function &__get(string $name)\n {\n return $this->attrs[$name];\n }", "public function __get($name)\n\t{\n\t\tif (isset($this->attributes[$name])) {\n\t\t\treturn $this->attributes[$name];\n\t\t} \n\t\treturn null;\n\t\t\n\t}" ]
[ "0.7299429", "0.72725564", "0.72151935", "0.7154686", "0.7076308", "0.7042904", "0.6980929", "0.6896698", "0.68681735", "0.6858955", "0.6852786", "0.6793147", "0.6772377", "0.676507", "0.6730527", "0.67199904", "0.66563606", "0.65841144", "0.6548909", "0.6543471", "0.6496219", "0.64943427", "0.6468302", "0.6458399", "0.6438975", "0.643646", "0.643646", "0.6431706", "0.6421002", "0.6397622", "0.6390163", "0.63877195", "0.6381438", "0.6375413", "0.63731015", "0.6360491", "0.63528913", "0.6352299", "0.6352173", "0.6352026", "0.6346436", "0.6343702", "0.6329053", "0.6321308", "0.6308046", "0.6287718", "0.62831616", "0.62800723", "0.6279508", "0.62627727", "0.62495553", "0.6205209", "0.6205209", "0.6205209", "0.6205209", "0.619447", "0.61652607", "0.6162602", "0.61599976", "0.6152442", "0.614639", "0.6140933", "0.61408746", "0.61389446", "0.6138272", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61222166", "0.61114204", "0.6100763", "0.609802", "0.6097694", "0.60952955", "0.60893303", "0.60685503", "0.6065539", "0.60644174", "0.6041801", "0.6036151", "0.60273343", "0.6021005", "0.60096794", "0.60042906", "0.60031307", "0.5998905", "0.5998905", "0.5998905", "0.5998905", "0.5998905", "0.5998905", "0.59969926", "0.5992798", "0.5991575" ]
0.0
-1
Returns an array of the resource
public function toArray() { return $this->data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asArray() {\n return $this->resource;\n }", "public function getResources(): array\n {\n return $this->resources;\n }", "public function getResourceList()\n {\n $data = array();\n $resources = Kronolith::getDriver('Resource')\n ->listResources(Horde_Perms::READ, array(), 'name');\n foreach ($resources as $resource) {\n $data[] = $resource->toJson();\n }\n\n return $data;\n }", "public function get(): array\n {\n return array_filter($this->resources, function ($resourceNumber) {\n return $resourceNumber >= $this->offset && $resourceNumber < ($this->offset + $this->limit);\n }, ARRAY_FILTER_USE_KEY);\n }", "public function getArray() {\n \treturn array(\n \t\t\t'id' => $this->id,\n \t\t\t'name' => $this->name,\n \t\t\t'path' => $this->path,\n \t\t\t'description' => $this->description,\n \t\t\t'version' => $this->version,\n \t\t\t'groups' => $this->groups,\n \t\t\t'enabled' => $this->enabled\n \t);\n }", "function getMultipleResource( $idMultiResource ) {\n\t\treturn array();\n\t}", "public function all(): array\n {\n $data = $this->dot->all();\n\n $result = [];\n foreach ($data as $k => $row) {\n $result[$k] = new Resource($row);\n }\n\n return $result;\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 toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }", "public function resource($resource) {\n $resource = strtolower($resource);\n if (isset($this->{$resource})) {\n return array_values($this->{$resource});\n } else {\n return array();\n }\n }", "public function getResources(): ?array\n {\n return collect(Filament::getResources())\n ->unique()\n ->filter(function ($resource) {\n if (Utils::isGeneralExcludeEnabled()) {\n return ! in_array(\n Str::of($resource)->afterLast('\\\\'),\n Utils::getExcludedResouces()\n );\n }\n\n return true;\n })\n ->reduce(function ($resources, $resource) {\n $name = $this->getPermissionIdentifier($resource);\n\n $resources[\"{$name}\"] = [\n 'resource' => \"{$name}\",\n 'model' => Str::of($resource::getModel())->afterLast('\\\\'),\n 'fqcn' => $resource,\n ];\n\n return $resources;\n }, collect())\n ->sortKeys()\n ->toArray();\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 toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "public function getRawResources()\n {\n return $this->resources;\n }", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\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 toArray(): array\n {\n return [\n 'id' => intval($this->id),\n 'title' => strval($this->title),\n 'body' => strval($this->body),\n 'owner' => new UserResource($this->whenLoaded('owner')),\n 'children' => CommentResource::collection($this->whenLoaded('children')),\n 'created_at' => strval($this->created_at),\n 'updated_at' => strval($this->updated_at),\n ];\n }", "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 getArray() {\r\n \r\n $data = [\r\n \"id\" => $this->id,\r\n \"name\" => $this->name,\r\n \"description\" => $this->desc,\r\n \"url_file\" => $this->url_file,\r\n \"filename\" => $this->filename,\r\n \"filepath\" => $this->filepath,\r\n \"filesize\" => $this->filesize,\r\n \"mime\" => $this->mime,\r\n \"active\" => $this->active,\r\n \"approved\" => $this->approved,\r\n \"meta\" => $this->extra_data,\r\n \"date\" => $this->Date,\r\n \"author\" => $this->Author->getArray(),\r\n \"url\" => $this->url->getURLs(),\r\n \"thumbnail\" => $this->getThumbnail(),\r\n \"icon\" => $this->getIcon(),\r\n ];\r\n \r\n return $data;\r\n \r\n }", "public function getAllResources() {\n\t\t\t$res=array();\n\t\t\t$res=$this->resources;\n\n\t\t\tforeach ($this->categories as $category)\n\t\t\t\t$res=array_merge($res,$category->getAllResources());\n\n\t\t\treturn $res;\n\t\t}", "public function toArray($request)\n {\n if($this->resource != null){\n return [\n 'id' => $this->id,\n 'products_id' => new ProductResource($this->product),\n 'file_path' => $this->file_path,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at\n ];\n }\n }", "function readableResources(){\n\n return $this->resourcesByPermission('read');\n }", "public function get(): array\n {\n \n }", "public function findAll() {\r\n\t\t$stmt = $this->db->query(\"SELECT * FROM resources\");\r\n\t\t$resources_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\t$resources = array();\r\n\r\n\t\tforeach ($resources_db as $resource) {\r\n\t\t\tarray_push($resources, new Resource($resource[\"id\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"nombre\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"aforo\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"descripcion\"]));\r\n\t\t}\r\n\r\n\t\treturn $resources;\r\n\t}", "public function load(ResourceInterface $resource)\n {\n return array();\n }", "public function toArray($request)\n {\n return [\n 'id'=> $this->id ,\n 'title' => $this->title ,\n 'cover' => new ContentResource(Content::where('id',$this->cover_id)->first()) ,\n 'cover_id' => $this->cover_id ,\n 'more_photo' => ContentResource::collection($this->contents) ,\n ];\n }", "public function get(): array;", "public function get(): array;", "public function toArray()\n {\n return [\n 'id' => $this->getId(),\n 'title' => $this->getTitle(),\n 'resourceId' => $this->getResource() != null ?\n $this->getResource()->getId() :\n null,\n 'project' => $this->getProject() != null ?\n $this->getProject()->toArray() :\n null,\n 'week' => $this->getWeek(),\n 'information' => $this->getInformation()\n ];\n }", "public function get_resource();", "public function get() : array;", "public function resourcesProvider()\n {\n return [\n 'roles' => [\n 'roles',\n ['name', 'description', 'unchangeable'],\n ],\n 'applications' => [\n 'applications',\n ['api_key', 'name', 'description'],\n ],\n ];\n }", "static function generateResource()\n {\n return ['org' => self::$resOrg,\n 'role' => self::$resRole,\n 'id' => self::$resId];\n }", "public function toArray() {\n\t\treturn $this->response;\n\t}", "protected function assets()\n\t{\n\t\tswitch($this->method)\n\t\t{\n\t\t\tcase 'GET':\n\t\t\t\t\n\t\t\t\t$ev = 'read';\n\t\t\t\t$evObj = array(\"assettype\"=>$this->verb,\"args\"=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\t\n\t\t\t\t$ev = 'update';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'PUT':\t\t\t\t\n\t\t\t\t$ev = 'create';\n\t\t\t\t$evObj = array('args'=>$this->verb);\n\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\t\n\t\t\t\t$ev = 'delete';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->fireEvent($this->endpoint,$ev,\"before\",$evObj);\n\t\t$obj = $this->$ev();\n\t\t$evObj['results']=$obj;\n\t\t$this->fireEvent($this->endpoint,$ev,\"after\",$evObj);\n\t\treturn $obj;\n\t}", "public function getAsArray();", "public function toArray(): array\n\t{\n\t\treturn [\n\t\t\t\"id\" => $this->id,\n\t\t\t\"streamUrl\" => $this->streamUrl,\n\t\t\t\"name\" => $this->name,\n\t\t\t\"homepageUrl\" => $this->homepageUrl,\n\t\t];\n\t}", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'description' => $this->description,\n 'created_at' => $this->created_at,\n 'images' => ImageResource::collection($this->whenLoaded('images')),\n ];\n }", "public function toArray(): array\n {\n return [\n 'slug' => $this->slug,\n 'path' => $this->getPath(),\n 'concurrency' => $this->concurrency,\n 'requests' => $this->requests,\n ];\n }", "public function toArray($request) \n\t{\n if (is_null($this->resource)) {\n return [];\n }\n if (is_array($this->resource)) {\n \treturn $this->resource;\n }\n\n return $this->modelResponse();\n\t}", "public function toArray($request)\n {\n // dd($this->resource);\n $obj = [\n 'titre' => $this->resource['directus_files_id']['title'],\n 'description' => $this->resource['directus_files_id']['description'],\n 'url' => $this->resource['directus_files_id']['data']['full_url'],\n 'width' => $this->resource['directus_files_id']['width'],\n 'height' => $this->resource['directus_files_id']['height'],\n 'numero_image' => $this->resource['sort_img']\n ];\n if(isset($this->resource['directus_files_id']['metadata']) && isset($this->resource['directus_files_id']['metadata']['credit'])){\n $obj['credit'] = $this->resource['directus_files_id']['metadata']['credit'];\n }else{\n $obj['credit'] = '';\n }\n return $obj;\n }", "public function getArrayResourceRels()\n {\n return $this->arrayResourceRels;\n }", "public function toArray()\n {\n return array(\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'file' => $this->getFile(),\n 'thumbnail' => $this->getThumbnail(),\n );\n }", "function fetch_object_array($resource) {\n $result = array();\n if ($this->num_rows($resource) > 0) {\n while($row_obj = mysql_fetch_object($resource)) {\n array_push($result, $row_obj);\n }\n }\n\n return $result;\n }", "public function transform($resource)\n {\n return [];\n }", "public function getUriArray(){\n\t\t$this->prepareRuta();\n\t\treturn $this->uriArray;\n\t}", "public function toArray($request)\n {\n $resourceData = [\n \"name\" => $this->name,\n \"user\" => UserResource::make($this->user),\n ];\n return $resourceData;\n }", "public function toArray()\n {\n $data = [];\n\n foreach (get_object_vars($this) as $attribute => $value) {\n if ($attribute != 'resource' and !empty($value)) {\n $data[$attribute] = $value;\n }\n }\n\n return $data;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "private function getAclResources()\n {\n if ($this->aclResources !== null) {\n return $this->aclResources;\n }\n $aclFiles = Files::init()->getConfigFiles('acl.xml', []);\n $xmlResources = [];\n array_map(function ($file) use (&$xmlResources) {\n $config = simplexml_load_file($file[0]);\n $nodes = $config->xpath('.//resource/@id') ?: [];\n foreach ($nodes as $node) {\n $xmlResources[(string)$node] = $node;\n }\n }, $aclFiles);\n $this->aclResources = $xmlResources;\n return $this->aclResources;\n }", "public function toArray() {\r\n \treturn array(\"response\"=>$this->_response);\r\n }", "public function toArray()\n {\n return $this->getContent();\n }", "public function toApiArray()\n {\n return [\n 'id' => $this->id,\n 'parentId' => $this->parentId,\n 'storeId' => $this->storeId,\n 'name' => $this->name,\n 'url' => $this->url,\n 'order' => $this->getOrder(),\n 'depth' => $this->getDepth()\n ];\n }", "public function modelResponse(): array\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'menu_id' => $this->menu_id,\n 'menu_products' => MenuProductResource::collection($this->menuProducts)\n ];\n }", "public function toArray()\n {\n $result = array();\n\n if (!empty($this->getLogging())) {\n $result[Resources::XTAG_LOGGING] =\n $this->getLogging()->toArray();\n }\n\n if (!empty($this->getHourMetrics())) {\n $result[Resources::XTAG_HOUR_METRICS] =\n $this->getHourMetrics()->toArray();\n }\n\n if (!empty($this->getMinuteMetrics())) {\n $result[Resources::XTAG_MINUTE_METRICS] =\n $this->getMinuteMetrics()->toArray();\n }\n\n $corsesArray = $this->getCorsesArray();\n if (!empty($corsesArray)) {\n $result[Resources::XTAG_CORS] =$corsesArray;\n }\n\n if ($this->defaultServiceVersion != null) {\n $result[Resources::XTAG_DEFAULT_SERVICE_VERSION] = $this->defaultServiceVersion;\n }\n\n return $result;\n }", "public function toArray($request)\n {\n\n $resource = [];\n\n if($this->typeSearched == 'projects'){\n $resource = [\n 'id' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'state' => $this->state,\n 'image' => new FileResource($this->file),\n 'typeSearched' => $this->typeSearched\n ];\n }\n\n if($this->typeSearched == 'events'){\n $resource = [\n 'id' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'initial_date' => $this->initial_date,\n 'final_date' => $this->final_date,\n 'state' => $this->state,\n 'typeSearched' => $this->typeSearched\n ];\n }\n\n if($this->typeSearched == 'documents'){\n\n \n\n $resource = [\n 'id' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'type' => $this->type,\n 'state' => $this->state,\n 'file' => new FileResource($this->file),\n 'schoolClass' => new SchoolClassResource($this->schoolClass),\n 'typeSearched' => $this->typeSearched\n ];\n }\n\n return $resource;\n }", "public static function getAll(): array;", "public function toArray() {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'avatar' => $this->avatar\n ];\n }", "public function toArray($request)\n {\n $product = \\App\\Product::find($this->resource);\n $product->images;\n return $product;\n }", "public function getData()\n {\n return array(\n\n );\n }", "public function toArray($request)\n {\n return [\n 'event' => new EventResource($this->event),\n 'category' => $this->category,\n 'image'=> $this->image\n ];\n }", "public function getArray()\n {\n return $this->get(self::_ARRAY);\n }", "public function toArray($request): array\n {\n return [\n 'data' => $this->collection->map(\n function ($tag) {\n return new TagResource($tag);\n })\n ]; }", "public function getArray() {\n return $this->_path;\n }", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'description' => $this->description,\n 'unit_price' => $this->unit_price,\n 'events' => new ResourceEvent($this->whenLoaded('event')),//Khi dữ liệu trả về chỉ một bản ghi(vd: quan hệ 1 nhiều) thì dùng cách này\n//// 'id_user'=> $this->when(Auth::user()->role=='admin',function ()//Kiểm tra xem người có quyền mới được xem(ở đây là secret-value)\n//// {\n//// return [ày\n// 'id_event' => ResourceEvent::collection($this->whenLoaded('event')),//Khi dữ liệu trả về nhiều bản ghi hay 1 array thì sử dụng cái n\n//// ];\n//// }),\n 'images' => ImageResource::collection($this->whenLoaded('images')),\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ];\n }", "public function toArray()\n {\n return array('path' => $this->path,\n 'methods' => $this->httpMethods,\n 'controller' => $this->controller\n );\n }", "function _resource_list($resource){\n\t_resource_list_offset($resource, '1', '20');\n}", "private function loadArray()\n {\n return collect(config('health.resources'))->mapWithKeys(function ($value, $key) {\n return [studly_case($key) => $value];\n });\n }", "public function toArray($request): array\n {\n\n $data = [\n 'id' => $this->id,\n 'quantity' => $this->quantity,\n 'product_id' => $this->product_id,\n 'product' => new ProductResource($this->product),\n 'order_id' => $this->order_id,\n 'order' => new OrderResource($this->order)\n ];\n\n return parent::toArray($data);\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'code' => $this->code,\n 'nom' => $this->nom,\n 'type' => $this->type,\n 'comte' => new ComteResource($this->whenLoaded('comte')),\n 'region' => new RegionResource($this->whenLoaded('region')),\n 'sections' => SectionResource::collection($this->whenLoaded('sections')),\n 'sectionresultats' => SectionresultatResource::collection($this->whenLoaded('sectionresultats'))\n ];\n }", "public function get_data(): array;", "public function get_data(): array;", "public function getResourceIds(): ?array\n {\n return $this->resourceIds;\n }", "public function getAll() : array;", "public function toArray($request)\n {\n $resource = [\n \"id\" => $this->id,\n \"user_id\" => $this->user_id,\n \"company_name\" => $this->company_name,\n \"email\" => $this->email,\n \"registration_no\" => $this->registration_no,\n \"created_at\" => date('d-m-Y', strtotime($this->created_at)),\n \"product\" => ProductCollectionResource::collection($this->product),\n ];\n\n return $resource;\n }", "public function getItems(): array;", "public function getItems(): array;", "public function getResources(string $type) : array {\n if(isset($this->resources[$type])) {\n return $this->resources[$type];\n }\n return array();\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'current_stock' => $this->current_stock,\n 'audited_stock' => $this->audited_stock,\n 'status' => $this->status == 'ok' ? true:false,\n 'product' => new ProductResource($this->whenLoaded('product')),\n ];\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'tanggal' => $this->created_at,\n 'status' => $this->status,\n 'jumlah' => $this->jumlah,\n 'catatan' => $this->catatan,\n 'user' => new UserResource(User::find($this->user_id)),\n 'berita' => new BeritaDukaResource(BeritaLelayu::where('transaksi_id', $this->id)->first()),\n 'paket' => new PaketResource(Paket::find($this->paket_id)),\n ];\n }", "public function getResources($icid) {\n $result = $this->connector->run(\"MATCH (:Identity {id: '{$icid}'})-[:RRELATION]->(r:Resource)\n return r.id as id, r.title as title, r.href as href order by r.title\");\n $resources = [];\n\n foreach ($result->getRecords() as $record) {\n $id = $record->get('id');\n $title = $record->get('title');\n $href = $record->get('href');\n $resources[] = [\"id\" => $id, \"title\" => $title, \"href\" => $href];\n }\n return $resources;\n }", "public function getItems() : array;", "private function getUserResources()\n {\n $result = array();\n $userdata = $this->get('security.context')->getToken()->getUser();\n $groups = $userdata->getUserGroups()->toArray();\n foreach ($groups as $grp) {\n $resources = $grp->getResources();\n foreach ($resources as $res) {\n $result[$res->getId()] = $res->getName();\n }\n }\n\n return $result;\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'quota' => $this->quota,\n 'specialist' => new SpecialistResource($this->specialist),\n 'date' => $this->date\n ];\n }", "public function toArray()\n {\n return array(\n \"httpGet\" => $this->httpGet,\n \"httpPost\" => $this->httpPost,\n \"formats\" => $this->formats\n );\n }", "public function getAll(): array;", "public function getAll(): array;", "public function getAll(): array;" ]
[ "0.83271515", "0.7425478", "0.7247038", "0.72019887", "0.71968246", "0.7153598", "0.71276134", "0.7121748", "0.7120227", "0.7120227", "0.70948935", "0.7045174", "0.70270306", "0.69635355", "0.69635355", "0.69635355", "0.69635355", "0.69323194", "0.68830174", "0.68733656", "0.6828255", "0.6814717", "0.6799882", "0.67881703", "0.67529577", "0.6731169", "0.6717964", "0.6678529", "0.66725284", "0.6647882", "0.66388047", "0.6583577", "0.65832675", "0.65832675", "0.657818", "0.657398", "0.65650314", "0.65524584", "0.65292674", "0.6517869", "0.650548", "0.6502994", "0.64902014", "0.648886", "0.6479192", "0.64769214", "0.6475678", "0.647016", "0.6456471", "0.64446163", "0.6433669", "0.64250857", "0.64214075", "0.64173883", "0.6417055", "0.6417055", "0.6417055", "0.6417055", "0.6417055", "0.6417055", "0.6417055", "0.6411293", "0.64067334", "0.64022374", "0.63810295", "0.634975", "0.6348424", "0.63399696", "0.632856", "0.6328533", "0.63172364", "0.6317132", "0.6312662", "0.631139", "0.6307789", "0.6306044", "0.6303107", "0.62964326", "0.62923145", "0.6288605", "0.62841225", "0.6280756", "0.6275604", "0.62747234", "0.62747234", "0.6273227", "0.62647265", "0.62580365", "0.6255532", "0.6255532", "0.62513274", "0.6247346", "0.6246075", "0.62439024", "0.62391543", "0.62376666", "0.6231892", "0.6231763", "0.6229662", "0.6229662", "0.6229662" ]
0.0
-1
Used to save the current collection to the database
public function save() { $this->checkForNecessaryProperties(); $this->update($this->getCurrentId(), $this->data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save() {\n\t\treturn $this->data->save($this->collection);\n\t}", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "protected function _saveDataCollection()\n\t{\n\t\tif (count($this->_dataCollection)>0) {\n\n\t\t\t$message = 'added <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> instances to a <code>Doctrine_Collection</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'doctrine');\n\n\t\t\ttry {\n\t\t\t\t/**\n\t\t\t\t * @todo replace this by \"replace\"\n\t\t\t\t */\n\t\t\t\t$this->_dataCollection->save();\n\n\t\t\t\t$message = 'successfully saved <code>'\n\t\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t\t . ' '\n\t\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t\t . '</code> records'\n\t\t\t\t;\n\t\t\t\t$this->addMessage($message, 'doctrine');\n\n\t\t\t} catch (Exception $exception) {\n\t\t\t\t/**\n\t\t\t\t * @todo revise this\n\t\t\t\t */\n\t\t\t\tL8M_Doctrine_Exception_Handler::handleException($exception);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "private function saveCollections()\r\n\t{\r\n\t\tif (!is_numeric($this->id))\r\n\t\t\treturn false;\r\n\r\n\t\tfor ($i = 0; $i < count($this->collections); $i++)\r\n\t\t{\r\n\t\t\t$this->collections[$i]->partnerId = $this->id;\r\n\t\t\t$this->collections[$i]->save();\r\n\t\t\t//$this->saveCollection($this->collections[$i]);\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function save()\n {\n $this->storage->save($this->collection->getContainer());\n return $this;\n }", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function save() {\n\t\t$this->data[] = $this->current();\n\t}", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "static function save($collection, $data) {\r\n\t\t$col = self::getCollection($collection);\r\n\t\treturn $col->save($data);\r\n\t}", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function saveToDB()\n {\n }", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {\n\t\t\t\n\t\t}", "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "public function persist()\n {\n persistableCollection::getInstance($this->resourceName)->persistObject($this);\n $this->loaded = true;\n $this->persisted = true;\n }", "public final function save() {\n }", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function save($collection, $data) {\n $col = $this->db->selectCollection($collection);\n return $col->save($data);\n }", "public function save()\r\n {\r\n \r\n }", "abstract public function persist($collection, array $document);", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public final function save()\n {\n }", "public function saveCollection(){\n\t\tif($this->rest->_getRequestMethod() != 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\t\t#variable de respuesta\n\t\t$response = array('status' => 'Success');\n\t\t$collection = json_decode(file_get_contents('php://input'),true);\n\t\t#comprobamos si es nuevo o edicion\n\t\tif(!$collection['id_cobro']){\n\t\t\t#nuevo\n\t\t\t$status = $this->_validData($collection);\n\t\t\tif($status == 1){\n\t\t\t\t$this->db->insert($this->Table_, $collection);\n\t\t\t\t$response['msg'] = '3000';\n\t\t\t\t$response['data'] = $this->db->insert_id();\n\t\t\t}else{\n\t\t\t\t$response['msg'] = $status;\n\t\t\t}\n\t\t}else{\n\t\t\t#edicion\n\t\t\t$oldCollection = $collection;\n\t\t\t$this->db->where('id_cobro',$collection['id_cobro']);\n\t\t\t$this->Result_ = $this->db->get($this->Table_);\n\t\t\tif($this->Result_->num_rows() > 0){\n\t\t\t\tunset($collection['id_cobro']);\n\t\t\t\tunset($collection['registro']);\n\t\t\t\t$status = $this->_validData($collection);\n\t\t\t\tif($status == 1){\n\t\t\t\t\t#actualizamos el registro\n\t\t\t\t\t$this->db->where('id_cobro',$oldCollection['id_cobro']);\n\t\t\t\t\t$this->db->update($this->Table_, $collection);\n\t\t\t\t\t$response['msg'] = '3001';\n\t\t\t\t\t$response['data'] = $oldCollection;\n\t\t\t\t}else{\n\t\t\t\t\t$response['msg'] = $status;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$response['msg'] = '2001';\n\t\t\t}\n\t\t}\n\t\t#envio de respuesta\n\t\t$this->rest->_responseHttp($response,$this->CodeHttp_);\n\t}", "public function save()\n {\n }", "public function save()\n {\n /** @var \\Illuminate\\Http\\Request $request */\n $request = App::make('request');\n $request->session()->put($this->collection->cart_name, $this->collection);\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save() {\n $class = get_called_class();\n return $class::$objects->save($this);\n }", "public function save()\n {\n $this->_validateModifiable();\n\n if($this->isNew())\n {\n $this->_getDataSource()->create($this);\n }\n else\n {\n $this->_getDataSource()->update($this);\n }\n\n $this->_saveRelations();\n $this->_setNew(false);\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function save()\n {\n return Query::update('officers', \"`ID`=\".$this->id, $this->initialVars, $this->getDBArray());\n }", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "static function save($collection, $data) {\n global $mongo;\n $col = $mongo->selectCollection(MONGODB_NAME, $collection);\n return $col->save($data);\n }", "public function save() {\n if ($this->loaded) {\n return $this->update();\n }else{\n return $this->create();\n }\n }", "function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}", "public function save()\n {\n \treturn FactoryAbastract::dao(get_class($this))->save($this);\n }", "function analyticsSave($key, $collection)\n {\n }", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function save()\n {\n // For V2.0\n }", "public function save() {\n }", "public function save() {\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function save()\r\n {\r\n //\r\n }", "public function store(Collection $collection): Collection\n {\n $this->service->save($this->request, $collection);\n $this->flashcardService->save($this->request->flashcards, $collection);\n\n return $collection;\n }", "public function saveToDb()\n\t{\n\t\tparent::saveToDb();\n\t\t$this->insertAttachment();\n\t}", "public function save(){\n }", "public function save()\n\t{\n\n\t}", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function save() {\n }", "public abstract function save();", "public function save(){\r\n\t\tif ($this->new){\r\n\t\t\treturn $this->insert();\r\n\t\t} else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}", "public function saveThis()\n {\n \t\tPersistentSession::getInstance()->saveOrUpdate($this);\n }", "public function save()\n {\n $postMapper = new Application_Model_PostsMapper();\n $postMapper->save($this);\n }", "public function saveData()\r\n {\r\n \r\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\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 }", "function save ($info) {\r\n\t\t// 2) copy $this into store\t\r\n\t}", "public function save()\n {\n if (count($this->toSave) <= 0)\n return;\n \n $columns = [ ];\n $params = [ ];\n $to_save = [ ];\n array_walk($this->toSave, function($value, $key) use (&$columns, &$to_save, &$params) {\n if ($this->insert):\n $columns[] = $key;\n $to_save[] = \"?\";\n else:\n $to_save[] = \"{$key} = ?\";\n endif;\n\n $params[] = $value;\n });\n $to_save = implode(', ', $to_save);\n\n if ($this->insert):\n $columns = implode(', ', $columns);\n $primary_key = database()->run('INSERT INTO ' . $this->table . '(' . $columns . ') VALUES(' . $to_save . ')', $params);\n \n $this->{$this->primaryKey} = $primary_key;\n $this->insert = false;\n else:\n $params[] = $this->{$this->primaryKey};\n database()->run('UPDATE ' . $this->table . ' SET ' . $to_save . ' WHERE ' . $this->primaryKey . ' = ?', $params);\n endif;\n \n $this->toSave = [ ];\n return $this;\n }", "private function saveItems()\n {\n $this->storage->save($this->items);\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function takeSnapshot()\n {\n $this->snapshot = $this->collection->toArray();\n $this->isDirty = false;\n }", "abstract protected function saveItems();", "function save()\r\n {\r\n $GLOBALS['DB']->exec(\"INSERT INTO inventory_items (name) VALUES ('{$this->getName()}')\");\r\n $this->id = $GLOBALS['DB']->lastInsertId();\r\n }", "public function save()\n {\n return;\n }", "public function saveContainers()\n {\n $this->toContainer->saveBook();\n $this->fromContainer->saveBook();\n }", "public function persistAll() {}", "public function save(){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"CALL sp_categories_save(:idcategory, :descategory)\", array(\n\t\t\t\":idcategory\"=>$this->getidcategory(),\n\t\t\t\":descategory\"=>$this->getdescategory()\n\t\t));\n\n\t\t$this->setData($results[0]);\n\n\n\t\tCategory::updateFile();\n\n\t}", "public function save()\n {\n //\n }", "function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }", "public function save()\n {\n if($this->id != -1)\n {\n $this->update_subject();\n }\n else\n {\n $this->insert_subject();\n }\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 save()\n {\n }", "public function save()\n {\n }" ]
[ "0.7597874", "0.7251458", "0.72219443", "0.703184", "0.67488813", "0.6709139", "0.6685542", "0.66612136", "0.66339", "0.6584866", "0.6580554", "0.65257657", "0.6486657", "0.648089", "0.64617735", "0.64617735", "0.64596343", "0.6457748", "0.64504576", "0.6444681", "0.6418968", "0.64173514", "0.6392447", "0.6364675", "0.6343778", "0.63431764", "0.63308704", "0.6323181", "0.6307596", "0.63020325", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.6273121", "0.62647074", "0.62511855", "0.6249771", "0.6243044", "0.6222718", "0.6211673", "0.6211507", "0.62107646", "0.6208075", "0.6188708", "0.61855775", "0.61254394", "0.612485", "0.61222506", "0.61207175", "0.61207175", "0.6104432", "0.6100953", "0.6097977", "0.60978526", "0.60930985", "0.60902506", "0.6083845", "0.60822743", "0.607858", "0.6072393", "0.60718024", "0.6068109", "0.60644746", "0.6053906", "0.60535187", "0.6043038", "0.60426766", "0.60411155", "0.60364395", "0.60364395", "0.60364395", "0.60364395", "0.60364395", "0.60333294", "0.60282004", "0.60166955", "0.6007499", "0.6005233", "0.60024023", "0.59772474", "0.5975521", "0.5965373", "0.5954653", "0.59536296", "0.5950963", "0.5950963" ]
0.65957457
9
Get the ID of the current collection
protected function getCurrentId() { return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id()\n\t{\n\t\t// @todo: _id should not be hard-coded (mongo-specific)\n\t\treturn $this->get('_id');\n\t}", "public function getCollectionId()\n {\n @list($collectionId) = explode('/', $this->_id, 2);\n\n return $collectionId;\n }", "public function getCollectionId() : ?string\n {\n return $this->collectionId;\n }", "static public function GetGETCollectionId() {\n if (isset(self::$collectionId))\n return self::$collectionId;\n else\n return false;\n }", "function getCollectionId()\n {\n return $this->getMessageQueueId();\n }", "public function getCollectionCarouselId()\n {\n return $this->collectionCarouselId;\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getId()\n {\n return $this->get('id', 0);\n }", "public function getId()\n {\n return $this->currentId;\n }", "public function id()\n {\n return $this->_getAuthId();\n }", "public function id()\n {\n return $this->_id;\n }", "public function id()\n {\n return $this->_id;\n }", "public function id()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->get(self::_ID);\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function getId()\n {\n return $this->__get(\"id\");\n }", "public function get_id()\n {\n return $this->_id;\n }", "public function getID()\n { return $this->get('id'); }", "public function getID()\n {\n return $this->getKey();\n }", "public function getObjectId() {\n\t\t\treturn SERIA_Meta::getNamedObjectId($this);\n\t\t}", "public function get_id() {\n\t\treturn $this->_id;\n\t}", "function GetId ()\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $data = $this->mongo->dataFindOne( array( \"username\" => $this->username ) );\n return isset( $data[ \"_id\" ] ) ? $data[ \"_id\" ] : 0;\n }", "public function getId()\n {\n return $this->_Id;\n }", "public function getId()\n {\n return $this->_Id;\n }", "public function id()\n\t{\n\t\treturn $this->_id;\n\t}", "public function id()\n {\n return $this->resource->getKey();\n }", "public function getId() {\n\t\treturn $this->_id;\n\t}", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function get_id()\n\t{\n\t\treturn $this->_id;\n\t}", "public function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "public function getId()\n {\n return $this->_id;\n }", "function id():string {return $this->_p['_id'];}", "public function getId()\n\t\t{\n\t\t\treturn $this->_id;\n\t\t}", "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function getId()\n\t{\n\t\treturn $this->_id;\n\t}", "public function getId()\n\t{\n\t\treturn $this->_id;\n\t}", "function getId() {\n\t\treturn $this->_id;\n\t}", "function get_id() {\n return $this->get_mapped_property('id');\n }", "public function getId()\n {\n return $this->_list->getId();\n }", "public function get_id()\n {\n return $this->id;\n }", "public function get_id()\n {\n return $this->id;\n }", "public function get_id()\n {\n return $this->id;\n }", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function getId() {\n return $this->_id;\n }", "public function getId() {\n return $this->_id;\n }", "public function getId() {\n return $this->_id;\n }", "public function getInternalId()\n {\n return $this->_id;\n }", "public function getId()\r\n\t\t{\r\n\t\t\treturn $this->_id;\r\n\t\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function id() {\r\n return $this->orm->id();\r\n }", "function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "public function getId() {\n if($this->items!==false)\n return @current($this->items)->id_str;\n return false;\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }" ]
[ "0.8163485", "0.8107526", "0.789086", "0.7690199", "0.74105793", "0.6962001", "0.6933297", "0.6932041", "0.69179386", "0.6910203", "0.68992364", "0.68992364", "0.68992364", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.6885321", "0.68850774", "0.68850774", "0.68850774", "0.68850774", "0.6884822", "0.6884822", "0.6884822", "0.6879306", "0.6835406", "0.68304074", "0.68299687", "0.6826602", "0.6825369", "0.68175316", "0.68175316", "0.6814716", "0.67754674", "0.6770964", "0.6765492", "0.6760634", "0.67492765", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.6744599", "0.67409295", "0.67379946", "0.67359906", "0.67358184", "0.67358184", "0.6729521", "0.6729521", "0.6713654", "0.6713652", "0.67094547", "0.6704423", "0.6704423", "0.6704423", "0.66957414", "0.66957414", "0.66957414", "0.66957414", "0.66955876", "0.66955876", "0.66955876", "0.66902184", "0.66902184", "0.66902184", "0.66862345", "0.6685775", "0.66839874", "0.66839874", "0.66834176", "0.66727394", "0.66727394", "0.6672365", "0.66677314", "0.66677314" ]
0.6681967
95
Makes sure all the necessary properties have been set
protected function checkForNecessaryProperties() { if (!property_exists($this, 'data')) { throw new IncompatibleParentClass('Parent class must implement $data property.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp()\n {\n $this->object = new Properties();\n }", "protected function checkUnsetProperties()\r\n {\r\n $ar = get_object_vars($this);\r\n if (self::$DEBUG)\r\n {\r\n //echo \"Object Vars:\" .PHP_EOL;\r\n // var_dump(get_object_vars($this));\r\n }\r\n foreach ($ar as $key => $val) {\r\n if (!isset($ar[$key]))\r\n trigger_error(\"{$key} not set in \" . get_class($this) . \". Try setting the value in __construct method.\");\r\n }\r\n }", "protected function resetProperties() {}", "protected function fillProperties()\n {\n foreach ($this as $key => $value) {\n if ($this->isPrivate($key)) {\n continue;\n }\n $this->currentProperties[\"{$key}\"] = $value;\n $this->newProperties[\"{$key}\"] = $value;\n }\n }", "protected function setUp()\n {\n $this->object = new TestAutoGetSetProps;\n }", "protected function setupFields()\n {\n }", "function properties()\n {\n }", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "abstract protected function properties();", "public function initProps()\n {\n foreach ($this->cmds as $key => $parseValues) {\n $this->props[$key] = false;\n }\n\n foreach ($this->flags as $key => $parseValues) {\n $this->props[$key] = false;\n }\n }", "public function allowProperties() {}", "protected function setUp() {\n $this->object = new Qwin_ValidationResult;\n\n\n }", "protected function setUp() {\r\n $this->object = new ValidaDados;\r\n }", "public function testInstanceHasRequiredProperties()\n {\n $module = new CWBlockStores();\n foreach (self::REQUIRED_PROPERTIES as $prop) {\n $this->assertNotNull($module->$prop);\n }\n }", "protected function setUp()\n\t{\n\t\t$this->object = new CXLHash;\n\t}", "protected function reset_properties() {\n\t\t$this->author = false;\n\t\t$this->readme = array();\n\t\t$this->theme = false;\n\t\t$this->theme_post = false;\n\t\t$this->theme_slug = '';\n\t\t$this->theme_dir = '';\n\t\t$this->theme_name = '';\n\t\t$this->tmp_svn_dir = '';\n\t\t$this->trac_changeset = 0;\n\t\t$this->trac_ticket = (object) array(\n\t\t\t'id' => 0,\n\t\t\t'resolution' => '',\n\t\t\t'summary' => '',\n\t\t\t'keywords' => [],\n\t\t\t'parent_link' => '',\n\t\t\t'priority' => '',\n\t\t\t'diff_line' => '',\n\t\t\t'description' => '',\n\t\t);\n\t\t$this->version_status = 'new';\n\t\t$this->importing_from = 'upload';\n\t\t$this->commit_msg = '';\n\n\t\t// $this->tmp_dir = ''; // Temporary folder per each instance of this class. Doesn't need to be reset each time.\n\t\t// $this->trac = false; // This can stay active, Trac access won't change between calls.\n\t}", "function resetProperties()\n {\n $this->fullremyears = 0;\n $this->fullremmonths = 0;\n $this->fullremdays = 0;\n $this->fullremhours = 0;\n $this->fullremminutes = 0;\n $this->fullremseconds = 0;\n $this->years = 0;\n $this->months = 0;\n $this->days = 0;\n $this->hours = 0;\n $this->minutes = 0;\n $this->seconds = 0;\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 }", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "abstract protected function setRequiredGetters();", "public function allowAllProperties() {}", "protected function setUp()\n {\n $this->object = new CValidate;\n }", "public function before()\n {\n if ($this->_config === null) {\n return;\n }\n foreach ($this->_config as $property => $value) {\n if (property_exists($this, $property)) {\n $this->{$property} = $value;\n }\n }\n }", "protected function setUp()\n {\n $this->object1 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group1', 'Role1', true);\n $this->object2 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group2', 'Role2', false);\n $this->object3 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('', '', false);\n }", "protected function setUp()\n {\n $this->object = new Hash;\n }", "public function ensureProperties(&$crash, $req_props, $log_msg)\n {\n \t $missing_prop = FALSE;\n \t $missing_prop_names = array();\n \t foreach ($req_props as $prop => $default_value) {\n \t if (! property_exists($crash, $prop)) {\n \t\t $missing_prop = TRUE;\n \t\t $crash->{$prop} = $default_value;\n \t\t array_push($missing_prop_names, $prop);\n \t }\n \t }\n \t if ($missing_prop) {\n \t Kohana::log('alert', \"Required properites are missing from $log_msg - \" . implode(', ', $missing_prop_names));\n \t }\n }", "protected function initialize()\n {\n // load the driver\n static::getDriver();\n\n // add in the default ID property\n if (static::$ids == [self::DEFAULT_ID_PROPERTY] && !isset(static::$properties[self::DEFAULT_ID_PROPERTY])) {\n static::$properties[self::DEFAULT_ID_PROPERTY] = self::$defaultIDProperty;\n }\n\n // generates created_at and updated_at timestamps\n if (property_exists($this, 'autoTimestamps')) {\n $this->installAutoTimestamps();\n }\n\n // fill in each property by extending the property\n // definition base\n foreach (static::$properties as &$property) {\n $property = array_replace(self::$propertyDefinitionBase, $property);\n }\n\n // order the properties array by name for consistency\n // since it is constructed in a random order\n ksort(static::$properties);\n }", "protected function setUp() {\n\n\t\t$class_name = __NAMESPACE__.\"\\\\\".$this->property_class_name;\n\t\t$this->property_options[\"default_value\"] = $this->default_value;\n\n\t\t$this->config = new ConfigTestMock(\"test\");\n\t\t$this->object = new $class_name( $this->config, $this->property_name, $this->property_options );\n\t}", "protected function setUp()\n\t{\n\t\t$this->object = new object('obj att', 'obj att2');\n\t}", "public function testProperties(): void\n {\n $body = new RequestBodyObject();\n\n $url = new UrlObject();\n $formParameter = new FormParameterObject();\n $file = new FileObject();\n\n $body->setDisabled(false);\n $body->setMode('file');\n $body->setRaw('test-raw');\n $body->setUrl($url);\n $body->setFormParameter($formParameter);\n $body->setFile($file);\n\n $this->assertProperties($body, [\n 'isDisabled' => false,\n 'getMode' => 'file',\n 'getRaw' => 'test-raw',\n 'getUrl' => $url,\n 'getFormParameter' => $formParameter,\n 'getFile' => $file\n ]);\n }", "public function setUp()\n\t{\n\t\t$this->state_data = new Blackbox_StateData();\n\t\t$this->target = new Blackbox_Target();\n\t}", "protected function setUp()\n {\n $this->instance = new TestProPropertyDTO();\n $this->masterClass = AbstractCSR3PropertyDTO::class;\n $this->reflexClass = TestProPropertyDTO::class;\n }", "protected function setUp(): void {\n $this->parser = new PropertyParser();\n }", "protected function setUp() {\n\t\t$this->object = new Showings;\n\t}", "protected function setupValidation()\n {\n }", "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 _getCleanProperties() {}", "protected function prepareForValidation()\n {\n $this->merge([\n 'current_password' => trim($this->current_password),\n 'password' => trim($this->password),\n ]);\n }", "public function setUp()\n\t{\n\t\t$this->bb_data = new OLPBlackbox_Data();\n\t\t$this->state_data = new Blackbox_StateData();\n\t}", "private function setDefaults()\n {\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n $property->applyDefault();\n }\n }", "private function setup()\r\n\t{ }", "private function ensureConfiguration(): void {\n if (!$this->_isInitialized) {\n $this->configure();\n $this->_isInitialized = true;\n }\n }", "public function setup()\n\t{\n\t\t// we don't do anything here in the base class\n\t}", "public function __construct()\n {\n $this->setRequiredFields($this->_aDefaultRequiredFields);\n\n $aRequiredFields = oxRegistry::getConfig()->getConfigParam('aMustFillFields');\n if (is_array($aRequiredFields)) {\n $this->setRequiredFields($aRequiredFields);\n }\n }", "public function flushProperties()\n\t{\n\t\t$this->properties = array();\n\t}", "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 }", "protected function setUp()\n {\n $this->object = new CollectionWrapper();\n }", "protected function prepareValidations() {}", "protected function initializeObject() {}", "protected function setUp(): void {\n $this->object = new ConvertorRule();\n }", "protected function setUp()\n {\n $this->update = new Update;\n }", "private function _getSettings()\n {\n $properties = $this->_class->getProperties();\n foreach ($properties as $property) {\n $prop = new Property($property);\n $prop->fillSettings($this->_reflect);\n }\n if (empty($this->_reflect->listField)) {\n $keys = array_keys($this->_reflect->fields);\n $this->_reflect->listField = array_shift($keys);\n }\n $this->_reflect->fieldNames = array_keys($this->_reflect->fields);\n }", "protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}", "function initializeImageProperties()\n\t{\n\t\tlist($this->width, $this->height, $iType, $this->htmlattributes) = getimagesize($this->sFileLocation);\n\n\t\tif (($this->width < 1) || ($this->height < 1)) {\n\t\t\t$this->printError('invalid imagesize');\n\t\t}\n\n\t\t$this->setImageOrientation();\n\t\t$this->setImageType($iType);\n\t}", "protected function setUp()\n {\n $this->object = new HttpParams();\n\n }", "protected function setUp() {\n $this->object = new pTime(10, 20, 5, 100);\n }", "protected function setUp() {\n $this->object = new validatorResource;\n }", "public function setUp()\n {\n $this->faker = Factory::create();\n\n $reader = new PhpDocReader();\n\n foreach (array_keys(get_object_vars($this)) as $propertyName) {\n if (self::MOCK_SUFFIX !== substr($propertyName, -strlen(self::MOCK_SUFFIX))) {\n continue;\n }\n\n $property = new \\ReflectionProperty(static::class, $propertyName);\n $propertyClass = $reader->getPropertyClass($property);\n\n $this->$propertyName = $this->prophesize($propertyClass);\n }\n }", "protected function setUp() {\n $this->object = new HeaderModel;\n }", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "protected function setUp()\n {\n $this->object = new Set;\n }", "public function setUp()\n {\n $this->paramErrors = new ParamErrors();\n }", "protected function setUp() {\n $this->object = new Dictionary;\n }", "protected function setUp()\r\n {\r\n $this->object = new AuthClientResource;\r\n $this->ref = new \\ReflectionObject($this->object);\r\n $this->identityRef = $this->ref->getProperty('identity');\r\n $this->identityRef->setAccessible(true);\r\n $this->propertiesRef = $this->ref->getProperty('properties');\r\n $this->propertiesRef->setAccessible(true);\r\n $this->innerIdRef = $this->ref->getProperty('innerId');\r\n $this->innerIdRef->setAccessible(true);\r\n }", "public function setup()\n {\n // $this->totalSteps = $this->startNumber;\n $this->times = array();\n $this->totalSteps = sizeof(HailApiObject::fetchables());\n }", "public function testGetAndSetMethods()\n {\n $attribs = ['class' => 'gravatar', 'title' => 'avatar', 'id' => 'gravatar-1'];\n $this->_object->setDefaultImg('monsterid')\n ->setImgSize(150)\n ->setSecure(true)\n ->setEmail(\"[email protected]\")\n ->setAttribs($attribs)\n ->setRating('pg');\n $this->assertEquals(\"monsterid\", $this->_object->getDefaultImg());\n $this->assertEquals(\"pg\", $this->_object->getRating());\n $this->assertEquals(\"[email protected]\", $this->_object->getEmail());\n $this->assertEquals($attribs, $this->_object->getAttribs());\n $this->assertEquals(150, $this->_object->getImgSize());\n $this->assertTrue($this->_object->getSecure());\n }", "protected function setUp() {\n $this->object = new Qwin_Config;\n }", "public function setUp() {\n\t\tparent::setUp();\n\n\t\t$_GET = array();\n\t\t$_POST = array();\n\t}", "protected function setup(){\n }", "protected function setUp()\n {\n $this->object = new SysInfo;\n }", "protected function setUp(): void {\n $this->object = new Atom();\n }", "protected function setUp() {\n $this->object = new XG_PersonRef;\n }", "function init()\n\t{\n\t\t$this->defineAttribute('value', false, true, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('connect', false, 0, COMPONENT_TYPE_INTEGER);\n\n\t\t// call the superclass for validate the attributes\n\t\tparent::init();\n\t}", "protected function setUp()\n\t{\n\t\tparent::setUp();\n\t\t// Сбросим валидатор, чтобы не было влияния одних тестов на другие\n\t\tValidator::reset();\n\t}", "public function initialize()\n\t{\n\t\t$this->data = new stdClass();\n\t}", "protected function setUp()\n\t{\n\t\t$this->object = PPCredentialManager::getInstance();\n\t}", "protected function setUp(): void\n {\n $this->object = new PotvrzeniUhrady();\n }", "protected function setUp() {\n\t\t$this->objectRegistry = new \\F3\\FLOW3\\Object\\TransientRegistry();\n\t}", "protected function setUp()\n {\n $this->object = new LazyClassDefinition('\\stdClass');\n \n }", "protected function init()\n {\n $this->setValueIfExistsAndNotNothing('bookmarkPid');\n $this->setValueIfExistsAndNotNothing('groupIdsToShowBookmarksFor');\n \n $this->setBooleanIfExistsAndNotNothing('showPrivateBookmarks');\n $this->setBooleanIfExistsAndNotNothing('showGroupBookmarks');\n $this->setBooleanIfExistsAndNotNothing('showPublicBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createPublicBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createPrivateBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createGroupBookmarks');\n $this->setBooleanIfExistsAndNotNothing('userCanDeleteAll');\n }", "public function setProperties($properties)\n {\n\n }", "public function checkSetup()\n {\n if ($this->itemType == \"\") {\n die(\"No itemType provided!\");\n }\n if ($this->classPathBase == \"\") {\n die(\"No classPathBase provided!\");\n }\n if ($this->listView == \"\" && empty($this->listNames)) {\n die(\"Provide either a list view OR fields!\");\n }\n if ($this->createView == \"\" && empty($this->editSettings)) {\n die(\"No create view OR editSettings provided!\");\n }\n\n if (! empty($this->editSettings)) {\n $fields = ['label','type'];\n foreach ($this->editSettings as $key => $es) {\n foreach ($fields as $f) {\n if (empty($es[$f])) {\n die(\"An edit parameter - {$f} - is missing or blank in your config for \\\"{$key}\\\".\");\n }\n }\n }\n }\n }", "protected function setUp()\n {\n $this->object = new Ticket(new Mapper());\n }", "public function ensureConsistency()\n {\n if ($this->aPublisher !== null && $this->publisher_id !== $this->aPublisher->getPublisherId()) {\n $this->aPublisher = null;\n }\n if ($this->aLanguage !== null && $this->language_id !== $this->aLanguage->getLanguageId()) {\n $this->aLanguage = null;\n }\n if ($this->aPlace !== null && $this->publish_place_id !== $this->aPlace->getPlaceId()) {\n $this->aPlace = null;\n }\n if ($this->aFrequency !== null && $this->frequency_id !== $this->aFrequency->getFrequencyId()) {\n $this->aFrequency = null;\n }\n if ($this->aUser !== null && $this->uid !== $this->aUser->getUserId()) {\n $this->aUser = null;\n }\n }", "function collectPropertiesAndActions()\n\t{\n\n\t}", "public function setUp () {\n\t\tif (!$this->oStore->isSetUp()) {\n\t\t\t$this->oStore->setUp();\n\t\t}\n\t}", "protected function initVars() {\n\n\t\t}", "protected function setUp()\n {\n global $db;\n $this->object = new testSmartObject();\n $this->object->db = $db;\n }", "protected function setUp(): void\n {\n $this->object = new HydrationOptions();\n }", "public function initialize()\n {\n $this->data = new stdClass();\n }", "function SetInitialValues()\n\t{\n\t\t$this->id = -1;\n\t\t$this->title = '';\n\t\t$this->url = '';\n\t\t$this->user_id = -1;\n\t\t$this->timestamp = -1;\n\t}", "private function init() {\n // Set environment variables MUST BE DONE IN THIS ORDER!\n self::initDefaultFormValues(); // Assign default values to forms\n self::initTablePriorityHash();\n self::initTableTypePriorityHash();\n self::initTableHash(); // assign tables.\n self::initTableColumnsHash(); // assign hash with column details.\n #self::initSurveyHash(); // Assign Surveys TODO Place this back in when surveys are merged.\n self::initAstroFilterHash(); // Assign Filters\n self::initQualityFlags(); // assign hash with column details for all quality flag tables.\n }", "function initialize () {\n //blank for implementing\n\t\n\t//go through the attributes see if any of them have a name propery\n }", "public function setUp()\r\n\t{\r\n\t\t$this->list = new STUB_Struct_DLL_1_0();\r\n\t\t// make sure list is empty before each run\r\n\t\t$this->assertAttributeEmpty( 'list', $this->list );\r\n\t}", "public function testSetProperties() {\n\t\t$this->CurrentConditions->update(\n\t\t\t.70,\n\t\t\t.33,\n\t\t\t.34\n\t\t);\n\n\t\t$reflection = new ReflectionClass($this->CurrentConditions);\n\t\t$reflectionTemperature = $reflection->getProperty('temperature');\n\t\t$reflectionTemperature->setAccessible(TRUE);\n\t\t$reflectionHumidity = $reflection->getProperty('humidity');\n\t\t$reflectionHumidity->setAccessible(TRUE);\n\n\t\t$this->assertSame(\n\t\t\t$reflectionTemperature->getValue($this->CurrentConditions),\n\t\t\t.70\n\t\t);\n\t\t$this->assertSame(\n\t\t\t$reflectionHumidity->getValue($this->CurrentConditions),\n\t\t\t.33\n\t\t);\n\t}", "public function setup() {}" ]
[ "0.7337592", "0.73021376", "0.7079115", "0.6696277", "0.6674233", "0.65453094", "0.65222734", "0.650841", "0.6505057", "0.64860314", "0.6483153", "0.64678365", "0.6444622", "0.6440914", "0.6369585", "0.63344264", "0.6298931", "0.6295469", "0.62934005", "0.62934005", "0.62934005", "0.62934005", "0.62934005", "0.62897736", "0.62673235", "0.6257215", "0.62492615", "0.624628", "0.6236496", "0.62112814", "0.62000966", "0.61936444", "0.6193168", "0.61840147", "0.61756974", "0.6173789", "0.616997", "0.61637926", "0.6163753", "0.61574346", "0.61526185", "0.6142402", "0.614067", "0.6139302", "0.6135662", "0.61330944", "0.6127041", "0.6123795", "0.6116208", "0.610907", "0.6105887", "0.6094663", "0.6093091", "0.6090093", "0.6090087", "0.6088255", "0.6086746", "0.60799116", "0.6077158", "0.60764617", "0.6076197", "0.6071929", "0.60655767", "0.60484433", "0.6048019", "0.6047697", "0.60248065", "0.6017839", "0.6010287", "0.6007369", "0.6003966", "0.60031253", "0.6001444", "0.60007584", "0.5999618", "0.59994245", "0.5991657", "0.5985383", "0.59852517", "0.59807426", "0.5979882", "0.5979118", "0.5976828", "0.5974445", "0.5972213", "0.59687066", "0.5968", "0.5964238", "0.5961177", "0.5960764", "0.59570944", "0.5952951", "0.5952711", "0.5941385", "0.5940433", "0.5937611", "0.5937267", "0.59355277", "0.59350836", "0.59350073" ]
0.61426175
41
Allows you to use the given resource object as a string
public function __toString() { return json_encode($this->toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function resource($resource);", "abstract protected function setResource(): String;", "static function resource($resource) {\n\t\treturn self::_getLoader()->resource($resource);\n\t}", "public function get_resource() : string\n {\n return $this->resource;\n }", "private function resource($value): string\n {\n return (string) $value;\n }", "public function string($name) {\n\t\t\t$r=new Resource(Resource::STRINGS, $name);\n\t\t\t$this->addResource($r);\n\t\t\treturn $r;\n\t\t}", "public function __toString()\n {\n if (is_object($this->resource) and method_exists($this->resource, '__toString')) {\n\n return $this->resource->__toString();\n }\n\n return json_encode($this->resource);\n }", "public function serialize(ResourceInterface $resource, ResourceSerializationContext $context): string;", "abstract public function resource();", "private function mapResource(string $resource, $object)\n {\n if ($object === false || is_string($object)) {\n return $object;\n }\n\n $baseResource = __NAMESPACE__ . '\\\\' . $resource;\n $class = (class_exists($baseResource)) ? $baseResource : 'Compredict\\\\API\\\\Algorithms\\\\Resources\\\\' . $resource;\n\n return new $class($object, $this);\n }", "public function resource(): ?string\n {\n $requestResource = $this->parameters()[1] ?? null;\n\n return Str::of($requestResource)\n ->plural()\n ->lower()\n ->__toString();\n }", "protected static function factory(){\n\t\t\treturn 'Resources';\n\t\t}", "public function getResource(): string\n {\n return $this->resource;\n }", "public function getResource(): string\n {\n return $this->resource;\n }", "public function get_resource();", "public function dumpResource($resource, $format = 'html')\n {\n $this->checkResourceParam($resource, true);\n\n if (isset($this->index[$resource])) {\n $properties = $this->index[$resource];\n } else {\n return '';\n }\n\n $plist = array();\n foreach ($properties as $property => $values) {\n $olist = array();\n foreach ($values as $value) {\n if ($value['type'] == 'literal') {\n $olist []= Utils::dumpLiteralValue($value, $format, 'black');\n } else {\n $olist []= Utils::dumpResourceValue($value['value'], $format, 'blue');\n }\n }\n\n $pstr = RdfNamespace::shorten($property);\n if ($pstr == null) {\n $pstr = $property;\n }\n if ($format == 'html') {\n $plist []= \"<span style='font-size:130%'>&rarr;</span> \".\n \"<span style='text-decoration:none;color:green'>\".\n htmlentities($pstr) . \"</span> \".\n \"<span style='font-size:130%'>&rarr;</span> \".\n join(\", \", $olist);\n } else {\n $plist []= \" -> $pstr -> \" . join(\", \", $olist);\n }\n }\n\n if ($format == 'html') {\n return \"<div id='\".htmlentities($resource, ENT_QUOTES).\"' \" .\n \"style='font-family:arial; padding:0.5em; \".\n \"background-color:lightgrey;border:dashed 1px grey;'>\\n\".\n \"<div>\".Utils::dumpResourceValue($resource, $format, 'blue').\" \".\n \"<span style='font-size: 0.8em'>(\".\n $this->classForResource($resource).\")</span></div>\\n\".\n \"<div style='padding-left: 3em'>\\n\".\n \"<div>\".join(\"</div>\\n<div>\", $plist).\"</div>\".\n \"</div></div>\\n\";\n } else {\n return $resource.\" (\".$this->classForResource($resource).\")\\n\" .\n join(\"\\n\", $plist) . \"\\n\\n\";\n }\n }", "function asset($component)\n{\n echo \"resources/$component\";\n}", "public function resource($name);", "public function setResource($resource);", "public function getResource(): ?string\n {\n return $this->resource ?? Str::snake(Str::pluralStudly(class_basename($this)));\n }", "public function getFrom($resource);", "abstract public function transformResource($resource);", "public function getResource($resourceId);", "public function format($resource, Headers $headers);", "private function return_seeAlso_resource($resource) {\r\n $resource = add_query_arg('feed','lhrdf', $resource);\r\n $resource = add_query_arg('format',$this->format, $resource);\r\n return $resource;\r\n }", "protected function getResource($resource)\r\n\t{\r\n\t\t$hyperLink = new Hyperlink();\r\n\t\t\r\n\t\t$p_resource = $resource->nodeValue;\r\n\t\t$p_title \t= $resource->getAttribute('title');\r\n\t\t\r\n\t\tif($p_title != '')\r\n\t\t\t$return = $hyperLink->Display($p_resource, $p_title);\r\n\t\telse\r\n\t\t\t$return = $hyperLink->Display($p_resource, $p_resource);\r\n\t\t\t\r\n\t\tunset($hyperLink);\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "protected static function _get_local_resource( $resource ) {\r\n return file_get_contents( \r\n $resource \r\n ); \r\n }", "public function getCode()\n {\n return 'resource_to_asset';\n }", "abstract function objectAsString($object);", "public function __invoke() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "private function handleResources($resource)\n {\n $retResource = null;\n if (0 === strpos($resource, '/script/')) {\n $retResource = Utils_ResourceLocator::scriptFile(substr($resource,8));\n }\n elseif (0 === strpos($resource, '/skin/')) {\n $retResource = Utils_ResourceLocator::skinFile(substr($resource, 5));\n }\n elseif (0 === strpos($resource, '/upload/')) {\n $retResource = Utils_ResourceLocator::uploadFile(substr($resource,7));\n }\n\n // Is a resource but file was not found\n if (false === $retResource) {\n Utils_Request::sendHttpStatusCode(Utils_Request::CLIENT_NOT_FOUND);\n exit(1);\n }\n // If resource file not found, any call above will die. If null, then none of the above\n // If $resource is null, then requested is not a resource: do nothing.\n elseif (!is_null($retResource)) {\n if (!Utils::str_endsWith($retResource, 'php', true)) {\n $mime = Utils_ResourceIdentifier::identify($retResource);\n $mime = $mime['mime'];\n Utils_ResourceLoader::outputResource($retResource, $mime);\n }\n else {\n Utils_Request::sendHttpStatusCode(Utils_Request::CLIENT_UNSUPPORTED_MEDIA_TYPE);\n }\n exit();\n }\n }", "function ju_resource_inline(string $u, Closure $f):string {\n\tstatic $c; /** @var array(string => bool) $c */\n\tif (!$u || isset($c[$u])) {$r = '';}\n\telse {$c[$u] = true; $r = $f(ju_asset_create($u)->getUrl());}\n\treturn $r;\n}", "public function ofObject($obj, $options = []){\n\n if (method_exists($obj, '__toString')) {\n return $this->ofString((string)$obj, $options,self::STREAM_OBJECT);\n }\n throw InvalidArgumentException::InvalidResourceType();\n }", "private function varIsResource($var): void {\r\n\t\t$this->makeTableHeader( 'resourceC', 'resource',1);\r\n\t\techo \"<tr>\\n<td>\\n\";\r\n\t\tswitch(get_resource_type($var)) {\r\n\t\t\tcase 'pgsql result':\r\n\t\t\t\t$this->varIsDBResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gd':\r\n\t\t\t\t$this->varIsGDResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'xml':\r\n\t\t\t\t$this->varIsXmlResource($var);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\techo get_resource_type($var).$this->closeTDRow();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\techo $this->closeTDRow().\"</table>\\n\";\r\n\t}", "public function getResourceUrl(string $resource): string\n {\n Assert::oneOf(\n $resource,\n array_keys($this->serverResources),\n 'Resource type \"%s\" is not supported by the ACME server (supported: %2$s)'\n );\n\n return $this->serverResources[$resource];\n }", "function celerity_get_resource_uri($resource, $source = 'phabricator') {\n $resource = ltrim($resource, '/');\n\n $map = CelerityResourceMap::getNamedInstance($source);\n $response = CelerityAPI::getStaticResourceResponse();\n return $response->getURI($map, $resource);\n}", "function idOrSlug(array $resource): string\n{\n global $config;\n return htmlspecialchars($config[\"use_url_rewrite\"] ? $resource[\"slug\"] : $resource[\"id\"]);\n}", "public function getResourceName();", "public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n return $this->offers; // Special case... No caching because of how offers are nested inside products\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n case 'brand':\n return $this->reference->resourceById('brands', $this->attr('brand'));\n }\n }", "public function get_resource_name();", "public function __toString() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "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}", "abstract protected function createResource();", "public function str() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "public function getResource() {}", "function resource($stub)\r\n{\r\n\treturn context_path().'/resources/'.$stub;\r\n}", "function add_resource($resource, $id) {\n\t//Create the HTML content for the resource page\n\t$content = '';\n\tif (isset($resource['description']))\n\t\t$content .= '<p>' . esc_attr($resource['description']) . '</p>';\n\t\n\t$content .= '<p><b>URL:</b> <a href=\"' . $resource['url'] . '\" target=\"_blank\">' . $resource['url'] . '</a><br/>';\n\tif (isset($resource['about'])) \n\t\t$content .= '<b>Keywords:</b> ' . join(\", \", $resource['about']) . '<br/>';\n\tif (isset($resource['author'])) \n\t\t$content .= '<b>Author:</b> ' . $resource['author'] . '<br/>';\n\tif (isset($resource['publisher'])) \n\t\t$content .= '<b>Publisher:</b> ' . $resource['publisher'] . '<br/>';\n\tif (isset($resource['dateCreated'])) \n\t\t$content .= '<b>Date created:</b> ' . $resource['dateCreated'] . '<br/>';\n\tif (isset($resource['language'])) \n\t\t$content .= '<b>Language:</b> ' . $resource['language'] . '<br/>';\n\tif (isset($resource['timeRequired'])) \n\t\t$content .= '<b>Time required:</b> ' . $resource['timeRequired'] . '<br/>';\n\tif (isset($resource['educationalUse'])) {\n\t\tcheck_term($resource['educationalUse'], \"asn_educational_use\");\n\t\t$content .= '<b>Educational use: </b><a href=\"'. get_term_link($resource['educationalUse'], \"asn_educational_use\") . '\">' . $resource['educationalUse'] . '</a><br/>';\n\t}\n\tif (isset($resource['educationalAudience'])) {\n\t\tcheck_term($resource['educationalAudience'], \"asn_educational_audience\");\n\t\t$content .= '<b>Educational audience: </b><a href=\"'. get_term_link($resource['educationalAudience'], \"asn_educational_audience\") . '\">' . $resource['educationalAudience'] . '</a><br/>';\n\t}\n\tif (isset($resource['interactivityType'])) {\n\t\tcheck_term($resource['interactivityType'], \"asn_interactivity_type\");\n\t\t$content .= '<b>Interactivity type: </b><a href=\"'. get_term_link($resource['interactivityType'], \"asn_interactivity_type\") . '\">' . $resource['interactivityType'] . '</a><br/>';\n\t}\n\tif (isset($resource['proficiencyLevel'])) {\n\t\tcheck_term($resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t$content .= '<b>Proficiency level: </b><a href=\"'. get_term_link($resource['proficiencyLevel'], \"asn_proficiency_level\") . '\">' . $resource['proficiencyLevel'] . '</a><br/>';\n\t}\n\t\n\t$content .= '</p>';\n\t//Prepare the post attributes\t\n\t$post = array(\n\t 'post_content' => $content,\n\t 'post_name' => sanitize_title(str_replace('-', ' ',$resource['title'])),\n\t 'post_title' => esc_attr($resource['title']),\n\t 'post_status' => 'publish',\n\t 'post_type' => 'learning_resource'\n\t);\n\t\n\n\t//Update existing post if appropriate\n\tif ($id >= 0) {\n\t\t$post['ID'] = $id;\n\t\twp_update_post($post);\n\t\twp_set_post_terms( $id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\t//$content .= '<b>Interactivity type:</b> ' . $resource['interactivityType'];\n\t\tif(get_post_meta($id, 'resource_uri', true)==\"\") {\n\t\t\tadd_post_meta($id, 'resource_uri', rawurlencode($resource['url']), true);\n\t\t}\n\t}\n\t//Create new post if appropriate\n\telse {\n\t\t$post_id = wp_insert_post( $post);\n\t\twp_set_post_terms( $post_id, $resource['competencies'], \"asn_index\" );\n\t\twp_set_post_terms( $post_id, $resource['topics'], \"asn_topic_index\" );\n\t\tif (isset($resource['interactivityType'])) \n\t\t\twp_set_post_terms($post_id, $resource['interactivityType'], \"asn_interactivity_type\");\n\t\tif (isset($resource['educationalAudience'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalAudience'], \"asn_educational_audience\");\n\t\tif (isset($resource['educationalUse'])) \n\t\t\twp_set_post_terms($post_id, $resource['educationalUse'], \"asn_educational_use\");\n\t\tif (isset($resource['proficiencyLevel'])) \n\t\t\twp_set_post_terms($post_id, $resource['proficiencyLevel'], \"asn_proficiency_level\");\n\t\tadd_post_meta($post_id, 'resource_uri', rawurlencode($resource['url']), true);\n\t}\n\t\n}", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function resource() : Resource\n {\n return Resources::forName($this->resource);\n }", "abstract protected function resourceClass(): ?string;", "function value($resource){\n if ($resource){\n if (is_object($resource) || is_array($resource) || is_resource($resource)){\n return $resource;\n } else {\n $cast = strval($resource);\n if ($cast != '' && $cast != 'null'){\n return $cast;\n }\n }\n }\n return false;\n}", "public function setResource($var)\n {\n GPBUtil::checkString($var, True);\n $this->resource = $var;\n\n return $this;\n }", "protected function getResourceEntity()\n\t{\n\t\treturn $this->arguments->getArgument(static::$RESOURCE_ARGUMENT_NAME)->getValue();\n\t}", "public function __toString()\n {\n switch ($this->current)\n {\n // ** Handle CSS Resources **\n case 'css':\n\n // *** Calculate which resources should be used according to the current media spec **\n $queue = array();\n if (isset($this->resources[$this->current]))\n {\n foreach ($this->resources[$this->current] as $file=>$resource)\n {\n if (isset($resource['media']) &&\n isset($this->currentOptions['media']) &&\n $resource['media'] == $this->currentOptions['media'])\n {\n $queue[] = $file;\n }\n }\n }\n \n // *** Ensure that some css resource was found before dumping the link ** \n if (!empty($queue))\n {\n $resources = implode(\",\", $queue);\n return \"<link href=\\\"{$this->view->baseUrl}/optimizer.php?type=css&amp;resources={$resources}\\\" media=\\\"{$this->currentOptions['media']}\\\" rel=\\\"stylesheet\\\" type=\\\"text/css\\\" />\";\n }\n break;\n \n // ** Handle javascript resources **\n case 'javascript':\n \n // ** Compress the files into an implodable array **\n $queue = array();\n if (isset($this->resources[$this->current]))\n {\n foreach ($this->resources[$this->current] as $file=>$resource)\n {\n $queue[] = $file;\n }\n }\n \n // *** Ensure that the queue is not empty before dumping the link **\n if (!empty($queue))\n {\n $resources = implode(\",\", $queue);\n return \"<script src=\\\"{$this->view->baseUrl}/optimizer.php?type=javascript&amp;resources={$resources}\\\" type=\\\"text/javascript\\\"></script>\";\n }\n \n break;\n }\n \n return \"\";\n }", "public function retrieve(Resource $resource);", "public function setResource($type, $name, $object, ?\\SetaPDF_Core_Document $document = null) {}", "protected function loadFile($resource)\n {\n return file_get_contents($resource);\n }", "public function fromResource(Resource $resource)\n {\n $file = $resource->getFilenameShort(false);\n $path = $resource->getRelativePath(true);\n return $this->urlizeRecursive($path . '/' . $file);\n }", "public function registerResource($id, $resource);", "public function getResourceKey(): string\n {\n return 'my-resource-key';\n }", "public function setToResource()\n {\n $this->type = \"resource\";\n }", "public function getResourceId($resource): string\n {\n if (is_resource($resource)) {\n $data = stream_get_meta_data($resource);\n $resource = $data['wrapper_data'];\n }\n\n return spl_object_hash($resource);\n }", "public function resourceUri($resource)\n {\n return $this->getDispatchFabricator()->resource($resource);\n }", "public function getApiResourceValue()\n {\n return \"\\$this->{$this->name}\";\n }", "public static function get_uri( $resource, $known_type = null ) {\r\n $original_resource = $resource;\r\n $resource = self::_normalize_resource( $resource );\r\n // echo $resource . \"</br>\";\r\n $local = self::is_resource_local( $resource ) && file_exists( $resource );\r\n if( strpos($resource, 'data') === 0 ) {\r\n return $original_resource;\r\n } else {\r\n $mime_type = $known_type != null ? $known_type : self::_get_mime_type( $resource );\r\n $resource_data = $local ? self::_get_local_resource( $resource ) : self::_get_remote_resource( $original_resource );\r\n// if( $mime_type == 'text/css' && strrpos( $resource_data, 'url(data' ) !== false && $local ) {\r\n// return $original_resource;\r\n// }\r\n $uri_data = self::_get_uri_data( $resource_data, $resource, $mime_type );\r\n if( ( !self::$_config['limit'] || strlen( $uri_data ) <= self::$_config['limit'] ) ) {\r\n return \"data:$mime_type;base64,$uri_data\";\r\n } else {\r\n return $original_resource;\r\n }\r\n }\r\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 }", "public function setResource(string $resource): self\n {\n $this->resource = $resource;\n\n return $this;\n }", "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "public function p_str($prepend = '', $append = '') {\n\t\t\techo $prepend.\\uri\\generate::string($this->object).$append;\n\t\t}", "public function get(Resource $resource);", "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 }", "private static function _getUrl(String $resource)\n {\n if (null == static::$api_url) {\n static::$api_url = 'https://' .\n substr(\n static::$api_key,\n strrpos(static::$api_key, '-') + 1\n ) .\n '.api.mailchimp.com/3.0';\n }\n return rtrim(static::$api_url, '/') . \"/\" . $resource;\n }", "public function __construct(public mixed $resource)\n {\n }", "public static function createButtonLabel()\n {\n return __('Request :resource', ['resource' => static::singularLabel()]);\n }", "public function versionedResource($resource) {\n \treturn Celsus_Resource::version($resource);\n }", "public static function toResource(): Resource\n {\n return new Resource(static::class);\n }", "public function ofResource($resource, $options = []){\n\n return $this->init_stream($resource, $options,self::STREAM_RESOURCE);\n\n }", "public function deserialize(string $data, string $resourceClass, ResourceSerializationContext $context): ResourceInterface;", "function to_str(){\n //\n //A string version of a literal is basicaly the literal itself as a string \n //hence it should be encosed in double quotes incase it is needed to be \n //converted into json\n return \"'$this->value'\";\n }", "public function testResource()\r\n {\r\n $s = new XML_Serializer();\r\n $s->serialize(fopen(__FILE__, 'r'));\r\n $this->assertRegExp('/<resource>Resource id #[0-9]+<\\/resource>/', $s->getSerializedData());\r\n }", "protected function createResource()\n {\n $resourceOptions = [\n 'resource' => $this->info['resource'],\n '--module' => $this->moduleName,\n ];\n\n $options = $this->setOptions([\n 'parent',\n 'assets'=>'uploads',\n 'data'\n ]);\n\n $this->call('engez:resource', array_merge($resourceOptions, $options));\n }", "public function getResourceURL($id) {\n return static::RESOURCE_URL . $id;\n }", "function constructURL($object);", "public function disponibilityStringGenerator(EntryInterface $object): string\n {\n $string = <<<ENDSTRING\n\nAPARTEMENT available: {$this->getName()} {$object->getId()},\nPrice: {$object->getCost()} kr.\nAddress: {$object->getAddress()}\nUrl: {$object->getUrl()}\nENDSTRING;\n\n return $string;\n }", "protected function getResourceTag($type, $url) {\r\n\t\tswitch($type) {\r\n\t\t\tcase self::RESOURCE_CSS:\r\n\t\t\t\treturn \"<link rel=\\\"stylesheet\\\" href=\\\"{$url}\\\"/>\";\r\n\t\t\tcase self::RESOURCE_JS:\r\n\t\t\t\treturn \"<script type=\\\"text/javascript\\\" src=\\\"{$url}\\\"></script>\";\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new \\simtpl\\exceptions\\source(\"Failed to get resource tag: unknown type {$type}\");\r\n\t\t}\r\n\t}", "public function toString() {\n return \"Resource Relation: \" . ($this->role ? $this->role->getTerm() . \" \" : \"\") . ($this->resource ? $this->resource->getTitle() . \" \" : $this->content);\n }", "public function show(Resource $resource)\n {\n //\n }", "public function intoResource($resource): void {\n\t\tforeach ($this as $value) {\n\t\t\tfwrite($resource, $value);\n\t\t}\n\t}", "public static function string(&$object) {\n\t\t\tself::scheme($object);\n\t\t\tself::authority($object);\n\t\t\t$str_arr = array($object->scheme, $object->authority, $object->path);\n\t\t\tif (!empty($object->query)) {\n\t\t\t\t$str_arr[] = '?'.$object->query;\n\t\t\t}\n\t\t\tif (!empty($object->fragment)) {\n\t\t\t\t$str_arr[] = '#'.$object->fragment;\n\t\t\t}\n\t\t\treturn implode('', $str_arr);\n\t\t}", "public function getResource(Request $request, $resourceId);", "function addResource($resObject)\n{\n\t\n\t\n\t$sql = \"INSERT INTO `\".DB_NAME.\"`.`resources` (\n\t\t`rid` ,\n\t\t`title` ,\n\t\t`link` ,\n\t\t`author` ,\n\t\t`timecreated` ,\n\t\t`rating` ,\n\t\t`description` ,\n\t\t`tags` ,\n\t\t`voteips`\n\t\t)\n\t\tVALUES (\n\t\tNULL , '\".sanitize($resObject->name).\"', '\".sanitize($resObject->url).\"', '\".$resObject->owner.\"',\n\t\t\".time().\" , '\".$resObject->score.\"', '\".sanitize($resObject->description).\"', '\".sanitize(dcSemicolonArrayToString($resObject->tags)).\"',\n\t\t'\".dcSemicolonArrayToString($resObject->voteips).\"'\n\t\t)\";\n\n\t$result = mysql_query($sql);\n\n\tif($result)\n\t\t$result = mysql_insert_id();\n\t\t\n\treturn $result;\n}", "public function getSource()\n {\n return 'tb_resource';\n }" ]
[ "0.6700844", "0.66519636", "0.65745884", "0.63703895", "0.6201882", "0.6151534", "0.6103719", "0.6095307", "0.6050964", "0.6040408", "0.59928054", "0.5970651", "0.5935587", "0.5935587", "0.5933866", "0.5806013", "0.57470834", "0.57396144", "0.5728721", "0.56865364", "0.56809413", "0.5655775", "0.56505156", "0.5625565", "0.5598637", "0.5583861", "0.55778724", "0.5567616", "0.55387574", "0.55366915", "0.5533441", "0.55128956", "0.54915756", "0.5487932", "0.5471824", "0.54692584", "0.546351", "0.5462213", "0.5454796", "0.5433574", "0.54286474", "0.54092824", "0.53972954", "0.53728795", "0.53443897", "0.53261894", "0.5313485", "0.5310607", "0.5310607", "0.5310607", "0.5310607", "0.5310607", "0.5310607", "0.52970463", "0.5295717", "0.5252119", "0.52513504", "0.52442724", "0.52253634", "0.52193385", "0.5215428", "0.521541", "0.5190274", "0.518754", "0.5182287", "0.51724374", "0.5172006", "0.5145149", "0.51274425", "0.51208055", "0.509716", "0.5088582", "0.50875455", "0.50875455", "0.50875455", "0.50875455", "0.50875455", "0.50800294", "0.50789857", "0.5077766", "0.50644565", "0.5040704", "0.5040108", "0.50385296", "0.5036442", "0.50167996", "0.5008738", "0.50080925", "0.5004751", "0.49973828", "0.499631", "0.4995313", "0.49893078", "0.4988912", "0.49873522", "0.49866855", "0.49627674", "0.49603638", "0.49542665", "0.4951182", "0.49432433" ]
0.0
-1
Check if $withoutAppends is enabled.
protected function getArrayableAppends() { if(self::$withoutAppends){ return []; } return parent::getArrayableAppends(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAppendingEnabled() {\n\t\treturn $this->append;\n\t}", "public function getAllowMissingDependencies() : bool\n {\n return $this->allowMissingDependencies;\n }", "function spr_section_exclude_installed() {\n\treturn(spr_exclude_column_found('spr_exclude'));\n}", "public function isDisabled()\n {\n return !$this->hasListItems();\n }", "public function isExcluded(): bool\n {\n return $this->exclude ?? false;\n }", "public function has_no_inactive_dependencies(): bool;", "protected function getExtraInstallment()\n {\n return false;\n }", "public static function isDisabled(): bool\n {\n return !empty(static::DISABLED);\n }", "public function has_no_active_dependencies(): bool;", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "public function isAppend();", "public function isNotUsing();", "public function isDisabled() {}", "public function isIgnoreObserver(){\n\t\t$ignore = true;\n\t\t$data = Mage::app()->getRequest()->getParams();\n\t\tif (isset($data['echeck_dropship']) && $data['echeck_dropship'] == 1)$ignore = false;\n\t\treturn $ignore;\n\t}", "public function isNeedPush(): bool\n\t{\n\t\treturn !empty($this->params);\n\t}", "public function hasExcluded(): bool\n {\n return null !== $this->exclude;\n }", "public static function generatesMissingEmails(): bool\n {\n return static::enabled(static::generateMissingEmails());\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "public function hasExcludeSearchFilter()\n {\n return $this->exclude_search_filter !== null;\n }", "public function dontRemoveCmd() {\n\t\tif ($this->getLogicalId() != '') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }", "public function isDisabled()\n {\n }", "public function isDisabled()\n {\n return false;\n }", "public function isUnsentOrderAdjustmentEnabled()\n {\n $flag = (integer) $this->scopeConfig->getValue(\n 'orderflow_inventory_import/settings/adjust_inventory',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE\n );\n\n return $flag > 0;\n }", "public function hasDisabled()\n {\n return $this->disabled;\n }", "function spr_section_exclude_install() {\n// note: TINYINT(1) DEFAULT 0 = BOOLEAN DEFAULT FALSE\nglobal $spr_exclude_db_debug;\n\n\tif (spr_section_exclude_installed())\n\t\treturn TRUE;\n\telse {\n\t\tcreate_article_position();\n\t\treturn safe_query(\"ALTER TABLE \".safe_pfx(\"txp_section\").\" ADD spr_exclude TINYINT(1) DEFAULT 0 NOT NULL;\",$spr_exclude_db_debug);\n\t}\n}", "public function isIncluded() {\n\t\tif ( is_admin() || is_feed() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( apply_filters( 'aioseo_disable', false ) || $this->isExcludedGlobal() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function notify_addon_enabled_from_admin_panel() {\n return ( (!!qa_opt('qw_enable_email_notfn')) &&\n (\n (!!qa_opt('qw_notify_cat_followers')) ||\n (!!qa_opt('qw_notify_tag_followers')) ||\n (!!qa_opt('qw_notify_user_followers'))\n )\n );\n }", "public function hasUninstall();", "public function hasEnabledExport(): bool\n {\n return (bool) ($this->exportOptions['enabled'] ?? false);\n }", "public function isDisabled()\n\t{\n\t\treturn ($this->disabled_at !== null);\n\t}", "public function has_config() {\n return false;\n }", "public function has_config() {\n return false;\n }", "public function needAdditionalData()\n {\n $result = false;\n if ($this->provider !== null) {\n $result = $this->provider->needAdditionalData();\n }\n\n return $result;\n }", "function hasMessages()\n {\n if ( $this->enabled != true || !count($this->messages) ) return false;\n return true;\n }", "public function exclude_sale_items() {\n\t\treturn 'yes' === $this->exclude_sale_items;\n\t}", "public function is_disabled()\n {\n }", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "public function hasAdditionalBuilders()\n {\n foreach ($this->behaviors as $behavior) {\n if ($behavior->hasAdditionalBuilders()) {\n return true;\n }\n }\n\n return false;\n }", "public function isNotMulti()\n {\n return ! $this->isMulti();\n }", "public function hasMissing() {\n return $this->_has(2);\n }", "public function isDisabled()\n {\n return !$this->enabled;\n }", "function fa_is_wptouch_exclusive(){\t\n\t$result = false;\t\n\t// wptouch has an option to disable scripts and stylesheets in header/footer\n\tif( function_exists('bnc_wptouch_is_exclusive') ){\n\t\t$result = bnc_wptouch_is_exclusive();\n\t}\t\n\treturn $result;\n}", "public function hasAttributes(array $without = [])\n {\n $attributes = $this->getAttributes(); \n\n if ( ! empty($without)) {\n array_map('unset', $attributes); \n }\n\n return (count($attributes) > 0);\n }", "public function has_inactive_dependencies(): bool;", "public function is_bookings_addon() {\n\t\treturn true;\n\t}", "public function maxExtras(): bool\n {\n return false;\n }", "public function orderExportExcludeAll()\n {\n $exportOrders = $this->scopeConfig->getValue('wesupply_api/wesupply_order_export/wesupply_order_filter', ScopeInterface::SCOPE_STORE);\n if ($exportOrders === 'exclude_all') {\n return true;\n }\n\n return false;\n }", "function isDisabled() {\n\t\treturn ($this->getActive() == self::PROFILE_DISABLED);\n\t}", "public function hasSub()\n {\n if(is_null($this->items) || !count($this->items)) return false;\n return true;\n }", "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "public function isAutocompleteDisabled()\n {\n return (bool)!$this->_scopeConfig->getValue(\n \\Magento\\Customer\\Model\\Form::XML_PATH_ENABLE_AUTOCOMPLETE,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function isExcluded()\n {\n return $this->excluded;\n }", "public static function noOffspring(&$parents, &$offspring){\n return count($offspring) != 0 ;\n }", "public function hasAdditionalDetails()\n {\n return !empty($this->additional);\n }", "public function hasModules()\n {\n return !empty($this->modules);\n }", "public function test_allows_not_blacklisted_by_append()\n {\n \tConfig::set('validation.email.blacklist.source', null);\n \tConfig::set('validation.email.blacklist.append', \"notinsource.com|otherappend.com\");\n\n\t\t$rules = ['email' => 'email|blacklist'];\n\n\t\t$input = ['email' => '[email protected]'];\n\n\t\t$passes = Validator::make($input, $rules)->passes();\n\n\t\t$this->assertTrue($passes);\n }", "public function hasAddmp(){\r\n return $this->_has(21);\r\n }", "public function isForceCartNoBackordersEnabled()\n {\n if ($this->isMultipleMode()) {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_FORCE_CART_NO_BACKORDERS);\n } else {\n return false;\n }\n }", "public function isDisabled(): bool\n {\n return $this->disabled;\n }", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "protected function appNotHavingAnyDefaultPlan(): bool\n {\n report(AppNotHavingAnyDefaultPlan::create($this));\n\n return false;\n }", "function needReport() {\n\t $produceReport = false;\n\t foreach ($this->members as $member) {\n\t $array = $member->getBills();\n\t \n\t if ($array != null && sizeof($array) != 0) {\n\t $produceReport = true;\n\t break;\n\t }\n\t }\n\t return $produceReport;\n\t}", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function willGenerateRemove(): bool;", "function getIsSubcomponent() {\n\t\treturn false;\n\t}", "public function hasOpts(): bool\n {\n return !empty($this->opts);\n }", "public function isAutocompleteDisabled() {\n return ( bool ) ! $this->_scopeConfig->getValue ( \\Magento\\Customer\\Model\\Form::XML_PATH_ENABLE_AUTOCOMPLETE, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE );\n }", "public function hasIgnoreEnabledFlag()\n {\n return $this->ignore_enabled_flag !== null;\n }", "public function disable(): bool {}", "public function can_do_add() {\n return false;\n }", "protected function _getListModuleNeedToByPassSession()\n {\n $modules = explode(\"\\n\", Mage::getStoreConfig('japi/jmango_rest_developer_settings/exclude_modules'));\n if (!count($modules)) return false;\n $helper = Mage::helper('core');\n foreach ($modules as $module) {\n if ($helper->isModuleEnabled(trim($module))) {\n return true;\n }\n }\n }", "public function isAppEventEnabled()\n {\n return true;\n }", "public function isIncluded()\n {\n return ! $this->excluded;\n }", "protected function isExclusive()\n {\n return $this->isInclusive() ? false : true;\n }", "public function isDisabled()\n {\n // TODO AccessControl or checking Role?\n /*if (Yii::$app->user->username !== 'admin') {\n return true;\n }*/\n\n return $this->parentIsDisabled();\n }", "public function isAllowInCart() {\n return !$this->isEnabled();\n }", "public function isDisabled()\n {\n if (!GoogleAPI::singleton()->hasAPIKey()) {\n return true;\n }\n \n return parent::isDisabled();\n }", "public function isForceCartItemNoBackordersEnabled()\n {\n if ($this->isMultipleMode()) {\n return Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_FORCE_CART_ITEM_NO_BACKORDERS);\n } else {\n return false;\n }\n }", "public function has_option() {\n return false;\n }", "public function hasOrderExportRules()\n {\n $exportOrders = $this->scopeConfig->getValue('wesupply_api/wesupply_order_export/wesupply_order_filter', ScopeInterface::SCOPE_STORE);\n if ($exportOrders === 'exclude_specific') {\n return true;\n }\n\n return false;\n }", "public function dontRemoveCmd()\r\n {\r\n if ($this->getLogicalId() == 'refresh') {\r\n return true;\r\n }\r\n return false;\r\n }", "protected function accountNotLinkedToAnyApp(): bool\n {\n report(AccountNotLinkedToAnyApp::create($this));\n\n return false;\n }", "public function effectively_installed()\n {\n return isset($this->config['oxcom_phpbbch_format_only']);\n }", "public function hasLibraries()\n {\n return !empty($this->libraries);\n }", "public function getIsDisabled() {}", "public function enabled()\n {\n if (!empty($this->_data[self::BUSINESS])) {\n return true;\n }\n\n return false;\n }", "public function isExtListUpdateNecessary() {}", "public static function shouldInheritOnUndefined()\n {\n return static::$inheritOnUndefinedLogger;\n }", "public function hasExtendpos(){\n return $this->_has(3);\n }", "public function isDisabled()\n {\n return $this->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED;\n }", "public function getAppendMode() : bool {\n return $this->append;\n }", "public function hasOverride() : bool\n {\n return $this->override !== null;\n }", "public function checkModules() : bool\n {\n if (method_exists($this, 'modules') && ! empty($this->modules())) {\n return true;\n }\n\n return false;\n }", "public static function has_dependents(){\n\t\treturn false;\n\t}" ]
[ "0.706743", "0.58802897", "0.5844586", "0.58172446", "0.58103573", "0.58025587", "0.5772933", "0.57648057", "0.5725931", "0.57000977", "0.57000977", "0.57000977", "0.56954837", "0.56892496", "0.5642585", "0.55994236", "0.55978286", "0.556866", "0.55247325", "0.55178916", "0.5514153", "0.5509273", "0.5482652", "0.5476086", "0.54589707", "0.5448947", "0.54240835", "0.5422242", "0.540706", "0.54067534", "0.5405569", "0.53928983", "0.5374323", "0.5372389", "0.5370563", "0.5346975", "0.5346975", "0.53429514", "0.53388417", "0.5332176", "0.53280956", "0.5325085", "0.5324838", "0.5321218", "0.5314709", "0.53027165", "0.5299785", "0.5287586", "0.52819604", "0.52787787", "0.52775645", "0.5276862", "0.52662176", "0.5251676", "0.5250339", "0.52248234", "0.52232534", "0.5223224", "0.5222349", "0.52111137", "0.52062947", "0.5205803", "0.52039534", "0.5198529", "0.51964957", "0.51955104", "0.5194487", "0.51932853", "0.51926655", "0.5166207", "0.51521194", "0.51513916", "0.5151099", "0.51506674", "0.51435715", "0.5139503", "0.5132422", "0.5121233", "0.5119409", "0.5116615", "0.5115733", "0.51102364", "0.5102792", "0.5098937", "0.50970817", "0.5077869", "0.5072682", "0.507086", "0.5068233", "0.50674796", "0.5067235", "0.5063773", "0.5062267", "0.50619245", "0.5056549", "0.5056161", "0.50405556", "0.5035948", "0.50344396", "0.50344074" ]
0.5473556
24
Returns the current element
public function current() { return parent::current(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current() {\n return $this->currentElem;\n }", "public function current()\n {\n return current($this->_elements);\n }", "public function current()\n {\n return current($this->elements);\n }", "public function current()\n\t{\n\t\t$name = $this->_elementNames[$this->__position];\n\t\treturn $this->get($name);\n\t}", "public function current() {\n $element = current($this->elements);\n return $element;\n }", "function currentElement()\n {\n return $this->current ? $this->current->parentNode : NULL;\n }", "public function current()\r\n\t{\r\n\t\treturn $this->elements[$this->i];\r\n\t}", "public function current()\n {\n return $this->currentElement;\n }", "public function current() {\n $element = current($this->elements);\n\n return $element;\n }", "public function current()\n {\n return $this->elements[$this->position];\n }", "public function current()\n\t{\n\t\treturn $this->current;\n\t}", "function current()\n\t{\n\t\treturn $this->get($this->pos);\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 }", "function current() {\r\n return $this->list[$this->index];\r\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->current;\n }", "function current() \n {\n // TODO wrap this;\n return $this->offsetGet($this->position);\n }", "public function current()\r\n {\r\n return current($this->children);\r\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n\t{\n\t\treturn $this->_items[$this->_currentIndex];\n\t}", "public function current(){\n return current($this->items);\n }", "public function current(){\n return current($this->items);\n }", "public function current()\n {\n return trim($this->_currentElement, \"\\r\\n\");\n }", "public function current()\n {\n\t\treturn current($this->_data);\n\t}", "public function current()\n {\n return $this->getItem($this->position);\n }", "public function current() {\n\t\treturn current($this->_value);\n\t}", "public function current()\n {\n return $this->list[$this->position];\n }", "public function current() {\n\t\treturn $this;\n\t}", "public function current() {\n\t\treturn current($this->array);\n\t}", "public function current() {\n\t\treturn $this->offsetGet($this->currentIndex);\n\t}", "public function current() {\n\t\treturn current($this->_data);\n\t}", "public function getCurrent() {\r\n\t\treturn $this->current;\r\n\t}", "public function current()\n {\n return $this->items[$this->k];\n }", "public function current()\n {\n return current($this->_items);\n }", "public function current() {\n\t\treturn $this->data[$this->position];\n\t}", "public function current()\n {\n return current($this->_object);\n }", "function current() {\n return $this->iterators->valid() ?\n $this->getInnerIterator()->current() : NULL;\n }", "public function current()\n {\n return current($this->iterator_data);\n }", "public function current()\n\t{\n\t\treturn $this->row;\n\t}", "public function current() {\n return $this->_data[$this->_key];\n }", "public function current() {\n\t\t\treturn $this;\n\t\t}", "public /*mixed*/ function current()\n\t{\n\t\treturn $this;\n\t}", "public function current()\n {\n return $this->iterator->current();\n }", "public function current() {\n return $this->iterator->current();\n }", "public function getCurrent()\n {\n return $this->current;\n }", "public function getCurrent()\n {\n return $this->current;\n }", "public function current()\n {\n return $this->get_row();\n }", "public function current() {\r\n return current($this->collection);\r\n }", "public function current()\n {\n return $this->data[$this->position];\n }", "public function current () {\n return current ($this->varContainer);\n }", "public function current()\n {\n return $this->offsetGet($this->index);\n }", "public function current() {\n return current($this->components);\n }", "public function current()\n {\n return current($this->data);\n }", "public function current()\n {\n return current($this->data);\n }", "public function current()\n {\n return current($this->data);\n }", "public function current()\n {\n return current($this->data);\n }", "public function current()\n\t\t{\n\t\t\treturn current($this->source);\n\t\t}", "public function current() {\n return $this->data[$this->key()];\n }", "public function getCurrent()\n {\n return $this->cur;\n }", "public function current()\n {\n return current($this->container);\n }", "public function current() {\n return current($this->data);\n }" ]
[ "0.86909854", "0.8645059", "0.8608747", "0.8550592", "0.8512021", "0.8469719", "0.84475064", "0.8440921", "0.84304065", "0.8420024", "0.77886057", "0.778723", "0.7734769", "0.7734769", "0.7734769", "0.7703023", "0.7697769", "0.7697769", "0.7697769", "0.76797825", "0.7659161", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.7650098", "0.75767046", "0.75536656", "0.75536656", "0.75282276", "0.75114703", "0.7504141", "0.7482476", "0.7478536", "0.7465676", "0.7465577", "0.7451074", "0.74453336", "0.74395025", "0.7439087", "0.74326473", "0.74250126", "0.7420071", "0.7419697", "0.7417326", "0.740789", "0.740694", "0.7405069", "0.7400645", "0.7396856", "0.73938864", "0.7370643", "0.7370643", "0.73706394", "0.73609525", "0.7356327", "0.73380977", "0.73359084", "0.73327976", "0.7331226", "0.7331226", "0.7331226", "0.7331226", "0.7330886", "0.732968", "0.73285323", "0.7316881", "0.7316281" ]
0.7820664
31
Returns the first element
public function first() { return parent::first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function first()\n {\n return reset($this->_elements);\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function getFirstItem();", "public function getFirst();", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function first() {\n return reset($this->list);\n }", "public function first()\n {\n return (count($this->list) > 0 ?\n $this->list[0] : null\n );\n }", "public function firstItem();", "public function first(): mixed;", "public function first(): mixed;", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public static function first();", "public function first() { \t\n \ttry{\n if (!is_array($this->Items)) return $this->Items ; \t\t\n if (!count($this->Items)) return null; \t\n \treset($this->Items); \t\t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n } \t\n }", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function First()\n {\n return $this->Results()[0];\n }", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }", "public function first()\n {\n return Arr::first($this->items);\n }", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function first()\n {\n return $this->results()[0];\n }", "function first()\n\t{\n\t\treturn array_values($this->_data)[0];\n\t}", "final public function getFirst() {\n\t\treturn null;\n\t}", "public function first()\n\t{\n\t\tif ($this->count()) {\n\t\t\treturn $this->_items[0];\n\t\t}\n\t}", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "public function first()\n {\n if(isset($this->list[0]))\n {\n return $this->list[0];\n }\n else\n {\n throw new NoSuchElementException(\"no element found in the first position of the sequence\");\n }\n }", "public function first(): mixed\n {\n return array_first($this->data);\n }", "public function first() {}", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function getFirst() {}", "function getFirst() ;", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function first()\n {\n return $this->getData(0);\n }", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "function getFirstItem() { return $this->m_firstItem; }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first()\n {\n $copy = $this->array;\n return reset($copy);\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function first()\n {\n return reset($this->items);\n }", "public function first(){\n return (!empty($this->_result)) ? $this->_result[0] : [];\n }", "public function first()\n {\n return count($this->items) > 0 ? reset($this->items) : null;\n }", "public function getFirst ()\n {\n return end ( $this->_list ) ;\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function first() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function first()\n {\n if($this->_results) {\n return $this->_results[0];\n }\n return null;\n }", "public function first()\n {\n return \\count($this->data) > 0 ? $this->data[0] : null;\n }", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public static function first($array) {\n\t\treturn $array[0];\n\t}", "public function first()\n {\n return current($this->_data);\n }", "public function first()\n {\n $collection = $this->get();\n return count($collection) ? $collection[0] : null;\n }", "public function getFirst()\n\t{\n\t\treturn $this;\n\t}", "public function first()\n {\n return count($this->nodes)?$this->nodes[0]:null;\n }", "public function getFirst()\n {\n $this->update();\n if (isset($this->data[0])) {\n return $this->updateValueIfNeeded($this->data, 0);\n }\n return null;\n }", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }", "public function first()\n {\n try {\n return Optional::ofNullable($this->get(0));\n } catch (OutOfBoundsException $e) {\n return Optional::absent();\n }\n }", "public function first(){\n return $this->find(1);\n }", "public function getFirst()\n {\n return 1;\n }", "function _first($ar){\n\treturn array_shift(array_values($ar));\t\n}", "public function first() {\n return $this->seek(0);\n }", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "function firstChild() {\n\t\t$children = $this->children();\n\t\tif (sizeof($children>0)) {\n\t\t\treturn $children[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function first()\r\n {\r\n $this->index = 0;\r\n }", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}" ]
[ "0.83928025", "0.8350279", "0.8252427", "0.81721365", "0.81130546", "0.81010956", "0.80842423", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8080797", "0.80754083", "0.80747885", "0.80545", "0.8053941", "0.804113", "0.804113", "0.8039877", "0.80320084", "0.799744", "0.7996818", "0.7990147", "0.7974422", "0.79739225", "0.79676485", "0.79560447", "0.7953087", "0.7946422", "0.79447746", "0.79404324", "0.79311854", "0.7925041", "0.79189044", "0.79181314", "0.7909792", "0.79048675", "0.789395", "0.78695524", "0.78660196", "0.78634876", "0.7858982", "0.7841578", "0.7839889", "0.78369766", "0.78244", "0.7824047", "0.7819664", "0.78034997", "0.778107", "0.778107", "0.77763087", "0.7763931", "0.77292764", "0.76838464", "0.7672682", "0.7648967", "0.7635121", "0.76347417", "0.7628432", "0.76088107", "0.754889", "0.7533936", "0.75296074", "0.7515007", "0.75073236", "0.75004166", "0.74964476", "0.74753183", "0.7435424", "0.74218696", "0.73847705", "0.7340666", "0.7299642", "0.7294585", "0.7289226", "0.72794837", "0.7277649" ]
0.0
-1
Returns the first element
public function last() { return parent::last(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function first()\n {\n return reset($this->_elements);\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function getFirstItem();", "public function getFirst();", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function first() {\n return reset($this->list);\n }", "public function first()\n {\n return (count($this->list) > 0 ?\n $this->list[0] : null\n );\n }", "public function firstItem();", "public function first(): mixed;", "public function first(): mixed;", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public static function first();", "public function first() { \t\n \ttry{\n if (!is_array($this->Items)) return $this->Items ; \t\t\n if (!count($this->Items)) return null; \t\n \treset($this->Items); \t\t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n } \t\n }", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function First()\n {\n return $this->Results()[0];\n }", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }", "public function first()\n {\n return Arr::first($this->items);\n }", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function first()\n {\n return $this->results()[0];\n }", "function first()\n\t{\n\t\treturn array_values($this->_data)[0];\n\t}", "final public function getFirst() {\n\t\treturn null;\n\t}", "public function first()\n\t{\n\t\tif ($this->count()) {\n\t\t\treturn $this->_items[0];\n\t\t}\n\t}", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "public function first()\n {\n if(isset($this->list[0]))\n {\n return $this->list[0];\n }\n else\n {\n throw new NoSuchElementException(\"no element found in the first position of the sequence\");\n }\n }", "public function first(): mixed\n {\n return array_first($this->data);\n }", "public function first() {}", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function getFirst() {}", "function getFirst() ;", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function first()\n {\n return $this->getData(0);\n }", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "function getFirstItem() { return $this->m_firstItem; }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first()\n {\n $copy = $this->array;\n return reset($copy);\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function first()\n {\n return reset($this->items);\n }", "public function first(){\n return (!empty($this->_result)) ? $this->_result[0] : [];\n }", "public function first()\n {\n return count($this->items) > 0 ? reset($this->items) : null;\n }", "public function getFirst ()\n {\n return end ( $this->_list ) ;\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function first() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function first()\n {\n if($this->_results) {\n return $this->_results[0];\n }\n return null;\n }", "public function first()\n {\n return \\count($this->data) > 0 ? $this->data[0] : null;\n }", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public static function first($array) {\n\t\treturn $array[0];\n\t}", "public function first()\n {\n return current($this->_data);\n }", "public function first()\n {\n $collection = $this->get();\n return count($collection) ? $collection[0] : null;\n }", "public function getFirst()\n\t{\n\t\treturn $this;\n\t}", "public function first()\n {\n return count($this->nodes)?$this->nodes[0]:null;\n }", "public function getFirst()\n {\n $this->update();\n if (isset($this->data[0])) {\n return $this->updateValueIfNeeded($this->data, 0);\n }\n return null;\n }", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }", "public function first()\n {\n try {\n return Optional::ofNullable($this->get(0));\n } catch (OutOfBoundsException $e) {\n return Optional::absent();\n }\n }", "public function first(){\n return $this->find(1);\n }", "public function getFirst()\n {\n return 1;\n }", "function _first($ar){\n\treturn array_shift(array_values($ar));\t\n}", "public function first() {\n return $this->seek(0);\n }", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "function firstChild() {\n\t\t$children = $this->children();\n\t\tif (sizeof($children>0)) {\n\t\t\treturn $children[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function first()\r\n {\r\n $this->index = 0;\r\n }", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}" ]
[ "0.83928025", "0.8350279", "0.8252427", "0.81721365", "0.81130546", "0.81010956", "0.80842423", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8080797", "0.80754083", "0.80747885", "0.80545", "0.8053941", "0.804113", "0.804113", "0.8039877", "0.80320084", "0.799744", "0.7996818", "0.7990147", "0.7974422", "0.79739225", "0.79676485", "0.79560447", "0.7953087", "0.7946422", "0.79447746", "0.79404324", "0.79311854", "0.7925041", "0.79189044", "0.79181314", "0.7909792", "0.79048675", "0.789395", "0.78695524", "0.78660196", "0.78634876", "0.7858982", "0.7841578", "0.7839889", "0.78369766", "0.78244", "0.7824047", "0.7819664", "0.78034997", "0.778107", "0.778107", "0.77763087", "0.7763931", "0.77292764", "0.76838464", "0.7672682", "0.7648967", "0.7635121", "0.76347417", "0.7628432", "0.76088107", "0.754889", "0.7533936", "0.75296074", "0.7515007", "0.75073236", "0.75004166", "0.74964476", "0.74753183", "0.7435424", "0.74218696", "0.73847705", "0.7340666", "0.7299642", "0.7294585", "0.7289226", "0.72794837", "0.7277649", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896" ]
0.0
-1
Returns the first element
public function offsetGet($_offset) { return parent::offsetGet($_offset); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function first()\n {\n return reset($this->_elements);\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function getFirstItem();", "public function getFirst();", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function first() {\n return reset($this->list);\n }", "public function first()\n {\n return (count($this->list) > 0 ?\n $this->list[0] : null\n );\n }", "public function firstItem();", "public function first(): mixed;", "public function first(): mixed;", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public static function first();", "public function first() { \t\n \ttry{\n if (!is_array($this->Items)) return $this->Items ; \t\t\n if (!count($this->Items)) return null; \t\n \treset($this->Items); \t\t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n } \t\n }", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function First()\n {\n return $this->Results()[0];\n }", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }", "public function first()\n {\n return Arr::first($this->items);\n }", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function first()\n {\n return $this->results()[0];\n }", "function first()\n\t{\n\t\treturn array_values($this->_data)[0];\n\t}", "final public function getFirst() {\n\t\treturn null;\n\t}", "public function first()\n\t{\n\t\tif ($this->count()) {\n\t\t\treturn $this->_items[0];\n\t\t}\n\t}", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "public function first()\n {\n if(isset($this->list[0]))\n {\n return $this->list[0];\n }\n else\n {\n throw new NoSuchElementException(\"no element found in the first position of the sequence\");\n }\n }", "public function first(): mixed\n {\n return array_first($this->data);\n }", "public function first() {}", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function getFirst() {}", "function getFirst() ;", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function first()\n {\n return $this->getData(0);\n }", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "function getFirstItem() { return $this->m_firstItem; }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first()\n {\n $copy = $this->array;\n return reset($copy);\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function first()\n {\n return reset($this->items);\n }", "public function first(){\n return (!empty($this->_result)) ? $this->_result[0] : [];\n }", "public function first()\n {\n return count($this->items) > 0 ? reset($this->items) : null;\n }", "public function getFirst ()\n {\n return end ( $this->_list ) ;\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function first() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function first()\n {\n if($this->_results) {\n return $this->_results[0];\n }\n return null;\n }", "public function first()\n {\n return \\count($this->data) > 0 ? $this->data[0] : null;\n }", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public static function first($array) {\n\t\treturn $array[0];\n\t}", "public function first()\n {\n return current($this->_data);\n }", "public function first()\n {\n $collection = $this->get();\n return count($collection) ? $collection[0] : null;\n }", "public function getFirst()\n\t{\n\t\treturn $this;\n\t}", "public function first()\n {\n return count($this->nodes)?$this->nodes[0]:null;\n }", "public function getFirst()\n {\n $this->update();\n if (isset($this->data[0])) {\n return $this->updateValueIfNeeded($this->data, 0);\n }\n return null;\n }", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }", "public function first()\n {\n try {\n return Optional::ofNullable($this->get(0));\n } catch (OutOfBoundsException $e) {\n return Optional::absent();\n }\n }", "public function first(){\n return $this->find(1);\n }", "public function getFirst()\n {\n return 1;\n }", "function _first($ar){\n\treturn array_shift(array_values($ar));\t\n}", "public function first() {\n return $this->seek(0);\n }", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "function firstChild() {\n\t\t$children = $this->children();\n\t\tif (sizeof($children>0)) {\n\t\t\treturn $children[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function first()\r\n {\r\n $this->index = 0;\r\n }", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}" ]
[ "0.83928025", "0.8350279", "0.8252427", "0.81721365", "0.81130546", "0.81010956", "0.80842423", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8084021", "0.8080797", "0.80754083", "0.80747885", "0.80545", "0.8053941", "0.804113", "0.804113", "0.8039877", "0.80320084", "0.799744", "0.7996818", "0.7990147", "0.7974422", "0.79739225", "0.79676485", "0.79560447", "0.7953087", "0.7946422", "0.79447746", "0.79404324", "0.79311854", "0.7925041", "0.79189044", "0.79181314", "0.7909792", "0.79048675", "0.789395", "0.78695524", "0.78660196", "0.78634876", "0.7858982", "0.7841578", "0.7839889", "0.78369766", "0.78244", "0.7824047", "0.7819664", "0.78034997", "0.778107", "0.778107", "0.77763087", "0.7763931", "0.77292764", "0.76838464", "0.7672682", "0.7648967", "0.7635121", "0.76347417", "0.7628432", "0.76088107", "0.754889", "0.7533936", "0.75296074", "0.7515007", "0.75073236", "0.75004166", "0.74964476", "0.74753183", "0.7435424", "0.74218696", "0.73847705", "0.7340666", "0.7299642", "0.7294585", "0.7289226", "0.72794837", "0.7277649", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896", "0.72535896" ]
0.0
-1
Returns the attribute name
public function getAttributeName() { return 'nonDerivativeHolding'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributeName()\n {\n return config(LocalizationServiceProvider::getConfigName().'.attribute_name', self::$defaultAttribute);\n }", "abstract protected function getAttributeName($attribute);", "public function getAttribute(): string\n {\n return $this->attribute;\n }", "public function getName()\n {\n return $this->attributes->name;\n }", "public function getName() {\n return @$this->attributes['name'];\n }", "function getName() {\n\t\t/* To refer to data stored in an object you proceed the name of the attribute with $this->yourAttribute*/ \n\n\treturn $this->name;\n\n\t}", "public function GetName()\n {\n return $this->GetAttribute(self::ATTR_NAME);\n }", "function getName()\n {\n return $this->getAttribute(\"name\");\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "public function getName()\n {\n return $this->getAttribute('name');\n }", "public function getName()\n {\n return $this->getAttribute('name');\n }", "public function getName()\n\t{\n\t\treturn $this->getAttribute('name');\n\t}", "public function getName() {\n\t\treturn isset($this->attributes['name'])?$this->attributes['name']:null;\n\t}", "public function getName(): string\n {\n return $this->getAttributes()['name'];\n }", "abstract public function attributeNames();", "public function getAttributeName($index = null);", "public function attributeNames()\n\t{\n\t\t$class = get_class($this);\n\t\tif(!isset(self::$_names[$class]))\n\t\t{\n\t\t\tself::$_names[$class] = array_merge(array('id'), $this->getNames($this->arrayStructure()));\n\t\t}\n\t\t\n\t\treturn self::$_names[$class];\n\t}", "function getName() {\n // $this is used to refer to an attribute of a class\n return $this->name;\n }", "public function getAttribute(string $attribute): string;", "public function getAttributeName(): string\n {\n return 'CDRData';\n }", "public function getName()\n {\n return $this->attributes['name'] ?? null;\n }", "public function getAttributeName()\n {\n return 'AgriculturalInsuranceDiscountFactor';\n }", "public function __attribute($name)\n {\n return $this->__attributes[$name];\n }", "public function getAttributeString(){\n return $this->_form->getAttributeString($this->_attributes);\n }", "public function getNameAttribute(): string\n {\n return $this->config['name'];\n }", "public function getNameAttribute() {\n\t\t$value = null;\n\n\t\tif (isset($this->attributes) && isset($this->attributes['name'])) {\n\t\t\t$value = $this->attributes['name'];\n\t\t}\n\n\t\tif (empty($value)) {\n\t\t\t$value = last(explode('/', $this->attributes['logo']));\n\t\t}\n\n\t\treturn $value;\n\t}", "public function name()\n {\n if (isset($this->attributes[self::NAME])) {\n return $this->attributes[self::NAME];\n }\n\n return $this->path();\n }", "public function attrLabel($attr) {\n $lebels = static::attributLabels();\n return isset($lebels[$attr]) ? $lebels[$attr] : ucfirst($attr);\n }", "public function attribute_names() {\n\t\n\t\treturn array_keys( $this->attributes );\n\t\t\n\t}", "public function name()\n\t{\n\t\tif ($attributes = $this->getRelationValue('attributes')) {\n\t\t\treturn $attributes->loadMissing('translations', 'group.translations')->map(function($attribute) {\n\t\t\t\treturn $attribute->group->getTranslation('name') . ':' . $attribute->getTranslation('value');\n\t\t\t})->implode(' - '); \n\t\t} \n\t}", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function get_attribute($name)\n {\n }", "public function getAttributeName(): string\n {\n return 'BodyContentAttributedValue';\n }", "public function attributeNames() {\n\t\treturn array(\n\t\t\t'name',\n\t\t\t'path',\n\t\t);\n\t}", "private function getNameAttributeId()\n {\n $attributeId = null;\n $attribute = $this->eavConfig->getAttribute('catalog_category', 'name');\n\n if ($attribute->getAttributeId()) {\n $attributeId = $attribute->getAttributeId();\n }\n\n return $attributeId;\n }", "public function getIdentifyingAttribute();", "public function getNameAttribute($name) {\n\t \tif(empty($name) === true) {\n\t \t\t$name = $this->getName();\n\t \t}\n\n\t \treturn $name;\n\t }", "public function getAttributeName()\n {\n return 'EventType';\n }", "private function getAttribute(string $name): string\n {\n return (string) $this->xmlItem->attributes()[$name];\n }", "function getName( $attribute )\r\n\t{\r\n\t\tswitch ( $attribute )\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\t\treturn translate($this->object->getAttributeUserName( $attribute ));\r\n\t\t}\r\n\t}", "public function getAttributeName(): string\n {\n return 'SupplyOrderReport';\n }", "public function getConflictingAttributeName()\n {\n return $this->conflictingAttributeName;\n }", "public function getAttrSetIdToName()\n {\n return $this->_attrSetIdToName;\n }", "public function getAttributeCode(){\n\t\t$code = 'brand_name';\n\t\treturn $code;\n\t}", "public function getAttribute($name);", "public function getAttributeName(): string\n {\n return 'Sender';\n }", "public function getNameAttribute(){\n return $this->tag->name;\n }", "public function getnameAttribute() : String\n {\n $locale = LaravelLocalization::getCurrentLocale();\n $fieldName = 'name';\n $column = $fieldName.\"_\" . $locale;\n $value = $this->{$column};\n return $value;\n }", "public function getAttributeName(): string\n {\n return 'ValidateOrderLineResult';\n }", "public function getNameAttribute(): string\n {\n return ucfirst($this->voornaam).' '.ucfirst($this->achternaam);\n }", "public function getAttributeByName($attributeName);", "public function filename()\n {\n return $this->attr_filename;\n }", "public function getFormattedNameAttribute(): string\n {\n return $this->open_tag . $this->name . $this->close_tag;\n }", "public function getNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }", "public function getTypeNameAttribute();", "public function attribute(string $name) {\n\t\treturn $this->m_attributes[$name] ?? null;\n\t}", "public function getAttributeName()\n\t{\n\t\treturn 'DurationAndConvexity';\n\t}", "public function getAttributeNames ()\n {\n\n return array_keys($this->attributes);\n\n }", "public function get_key() {\n\t\treturn array_get($this->attributes, static::$key);\n\t}", "public function attributeNames()\n {\n return array_merge_recursive(parent::attributeNames(), array(\n 'markup',\n 'name',\n 'plaintext_markup',\n 'subject_markup',\n 'base',\n ));\n }", "public function attributeNames() {\n\t\treturn $this->getAttributeNames();\n\t}", "public function getAttribute(string $name);", "public static function label()\n {\n return __('Attributes');\n }", "function getPropertyName() ;", "public function getNameAttribute()\n {\n return pathinfo($this->file_path, PATHINFO_FILENAME);\n }", "protected function getInputName($attribute)\n {\n $formName = $this->formName;\n \n if ($formName === null) {\n return $this->model->formName() . \"[$attribute]\";\n } elseif ($formName === '') {\n return $attribute;\n } else {\n return $formName . \"[$attribute]\";\n }\n }", "public function getAttributeLabel($attribute);", "public function getNameAttribute()\n {\n return $this->first.' '.$this->last;\n }", "public function getAttributeName()\n\t{\n\t\treturn 'Forecast';\n\t}", "public function attr($name) {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0]->attrList[$name])) return $this->selectList[0]->attrList[$name];\n\tif( isset($this->attrList[$name]) ) return $this->attrList[$name];\n\treturn '';\n }", "public function attributeNames() {\n\t\t$attributeNames = array(\n\t\t\t'name',\n\t\t\t'width',\n\t\t\t'height',\n\t\t);\n\t\t$attributeNames = array_merge($attributeNames, $this->existAttributeNames());\n\t\treturn $attributeNames;\n\t}", "public function getAttributeName()\n\t{\n\t\treturn 'MetalQuoteItem';\n\t}", "public function visitAttribute(\n /*IAttribute*/ $node) /*: mixed*/ {\n $expressions = Vector {};\n foreach ($node->getExpressions() as $expressions_elem) {\n $expressions[] = /*(string)*/$expressions_elem->accept($this);\n }\n\n $result = $node->getAttributeName();\n $result .= $this->visitVector($expressions, '(', ', ', ')', '');\n return $result;\n }", "public function getName()\n\t{\n\t\treturn $this->getAttribute('description');\n\t}", "public function getPropertyName();", "public function getPropertyName();", "public function getAttributeNames()\n {\n return array_keys($this->attributes);\n }", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }", "public function attributeNames()\n\t{\n\t\treturn array('frequency','priority','route','params','baseModel','scopeName');\n\t}", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getAttribute(): string|null\n {\n return $this->attribute;\n }", "public function getAttributeName()\n\t{\n\t\treturn 'Indicator';\n\t}", "public function getAttributeName()\n {\n return 'ShipmentItem';\n }", "protected function getAttribute($attribute)\n {\n if (isset( $this->customAttributes[$attribute] )) {\n return $this->customAttributes[$attribute];\n }\n\n $key = \"validation.attributes.{$attribute}\";\n\n if (( $line = trans($key) ) !== $key) {\n return $line;\n } else {\n return str_replace('_', ' ', snake_case($attribute));\n }\n }", "public function getAttribute($name) {\n\t\tif (isset ( $this->$name ))\treturn $this->$name;\n\t}", "public function getAttributeName(): string\n {\n return 'MessageTrackingSearchResult';\n }", "public function getAttributeName()\n {\n return 'LifeInsuranceDiscountFactor';\n }", "public function getAttributeName()\n\t{\n\t\treturn 'WeatherDescription';\n\t}", "public function attributeNames()\n {\n $className = get_class($this);\n if (!isset(self::$_names[$className])) {\n $class = new ReflectionClass(get_class($this));\n $names = array();\n foreach ($class->getProperties() as $property) {\n $name = $property->getName();\n if ($property->isPublic() && !$property->isStatic())\n $names[] = $name;\n }\n return self::$_names[$className] = $names;\n } else\n return self::$_names[$className];\n }", "private function attrNames()\n {\n $dimAttr = [\n 'length' => 'length',\n 'width' => 'width',\n 'height' => 'height',\n ];\n $dsAttr = [\n 'dropship' => 'dropship',\n 'dropship_location' => 'dropship_location'\n ];\n\n $this->attrNames = ($this->mageVersion >= '2.2.5') ? $dsAttr : array_merge($dsAttr, $dimAttr);\n }", "public function name()\n\t{\n\t\treturn $this->array['name'] ?? '';\n\t}", "public function getAttributeName()\n\t{\n\t\treturn 'FilterBase';\n\t}", "public function getNameAttribute()\n {\n return $this->translateOrNew($this->locale())->name;\n }", "public function getNameAttribute()\n {\n return $this->translateOrNew($this->locale())->name;\n }", "public function getName()\n {\n return \"arpAttributes\";\n }", "public function attorneyName()\n {\n return $this->bean->attorney()->name;\n }" ]
[ "0.7962568", "0.78212345", "0.7816693", "0.7774161", "0.7737602", "0.77027494", "0.7686713", "0.7588044", "0.7514053", "0.7504524", "0.7504524", "0.74973154", "0.7417325", "0.7368722", "0.734146", "0.7296611", "0.72479343", "0.7233783", "0.71818584", "0.7172", "0.7106876", "0.70995194", "0.70925295", "0.7082527", "0.70788616", "0.70759666", "0.70642567", "0.70404345", "0.70028114", "0.69975656", "0.69923335", "0.69923335", "0.6981218", "0.69810325", "0.6979247", "0.69763243", "0.69699943", "0.69446176", "0.6934906", "0.6904995", "0.6904624", "0.6903111", "0.6900589", "0.689807", "0.68880695", "0.6875179", "0.68654925", "0.6838721", "0.68231916", "0.6819249", "0.6814896", "0.6793068", "0.678359", "0.6769387", "0.67691374", "0.67508423", "0.67508316", "0.6742558", "0.6741977", "0.6736208", "0.67281353", "0.6727788", "0.671452", "0.67007226", "0.6699483", "0.6689954", "0.66861737", "0.6683506", "0.66806155", "0.6679666", "0.6676402", "0.66577256", "0.66264826", "0.66223675", "0.6621368", "0.66169596", "0.66169596", "0.6615163", "0.6606896", "0.6604439", "0.6577697", "0.6573324", "0.6573324", "0.6573324", "0.65704805", "0.6568914", "0.65684295", "0.6564255", "0.6550942", "0.65490294", "0.6548563", "0.654832", "0.65433246", "0.65424985", "0.6536527", "0.65364766", "0.65330374", "0.65330374", "0.6525497", "0.65239686" ]
0.67703164
53
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return __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 getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName() { return __CLASS__; }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function className() : string {\n return get_called_class();\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getClassName()\n {\n return $this->class_name;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string;", "public function getClassName() : string;", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass()\n {\n return $this->_className;\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getClass(): string\n {\n return $this->class;\n }", "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "function getName()\n {\n return get_class($this);\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function toString()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}", "public function __toString() {\n\t\treturn $this->className();\n\t}", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }" ]
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529981", "0.85237026", "0.8502733", "0.8493115", "0.8491238", "0.8488943", "0.8484194", "0.847459", "0.8441478", "0.8418852", "0.8399611", "0.83950585", "0.83949184", "0.83853173", "0.8378261", "0.837777", "0.8372544", "0.8355432", "0.8355432", "0.83479965", "0.8325877", "0.8325877", "0.8312873", "0.83027107", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.82474744", "0.8242934", "0.8202995", "0.8185409", "0.8184752", "0.81829107", "0.81829107", "0.8176191", "0.81761754", "0.8162896", "0.8142928", "0.81323636", "0.8062757", "0.80528253", "0.8045769", "0.8033823", "0.8026215", "0.8001116", "0.79949147", "0.79779136", "0.79672754", "0.7957633", "0.790449", "0.78617185", "0.7860126", "0.7847096", "0.78195953", "0.7817044", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.77821547", "0.7761565", "0.77588034", "0.7747239", "0.77409905", "0.77409905", "0.7710985", "0.76808393", "0.7670475", "0.76640886", "0.76514393", "0.76499707", "0.76323646", "0.76005036", "0.75937456" ]
0.0
-1
Check if popup is enabled
public function getStatus(){ if($this->scopeConfigInterface->getValue(self::XML_PATH_ENABLED,ScopeInterface::SCOPE_WEBSITE) ==1){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isNewsletterPopUpEnable() \n {\n return (bool) Mage::getStoreConfig(self::XML_PATH_ENABLE);\n }", "public static function isPopupWindow()\n\t{\n\t\treturn (bool)(self::$viewingMode & self::POPUP);\n\t}", "function has_html() {\n\t\treturn $this->settings['popup'];\n\t}", "public function isModuleEnabled()\n {\n return $this->scopeConfig->isSetFlag(\n self::AJAXLOGIN_POPUP_XML_PATH,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function isModuleEnabled()\n {\n return $this->scopeConfig->isSetFlag(\n self::AJAXLOGIN_POPUP_XML_PATH,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "protected function isOccurrencesModalEnabled(): bool {\n return !empty($this->getSetting('occurrences_modal'));\n }", "function use_custom_js() {\n if ( $this->addon->options['email_link_format'] === 'popup_form' ) { return true; }\n if ( $this->slplus->is_CheckTrue( $this->addon->options['disable_initial_directory'] ) ) { return true; }\n return false;\n }", "public function is_comments_popup()\n {\n }", "function notify_addon_enabled_from_admin_panel() {\n return ( (!!qa_opt('qw_enable_email_notfn')) &&\n (\n (!!qa_opt('qw_notify_cat_followers')) ||\n (!!qa_opt('qw_notify_tag_followers')) ||\n (!!qa_opt('qw_notify_user_followers'))\n )\n );\n }", "public function getPopup() {}", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function IsOpen()\n {\n $this->CallJqUiMethod(\"isOpen\");\n }", "function isEnabled();", "function isEnabled();", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "function isEnabled ();", "public function isActivated() {}", "public function canShow(){\n\t\tif (Mage::getStoreConfig('logicbroker_edi_section/logicbroker_edi_group1/notificationstatus') == 0) {\n\t\t\t$this->setConfigValue(array(\n\t\t\t\t'scope' => 'default',\n\t\t\t\t'scope_id' => '0',\n\t\t\t\t'path' => 'logicbroker_edi_section/logicbroker_edi_group1/notificationstatus',\n\t\t\t\t'value' => '1',\n\t\t\n\t\t\t\t));\n\t\t\treturn true;\n }else{\n \treturn false;\n }\n\t}", "public function isVisible(): bool\n {\n return $this->scopeConfig->getValue('helloworld/general/enable');\n }", "function isEnabled()\n {\n return false;\n }", "protected function _isEnabled()\n {\n return Mage::helper('gri_reward')->isEnabledOnFront()\n && Mage::helper('gri_reward')->getGeneralConfig('publish_history');\n }", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "public static function isEnabled()\n {\n $app_model = new waAppSettingsModel();\n $is_enabled = $app_model->get(array('shop', self::PLUGIN_ID), self::PLUGIN_ID . '-profile');\n $profile_cookie = $app_model->get(array('shop', self::PLUGIN_ID), self::PLUGIN_ID_SHORT . '-profile-cookie');\n $cookie_enabled = $profile_cookie && waRequest::cookie($profile_cookie, '');\n return $is_enabled && $cookie_enabled;\n }", "protected function _isNeedToShow()\n {\n if (!$this->_isModuleEnabled()) {\n return false;\n }\n\n if (!$this->_isParallaxBlockEnabled()) {\n return false;\n }\n\n return true;\n }", "public function is_feedback_notice_active() {\n\t\t// Check whether the current user has sufficient capabilities for the notice to be displayed\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check whether the plugin has been installed long enough for the notice to be displayed\n\t\t$plugin_installed = get_option( 'wpba_installed_timestamp' );\n\n\t\tif ( $plugin_installed && ( time() - $plugin_installed ) <= 60 * 60 * 24 * 7 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! get_user_meta( get_current_user_id(), 'wpba/notice_disabled/feedback', true );\n\t}", "public function isEnabled()\n\t{\n\t\t// note: don't use $this->_main->.. as it might not exist when this func is called.\n\t\treturn Mage::helper('shoptimally_upsalecoupons/main')->isEnabled();\n\t}", "public function isEnableConfirmations()\r\n {\r\n return $this->enable_confirmations;\r\n }", "public function canShowOnDemand () {\n return true;\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig('refersion/refersion_settings/refersion_active');\n }", "public function canShowTab()\n {\n $integrationData = $this->_coreRegistry->registry(\n Integration::REGISTRY_KEY_CURRENT_INTEGRATION\n );\n\n if (isset($integrationData['integration_id']) &&\n isset($integrationData['endpoint']) &&\n (str_contains($integrationData['endpoint'], 'extend.com') &&\n str_contains($integrationData['endpoint'], 'integ-mage'))\n ) {\n return true;\n }\n }", "public function acf_wpi_ui() {\n\t\tif ( ! get_field( 'acf_wpi_ui_enable', 'option' ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getIsOpenInNewWindow() {\n return (boolean) Mage::getStoreConfig('mytunes/globals/open_download_in_new_window');\n }", "public static function canDisplayProfitAndLossMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PROFIT_AND_LOSS_REPORT);\n\t}", "public function isEnabled()\n {\n return $this->_helperData->isEnabled();\n }", "protected function _canBeShown()\n {\n if (!Mage::helper('factfinder_campaigns')->getIsResultListingPage()) {\n return false;\n }\n\n return (bool) Mage::helper('factfinder')->isEnabled('campaigns');\n }", "public function isShowActivator() {\n\t\t$cache = WP_Helper::getCache();\n\t\tif ( $cache->get( 'wdf_isActivated', false ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( get_site_transient( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif ( get_site_option( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$keys = [\n\t\t\t'wp_defender',\n\t\t\t'wd_scan_settings',\n\t\t\t'wd_hardener_settings',\n\t\t\t'wd_audit_settings',\n\t\t\t'wd_2auth_settings',\n\t\t\t'wd_masking_login_settings'\n\t\t];\n\t\tforeach ( $keys as $key ) {\n\t\t\t$option = get_site_option( $key );\n\t\t\tif ( is_array( $option ) ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "public function checkAccess() {\n\t\t$conf = $GLOBALS['BE_USER']->getTSConfig('backendToolbarItem.tx_newsspaper_role.disabled');\n\t\treturn ($conf['value'] == 1 ? false : true);\n\t}", "public function is_enabled()\n {\n }", "function isDisabled()\n {\n return false;\n }", "public function isPreviewerEnabled($mode) {\n return $mode != 'removed' && $mode != 'remove';\n }", "public function isEnabled()\n {\n return $this->helper->isEnabled();\n }", "public function canShowTab()\n {\n $customer = Mage::registry('current_customer');\n return $customer->getId()&& Mage::helper('storecreditpro')->moduleEnabled();\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig('quickview/settings/enabled', Mage::app()->getStore());\n }", "public function can_activate(): bool;", "public function canShowScript() {\n\t\t$pluginUpgrader = new Utils\\PluginUpgraderSilentAjax();\n\t\t$miLite = $pluginUpgrader->pluginSlugs['miLite'];\n\t\t$miPro = $pluginUpgrader->pluginSlugs['miPro'];\n\t\t$emLite = $pluginUpgrader->pluginSlugs['emLite'];\n\t\t$emPro = $pluginUpgrader->pluginSlugs['emPro'];\n\t\t$activePlugins = get_option( 'active_plugins' );\n\n\t\tif (\n\t\t\tin_array( $miLite, $activePlugins, true ) ||\n\t\t\tin_array( $miPro, $activePlugins, true ) ||\n\t\t\tin_array( $emLite, $activePlugins, true ) ||\n\t\t\tin_array( $emPro, $activePlugins, true )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$googleAnalyticsId = aioseo()->options->deprecated->webmasterTools->googleAnalytics->id;\n\t\t$gtmContainerId = aioseo()->options->deprecated->webmasterTools->googleAnalytics->gtmContainerId;\n\n\t\tif (\n\t\t\tin_array( 'googleAnalytics', aioseo()->internalOptions->internal->deprecatedOptions, true ) &&\n\t\t\t! $googleAnalyticsId &&\n\t\t\t! $gtmContainerId\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! $this->userIsExcluded();\n\t}", "public function isEnabled(): bool;", "public function isEnabled(): bool;", "public function isEnabled(): bool;", "function ts_check_if_control_panel()\r\n{\r\n\t$control_panel = ot_get_option('control_panel');\r\n\t\r\n\tif ($control_panel == 'enabled_admin' && current_user_can('manage_options') || $control_panel == 'enabled_all')\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "public function is_panel_active()\n {\n }", "public function isDisabled() {}", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function getIsEnabled()\n {\n return $this->helper->isEnabled();\n }", "public function enabled()\n {\n return (bool) Mage::getStoreConfig('actions/settings/enabled');\n }", "function the_champ_social_login_enabled(){\r\n\tglobal $theChampLoginOptions;\r\n\tif(isset($theChampLoginOptions['enable']) && $theChampLoginOptions['enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$theme_support = get_theme_support( 'themeisle-demo-import' );\n\n\t\tif ( empty( $theme_support ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected function _isEnabled()\n {\n return $this->currentCustomer->getCustomerId() && $this->_rewardData->isEnabledOnFront()\n && $this->_rewardData->getGeneralConfig('publish_history');\n }", "function isVisible() {\n return $this->entry->staff_id && $this->entry->type == 'R'\n && !parent::isEnabled();\n }", "public function isCooperativeModeAllowed()\n {\n $data = $this->_coreRegistry->registry('magictoolbox');\n return is_null($data) ? false : $data['cooperative-mode'];\n }", "public function isEnabled()\n {\n return true;\n\n }", "function isDisabled() {\n\t\treturn ($this->getActive() == self::PROFILE_DISABLED);\n\t}", "public function checkForOneTimeDemoMessage(): bool\n {\n return $this->getCustomerAttrCreditHold() && $this->configProvider->isOptionCreditHoldEnable() && !$this->getFlag();\n }", "public function getIsDisabled() {}", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "public function isAutomationEnabled(): bool\n\t{\n\t\treturn $this->isAutomationEnabled;\n\t}", "protected function isEnabled() {\n\t\treturn (\n\t\t\t$this->getPageService()->isEnabled() &&\n\t\t\t(bool) $this->getTypoScriptService()->resolve('settings.enable')\n\t\t);\n\t}", "public function is_plugin_settings() {\n\n\t\treturn isset( $_GET['page'], $_GET['tab'] ) && 'wc-settings' === $_GET['page'] && 'pip' === $_GET['tab'];\n\t}", "public function has_admin_panel(){\r\n\t\treturn $this->module_has_admin_panel();\r\n\t}", "public function isEnabled()\n {\n return true;\n }", "public function isEnabled()\n {\n return true;\n }", "public function isEnabled()\n {\n return true;\n }", "public function isEnabled()\n {\n return true;\n }", "public function isEnabled()\n {\n return true;\n }", "public function isDisplayed()\n {\n if (!$this->scopeConfig->getValue('magentomobileshop/secure/key')) {\n return true;\n }\n }", "public function is_enabled() {\n $enabled = file_exists(ABSPATH . '!sak4wp.php');\n return $enabled;\n }", "function isVisible() {\n\t\t$worker = CerberusApplication::getActiveWorker();\n\t\t\n\t\tif(empty($worker)) {\n\t\t\treturn false;\n\t\t} elseif($worker->is_superuser) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function displayInAdmin()\n {\n return self::_enabled();\n }", "public function isEnable() {\n\t\treturn self::$isEnable && session_id() != '';\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function isEditorConfirmEnabled()\n\t{\n\t\treturn !$this->getEditorId();\n\t}", "public function staticPreviewIsEnabled()\n {\n return $this->staticPreview;\n }", "public function isAdminPanelVisible() {}", "public function is_enabled()\n {\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig(self::GENE_BRAINTREE_APPLEPAY_ACTIVE)\n && Mage::getStoreConfig(self::GENE_BRAINTREE_APPLEPAY_EXPRESS_ACTIVE);\n }" ]
[ "0.73778397", "0.72082776", "0.70571244", "0.652414", "0.652414", "0.64251757", "0.6390545", "0.62545776", "0.62286973", "0.61912286", "0.6133611", "0.6127853", "0.61082196", "0.61082196", "0.6040975", "0.6021793", "0.6011007", "0.600878", "0.600696", "0.60065675", "0.59974897", "0.5995035", "0.59443784", "0.5929593", "0.5926082", "0.5923407", "0.59142435", "0.59088194", "0.59077525", "0.5907472", "0.5905201", "0.58799714", "0.58604074", "0.5833907", "0.58325565", "0.58282816", "0.5824945", "0.5814563", "0.58112437", "0.5802632", "0.57991016", "0.579884", "0.5792368", "0.5789774", "0.5785815", "0.5774059", "0.5774059", "0.5774059", "0.5772269", "0.5761464", "0.5759939", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.5759346", "0.57588387", "0.575404", "0.5751185", "0.5750532", "0.57494366", "0.574477", "0.5736166", "0.5733858", "0.5733856", "0.5723494", "0.5721934", "0.5717567", "0.5717567", "0.5717567", "0.57165897", "0.5714702", "0.5711495", "0.5707427", "0.5703453", "0.5703453", "0.5703453", "0.5703453", "0.5703453", "0.5701315", "0.57001007", "0.5696529", "0.5696257", "0.569069", "0.56879604", "0.56879604", "0.56879604", "0.56879604", "0.56869936", "0.5686299", "0.568353", "0.5681569", "0.5680276" ]
0.0
-1
Get popup background url
public function getBgImage(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_BG_IMAGE,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url_background_pion(){ return $this->_url_background_pion;}", "public function get_url_background_card(){ return $this->_url_background_card;}", "function get_background_image()\n {\n }", "public function getPopup() {}", "function getBackground() {return $this->readBackground();}", "public function getPopupContent();", "function getPopup($id, $attr, $url)\n{\n\t\tif ($attr == '1') $attr = '800x600';\n\t\t@list($size,$attr) = explode(' ', $attr);\n\t\tswitch ($attr) {\n\t\tcase 'full': $poppar='toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1';\n\t\tbreak;\n\t\tcase 'min': $poppar = 'resizable=1';\n\t\tbreak;\n\t\tcase 'none': $poppar = '';\n\t\tbreak;\n\t\tcase 'max': default: $poppar = 'scrollbars=1,resizable=1';\n\t\tbreak;\n\t\t}\n\n\t\tif ($size) {\n\t\t\tlist($w, $h, $l, $t) = sscanf($size, \"%dx%d+%d+%d\");\n\t\t\tif (!$l) $l = \"'+((window.screen.width-$w)/2)+'\";\n\t\t\tif (!$t) $t = \"'+((window.screen.height-$h)/2)+'\";\n\t\t\t$poppar .= ($poppar?',':'') . \"left=$l,top=$t,width=$w,height=$h\";\n\t\t}\n\n\t\treturn \"javascript:void(win_$id=window.open('$url','win_$id','$poppar'));win_$id.focus()\";\n}", "function get_custom_bg_for_user_profile() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= $target_path;\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "private function getURLLightbox() {\n\t\treturn (!$this->isSandbox ? $this->urlLightBox : $this->urlLighboxSandbox);\n\t}", "function readBackground() {return $this->_background;}", "public function getPreviewUrlFront()\n {\n return $this->previewUrlFront;\n }", "public function getPopupHtml() { return $this->popHtml; }", "function getBackgroundPosition() {return $this->readBackgroundPosition();}", "function get_background() {\r\n return $this->db->get($this->table);\r\n\t}", "public function get_preview_url()\n {\n }", "function get_custom_bg_for_user_profile_admin() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= '<img src=\"'.$target_path.'\" style=\"max-width:98% !important;\">';\t\r\n\t\t\t$html .= '<input type=\"button\" name=\"submit\" class=\"button button-secondary \" id=\"uultradmin-remove-custom-user-bg-image\" value=\"'.__('Remove','xoousers').'\" />';\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "function background_img($link){\n\t\t\t\techo \"<style> body{background: url(\". $link. \");\n\t\t\t\t\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t} </style>\";\n\t\t\t}", "function get_background($page_id){\n\n\t$custom_meta = get_post_custom($page_id);\n\t\n\tif(isset($custom_meta['lumen_page_background']) && isset($custom_meta['lumen_page_background'][0]) && $page_id != \"default\"){\n\t\t$background = unserialize($custom_meta['lumen_page_background'][0]);\t\n\t\tif($background['background-color'] == \"\" && $background['background-image'] == \"\") {\n\t\t\t$background = ot_get_option('lumen_site_default_background');\n\t\t}\n\t}\telse {\n\t\t$background = ot_get_option('lumen_site_default_background');\n\t}\n\t\n\t$background_image = \"\";\n\tif(isset($background['background-image'])){\n\t\t$background_image = $background['background-image'];\n\t\tif(strlen($background_image) > 0) {\n\t\t\t$background_image = 'url('.$background_image.')';\n\t\t}\n\t}\n\t\n\t$output = \"\";\n\t$background_repeat = false;\n\t\n\tif(isset($background['background-color'])){ $output .= $background['background-color'].\" \"; }\n\t$output .= $background_image.\" \";\n\tif(isset($background['background-repeat'])){ \n\t\t$output .= $background['background-repeat'].\" \"; \n\t\tif($background['background-repeat'] == \"repeat\"){\n\t\t\t$background_repeat = true;\t\t\n\t\t} \n\t}\n\tif(isset($background['background-attachment'])){ $output .= $background['background-attachment'].\" \"; }\n\tif(isset($background['background-position'])){ $output .= $background['background-position'].\" \"; }\n\t\n\tif(strlen(trim($output)) > 0 && $background_repeat) { \n\t\treturn 'background: '.$output.'; background-size: inherit!important;'; \n\t}else{\n\t\treturn 'background: '.$output; \n\t}\n\t\n\treturn \"\";\n}", "function cjpopups_wp_avatar_url($user_id_or_email, $size = 150){\n\t$user_id = cjpopups_user_info($user_id_or_email, 'ID');\n\t$get_avatar = get_avatar( $user_id, $size );\n preg_match(\"/src='(.*?)'/i\", $get_avatar, $matches);\n return ( $matches[1] );\n}", "function featuredBG($size = 'full', $pos_x = 'center', $pos_y = 'center', $repeat = 'no-repeat'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo 'style=\"background: url('. $url .')'. $pos_x .' '. $pos_y .' ' . $repeat .'\"';\n}", "function _custom_background_cb()\n {\n }", "public function getPictureUrl()\n {\n return $this->getImageurl();\n }", "function background_image()\n {\n }", "public function getBackgroundMode() {\n return $backgroundMode;\n }", "public function getAbsoluteSrc();", "public function getFrontPageUrl();", "function getPicUrl()\n\t\t{\n\t\t\treturn $this->picurl;\n\t\t}", "function wprt_background_css( $bg ) {\n\t// Define vars\n\t$css = '';\n\t$bg_style = $bg .'_style';\n\n\tif ( $bg_img = wprt_get_mod( $bg, null ) ) {\n\t\t$css .= 'background-image: url('. esc_url( $bg_img ). ');';\n\t}\n\n\tif ( $bg_style = wprt_get_mod( $bg_style ) ) {\n\t\tif ( 'fixed' == $bg_style ) {\n\t\t\t$css .= ' background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-top' == $bg_style ) {\n\t\t\t$css .= ' background-position: center top; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-bottom' == $bg_style ) {\n\t\t\t$css .= ' background-position: center bottom; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'cover' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center center; background-size: cover;';\n\t\t} elseif ( 'center-top' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center top;';\n\t\t} elseif ( 'repeat' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat;';\n\t\t} elseif ( 'repeat-x' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-x;';\n\t\t} elseif ( 'repeat-y' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-y;';\n\t\t}\n\t}\n\n\treturn esc_attr( $css );\n}", "function hyde_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color )\n\t\treturn;\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n\t\t\t$repeat = 'repeat';\n\t\t$repeat = \" background-repeat: $repeat;\";\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n\t\t\t$position = 'left';\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n\t\t\t$attachment = 'scroll';\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"custom-background-css\">\n.sidebar { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "function cjpopups_get_image_url($image){\n\tif(strpos($image, 'img') > 0){\n\t\t$xpath = new DOMXPath(@DOMDocument::loadHTML($image));\n\t\t$src = $xpath->evaluate(\"string(//img/@src)\");\n\t\treturn $src;\n\t}else{\n\t\treturn $image;\n\t}\n}", "public function get_url()\r\n\t{\r\n\t\treturn $this->dropin_url;\r\n\t}", "public static function getThemeUrl()\n {\n return (isset(self::$data['_url'])) ? self::$data['_url'] : '';\n }", "function getUrlPromo() {\n\t$connection = connectDB();\n\t$tabla = 'options';\n\t$option_name = 'urlPopup';\n\n\t$query = \"SELECT * FROM \" .$tabla. \" WHERE options_name = '{$option_name}' LIMIT 1\";\n\t$result = mysqli_query($connection, $query);\n\t\n\tcloseDataBase($connection);\n\n\tif ($result->num_rows == 0) {\n\t\treturn '#';\n\t}\n\t\n\t$data = mysqli_fetch_array($result);\n\t\n\tif ($data[2] == '') {\n\t\treturn '#';\n\t} else {\n\t\treturn $data[2];\n\t}\n\n\tcloseDataBase($connection);\n}", "protected abstract function getButtonCallbackURL();", "function get_background_color()\n {\n }", "public function GetPreferencesUrl();", "public static function getURI() {\n\n return self::loadUrl();\n }", "function client_url() {\n\tglobal $post;\n\t$url = get_post_meta($post->ID, 'client_url', true);\n\tif ($url) {\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\" target=\"_blank\">Live Preview →</a>\n <?php\n\t}\n}", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "function background_function($url) {\n\t\t$query = $this->dobj->db_query(\"DELETE FROM backgrounds WHERE url=$$\".$url.\"$$\");\n\t\t$query = $this->dobj->db_query(\"INSERT INTO backgrounds (url) VALUES ($$\".$url.\"$$);\");\n\t\treturn $url;\n\t}", "public function getScreenshotUrl()\n {\n return $this->screenshotUrl;\n }", "function draw_modal_outer_background() { ?>\n <div id=\"modal-outer-background\" class=\"no-display\">\n </div>\n \n<?php }", "public function setBackgroundImage($url);", "public function getUrl()\n {\n return $this->createUrl();\n }", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "function readBackgroundPosition() {return $this->_backgroundposition;}", "function bethel_get_default_background_args() {\n\treturn array ('default-color' => '#f5f5f5',\n\t\t\t\t 'default-image' => get_stylesheet_directory_uri().'/images/background.jpg',\n\t\t\t\t 'default-repeat' => 'repeat'\n\t );\n}", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getPreviewImageUrl(): string\n {\n $previewPath = $this->getConfigValue('previewImage', 'assets/img/skin-preview.png');\n if (File::exists($this->getPath() . '/' . $previewPath)) {\n return Url::asset('plugins/summer/login/skins/' . $this->getDirName() . '/' . $previewPath);\n }\n return Url::asset('modules/cms/assets/images/default-theme-preview.png');\n }", "public function set_url_background_pion(String $_url_background_pion){\n $this->_url_background_pion = $_url_background_pion;\n\n return $this;\n }", "public function getPreviewUrl()\n {\n return $this->getUrl('*/*/preview');\n }", "function getBackgroundRepeat() {return $this->readBackgroundRepeat();}", "function vibe_custom_background_cb(){\n $background = set_url_scheme( get_background_image() );\n\n // $color is the saved custom color.\n // A default has to be specified in style.css. It will not be printed here.\n $color = get_theme_mod( 'background_color' );\n\n if ( ! $background && ! $color )\n return;\n\n $style = $color ? \"background-color: #$color;\" : '';\n\n if ( $background ) {\n $image = \" background-image: url('$background');\";\n\n $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n $repeat = 'repeat';\n $repeat = \" background-repeat: $repeat;\";\n\n $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n $position = 'left';\n $position = \" background-position: top $position;\";\n\n $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n $attachment = 'scroll';\n $attachment = \" background-attachment: $attachment;\";\n\n $style .= $image . $repeat . $position . $attachment;\n\n echo '\n <div id=\"background_fixed\">\n <img src=\"'.$background.'\" />\n </div>\n <style type=\"text/css\">\n #background_fixed{position: fixed;top:0;left:0;width:200%;height:200%;}\n </style>\n ';\n }\n\n}", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function get_callback_url(){\n\t\treturn $this->callback_url;\n\t}", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public function getBackgroundImage()\r\n {\r\n $orientation = $this->getOrientation();\r\n $backgroundImage = '';\r\n /** @var $helperImage Mage_XmlConnect_Helper_Image */\r\n $helperImage = Mage::helper('xmlconnect/image');\r\n\r\n switch ($orientation) {\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_LANDSCAPE:\r\n $configPath = 'conf/body/backgroundIpadLandscapeImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_home_landscape.jpg');\r\n }\r\n break;\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_PORTRAIT:\r\n $configPath = 'conf/body/backgroundIpadPortraitImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_portrait.jpg');\r\n }\r\n break;\r\n default:\r\n Mage::throwException(\r\n Mage::helper('xmlconnect')->__('Wrong Ipad background image orientation has been specified: \"%s\".', $orientation)\r\n );\r\n break;\r\n }\r\n return $backgroundImage;\r\n }", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "function cjpopups_current_url($only_url = null, $port = null){\n\t$pageURL = (is_ssl()) ? \"https://\" : \"http://\";\n\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\tif(is_null($port)){\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n\t\t}else{\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n\t\t}\n\t} else {\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n\t}\n\tif(is_null($only_url)){\n\t\treturn $pageURL;\n\t}else{\n\t\t$url = explode('?', $pageURL);\n\t\treturn $url[0];\n\t}\n}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getUrl()\n {\n return $this->getProperty()->url;\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function _theme_url() {\n\t\treturn $this->EE->elements->_theme_url();\n\t}", "function get_url()\n {\n }", "function getScriptUrl() ;", "function featuredURL($size = 'full'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo $url;\n}", "function featuredURL($size = 'full'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo $url;\n}", "public function getExternalUpdateProfileUrl();", "function extra_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color ) {\n\t\treturn;\n\t}\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $_repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) {\n\t\t\t$_repeat = 'repeat';\n\t\t}\n\n\t\t$repeat = \" background-repeat: $_repeat;\";\n\n\t\tif ( 'no-repeat' == $_repeat ) {\n\t\t\t$repeat .= \" background-size: cover;\";\n\t\t}\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) {\n\t\t\t$position = 'left';\n\t\t}\n\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) {\n\t\t\t$attachment = 'scroll';\n\t\t}\n\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"extra-custom-background-css\">\nbody.custom-background { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "public function getUrl()\n {\n if (array_key_exists(\"url\", $this->_propDict)) {\n return $this->_propDict[\"url\"];\n } else {\n return null;\n }\n }", "function cjpopups_callback_url($callback = null){\n\t$text_domain = cjpopups_item_info('text_domain');\n\t$callback = (isset($_GET['callback']) && is_null($callback)) ? $_GET['callback'] : $callback;\n\tif(!is_null($callback)){\n\t\treturn admin_url('admin.php?page=').cjpopups_item_info('page_slug').'&callback='.$callback;\n\t}else{\n\t\treturn admin_url('admin.php?page=').cjpopups_item_info('page_slug');\n\t}\n}", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'height:'.$image[2].'px':'') : $image[0];\n }\n}", "function bgimg($img){\n\treturn \"background: url('\".$img.\"'); background-size: cover; background-position: 0 50%;\";\n}", "public function get_url();", "function timeless_backstretch_js() {\n\t//* or if it is the homepage and background video is enabled in customizer\n\tif ( ! is_home() && equity_get_custom_field( '_equity_disable_single_post_background' ) == true )\n\t\treturn;\n\n\t$background_url = equity_get_custom_field( '_equity_single_post_background' );\n\n\t// use default if no background image set\n\tif ( ! $background_url || is_home() && 'image' === get_theme_mod( 'homepage_background_option', 'image' ) ) {\n\t\t$background_url = get_theme_mod( 'default_background_image', get_stylesheet_directory_uri() . '/images/bkg-default.jpg' );\n\t}\n\t?>\n\t\n\t<script>jQuery.backstretch(\"<?php echo $background_url; ?>\");</script>\n\t<?php\n}", "static public function getImageURL() {\n\t\treturn self::$image_url;\n\t}", "protected function _getLogoUrl() {\n return ($this->_getFromConfig('pop_up_logo')) ? $this->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'), array(\"_area\" => \"frontend\")) : \"\";\n }", "function myUrl($atts, $content = null) {\n extract(shortcode_atts(array(\n \"gallery\" => 'http://'\n ), $atts));\n return '<a href=\"'.$gallery.'\" class=\"popup_mediacenter\" target=\"popup_mediacenter\"><img src=\"http://seattletimes.nwsource.com/art/ui/Photograph_link.gif\" width=\"15\" height=\"11\" class=\"icon\">'.$content.'</a>';\n}", "public function getJavascriptUrl()\n {\n return $this->_getField(self::$JAVASCRIPT_URL);\n }", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "protected function getPluginUrl()\n {\n $filename = 'jquery.colorbox.js';\n \n if ($this->isProduction()) {\n $filename = 'jquery.colorbox-min.js';\n }\n\n return $this->getLocationUrl() . '/jquery-colorbox/' . $filename;\n }", "function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }", "function getDeleteAvatarUrl() {\n \treturn assemble_url('people_company_user_delete_avatar', array(\n \t 'company_id' => $this->getCompanyId(),\n \t 'user_id' => $this->getId(),\n \t));\n }", "public function backdropPath()\n {\n \treturn $this->defaultBackdropPath;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "static public function getCurrentImageURL() {\n\t\tif (self::checkSSL()) {\n\t\t\treturn self::getSecureImageURL();\n\t\t} else {\n\t\t\treturn self::getImageURL();\n\t\t}\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'min-height:'.$image[2].'px':'') : $image[0];\n }\n}", "public function get_attached_page_url() {\n\t\t$required_pages_creator = new Required_Pages();\n\t\t\n\t\treturn get_permalink( $required_pages_creator->get_page_id_by_shortcode( $this->get_shortcode_name() ) );\n\t}", "public function getURL() {\n\t\treturn $this->selectedEndpoint['url'];\t\n\t}", "public function get_embed_url() {\n\t\treturn $this->get_meta( 'embed_url' );\n\t}", "public function getPreviewImageUrlUnwrapped()\n {\n return $this->readWrapperValue(\"preview_image_url\");\n }" ]
[ "0.7662499", "0.65181", "0.63692915", "0.62914294", "0.60900795", "0.5884704", "0.58233964", "0.57780117", "0.5726911", "0.5686214", "0.5676823", "0.5669619", "0.56365454", "0.55923164", "0.5589073", "0.55470103", "0.55421066", "0.54672974", "0.5455209", "0.5407353", "0.53895384", "0.5376368", "0.5364553", "0.53601545", "0.53571844", "0.5354042", "0.5348791", "0.534041", "0.5323523", "0.5314655", "0.530087", "0.52994496", "0.5291672", "0.5290685", "0.5289806", "0.5289636", "0.52816164", "0.5274154", "0.52494997", "0.5244466", "0.5241641", "0.5240757", "0.52363205", "0.52358335", "0.5235478", "0.52268565", "0.5219123", "0.5205172", "0.52048665", "0.52027893", "0.51948595", "0.5192195", "0.5191251", "0.51878697", "0.5187739", "0.51854944", "0.5185298", "0.5180109", "0.5180109", "0.51754105", "0.51723653", "0.51715815", "0.51690483", "0.5167792", "0.51599973", "0.51555926", "0.51502013", "0.51502013", "0.5148454", "0.5147878", "0.5145222", "0.51444477", "0.5141232", "0.51401824", "0.51392496", "0.513296", "0.5131629", "0.5111392", "0.51080406", "0.51062334", "0.51037353", "0.509966", "0.50833344", "0.50819963", "0.5078642", "0.50769335", "0.5074222", "0.5074222", "0.5074222", "0.5074222", "0.5074222", "0.50734526", "0.50702065", "0.50702065", "0.50702065", "0.5068441", "0.5066183", "0.5065901", "0.5055332", "0.50514466" ]
0.72030306
1
Get popup static block id
public function getStaticBlockId(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_STATIC_BLOCK,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ID()\n {\n return $this->blockId;\n }", "public function getBlockId($name='')\n\t{\n\t\tif (!$name)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$this->_db->setQuery( \"SELECT id FROM $this->_tbl WHERE block=\" . $this->_db->quote($name) . \" LIMIT 1\" );\n\t\treturn $this->_db->loadResult();\n\t}", "function fetchId($name)\n {\n //return $this->_parent->_name.'-'.\"popup-$name[1]\";\n return $this->_parent->getName().'-'.\"popup-$name[1]\";\n }", "protected function actionGetPrimaryKey()\n {\n return $this->_static_block->getPrimaryKey();\n }", "public function getIblockId()\n {\n return $this->iblockId;\n }", "protected function blockPluginId() {\n return '';\n }", "function getHtmlId(){\n\t\t//this to have unique ID attribute of the main containing div in case there is more \n\t\t//than 1 of the same action box. Cache key is composed of $_htmlUniqueId prefix and \n\t\t//ID of the action box.\n\t\t$actionBoxId = $this->getId();\n\t\t\n\t\t$htmlUniqueId = wp_cache_get( $this->_html_UniqueId . $actionBoxId );\n\t\tif( false === $htmlUniqueId ){\n\t\t\t//this is the first\n\t\t\t$htmlUniqueId = 1;\n\t\t\twp_cache_set( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t} else {\n\t\t\t//another box is already displayed\n\t\t\t$htmlUniqueId++;\n\t\t\twp_cache_replace( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t}\n\t\t\n\t\treturn $actionBoxId.$htmlUniqueId;\n\t}", "public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR />&nbsp;<BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }", "public static function getMaximumId()\n\t{\n\t\treturn (int) BackendModel::getDB()->getVar('SELECT MAX(i.id) FROM content_blocks AS i LIMIT 1');\n\t}", "public function edite_static_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_edite_static_block();\r\n return $this->module_no_permission();\r\n\t}", "public function getPopup() {}", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function get_site_id()\n {\n }", "public function get_site_id()\n {\n }", "function get_block_template($id, $template_type = 'wp_template')\n {\n }", "public function getAjaxID() {}", "function get_block_id ($gid1, $gid2) {\n $values_gid1 = array(\n 'subject_id' => $gid1,\n 'type_id' => array (\n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid1 = chado_select_record(\n 'feature_relationship', \n array('object_id'),\n $values_gid1\n );\n\n $values_gid2 = array(\n 'subject_id' => $gid2,\n 'type_id' => array ( \n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid2 = chado_select_record(\n 'feature_relationship', \n array('object_id'), \n $values_gid2\n );\n\n // locate the block id shard by gid1 and gid2 \n $blk_html = '';\n foreach ($blk_region_gid1 as $blk1) {\n foreach ($blk_region_gid2 as $blk2) { \n // search block id shared by gid 1 and gid2\n $bid = db_query('SELECT blockid FROM {synblock} WHERE (b2=:blk1 AND b1=:blk2) OR (b1=:blk1 AND b2=:blk2)', \n\t\t\t array(\n ':blk1' => $blk1->object_id,\n ':blk2' => $blk2->object_id,\n\t\t\t )\n\t\t )->fetchField();\n $blk_html.= l($bid, \"synview/block/\" . $bid, array('attributes' => array('target' => \"_blank\")));\n }\n }\n\n if (empty($blk_html)) {\n $blk_html = 'NA';\n }\n\n\n return $blk_html; \n}", "public static function getSiteId(){\n return 1;\n\n }", "public function getFormId() {\n return 'sayhello_block_form';\n }", "public static function getTemplateBlock()\n {\n return self::$templateBlock;\n }", "function vcex_get_block_editor_script_src( $block = '' ) {\n\treturn TTC_PLUGIN_DIR_URL . 'inc/vcex/blocks/' . $block . '/vcex-' . $block . '-block.js';\n}", "public function getAutoBlockTitle()\n\t{\n\t\tglobal $lng;\n\n\t\treturn $lng->txt(\"survey_auto_block_title\");\n\t}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getSiteId();", "public function getPublicBlock() {\n return '';\n }", "function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}", "public function getOriginalBlock()\n {\n $data = $this->_coreRegistry->registry('magictoolbox');\n return is_null($data) ? null : $data['blocks']['product.info.media.image'];\n }", "function get_block_file_template($id, $template_type = 'wp_template')\n {\n }", "public function getGuestTemplateId()\n {\n return $this->getTemplateId();\n }", "function get_the_block_template_html()\n {\n }", "public static function getActualId()\n {\n if (self::$context->getName() == 'citation'\n && self::getCitationItem()!== false) {\n return self::getCitationItem()->get('id');\n }\n\n return self::getData()->getVariable('id');\n }", "public static function id(){\n return self::info('id');\n }", "private function getCurrentWebsiteId()\n {\n return $this->storeManager->getWebsite()->getId();\n }", "public function getTaskIdBlock()\n {\n return $this->task_id_block;\n }", "public function getPopupContent();", "public function onclick_btn_delete_static_block($e){\r\n\t\tif($this->has_admin_panel()) return $this->module_onclick_btn_delete_static_block($e);\r\n\t\treturn $this->msg->modal_no_permission($e);\r\n\t}", "function the_ID()\n {\n }", "public function getVisualId()\n {\n return $this->getId();\n }", "public function main() {\n return $this->id;\n }", "public function main() {\n return $this->id;\n }", "public function Admin_Action_ShowBlockForm() {\n $ssf = new SendStudio_Functions ( );\n $action = 'new';\n $GLOBALS ['blockid'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? $_GET ['id'] : md5(rand ( 1, 100000000 ));\n $GLOBALS ['tagid'] = (isset ( $_GET ['tagId'] ) && $_GET ['tagId'] > 0) ? $_GET ['tagId'] : 0;\n $GLOBALS ['blockaction'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? 'edit' : 'new';\n $GLOBALS ['BlockEditor'] = $ssf->GetHTMLEditor ( '', false, 'blockcontent', 'exact', 260, 630 );\n $GLOBALS ['CustomDatepickerUI'] = $this->template_system->ParseTemplate('UI.DatePicker.Custom_IEM', true);\n $this->template_system->ParseTemplate ( 'dynamiccontentblocks_form' );\n }", "private function getContentBlockName()\n\t{\n\t\tif ($this->test->getKioskMode())\n\t\t{\n\t\t\t$this->tpl->setBodyClass(\"kiosk\");\n\t\t\t$this->tpl->setAddFooter(FALSE);\n\t\t\treturn \"CONTENT\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"ADM_CONTENT\";\n\t\t}\n\t}", "protected function getToggleId()\n {\n $unique = md5(uniqid());\n return \"sidenav_$unique\";\n }", "protected function getCurrentPageIdFromRootTemplate() {}", "public static function getCurLocationID()\n {\n return Yii::app()->getsetSession->getLocationId();\n }", "function get_dynamic_block_names()\n {\n }", "public static function getID() {\r\n return 1;\r\n }", "public function getId()\n\t{\n\t\treturn $this->get('templateid');\n\t}", "public static function getID()\n {\n return self::getInstance()->_getID();\n }", "public function get_id() {\n\t\treturn self::MODULE_ID;\n\t}", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }", "public function getId()\n\t{\n\t\treturn $this->_themeExtras['id'];\n\t}", "public static function id()\n {\n return 1;\n }", "function get_the_ID()\n {\n }", "public function fetch_the_id() {}", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "public function getGathercontentTemplateId();", "function get_header_image_id( $block ) {\n\n\tif ( 'acf/header' !== $block['blockName'] ) {\n\t\treturn null;\n\t}\n\n\tif ( ! empty( $block['attrs']['data']['image'] ) && isset( $block['attrs']['data']['image'] ) ) {\n\t\treturn $block['attrs']['data']['image'];\n\t}\n\n\treturn null;\n}", "function ID($id)\n {\n if (false !== $ctrl = \\ClickBlocks\\MVC\\Page::$current->view->get($id)) return $ctrl->attr('id');\n }", "public function getHtmlId() {\n return Html::getId('draggableviews-table-' . $this->view->id() . '-' . $this->view->current_display);\n }", "public static function getHolderID();", "public function getTemplateId()\n\t{\n\t\treturn $this->template_id;\n\t}", "public function getIdentifier()\n {\n $configID = $this->get_config() ? $this->get_config()->ID : 1;\n return ucfirst($this->get_mode()) . \"Site\" . $configID;\n }", "public function get_id() {\n return 'remote';\n }", "public function get_theme_custom_block_dir()\n {\n return get_stylesheet_directory() .\n \"/\" .\n $this->get_config()->get(\"componentBlocksLocation\") .\n \"layout/\" .\n $this->get_ID();\n }", "public function get_site_id()\n {\n if ( ! $this->_site_id)\n {\n $this->_site_id = intval($this->EE->config->item('site_id'));\n }\n\n return $this->_site_id;\n }", "function getBlock()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('app_name', \t$_SESSION['customization']['applications']['app_name'], 'sqlsafe');\n\t\t$args->set('block_id', \tNOTSET, 'sqlsafe');\n\t\t$args = $args->get(func_get_args());\n\t\t$GLOBALS['appshore_data']['server']['xml_render'] = true;\t\n\t\t\n\t\tif( $args['block_id'] )\n\t\t\t$result['customization'] = getManyAssocArrays('select * from db_blocks where app_name = \"'.$args['app_name'].\n\t\t\t\t'\" and block_id = \"'.$args['block_id'].'\"');\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$result['return'] = 'success';\n\t\t$result['message'] = '';\n \t\treturn $result;\n }", "public static function id()\n {\n return self::$id;\n }", "protected function getWidgetId()\n {\n return !empty($_GET['wid']) ? $_GET['wid'] : 'rrf';\n }", "public function getLiveId() {}", "public function getId() {\n return ($this->isInit()) ? $this->id : null;\n }", "public function id()\n\t{\n\t\treturn $this->SqueezePlyrID ;\n\t}", "public function get_module_id()\n {\n return C__MODULE__DIALOG_ADMIN;\n }", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "function wp_get_first_block($blocks, $block_name)\n {\n }", "public function getHashtag()\n {\n return $this->partials['fragment'];\n }", "function initPageId()\n {\n $global=Frd::getGlobal();\n\n if(isset($_REQUEST['signed_request']))\n {\n $global->page_id=get_page_id();\n return $global->page_id;\n }\n\n return false;\n }", "public function getClickwrapId() {\n return @$this->attributes['clickwrap_id'];\n }", "public function getElementId() {\n $id = $this->getDivId();\n return $id;\n }", "public function getTriggerId(): string\n {\n return $this->attributes->get('trigger_id', '');\n }", "public function add_static_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_add_static_block();\r\n return $this->module_no_permission();\r\n\t}", "public function getBlock()\n {\n return $this->block;\n }", "public function getSocialUniqueClick()\n\t{\n\t\tif (isset($this->socialUniqueClick)) {\n\n\t\t\treturn $this->socialUniqueClick;\n\t\t}\n\n\t\treturn 0;\n\t}", "protected static function getRebuildBlockMarkContent()\n {\n return static::getKey() ?: '_';\n }", "public function getIdentifier()\n {\n return $this->getParam('flowIdentifier');\n }", "public function getCurStageId()\n {\n return $this->get(self::_CUR_STAGE_ID);\n }", "function getSiteId()\n {\n return $this->_props['SiteId'];\n }", "public function edite_block(){\r\n\t\tif($this->has_admin_panel()){\r\n if(isset($_GET['id'])) return $this->module_edite_block($_GET['id']);\r\n //access denied\r\n return $this->module_no_permission();\r\n }\r\n\t\treturn core\\router::jump_page(404);\t\r\n\t}", "public static function id ()\n {\n return self::user()->getId();\n }", "function getFirstMessageBlock(){\n global $mysqli;\n $results = $mysqli->query(\"SELECT block_index FROM messages ORDER BY message_index ASC LIMIT 1\");\n if($results){\n $row = $results->fetch_assoc();\n return $row['block_index'];\n }\n}", "public function getTemplateId() : string {\n return $this->templateId;\n }", "public function get_id();", "public function get_id();", "public function getWebhookId()\n {\n return Mage::getStoreConfig('trello_api/webhook/id');\n }", "public static function id()\n {\n if (!ServerHelper::coroutineIsEnabled()) {\n return 0;\n }\n\n return SwCoroutine::getuid();\n }", "public function getPluginId();", "protected static function getAjaxId()\n\t{\n\t\treturn preg_replace('/.*_([0-9a-zA-Z]+)$/', '$1', self::getPost('id'));\n\t}", "function getID();" ]
[ "0.6915995", "0.6216904", "0.6204871", "0.60660446", "0.6021487", "0.60035217", "0.5912662", "0.58703965", "0.5808187", "0.5794352", "0.57913446", "0.57251763", "0.5600986", "0.5600986", "0.5586825", "0.5564948", "0.5546049", "0.55442536", "0.554154", "0.5524439", "0.5505612", "0.550064", "0.5496692", "0.54647845", "0.5453472", "0.54461634", "0.54446536", "0.5436763", "0.5402306", "0.54000247", "0.5396142", "0.5387699", "0.5369013", "0.5354517", "0.53528094", "0.53494084", "0.53447825", "0.53431505", "0.5341349", "0.5341349", "0.53389746", "0.5328388", "0.5327231", "0.5312801", "0.5310423", "0.52971196", "0.52966493", "0.5290196", "0.5282252", "0.5280351", "0.5277847", "0.52622014", "0.5257661", "0.52506304", "0.5245631", "0.52350694", "0.5230583", "0.5230394", "0.52303016", "0.52154344", "0.52066135", "0.52037597", "0.5200268", "0.5200215", "0.51959157", "0.5187122", "0.5183605", "0.51808035", "0.5179967", "0.5179756", "0.5174495", "0.51743287", "0.51732266", "0.51677346", "0.5165108", "0.5165108", "0.51638836", "0.5158267", "0.51415914", "0.5138824", "0.5133614", "0.5112973", "0.51109314", "0.5109424", "0.51078296", "0.5093026", "0.509297", "0.50915575", "0.5089429", "0.50879484", "0.5086729", "0.5080655", "0.5076217", "0.5074563", "0.5074563", "0.5069678", "0.5065974", "0.50638765", "0.5055942", "0.5052582" ]
0.8631903
0
Get popup cookie time
public function getCookieTime(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_COOKIE_TIME,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLastTime(){\n\t \t if (!empty($_COOKIE['lastVisit'])) {\n\t\techo \"你上次登陆的时间是:\".$_COOKIE['lastVisit'];\n\t}else{\n\t\techo \"你是第一次登陆\";\n\t}\n\t\tsetCookie(\"lastVisit\",date(\"Y-m-d : H:i:s\"),time()+24*3600*30);\n }", "private static function cookieLifetime()\n {\n return time() + (self::ACCESS_TOKEN_EXPIRES_DAYS * 24 * 60 * 60);\n }", "public function get_cookie_life() {\n\n\t\t\t$life = get_option( 'wc_sc_coupon_cookie_life', 180 );\n\n\t\t\treturn apply_filters( 'wc_sc_coupon_cookie_life', time() + ( 60 * 60 * 24 * $life ) );\n\n\t\t}", "public function getSessionTime(){\n return $this->_session->get('time');\n }", "function _tsuiseki_tracking_get_expiration_time() {\n return (time() + TSUISEKI_TRACKER_COOKIE_TIMEOUT);\n}", "public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }", "private function get_cookie_expiration_time()\n {\n $session = $this->getSession();\n if( !is_array($session) ) \n { \n return false;\n }\n else\n {\n return $session['expires'];\n }\n }", "public static function getCookiePersistentSecs () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n // ten years\n $cookie_time = 3600 * 24 * 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = 3600 * 24 * $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "private function getSessionTimestamp()\n {\n if ($this->_phpsession && isset($_SESSION[$this->_sessionName]->SessionID))\n $timestamp = $_SESSION[$this->_sessionName]->SessionID;\n\n\n if ($this->_cookie && isset($_COOKIE[$this->_sessionName . \"_Timestamp\"]))\n $timestamp = $_COOKIE[$this->_sessionName . \"_Timestamp\"];\n\n return $timestamp;\n }", "public function lastLogoutTime();", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function logged_in_since() {\n if (isset($_COOKIE[\"login_time\"])) {\n ?>\n\n <em>(logged in since <?= $_COOKIE[\"login_time\"] ?>)</em>\n\n <?php\n }\n }", "public function currentCookieInfo() {\n if ($this->isLoggedIn()) {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n return $this->cookieInfo($auth_cookie);\n }\n }", "public function getShowTime()\n\t{\n\t\treturn $this->showtime;\n\t}", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "static public function getSessionTime(){\n if (!isset($_SESSION['start_time'])){\n return 0;\n } else {\n return time() - $_SESSION['start_time'];\n }\n }", "function cjpopups_time_ago($ptime){\n $etime = time() - $ptime;\n if ($etime < 1){\n return __('Just now', 'cjpopups');\n }\n $a = array(\n \t12 * 30 * 24 * 60 * 60 => 'year',\n\t\t30 * 24 * 60 * 60 => 'month',\n\t\t24 * 60 * 60 => 'day',\n\t\t60 * 60 => 'hour',\n\t\t60 => 'minute',\n\t\t1 => 'second',\n );\n $singular = array(\n \t'year' => __('year', 'cjpopups'),\n\t\t'month' => __('month', 'cjpopups'),\n\t\t'day' => __('day', 'cjpopups'),\n\t\t'hour' => __('hour', 'cjpopups'),\n\t\t'minute' => __('minute', 'cjpopups'),\n\t\t'second' => __('second', 'cjpopups'),\n );\n $plurals = array(\n \t'year' => __('years', 'cjpopups'),\n\t\t'month' => __('months', 'cjpopups'),\n\t\t'day' => __('days', 'cjpopups'),\n\t\t'hour' => __('hours', 'cjpopups'),\n\t\t'minute' => __('minutes', 'cjpopups'),\n\t\t'second' => __('seconds', 'cjpopups'),\n );\n foreach ($a as $secs => $str){\n $d = $etime / $secs;\n if ($d >= 1){\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $plurals[$str] : $singular[$str]) .' '. __('ago', 'cjpopups');\n }\n }\n}", "public function getExpirationTime() {\n return $this->sessionData[\"expire\"];\n }", "public function getExpirationTime() {\n return $this->shareData[\"expire\"];\n }", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "public function lastLoginTime();", "public static function getCookiePersistentDays () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n $cookie_time = 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "function gmt_time() {\r\n\t\t$now = time ();\r\n\t\t$tz = $this->gmt_timezone ();\r\n\t\t$seconds = 3600 * $tz;\r\n\t\treturn $now - $seconds;\r\n\t}", "public function getshowTime()\n {\n return $this->showtime;\n }", "public static function get_expire_time_otp()\n {\n return apply_filters('wordpress_acl_otp_time_expire', (MINUTE_IN_SECONDS * 5));\n }", "public function getExpireTime()\n {\n return $this->expire_time;\n }", "function getHtmlTime(){\r\n\treturn('P&aacute;gina generada en <b>'.(time() - $_SERVER['REQUEST_TIME']) .'</b> segundos');\r\n}", "public function getCookTime()\r\n {\r\n return $this->_cook_time;\r\n }", "function getLifeTime();", "public function redirecttime() {\n return $this->info['redirect_time'];\n }", "public function toCookieString()\n {\n return $this->format(\\DateTime::COOKIE);\n }", "function get_cookie_days()\n{\n global $SITE_INFO;\n return array_key_exists('cookie_days', $SITE_INFO) ? intval($SITE_INFO['cookie_days']) : 120;\n}", "protected function getTimeLastSaved()\n {\n return SiteConfig::current_site_config()->VimeoFeed_LastSaved;\n }", "public function getExpireTime()\n {\n return $this->expireTime;\n }", "public function getExpireTime()\r\n {\r\n return $this->expireTime;\r\n }", "public function getCredentialsExpireAt()\r\n {\r\n return $this->credentials_expire_at;\r\n }", "public function getCookie()\n {\n return $this->cookie;\n }", "public function getExpiresIn();", "public function getCookie() {\n return $this->cookie;\n }", "public function get_expires() {\n\t\treturn $this->expires;\n\t}", "public function getCookie()\n {\n return $this->getHeaders()->get('Cookie');\n }", "function wpgplus_get_cookie($name) {\n\t$my_cookie = get_transient('wpgplus_cookie_'. $name);\n\t// wpgplus_debug(\"\\nCookie is \" . print_r($my_cookie,true) . \"\\n\");\n\t// Cookies which have an expiration date and it is passed should not be returned\n\tif(!$my_cookie || ((!empty($my_cookie->expires)) && ($my_cookie->expires < time()))) {\n\t\t//wpgplus_debug(\"\\nNo cookies found for \". $name . \"\\n\");\n\t\treturn false;\n\t} else {\n\t\t//wpgplus_debug(\"\\nGetting cookie for \". $my_cookie->name . \"\\n\");\n\t\treturn $my_cookie;\n\t}\n}", "static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}", "function get_now_hour(){\n if($this->nowHour == \"nc\");\n $this->nowHour = $this->_getNowValues( \"1 hours\");\n return round($this->nowHour * 0.001,3);\n }", "public function getAuthTime()\n {\n return $this->authTime;\n }", "public function cookieValue() {\n return $this->cookie;\n }", "public function cookieValue() {\n\t\treturn $this->cookie;\n\t}", "function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "function getCurrentTime()\n\t\t{\n\t\t\t$time = date('h:i:s a');\n\t\t\treturn $time;\n\t\t}", "public function getPopup() {}", "public function GetSessionExpirationSeconds ();", "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "public function getCredentialsExpireAt()\n {\n return $this->credentialsExpireAt;\n }", "public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}", "public function getTimeExpiry()\n {\n return $this->timeExpiry;\n }", "public function getLastCheckedtime()\n {\n\t\treturn $this->_getSess('checktime');\n }", "public function getExpirationTime()\n {\n return $this->_expiration_time;\n }", "public function GetCurrentTime(){\n\t\treturn date('y-m-d H:i:s', time());\n\t}", "function reply_time() {\n\tglobal $reply;\n\treturn $reply['time'];\n}", "public static function popMessage() {\n if (isset($_COOKIE[self::$_name])) {\n $message = unserialize($_COOKIE[self::$_name]);\n setcookie(self::$_name, \"\", time() - self::$_time, self::$_path);\n } else {\n $message = NULL;\n }\n return $message;\n }", "public function get_time_created(){\n\t\treturn $this->time_created;\n\t}", "function wp_get_cookie_login()\n {\n }", "public function getExpire()\r\n {\r\n return $this->expire;\r\n }", "public static function now(){\n\t\treturn date('Y-m-d H:i:s', time());\n\t}", "function get_timecreated() {\n return $this->timecreated;\n }", "public function getExpire()\n {\n return $this->_expire;\n }", "protected function getTime()\n {\n return time();\n }", "public static function getSystemCookie (){\n if (isset($_COOKIE['system_cookie'])){\n return $_COOKIE['system_cookie'];\n } else {\n return false;\n }\n }", "public static function GMNow()\n {\n return gmdate('Y-m-d H:i:s');\n }", "protected function _getCacheLifetime()\n\t{\n\t\treturn Mage::helper('bcp')->getAdvancedConfig('html_page_cache_time');\n\t}", "public function getExpire()\n {\n return $this->expire;\n }", "public function getExpire()\n {\n return $this->expire;\n }", "public function getExpire()\n {\n return $this->expire;\n }", "public function getLifetime()\n {\n\t\treturn $this->_getSess('lifetime');\n }", "public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}", "public function getExpirationTime()\n {\n return $this->expiration_time;\n }", "public function getExpirationTime()\n {\n return $this->expiration_time;\n }", "private function get_nonce () {\n return @$_COOKIE['sso_nonce'];\n }", "public function connecttime() {\n return $this->info['connect_time'];\n }", "public function getSpotifyExpiresIn()\n {\n return $this->spotifyExpiresIn;\n }", "function getjsOnTimer() {return $this->_jsontimer;}", "public function getCurrentTime() {\n $timestamp = $this->getInfo();\n $http_code = $timestamp->code;\n $current_time = 'Time not set yet';\n if ($http_code == 200) {\n $current_time = date('H:i', $timestamp->data->date->timestamp);\n }\n return $current_time;\n }", "public function getExpiresIn()\n {\n return $this->expiresIn;\n }", "public static function getCookieName() {}", "public static function getCookieName() {}", "function time_session(){\n $_SESSION['time'] = time();\n }", "public function getAuthCaptureTimestamp()\n {\n return $this->auth_capture_timestamp;\n }", "function time_now() {\n return date(\"H:i:s\");\n}", "public function getExpiresAt()\r\n {\r\n return $this->expires_at;\r\n }", "function getAuthTimestamp()\n {\n \treturn $this->_authTimestamp;\n }", "public function setUpCookie() {\n\t\t if (ini_get(\"session.use_cookies\")) {\n\t\t \t$this->time=time()+$this->prp['lifetime'];\n\t\t\t$t=new DateTime();\n\t\t\t$t->setTimestamp($this->time);\n\t\t\t$f=$t->format('c');\n\t\t\t$this->trz[]=\"Expire at {$f}\";\n\t\t\t$params= session_get_cookie_params();\n\t\t\tforeach($this->prp['params'] as $p=>$v) $params[$p]=$v;\n\t\t\tif(0) singleton::show($params,\"Cookie params before set:\");\n\t\t\t // This set the cookie for the next call\n setcookie(session_name(), session_id(),\n \t\t$this->time,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\t\telse die( 'session cookies disabled');\n\t}", "function my_custom_popup_scripts() { ?>\n <script type=\"text/javascript\">\n (function ($, document, undefined) {\n\n $('#pum-123')\n .on('pumAfterOpen', function () {\n var $popup = $(this);\n setTimeout(function () {\n $popup.popmake('close');\n }, 10000); // 10 Seconds\n });\n\n }(jQuery, document))\n </script><?php\n}", "public function get_time() {\n return $this->_time;\n }", "public function getCookieName()\n {\n return Mage::helper('fastlycdn')->generateCookieName(\n Fastly_CDN_Model_Esi_Tag_Reports_Product_Viewed::COOKIE_NAME\n );\n }", "public function getCookieVariables();", "public static function logout() {\n\t\tif (isset($_COOKIE['sm_constitid'])) {\n\t\t\tsetrawcookie('sm_constitid', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['ERIGHTS'])) {\n\t\t\tsetrawcookie('ERIGHTS', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['JSESSIONID'])) {\n\t\t\tsetrawcookie('JSESSIONID', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['emeta_id'])) {\n\t\t\tsetrawcookie('emeta_id', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['first_name'])) {\n\t\t\tsetrawcookie('first_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['last_name'])) {\n\t\t\tsetrawcookie('last_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['is_org'])) {\n\t\t\tsetrawcookie('is_org', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['email'])) {\n\t\t\tsetrawcookie('email', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['status'])) {\n\t\t\tsetrawcookie('status', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\t\texit;\n\t}" ]
[ "0.6724043", "0.6605812", "0.6433711", "0.64166373", "0.6311801", "0.6257696", "0.6249962", "0.622519", "0.6133038", "0.6073651", "0.6008927", "0.6008927", "0.60028315", "0.5937981", "0.5823877", "0.58137786", "0.58137786", "0.58137786", "0.58137786", "0.5795732", "0.5792176", "0.5748114", "0.57443696", "0.5732915", "0.5731286", "0.57308114", "0.5711119", "0.5681686", "0.56664735", "0.5642632", "0.5603911", "0.5603833", "0.56023186", "0.55927694", "0.55823493", "0.55636525", "0.55346566", "0.5521868", "0.5520136", "0.5505887", "0.546045", "0.54535455", "0.54478395", "0.5440128", "0.54399526", "0.5438816", "0.54286313", "0.54283506", "0.542716", "0.54219395", "0.5414872", "0.5405967", "0.54050654", "0.5398966", "0.5353271", "0.532632", "0.5325565", "0.53197056", "0.5315315", "0.5313346", "0.5304459", "0.53027064", "0.53021675", "0.5301284", "0.52968395", "0.5296707", "0.5286029", "0.5285049", "0.52849287", "0.5283613", "0.5280407", "0.5272578", "0.5269594", "0.5263928", "0.52605283", "0.52605283", "0.52605283", "0.52552706", "0.52521086", "0.52466166", "0.52466166", "0.52447104", "0.5236571", "0.5236174", "0.5231468", "0.52283317", "0.5222958", "0.52226055", "0.522175", "0.52178514", "0.52104545", "0.5210102", "0.52041423", "0.5199807", "0.5197523", "0.51966304", "0.5190281", "0.51875234", "0.5183525", "0.5182825" ]
0.8568498
0
Run the database seeds.
public function run() { foreach ($this->branches as $role){ DB::table('dance_branches')->insert([ 'company_id' => FirstCompanySeeder::COMPANY_ID, 'uid' => md5(microtime()), 'name' => $role[0], 'address' => $role[1], 'active' => true ]); } }
{ "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
Display a listing of the resource.
public function index() { $allproduct=Product::orderBy('weightage', 'desc')->paginate(10); return view('admin.product.index')->with('allproduct', $allproduct); }
{ "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 {\n $modules = Module::all();\n return Resource::collection($modules);\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 // 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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\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 index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\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 $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 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 $this->indexPage('list-product', 'List Product');\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\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 return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "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}", "public function _index(){\n\t $this->_list();\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 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 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 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 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 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 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 $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002", "0.6801792", "0.6796645", "0.67952746", "0.678579", "0.6760132", "0.6741144", "0.67304057", "0.6726034", "0.6723304", "0.6723304", "0.6723304", "0.67188966", "0.67061126", "0.67046595", "0.67042124", "0.6664004", "0.6663109", "0.66603667", "0.66595376", "0.6656908", "0.66536283", "0.6648508", "0.6619696", "0.66191936", "0.66145146", "0.66056865", "0.6600895", "0.66007215", "0.6593214", "0.6587006", "0.6585572", "0.6584028", "0.65802413", "0.65751636", "0.6574276", "0.6572553", "0.65703243", "0.6569474", "0.6563628", "0.6563418", "0.65516967", "0.655156", "0.65460885", "0.65367365", "0.6533626", "0.6533064", "0.6527408", "0.65251255", "0.6524834", "0.65202224", "0.6517302", "0.65167385", "0.6516062", "0.65148616", "0.6506742", "0.65018", "0.6501768", "0.6494415", "0.64921784", "0.6486631", "0.6485237", "0.6484199", "0.64841217", "0.6479556", "0.6478558", "0.6469807", "0.646858", "0.64683306", "0.6466808", "0.64637285", "0.64616066", "0.6458575", "0.6457558", "0.64535207", "0.64534074", "0.64524984", "0.64491946", "0.6448726", "0.6447211", "0.64461327" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $specheads = SpecificationHeader::all(); $attributes = Attribute::all(); // $selectedSpec = User::first()->role_id; return view('admin.product.create',compact('specheads', 'attributes')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n {\n return view('url.form');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "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 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 $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(\"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\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "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 {\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.75936973", "0.75936973", "0.7585464", "0.7576766", "0.7571166", "0.7498768", "0.7434969", "0.7432511", "0.7387868", "0.7351811", "0.7336364", "0.73113805", "0.7293885", "0.72812635", "0.7273037", "0.72410345", "0.7228987", "0.7225174", "0.718589", "0.71786976", "0.7172516", "0.71492815", "0.7143504", "0.7143484", "0.71349627", "0.71274126", "0.7122271", "0.7115064", "0.7115064", "0.7115064", "0.7110841", "0.70930386", "0.70841706", "0.7079425", "0.7079275", "0.70567256", "0.70567256", "0.7054091", "0.70386195", "0.7038531", "0.7034834", "0.7032825", "0.7029208", "0.70263356", "0.7025177", "0.7018699", "0.70156187", "0.7004536", "0.7002615", "0.7000439", "0.69960874", "0.6992934", "0.6991493", "0.6988563", "0.698635", "0.69649065", "0.6963641", "0.69552153", "0.6950279", "0.69498897", "0.69465077", "0.6943029", "0.6940043", "0.6939427", "0.69359136", "0.69359136", "0.69357383", "0.6933012", "0.6929994", "0.69270134", "0.69259113", "0.6923401", "0.6917057", "0.69144267", "0.6911519", "0.6909902", "0.690978", "0.6905855", "0.6903688", "0.6900189", "0.68999064", "0.6898482", "0.6893158", "0.6892387", "0.6891021", "0.68905854", "0.6890334", "0.6890334", "0.68871844", "0.68864834", "0.68854547", "0.6881966", "0.68814063", "0.68788683", "0.68738896", "0.6871671", "0.68716353", "0.68688464", "0.6868651", "0.68685114", "0.686829" ]
0.0
-1
Store a newly created resource in storage.
public function addcategoris($request, $productId) { if($request->category_id){ foreach ($request->category_id as $categories[]); foreach($categories as $categoryid){ if(!is_numeric($categoryid)) { $catearr=explode(" - ",$categoryid); // if(@count($catearr)==3) if(count($catearr)==3) { $firstcate=Category::where('name', $catearr[0])->first(); if($firstcate) { $secondcate=Category::where([ 'parent_id' => $firstcate->id, 'name' => $catearr[1] ])->first(); if($secondcate){ //add category table $category = new Category(); $category->parent_id=$secondcate->id; $category->name=$catearr[2]; $category->order=3; $category->slug=Str::of($catearr[2])->slug('-'); $category->save(); //add product category table $productcategory = new ProductCategory(); $productcategory->product_id=$productId; $productcategory->category_id=$category->id; $productcategory->save(); }else { $c_category = new Category(); $c_category->parent_id=$firstcate->id; $c_category->name=$catearr[1]; $c_category->order=2; $c_category->slug=Str::of($catearr[1])->slug('-'); $c_category->save(); $cc_category = new Category(); $cc_category->parent_id=$c_category->id; $cc_category->name=$catearr[2]; $cc_category->order=3; $cc_category->slug=Str::of($catearr[2])->slug('-'); $cc_category->save(); $productcategory = new ProductCategory(); $productcategory->product_id=$productId; $productcategory->category_id=$cc_category->id; $productcategory->save(); } }else{ $category = new Category(); $category->name=$catearr[0]; $category->order=1; $category->slug=Str::of($catearr[0])->slug('-'); $category->save(); $c_category = new Category(); $c_category->parent_id=$category->id; $c_category->name=$catearr[1]; $c_category->order=2; $c_category->slug=Str::of($catearr[1])->slug('-'); $c_category->save(); $cc_category = new Category(); $cc_category->parent_id=$c_category->id; $cc_category->name=$catearr[2]; $cc_category->order=3; $cc_category->slug=Str::of($catearr[2])->slug('-'); $cc_category->save(); $productcategory = new ProductCategory(); $productcategory->product_id=$productId; $productcategory->category_id=$cc_category->id; $productcategory->save(); } } }else{ $productcategory = new ProductCategory(); $productcategory->product_id=$productId; $productcategory->category_id=$categoryid; $productcategory->save(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $product = Product::findOrFail($id); $cate=$product->categories; $specheads = SpecificationHeader::all(); $attributes = Attribute::all(); $oldattrib = ProductAttribute::where('product_id', $id)->get(); return view('admin.product.edit') ->with([ 'product'=> $product, 'cate' => $cate, 'specheads' => $specheads, 'attributes' => $attributes, 'oldattrib' => $oldattrib ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\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($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function 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() {\n return view('routes::edit');\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($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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($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 editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 $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($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(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665", "0.6812782", "0.6807947", "0.68078786", "0.6803727", "0.6796845", "0.67935634", "0.67935634", "0.67894953", "0.67862976", "0.67815566", "0.6777874", "0.67700446", "0.6764179", "0.6747784", "0.6747784", "0.67476946", "0.6746584", "0.67417157", "0.67370653", "0.6727131", "0.6714694", "0.66953164", "0.6693583", "0.6690321", "0.66898996", "0.6689058", "0.66865313", "0.6684526", "0.66717213", "0.6670211", "0.6666833", "0.6666833", "0.66633433", "0.6663041", "0.6661699", "0.6658396", "0.6657984", "0.665473", "0.6644314", "0.66343915", "0.6633082", "0.6629606", "0.6629606", "0.6620677", "0.6620635", "0.66180485", "0.66171867", "0.6612161", "0.6610249", "0.660762", "0.6597593", "0.6596027", "0.6595597", "0.65925545", "0.65920216", "0.65896076", "0.65822965", "0.6581996", "0.65817595", "0.65770084", "0.65768373", "0.6575926", "0.65713066", "0.6569505", "0.656938", "0.65680295", "0.65636957", "0.65636957", "0.65624565", "0.65597314", "0.6559697", "0.65576696", "0.65573514", "0.65564495", "0.6556307", "0.655628", "0.65558994", "0.6549784", "0.6549675", "0.65461886" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->validate($request, [ 'product_name'=> 'required', 'brand'=> 'required', 'prod_desc' => 'required', 'SKU' => 'required', 'category_id' => 'required', 'price' => 'required', ]); $product = Product::findOrFail($id); $product->product_name=$request->input('product_name'); $product->slug=Str::of($request->product_name)->slug('-'); $product->brand=$request->input('brand'); $product->prod_desc=$request->input('prod_desc'); $product->SKU=$request->input('SKU'); $product->video_link=$request->input('video_link'); $product->price=$request->input('price'); if($request->input('weightage')) $product->weightage=$request->input('weightage'); else $product->weightage=1; $product->status=1; $product->save(); // edit product images $this->addimages($request, $product->id); // edit category details //delete old categories ProductCategory::where('product_id', $product->id)->delete(); $this->addcategoris($request, $product->id); // edit attribute // specification, attribute, product_attribute ProductAttribute::where('product_id', $product->id)->delete(); $this->addattributs($request, $product->id); flash('Product Updated Successfully!'); return redirect('/admin/product'); }
{ "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 deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
adds mapping for data type to orm type
public function addDataType($dataType, $ormDataType) { $this->dataTypeMapping[$dataType] = $ormDataType; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeDoctrineTypeMappings()\n {\n $this->doctrineTypeMapping = array(\n 'int' => 'integer',\n 'timestamp' => 'datetime',\n 'time' => 'datetime',\n 'date' => 'date',\n 'varchar' => 'string',\n 'char' => 'string',\n 'double' => 'float',\n 'float' => 'float',\n 'int64' => 'float',\n 'smallint' => 'integer',\n );\n }", "abstract protected function initializeMappedTypes();", "public function registerCustomTypes()\n {\n // enum\n DbalService::getSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');\n }", "private function initializeMappedTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'mappedTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array('foo' => Type::INTEGER));\n }", "protected function getTypeMapping()\n {\n return self::$mysqlTypeMap;\n }", "public function getTypeMapper();", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "public function registerColumnTypes();", "public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }", "function get_field_mapping_types() {\n return drupal_map_assoc([\n 'string',\n 'keyword',\n 'date',\n 'long',\n 'double',\n 'boolean',\n 'ip',\n 'object',\n 'nested',\n 'geo_point',\n 'geo_shape',\n 'completion',\n ]);\n}", "public function loadColumnType($name);", "public function elasticMapping($mapping)\n\t{\n\t\t$mapping[$this->name] = ['type' => $this->integer ? 'integer' : 'float'];\n\t}", "public function setType(){\n switch($this->security){\n case 'H':\n case 'L':\n case '0.0':\n $typeId = 2; // k-space\n break;\n case 'A':\n $typeId = 3; // a-space\n break;\n default:\n $typeId = 1; // w-space\n }\n\n /**\n * @var $type MapTypeModel\n */\n $type = $this->rel('typeId');\n $type->getById($typeId);\n $this->typeId = $type;\n }", "function hook_acquia_contenthub_field_type_mapping_alter(array &$mapping) {\n $mapping['my_custom_field'] = 'array<string>';\n}", "private function _transformType($dataType)\n {\n switch ($dataType) {\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BOOLEAN:\n return self::PHP_TYPE_BOOLEAN;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_INTEGER:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_SMALLINT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BIGINT:\n return self::PHP_TYPE_INTEGER;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DECIMAL:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_FLOAT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DOUBLE_PRECISION:\n return self::PHP_TYPE_FLOAT;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BLOB:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TEXT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_CHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BINARY_VARYING:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_VARCHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_ENUM:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATE:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIME:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIMESTAMP:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATETIME:\n return self::PHP_TYPE_STRING;\n\n default:\n return \"unknown ({$dataType})\";\n break;\n }\n }", "public static function getTypeMap() {\n return [\n 'charge_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'amount' => self::FIELD_INT,\n 'description' => self::FIELD_STRING,\n 'charge_date' => self::FIELD_EPOCH,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "private function _columnTypeTranslation($type) {\n $map = array(\n 'datetime' => 'timestamp',\n );\n if(!empty($map[$type])) {\n return $map[$type];\n }\n return $type;\n }", "public function getMappingEntityType();", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function setMappedEntityType($entity_type);", "public function getTypeMap()\n {\n }", "public function getDbFieldType()\n {\n }", "public function getMappedOrmType($dataType)\n {\n return $this->hasDataType($dataType)\n ? $this->dataTypeMapping[$dataType]\n : null;\n }", "public static function getTypeMap() {\n return [\n 'session_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'session_string' => self::FIELD_STRING,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public function setColumnType($column, $type)\n {\n switch($type)\n {\n case PDO::PARAM_JSON:\n $this->_columns[$column] = new DataTypes\\JSON($column);\n break;\n\n case PDO::PARAM_DATETIME:\n $this->_columns[$column] = new DataTypes\\DateTime($column);\n break;\n\n case PDO::PARAM_DATE:\n $this->_columns[$column] = new DataTypes\\Date($column);\n break;\n\n case PDO::PARAM_ARRAY:\n $this->_columns[$column] = new DataTypes\\PhpArray($column);\n break;\n\n default:\n }\n }", "private function initializeCustomTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'customTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array(Type::INTEGER));\n }", "public function getTypeDoctrine()\n {\n if (isset(self::$doctrineTypeMap[$this->getType()])) {\n return self::$doctrineTypeMap[$this->getType()];\n }\n\n // our fallback default\n return self::$doctrineTypeMap[self::TYPE_STRING];\n }", "function getTypeConverter() ;", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "protected function bootTypes()\n {\n $configTypes = config('graphql.types');\n foreach ($configTypes as $name => $type) {\n if (is_numeric($name)) {\n $this->app['graphql']->addType($type);\n } else {\n $this->app['graphql']->addType($type, $name);\n }\n }\n }", "public function getColumnType($name);", "public function getColumnType($name);", "public static function buildTableMap()\n {\n $dbMap = Propel::getDatabaseMap(BaseCastleTypePeer::DATABASE_NAME);\n if (!$dbMap->hasTable(BaseCastleTypePeer::TABLE_NAME)) {\n $dbMap->addTableObject(new \\CastleTypeTableMap());\n }\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "public function setup_types()\n {\n }", "abstract protected function defineMapping();", "function dmlChangeColumnType () {\r\n\t\t// Create connection\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t$sql = \"ALTER TABLE tbldmlmapcontent MODIFY CntField7 MEDIUMTEXT\";\r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\techo 1;\r\n\t\t} else {\r\n\t\t\techo 0;\r\n\t\t}\r\n\t\t\r\n\t\t$conn->close();\r\n\t}", "public function getMappedEntityType();", "public function mapFor()\n {\n // Here we tell Doctrine that this mapping is for the Scientist object.\n return Article::class;\n }", "public function dbFieldType()\n {\n return 'string';\n }", "public function castDataType($type)\n {\n return ApiDataType::get($type);\n }", "public function getDataWithTypeDb() {}", "protected function mapType($schema, $column)\n {\n $baseType = $schema->baseColumnType($column);\n switch ($baseType) {\n case 'uuid':\n return ['type' => 'text', 'index' => false, 'null_value' => '_null_'];\n case 'integer':\n return ['type' => 'integer', 'null_value' => pow(-2,31)];\n case 'date':\n return ['type' => 'date', 'format' => 'dateOptionalTime||basic_date||yyy-MM-dd', 'null_value' => '0001-01-01'];\n case 'datetime':\n case 'timestamp':\n return ['type' => 'date', 'format' => 'basic_t_time_no_millis||dateOptionalTime||basic_date_time||ordinal_date_time_no_millis||yyyy-MM-dd HH:mm:ss||basic_date', 'null_value' => '0001-01-01 00:00:00'];\n case 'float':\n case 'decimal':\n return ['type' => 'float', 'null_value' => pow(-2,31)];\n case 'float':\n case 'decimal':\n return ['type' => 'float', 'null_value' => pow(-2,31)];\n case 'boolean':\n return ['type' => 'boolean'];\n default:\n return [\n 'type' => 'text',\n 'fields' => [\n $column => ['type' => 'text'],\n 'raw' => ['type' => 'text', 'index' => false]\n ]\n ];\n }\n }", "public function getDataWithTypeField() {}", "function set_attributes_data_types(&$table, $attributes)\n{\n\tforeach($attributes as $key_attr => $attribute)\n\t{\n\t\t$key_attr = mb_strtolower($key_attr, 'UTF-8');\n\n\t\tif(isset($table[$key_attr]))\n\t\t\t$table[$key_attr] = compare_data_type($table[$key_attr], recognize_data_type($attribute)); //if there already is set data type compare old and now to get the highest one\n\t\telse\n\t\t\t$table[$key_attr] = recognize_data_type($attribute); // if data type not set, recognize it\n\n\t\tif($table[$key_attr] == \"NTEXT\") // setting an attributes data type requires a conversion of ntext type to nvarchar\n\t\t\t$table[$key_attr] = \"NVARCHAR\";\n\t}\n}", "function registerFieldType($name, $type);", "public function getMappedDataType($ormType, $length = 0)\n {\n if (!isset($this->ormTypeMapping[$ormType])) {\n return $ormType;\n }\n\n $mapping = $this->ormTypeMapping[$ormType];\n if (is_string($mapping)) {\n return $mapping;\n }\n\n $defaultType = isset($mapping['default']) ? $mapping['default'] : null;\n if (!isset($mapping['types'])) {\n return $defaultType;\n }\n\n if ($defaultType && ($length === null || $length === 0)) {\n return $defaultType;\n }\n\n $unit = isset($mapping['unit']) ? $mapping['unit'] : 'chars';\n if ($unit === self::UNIT_BYTES) {\n $length = (int)floor((log(pow(10, $length)) / log(2)) / 8);\n }\n return $this->getBestMatchingType($mapping['types'], $defaultType, $length);\n }", "abstract protected function mapData($data, $tableObject);", "public static function getFieldTypeMapping() {\n // Check the static cache first.\n if (empty(static::$fieldTypeMapping)) {\n // It's easier to write and understand this array in the form of\n // $search_api_field_type => array($data_types) and flip it below.\n $default_mapping = array(\n 'text' => array(\n 'field_item:string_long.string',\n 'field_item:text_long.string',\n 'field_item:text_with_summary.string',\n 'text',\n ),\n 'string' => array(\n 'string',\n 'email',\n 'uri',\n 'filter_format',\n 'duration_iso8601',\n ),\n 'integer' => array(\n 'integer',\n 'timespan',\n ),\n 'decimal' => array(\n 'decimal',\n 'float',\n ),\n 'date' => array(\n 'datetime_iso8601',\n 'timestamp',\n ),\n 'boolean' => array(\n 'boolean',\n ),\n // Types we know about but want/have to ignore.\n NULL => array(\n 'language',\n ),\n );\n\n foreach ($default_mapping as $search_api_type => $data_types) {\n foreach ($data_types as $data_type) {\n $mapping[$data_type] = $search_api_type;\n }\n }\n\n // Allow other modules to intercept and define what default type they want\n // to use for their data type.\n \\Drupal::moduleHandler()->alter('search_api_field_type_mapping', $mapping);\n\n static::$fieldTypeMapping = $mapping;\n }\n\n return static::$fieldTypeMapping;\n }", "public function getMappingType(): string\n {\n return (string) $this->mappingType;\n }", "public function delegateGetDbalColumnType(&$dbal_type, array $drupal_field_specs);", "function cast_query_results($rs)\n{\n $fields = mysqli_fetch_fields($rs);\n $data = array();\n $types = array();\n foreach ($fields as $field) {\n switch ($field->type) {\n case 3:\n $types[$field->name] = 'int';\n break;\n case 4:\n $types[$field->name] = 'float';\n break;\n default:\n $types[$field->name] = 'string';\n break;\n }\n }\n while ($row = mysqli_fetch_assoc($rs)) {\n array_push($data, $row);\n }\n\n for ($i = 0; $i < count($data); $i++) {\n foreach ($types as $orgname => $type) {\n settype($data[$i][$orgname], $type);\n }\n }\n return $data;\n}", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "protected function getColumnPhpType($type)\r\n {\r\n static $typeMap = [\r\n // abstract type => php type\r\n 'text' => 'string',\r\n 'number' => 'integer',\r\n 'container' => 'resource',\r\n 'date' => 'date',\r\n 'time' => 'time',\r\n 'timestamp' => 'timestamp',\r\n ];\r\n if (isset($typeMap[$type])) {\r\n return $typeMap[$type];\r\n } else {\r\n return 'string';\r\n }\r\n }", "public function setDataType( $column, $type='string' )\n\t{\n\t\tif( is_array($column) )\n\t\t{\n\t\t\tforeach( $column as $_column )\n\t\t\t{\n\t\t\t\t$this->_dataTypes[ $_column ]\t= $type;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dataTypes[ $column ]\t= $type;\n\t\t}\n\t}", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "public static function updateMapping()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->setMapping(static::index(), static::type(), static::mapping());\n }", "public function addOrmType(OrmDataTypeInterface $ormDataType, $dataType, $dataTypeMaxLength = 'default')\n {\n $type = $ormDataType->getType();\n $this->ormDataTypeInstance[$type] = $ormDataType;\n\n if ($dataTypeMaxLength === 'default') {\n if (!isset($this->ormTypeMapping[$type]) || is_string($this->ormTypeMapping[$type])) {\n $this->ormTypeMapping[$type] = $dataType;\n }\n else {\n $this->ormTypeMapping[$type]['default'] = $dataType;\n }\n }\n else {\n $this->ormTypeMapping[$type]['types'][$dataType] = $dataTypeMaxLength;\n }\n return $this;\n }", "protected function AssignPageTypeFields() {\n $this->AddField('showmap', self::DT_BOOLEAN, true);\n $this->AddField('mapaddress', self::DT_STRING);\n }", "public function _toMongoType($data, $type = null)\n {\n if($type == 'id')\n {\n return new MongoId($data);\n }\n\n if($data instanceof DateTime)\n {\n return new MongoDate($data->getTimestamp());\n }\n if($type == 'date')\n {\n return new MongoDate($data->getTimestamp());\n }\n }", "public function getTypeConverter() {}", "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'code' ,\n 'the_name' => 'theName' ,\n 'the_type' => 'theType' ,\n 'the_year' => 'theYear'\n );\n }", "public function setType($type)\r\n\t{\r\n\t\t// Check the type\r\n\t\t$type = strtolower($type);\r\n\t\tif(!in_array($type, $this->allowed_types))\r\n\t\t{\r\n\t\t\t$type = 'varchar'; // default to varchar\r\n\t\t}\r\n\t\t\r\n\t\t$name \t\t= 'tienda';\r\n\t\t$eav_suffix = 'eavvalues';\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\t// Set the correct suffix\r\n\t\t$this->set( '_suffix', $eav_suffix.$type );\r\n\t\t$tbl_name = \"#__{$name}_{$eav_suffix}{$type}\";\r\n\t\t$this->_tbl = $tbl_name;\r\n\t\t\r\n\t\t// Now set the properties!\r\n\t\t$this->setTableProperties();\r\n\t\t\r\n\t\t// Table Type defined: Activate the table\r\n\t\t$this->active = true;\r\n\t}", "public function set_typeNum()\n {\n // init the map\n $this->initVarTypeNum();\n }", "function register_field_type($class)\n {\n }", "private function loadDataTypes() {\n if(count($this->dbConfigs) > 0){\n switch ($this->dbConfigs[\"driver\"]) {\n case \"mysql\":\n $this->arrDataTypes = array('char', 'varchar', 'tinytext', 'text', 'mediumtext', 'longtext', 'tinyblob', 'mediumblob',\n 'blob', 'longblob', 'enum', 'set', 'date', 'datetime', 'time', 'year');\n break;\n\n case \"mssql\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary');\n break;\n\n case \"sqlsrv\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary','date');\n break;\n }\n }\n }", "protected function fromDatabase( $data )\n\t{\n\t\tforeach ( $data AS $field => $value ) \n\t\t{\t\n\t\t\tif ( isset( static::$schema[ $field ] ) )\n\t\t\t{\n\t\t\t\tif ( is_array( static::$schema[ $field ] ) )\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ][ 'type' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ];\n\t\t\t\t}\n\t\n\t\t\t\t$this->data[ $field ] = $this->sanitize( $type, $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->loaded = true;\n\t}", "function register_field_type_info($info)\n {\n }", "function agilecrm_map_types($array)\n{\n $mapped = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $mapped[] = $value;\n continue;\n }\n\n $type = in_array($key, TYPES['SYSTEM']) ? 'SYSTEM' : 'CUSTOM';\n\n $mapped[] = [\n 'type' => $type,\n 'name' => $key,\n 'value' => $value,\n ];\n }\n\n return $mapped;\n}", "public static function updateMapping(){\r\n $db = self::getDb();\r\n $command = $db->createCommand();\r\n\t\tif(!$command->indexExists(self::index())){\r\n\t\t\t$command->createIndex(self::index());\r\n\t\t}\r\n $command->setMapping(self::index(), self::type(), self::mapping());\r\n }", "abstract public function register_type();", "public function getMappedDatabaseTypes(AbstractSpatialType $type)\n {\n $sqlType = mb_strtolower($type->getSQLType());\n\n if ($type instanceof GeographyType && 'geography' !== $sqlType) {\n $sqlType = sprintf('geography(%s)', $sqlType);\n }\n\n return [$sqlType];\n }", "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'int' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}',\n 'timestamp' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}'\n ];\n }", "public function setTransformer() {\n\t\tif ($this->isPassword()) {\n\t\t\t$this->addTransformer('password');\n\t\t} else {\n\t\t\t$dbType = $this->getDbType();\n\t\t\tif ($dbType == 'datetime') {\n\t\t\t\t$this->addTransformer('datetime');\n\t\t\t}\n\t\t}\n\t}", "function getDatatypesMapping() {\n return ['Protein' => ['pdb','swissprot','datacitesbgrid'],\n 'Phenotype' => ['clinvar','dbgap','mpd','datacitemorphobank'],\n 'Gene Expression' => ['geo', 'arrayexpress', 'gemma','nursadatasets','lsdb','genenetwork','gtexldacc'],\n 'Nucleotide Sequence' => ['sra','datacitebgi'],\n 'Morphology'=>['neuromorpho'],\n 'Clinical Trials'=>['clinicaltrials','ctn'],\n 'Proteomics Data'=>['peptideatlas','proteomexchange','yped'],\n 'Physiological Signals'=>['physiobank'],\n 'Epigenetic Data'=>['epigenomics'],\n 'Data from Papers'=>['datacitepeerj','ndarpapers'],\n\n 'Omics Data'=>['omicsdi'],\n 'Survey Data'=> ['datacitefdz'],\n 'Cell Signaling'=>['datacitesdscsg'],\n 'Imaging Data'=>['cvrg','neuromorpho','cia','openfmri','cil','bmrb','retina','emdb', 'nitrcir','neurovaultatlases','neurovaultcols','neurovaultnidm','datacitecxidb','datacitembf','datacitecandi'],\n 'Unspecified' => ['lincs','bioproject','dryad','dataverse','niddkcr','icpsr','gdc','rgd','vectorbase','datacitegnd','datacitezenodo',\n 'datacitecrcns','immport','datacitedatabrary','datacitelshtm','datacitejhu',\n 'simtk',\n 'datacitebils',\n 'dataciteada',\n 'dataciteukda',\n 'dataciteadaptive',\n 'datacitemit',\n 'datacitectsi',\n 'datacitenimh',\n 'nsrr','naturedata','datacitethieme','datacitefigshare','dataciteccdc','wormbase','metabolomics'],\n ];\n}", "public function testFieldWithSpecialConfig()\n {\n self::assertEquals('keyword', $this->mapper->getDataType('tstamp'), 'Wrong data type found');\n\n // Und jetzt per Config überschreiben\n $cfg = [];\n $cfg['fields.']['tstamp.']['type'] = 'unindexed';\n $mapper = tx_rnbase::makeInstance('tx_mksearch_service_engine_lucene_DataTypeMapper', $cfg);\n self::assertEquals('unindexed', $mapper->getDataType('tstamp'), 'Wrong data type found');\n // Die anderen sollten weiter normal funktionieren\n self::assertEquals('keyword', $mapper->getDataType('uid'), 'Wrong data type found');\n }", "abstract protected function initDataTypes();", "protected function transformValueFromDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_STRING) {\n return (string)$value;\n }\n\n if($type==SettingInterface::TYPE_INTEGER) {\n return (integer)$value;\n }\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n if(in_array($value,[true,1,'y','yes','true'])) {\n return true;\n }\n if(in_array($value,[false,0,'n','no','false'])) {\n return false;\n }\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n return \\DateTime::createFromFormat('Y-m-d H:i:s',$value);\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n return json_decode($value,true);\n }\n\n return $value;\n }", "protected function translateSimpleColumnTypes(array &$info)\n {\n $type = (isset($info['type'])) ? $info['type'] : null;\n switch ($type) {\n // some types need massaging, some need other required properties\n case 'pk':\n case ColumnSchema::TYPE_ID:\n $info['type'] = 'int';\n $info['allow_null'] = false;\n $info['auto_increment'] = true;\n $info['is_primary_key'] = true;\n break;\n\n case 'fk':\n case ColumnSchema::TYPE_REF:\n $info['type'] = 'int';\n $info['is_foreign_key'] = true;\n // check foreign tables\n break;\n\n case ColumnSchema::TYPE_DATETIME:\n $info['type'] = 'datetime2';\n break;\n case ColumnSchema::TYPE_TIMESTAMP:\n $info['type'] = 'datetimeoffset';\n break;\n case ColumnSchema::TYPE_TIMESTAMP_ON_CREATE:\n case ColumnSchema::TYPE_TIMESTAMP_ON_UPDATE:\n $info['type'] = 'datetimeoffset';\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (!isset($default)) {\n $default = 'CURRENT_TIMESTAMP';\n $info['default'] = ['expression' => $default];\n }\n break;\n case ColumnSchema::TYPE_USER_ID:\n case ColumnSchema::TYPE_USER_ID_ON_CREATE:\n case ColumnSchema::TYPE_USER_ID_ON_UPDATE:\n $info['type'] = 'int';\n break;\n\n case ColumnSchema::TYPE_BOOLEAN:\n $info['type'] = 'bit';\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (isset($default)) {\n // convert to bit 0 or 1, where necessary\n $info['default'] = (int)filter_var($default, FILTER_VALIDATE_BOOLEAN);\n }\n break;\n\n case ColumnSchema::TYPE_INTEGER:\n $info['type'] = 'int';\n break;\n\n case ColumnSchema::TYPE_DOUBLE:\n $info['type'] = 'float';\n $info['type_extras'] = '(53)';\n break;\n\n case ColumnSchema::TYPE_TEXT:\n $info['type'] = 'varchar';\n $info['type_extras'] = '(max)';\n break;\n case 'ntext':\n $info['type'] = 'nvarchar';\n $info['type_extras'] = '(max)';\n break;\n case 'image':\n $info['type'] = 'varbinary';\n $info['type_extras'] = '(max)';\n break;\n\n case ColumnSchema::TYPE_STRING:\n $fixed =\n (isset($info['fixed_length'])) ? filter_var($info['fixed_length'], FILTER_VALIDATE_BOOLEAN) : false;\n $national =\n (isset($info['supports_multibyte'])) ? filter_var($info['supports_multibyte'],\n FILTER_VALIDATE_BOOLEAN) : false;\n if ($fixed) {\n $info['type'] = ($national) ? 'nchar' : 'char';\n } elseif ($national) {\n $info['type'] = 'nvarchar';\n } else {\n $info['type'] = 'varchar';\n }\n break;\n\n case ColumnSchema::TYPE_BINARY:\n $fixed =\n (isset($info['fixed_length'])) ? filter_var($info['fixed_length'], FILTER_VALIDATE_BOOLEAN) : false;\n $info['type'] = ($fixed) ? 'binary' : 'varbinary';\n break;\n }\n }", "protected function addDoctrineTypes(Connection $connection)\n {\n $name = $connection->getDriverName();\n\n foreach (Arr::get($this->types, $name, []) as $type => $handler) {\n if (!Type::hasType($type)) {\n Type::addType($type, $handler);\n }\n\n $connection->getDoctrineConnection()\n ->getDatabasePlatform()\n ->registerDoctrineTypeMapping($type, $type);\n }\n }", "protected function getMap()\n {\n return config('codegenerator.eloquent_type_to_html_type');\n }", "public function getDataType() {}", "abstract public function getFieldByColumnType($name, $type, array $parameters = null);", "public function changeFieldType($field)\n {\n\tif ( !$field->getRecastCallback())\n\t{\n\t throw new Exception(\"Unable to recast value as recast callback was not set for field '\".$field->getName().\"'\");\n\t}\n\n\t$builder= PerfORMController::getBuilder('fieldretype');\n\t\n\t$tmpfield= $field->getName().'_'.md5(time());\n\t$template= $builder->getTemplate('field-add');\n\t$fieldInfo= $builder->getField($field);\n\t$fieldInfo->name= $tmpfield;\n\t$fieldInfo->nullable= true;\n\t$template->field= $fieldInfo;\n\tPerfORMController::getBuilder()->addToBuffer($builder->renderTemplate($template), 'alters');\n\t//PerfORMController::getConnection()->nativeQuery($sql);\n\n\t$result= PerfORMController::getConnection()->query('select * from %n',\n\t $field->getModel()->getTableName()\n\t);\n\n\t$pk= $field->getModel()->getPrimaryKey();\n\n\tforeach($result as $row )\n\t{\n\t if ( is_callable($field->getRecastCallback()))\n\t {\n\t\t$value= call_user_func($field->getRecastCallback(), $row);\n\t\tif ( !$field->isNullable() and is_null($value))\n\t\t{\n\t\t throw new Exception(\"Unable to recast null value for field '\".$field->getName().\"' (id=\".$row->{$pk}.\") as field is not null\");\n\t\t}\n\t }\n\t else\n\t {\n\t\tthrow new Exception(\"Unable to recast value for field '\".$field->getName().\"' (id=\".$row->{$pk}.\")\");\n\t }\n\n\t $sql= PerfORMController::getConnection()->sql('update %n set %n = %'.$field->getType().' where %n = %i;',\n\t\t$field->getModel()->getTableName(),\n\t\t$tmpfield,\n\t\t$value,\n\t\t$pk,\n\t\t$row->{$pk}\n\t );\n\t PerfORMController::getBuilder()->addToBuffer($sql, 'alters');\n\t}\n\n\tif (!$field->isNullable())\n\t{\n\t $fieldInfo->nullable= false;\n\t $template= $builder->getTemplate('field-change-nullable');\n\t $template->field= $fieldInfo;\n\t $sql= $builder->renderTemplate($template);\n\t PerfORMController::getBuilder()->addToBuffer($sql, 'alters');\n\t //PerfORMController::getConnection()->nativeQuery($sql);\n\t}\n\n\tPerfORMController::getBuilder()->dropField($field->getName(), $field->getModel());\n\tPerfORMController::getBuilder()->renameField($field, $tmpfield);\n\t$this->updateFieldSync($field);\n }", "protected function loadMapBuilderClasses()\n {\n $this->table = Doctrine::getTable($this->getClassName());\n }", "protected function editDataType($data_type = null, $column_name = '')\n {\n if ($data_type === null) {\n throw new RuntimeException(\n 'Query-editDataType Method: No Datatype provided for Column: ' . $column_name\n );\n }\n }", "protected function mapType(Param $param) {\n switch($param->type) {\n case 'gboolean':\n $param->zppSpec = 'b';\n $param->zppType = 'zend_bool';\n $param->ztype = 'bool';\n return;\n case 'guint':\n case 'guint64': // NOTE: may need to do this as a string!\n case 'glong':\n case 'gsize':\n case 'guint8':\n case 'gssize':\n case 'gint64':\n case 'guint32':\n case 'gdouble':\n case 'gulong':\n case 'gint32':\n case 'gint':\n $param->zppSpec = 'l';\n $param->zppType = 'long';\n $param->ztype = 'int';\n return;\n case 'utf8':\n case 'gchar':\n $param->zppSpec = 's';\n $param->zppType = ['char *', 'int'];\n return;\n case 'gpointer':\n echo \"have no idea what to do with gpointer omg\\n\";\n return;\n case 'DestroyNotify':\n case 'CompareFunc':\n case 'CompareDataFunc':\n case 'HRFunc':\n case 'HFunc':\n case 'HashFunc':\n case 'EqualFunc':\n case 'HookFindFunc':\n case 'HookCompareFunc':\n case 'HookMarshaller':\n case 'HookCheckMarshaller':\n case 'Func':\n case 'SourceFuncs':\n case 'SourceFunc':\n case 'PollFunc':\n case 'NodeForeachFunc':\n case 'CopyFunc':\n case 'NodeTraverseFunc':\n case 'ThreadFunc':\n case 'TranslateFunc':\n case 'OptionErrorFunc':\n case 'OptionParseFunc':\n case 'RegexEvalCallback':\n case 'SequenceIterCompareFunc':\n case 'SourceCallbackFuncs':\n case 'TraverseFunc':\n case 'Variant':\n echo \"I believe this is a callback - that'll be fun\\n\";\n return;\n case 'TimeVal':\n case 'Bytes':\n case 'ChecksumType':\n case 'Mutex':\n case 'Date':\n case 'DateDay':\n case 'DateMonth':\n case 'DateYear':\n case 'Time':\n case 'DateWeekday':\n case 'TimeSpan':\n case 'DateTime':\n case 'TimeZone':\n case 'Quark':\n case 'GLib.HashTable':\n case 'Hook':\n case 'HookList':\n case 'String':\n case 'GLib.List':\n case 'MarkupParser':\n case 'Node':\n case 'OptionGroup':\n case 'OptionEntry':\n case 'PatternSpec':\n case 'MatchInfo':\n case 'GLib.SList':\n case 'ScannerConfig':\n case 'SequenceIter':\n case 'Source':\n case 'MainContext':\n case 'TestCase':\n case 'TestSuite':\n case 'TrashStack':\n echo \"and I think this is an object\\n\";\n return;\n case 'filename':\n echo \"no clue at all what THIS is\\n\";\n return;\n case 'gunichar':\n echo \"hmm, this one is weird\\n\";\n return;\n case 'SeekType':\n case 'IOFlags':\n case 'KeyFileFlags':\n case 'PollFD':\n case 'Cond':\n case 'MarkupParseFlags':\n case 'TraverseFlags':\n case 'TraverseType':\n case 'RegexMatchFlags':\n case 'RegexCompileFlags':\n case 'TokenType':\n case 'TimeType':\n case 'VariantType':\n echo \"this might be an enum!\\n\";\n return;\n case 'va_list':\n echo \"this one is going to be fun *\\n\";\n return;\n default:\n throw new UnknownTypeException($param->type . $param->identifer);\n }\n }", "public static function initActiveRecordByType()\r\n\t{\r\n\t\trequire_once \"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php\";\r\n\t}", "function set_ms_layer_type(&$ms_layer, $db_layer){\n\t\tswitch ($db_layer->geom_type){\n\t\t\t// point\n\t\t\tcase \"point\":\n\t\t\tcase \"multipoint\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POINT);\n\t\t\t\tbreak;\n\t\t\t// line\t\n\t\t\tcase \"line\":\n\t\t\tcase \"linestring\":\n\t\t\tcase \"multilinestring\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_LINE);\n\t\t\t\tbreak;\n\t\t\t// polygon\n\t\t\tcase \"polygon\":\n\t\t\tcase \"multipolygon\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POLYGON);\n\t\t\t\tbreak;\n\t\t\t// default\n\t\t\tdefault:\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POLYGON);\n\t\t}\n\t}", "function _token_rules_map_type($type) {\r\n if (($data_type = rules_get_data_types($type)) && isset($data_type['token type'])) {\r\n return $data_type['token type'];\r\n }\r\n return $type;\r\n}", "public function getDataTypeAttribute(): string\n {\n return $this->config['data_type'];\n }", "function _db_process_field($field) {\n\n if (!isset($field['size'])) {\n $field['size'] = 'normal';\n }\n\n // Set the correct database-engine specific datatype.\n if (!isset($field['mysql_type'])) {\n $map = db_type_map();\n $field['mysql_type'] = $map[$field['type'] .':'. $field['size']];\n }\n\n if ($field['type'] == 'serial') {\n $field['auto_increment'] = TRUE;\n }\n\n return $field;\n}", "public function getDataMapper() {}", "private function setupMapping()\n {\n $this->mapping = array();\n $fields = array();\n\n $aliases = array_keys($this->getJoinSettings());\n\n foreach ($aliases as $i => $alias) {\n $fields = array_merge($fields, $this->mapAlias($alias));\n }\n\n $this->mapping['fields'] = array_replace_recursive($fields, $this->getCustomMapping());\n $this->mapping['joins'] = $this->getJoinSettings();\n }", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public abstract function getTypeAttribute();", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'item_type'\t=> 'itemtype',\n 'name' => 'name',\n 'description' => 'description',\n 'cash'\t=> 'cashCost',\n 'diamond' => 'diamondCost',\n );\n }", "protected function getMapping($type)\n {\n switch ($type) {\n case 'article':\n return [\n 'txtArtikel' => 'name',\n 'txtshortdescription' => 'description',\n 'txtlangbeschreibung' => 'descriptionLong',\n 'txtshippingtime' => 'shippingTime',\n 'txtzusatztxt' => 'additionalText',\n 'txtkeywords' => 'keywords',\n 'txtpackunit' => 'packUnit',\n ];\n case 'variant':\n return [\n 'txtshippingtime' => 'shippingTime',\n 'txtzusatztxt' => 'additionalText',\n 'txtpackunit' => 'packUnit',\n ];\n case 'link':\n return [\n 'linkname' => 'description',\n ];\n case 'download':\n return [\n 'downloadname' => 'description',\n ];\n case 'config_countries':\n return [\n 'countryname' => 'name',\n 'notice' => 'description',\n ];\n case 'config_units':\n return [\n 'description' => 'name',\n ];\n case 'config_dispatch':\n return [\n 'dispatch_name' => 'name',\n 'dispatch_description' => 'description',\n 'dispatch_status_link' => 'statusLink',\n ];\n default:\n return false;\n }\n }", "function getFieldsTypes()\n {\n return array(\n'id' =>'integer',\n'paypalid'=>'string',\n'notifyid'=>'string',\n\n\t\t\t\n\t );\n }" ]
[ "0.72686905", "0.6740753", "0.66935056", "0.65132505", "0.6446485", "0.6412536", "0.63516307", "0.6270797", "0.6176217", "0.6037854", "0.6022009", "0.5934086", "0.5865228", "0.5836885", "0.5833662", "0.5805937", "0.58001393", "0.57839316", "0.5701092", "0.5692783", "0.5608246", "0.5598319", "0.55942965", "0.55859303", "0.5579647", "0.55281353", "0.5520488", "0.5514712", "0.5480639", "0.54559016", "0.54532343", "0.54532343", "0.54398096", "0.543297", "0.5432664", "0.54041266", "0.5396557", "0.53945386", "0.5390118", "0.5381398", "0.53747183", "0.5369185", "0.5342581", "0.5328572", "0.53183746", "0.5316931", "0.5298313", "0.52619016", "0.5255749", "0.52402157", "0.5220389", "0.5208632", "0.52024", "0.51977503", "0.5197665", "0.5196508", "0.5194422", "0.5175083", "0.5171318", "0.5168325", "0.51620877", "0.51613915", "0.5156201", "0.51529694", "0.5140768", "0.51391864", "0.5132512", "0.51069057", "0.5106482", "0.5103028", "0.5098028", "0.5067428", "0.50654286", "0.5056718", "0.5055567", "0.5046729", "0.5042579", "0.5040788", "0.503616", "0.5032219", "0.50131124", "0.5000713", "0.4996486", "0.49910378", "0.49848214", "0.49800298", "0.4974864", "0.496405", "0.4962987", "0.49619138", "0.49562967", "0.49538073", "0.49535656", "0.49513754", "0.4945819", "0.49404642", "0.49370727", "0.49355727", "0.49311885", "0.49307063" ]
0.5782037
18
adds mapping for orm type to data type
public function addOrmType(OrmDataTypeInterface $ormDataType, $dataType, $dataTypeMaxLength = 'default') { $type = $ormDataType->getType(); $this->ormDataTypeInstance[$type] = $ormDataType; if ($dataTypeMaxLength === 'default') { if (!isset($this->ormTypeMapping[$type]) || is_string($this->ormTypeMapping[$type])) { $this->ormTypeMapping[$type] = $dataType; } else { $this->ormTypeMapping[$type]['default'] = $dataType; } } else { $this->ormTypeMapping[$type]['types'][$dataType] = $dataTypeMaxLength; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeDoctrineTypeMappings()\n {\n $this->doctrineTypeMapping = array(\n 'int' => 'integer',\n 'timestamp' => 'datetime',\n 'time' => 'datetime',\n 'date' => 'date',\n 'varchar' => 'string',\n 'char' => 'string',\n 'double' => 'float',\n 'float' => 'float',\n 'int64' => 'float',\n 'smallint' => 'integer',\n );\n }", "abstract protected function initializeMappedTypes();", "public function registerCustomTypes()\n {\n // enum\n DbalService::getSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');\n }", "private function initializeMappedTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'mappedTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array('foo' => Type::INTEGER));\n }", "protected function getTypeMapping()\n {\n return self::$mysqlTypeMap;\n }", "public function getTypeMapper();", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "public function registerColumnTypes();", "public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }", "function get_field_mapping_types() {\n return drupal_map_assoc([\n 'string',\n 'keyword',\n 'date',\n 'long',\n 'double',\n 'boolean',\n 'ip',\n 'object',\n 'nested',\n 'geo_point',\n 'geo_shape',\n 'completion',\n ]);\n}", "public function loadColumnType($name);", "public function elasticMapping($mapping)\n\t{\n\t\t$mapping[$this->name] = ['type' => $this->integer ? 'integer' : 'float'];\n\t}", "function hook_acquia_contenthub_field_type_mapping_alter(array &$mapping) {\n $mapping['my_custom_field'] = 'array<string>';\n}", "public function setType(){\n switch($this->security){\n case 'H':\n case 'L':\n case '0.0':\n $typeId = 2; // k-space\n break;\n case 'A':\n $typeId = 3; // a-space\n break;\n default:\n $typeId = 1; // w-space\n }\n\n /**\n * @var $type MapTypeModel\n */\n $type = $this->rel('typeId');\n $type->getById($typeId);\n $this->typeId = $type;\n }", "public function setMappedEntityType($entity_type);", "public function getMappingEntityType();", "public static function getTypeMap() {\n return [\n 'charge_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'amount' => self::FIELD_INT,\n 'description' => self::FIELD_STRING,\n 'charge_date' => self::FIELD_EPOCH,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public function addDataType($dataType, $ormDataType)\n {\n $this->dataTypeMapping[$dataType] = $ormDataType;\n return $this;\n }", "private function _columnTypeTranslation($type) {\n $map = array(\n 'datetime' => 'timestamp',\n );\n if(!empty($map[$type])) {\n return $map[$type];\n }\n return $type;\n }", "private function _transformType($dataType)\n {\n switch ($dataType) {\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BOOLEAN:\n return self::PHP_TYPE_BOOLEAN;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_INTEGER:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_SMALLINT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BIGINT:\n return self::PHP_TYPE_INTEGER;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DECIMAL:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_FLOAT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DOUBLE_PRECISION:\n return self::PHP_TYPE_FLOAT;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BLOB:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TEXT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_CHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BINARY_VARYING:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_VARCHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_ENUM:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATE:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIME:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIMESTAMP:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATETIME:\n return self::PHP_TYPE_STRING;\n\n default:\n return \"unknown ({$dataType})\";\n break;\n }\n }", "public function getTypeMap()\n {\n }", "private function initializeCustomTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'customTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array(Type::INTEGER));\n }", "public static function getTypeMap() {\n return [\n 'session_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'session_string' => self::FIELD_STRING,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public function getMappedOrmType($dataType)\n {\n return $this->hasDataType($dataType)\n ? $this->dataTypeMapping[$dataType]\n : null;\n }", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function setColumnType($column, $type)\n {\n switch($type)\n {\n case PDO::PARAM_JSON:\n $this->_columns[$column] = new DataTypes\\JSON($column);\n break;\n\n case PDO::PARAM_DATETIME:\n $this->_columns[$column] = new DataTypes\\DateTime($column);\n break;\n\n case PDO::PARAM_DATE:\n $this->_columns[$column] = new DataTypes\\Date($column);\n break;\n\n case PDO::PARAM_ARRAY:\n $this->_columns[$column] = new DataTypes\\PhpArray($column);\n break;\n\n default:\n }\n }", "public function getDbFieldType()\n {\n }", "abstract protected function defineMapping();", "public function getTypeDoctrine()\n {\n if (isset(self::$doctrineTypeMap[$this->getType()])) {\n return self::$doctrineTypeMap[$this->getType()];\n }\n\n // our fallback default\n return self::$doctrineTypeMap[self::TYPE_STRING];\n }", "public static function buildTableMap()\n {\n $dbMap = Propel::getDatabaseMap(BaseCastleTypePeer::DATABASE_NAME);\n if (!$dbMap->hasTable(BaseCastleTypePeer::TABLE_NAME)) {\n $dbMap->addTableObject(new \\CastleTypeTableMap());\n }\n }", "protected function bootTypes()\n {\n $configTypes = config('graphql.types');\n foreach ($configTypes as $name => $type) {\n if (is_numeric($name)) {\n $this->app['graphql']->addType($type);\n } else {\n $this->app['graphql']->addType($type, $name);\n }\n }\n }", "public function mapFor()\n {\n // Here we tell Doctrine that this mapping is for the Scientist object.\n return Article::class;\n }", "public function setup_types()\n {\n }", "function getTypeConverter() ;", "public function getMappedEntityType();", "function dmlChangeColumnType () {\r\n\t\t// Create connection\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t$sql = \"ALTER TABLE tbldmlmapcontent MODIFY CntField7 MEDIUMTEXT\";\r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\techo 1;\r\n\t\t} else {\r\n\t\t\techo 0;\r\n\t\t}\r\n\t\t\r\n\t\t$conn->close();\r\n\t}", "public function getColumnType($name);", "public function getColumnType($name);", "public function getMappedDataType($ormType, $length = 0)\n {\n if (!isset($this->ormTypeMapping[$ormType])) {\n return $ormType;\n }\n\n $mapping = $this->ormTypeMapping[$ormType];\n if (is_string($mapping)) {\n return $mapping;\n }\n\n $defaultType = isset($mapping['default']) ? $mapping['default'] : null;\n if (!isset($mapping['types'])) {\n return $defaultType;\n }\n\n if ($defaultType && ($length === null || $length === 0)) {\n return $defaultType;\n }\n\n $unit = isset($mapping['unit']) ? $mapping['unit'] : 'chars';\n if ($unit === self::UNIT_BYTES) {\n $length = (int)floor((log(pow(10, $length)) / log(2)) / 8);\n }\n return $this->getBestMatchingType($mapping['types'], $defaultType, $length);\n }", "function registerFieldType($name, $type);", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "public function castDataType($type)\n {\n return ApiDataType::get($type);\n }", "public static function updateMapping()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->setMapping(static::index(), static::type(), static::mapping());\n }", "public static function getFieldTypeMapping() {\n // Check the static cache first.\n if (empty(static::$fieldTypeMapping)) {\n // It's easier to write and understand this array in the form of\n // $search_api_field_type => array($data_types) and flip it below.\n $default_mapping = array(\n 'text' => array(\n 'field_item:string_long.string',\n 'field_item:text_long.string',\n 'field_item:text_with_summary.string',\n 'text',\n ),\n 'string' => array(\n 'string',\n 'email',\n 'uri',\n 'filter_format',\n 'duration_iso8601',\n ),\n 'integer' => array(\n 'integer',\n 'timespan',\n ),\n 'decimal' => array(\n 'decimal',\n 'float',\n ),\n 'date' => array(\n 'datetime_iso8601',\n 'timestamp',\n ),\n 'boolean' => array(\n 'boolean',\n ),\n // Types we know about but want/have to ignore.\n NULL => array(\n 'language',\n ),\n );\n\n foreach ($default_mapping as $search_api_type => $data_types) {\n foreach ($data_types as $data_type) {\n $mapping[$data_type] = $search_api_type;\n }\n }\n\n // Allow other modules to intercept and define what default type they want\n // to use for their data type.\n \\Drupal::moduleHandler()->alter('search_api_field_type_mapping', $mapping);\n\n static::$fieldTypeMapping = $mapping;\n }\n\n return static::$fieldTypeMapping;\n }", "public function dbFieldType()\n {\n return 'string';\n }", "protected function mapType($schema, $column)\n {\n $baseType = $schema->baseColumnType($column);\n switch ($baseType) {\n case 'uuid':\n return ['type' => 'text', 'index' => false, 'null_value' => '_null_'];\n case 'integer':\n return ['type' => 'integer', 'null_value' => pow(-2,31)];\n case 'date':\n return ['type' => 'date', 'format' => 'dateOptionalTime||basic_date||yyy-MM-dd', 'null_value' => '0001-01-01'];\n case 'datetime':\n case 'timestamp':\n return ['type' => 'date', 'format' => 'basic_t_time_no_millis||dateOptionalTime||basic_date_time||ordinal_date_time_no_millis||yyyy-MM-dd HH:mm:ss||basic_date', 'null_value' => '0001-01-01 00:00:00'];\n case 'float':\n case 'decimal':\n return ['type' => 'float', 'null_value' => pow(-2,31)];\n case 'float':\n case 'decimal':\n return ['type' => 'float', 'null_value' => pow(-2,31)];\n case 'boolean':\n return ['type' => 'boolean'];\n default:\n return [\n 'type' => 'text',\n 'fields' => [\n $column => ['type' => 'text'],\n 'raw' => ['type' => 'text', 'index' => false]\n ]\n ];\n }\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "public static function updateMapping(){\r\n $db = self::getDb();\r\n $command = $db->createCommand();\r\n\t\tif(!$command->indexExists(self::index())){\r\n\t\t\t$command->createIndex(self::index());\r\n\t\t}\r\n $command->setMapping(self::index(), self::type(), self::mapping());\r\n }", "public function getMappingType(): string\n {\n return (string) $this->mappingType;\n }", "public function getDataWithTypeDb() {}", "public function delegateGetDbalColumnType(&$dbal_type, array $drupal_field_specs);", "function set_attributes_data_types(&$table, $attributes)\n{\n\tforeach($attributes as $key_attr => $attribute)\n\t{\n\t\t$key_attr = mb_strtolower($key_attr, 'UTF-8');\n\n\t\tif(isset($table[$key_attr]))\n\t\t\t$table[$key_attr] = compare_data_type($table[$key_attr], recognize_data_type($attribute)); //if there already is set data type compare old and now to get the highest one\n\t\telse\n\t\t\t$table[$key_attr] = recognize_data_type($attribute); // if data type not set, recognize it\n\n\t\tif($table[$key_attr] == \"NTEXT\") // setting an attributes data type requires a conversion of ntext type to nvarchar\n\t\t\t$table[$key_attr] = \"NVARCHAR\";\n\t}\n}", "protected function AssignPageTypeFields() {\n $this->AddField('showmap', self::DT_BOOLEAN, true);\n $this->AddField('mapaddress', self::DT_STRING);\n }", "abstract protected function mapData($data, $tableObject);", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "function agilecrm_map_types($array)\n{\n $mapped = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $mapped[] = $value;\n continue;\n }\n\n $type = in_array($key, TYPES['SYSTEM']) ? 'SYSTEM' : 'CUSTOM';\n\n $mapped[] = [\n 'type' => $type,\n 'name' => $key,\n 'value' => $value,\n ];\n }\n\n return $mapped;\n}", "public function getDataWithTypeField() {}", "public function set_typeNum()\n {\n // init the map\n $this->initVarTypeNum();\n }", "protected function getColumnPhpType($type)\r\n {\r\n static $typeMap = [\r\n // abstract type => php type\r\n 'text' => 'string',\r\n 'number' => 'integer',\r\n 'container' => 'resource',\r\n 'date' => 'date',\r\n 'time' => 'time',\r\n 'timestamp' => 'timestamp',\r\n ];\r\n if (isset($typeMap[$type])) {\r\n return $typeMap[$type];\r\n } else {\r\n return 'string';\r\n }\r\n }", "public function getMappedDatabaseTypes(AbstractSpatialType $type)\n {\n $sqlType = mb_strtolower($type->getSQLType());\n\n if ($type instanceof GeographyType && 'geography' !== $sqlType) {\n $sqlType = sprintf('geography(%s)', $sqlType);\n }\n\n return [$sqlType];\n }", "function cast_query_results($rs)\n{\n $fields = mysqli_fetch_fields($rs);\n $data = array();\n $types = array();\n foreach ($fields as $field) {\n switch ($field->type) {\n case 3:\n $types[$field->name] = 'int';\n break;\n case 4:\n $types[$field->name] = 'float';\n break;\n default:\n $types[$field->name] = 'string';\n break;\n }\n }\n while ($row = mysqli_fetch_assoc($rs)) {\n array_push($data, $row);\n }\n\n for ($i = 0; $i < count($data); $i++) {\n foreach ($types as $orgname => $type) {\n settype($data[$i][$orgname], $type);\n }\n }\n return $data;\n}", "public function setDataType( $column, $type='string' )\n\t{\n\t\tif( is_array($column) )\n\t\t{\n\t\t\tforeach( $column as $_column )\n\t\t\t{\n\t\t\t\t$this->_dataTypes[ $_column ]\t= $type;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dataTypes[ $column ]\t= $type;\n\t\t}\n\t}", "function register_field_type($class)\n {\n }", "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'code' ,\n 'the_name' => 'theName' ,\n 'the_type' => 'theType' ,\n 'the_year' => 'theYear'\n );\n }", "private function setupMapping()\n {\n $this->mapping = array();\n $fields = array();\n\n $aliases = array_keys($this->getJoinSettings());\n\n foreach ($aliases as $i => $alias) {\n $fields = array_merge($fields, $this->mapAlias($alias));\n }\n\n $this->mapping['fields'] = array_replace_recursive($fields, $this->getCustomMapping());\n $this->mapping['joins'] = $this->getJoinSettings();\n }", "public function setType($type)\r\n\t{\r\n\t\t// Check the type\r\n\t\t$type = strtolower($type);\r\n\t\tif(!in_array($type, $this->allowed_types))\r\n\t\t{\r\n\t\t\t$type = 'varchar'; // default to varchar\r\n\t\t}\r\n\t\t\r\n\t\t$name \t\t= 'tienda';\r\n\t\t$eav_suffix = 'eavvalues';\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\t// Set the correct suffix\r\n\t\t$this->set( '_suffix', $eav_suffix.$type );\r\n\t\t$tbl_name = \"#__{$name}_{$eav_suffix}{$type}\";\r\n\t\t$this->_tbl = $tbl_name;\r\n\t\t\r\n\t\t// Now set the properties!\r\n\t\t$this->setTableProperties();\r\n\t\t\r\n\t\t// Table Type defined: Activate the table\r\n\t\t$this->active = true;\r\n\t}", "abstract public function register_type();", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "function register_field_type_info($info)\n {\n }", "protected function addDoctrineTypes(Connection $connection)\n {\n $name = $connection->getDriverName();\n\n foreach (Arr::get($this->types, $name, []) as $type => $handler) {\n if (!Type::hasType($type)) {\n Type::addType($type, $handler);\n }\n\n $connection->getDoctrineConnection()\n ->getDatabasePlatform()\n ->registerDoctrineTypeMapping($type, $type);\n }\n }", "public function getTypeConverter() {}", "protected function loadMapBuilderClasses()\n {\n $this->table = Doctrine::getTable($this->getClassName());\n }", "private function loadDataTypes() {\n if(count($this->dbConfigs) > 0){\n switch ($this->dbConfigs[\"driver\"]) {\n case \"mysql\":\n $this->arrDataTypes = array('char', 'varchar', 'tinytext', 'text', 'mediumtext', 'longtext', 'tinyblob', 'mediumblob',\n 'blob', 'longblob', 'enum', 'set', 'date', 'datetime', 'time', 'year');\n break;\n\n case \"mssql\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary');\n break;\n\n case \"sqlsrv\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary','date');\n break;\n }\n }\n }", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public static function initActiveRecordByType()\r\n\t{\r\n\t\trequire_once \"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php\";\r\n\t}", "public function testFieldWithSpecialConfig()\n {\n self::assertEquals('keyword', $this->mapper->getDataType('tstamp'), 'Wrong data type found');\n\n // Und jetzt per Config überschreiben\n $cfg = [];\n $cfg['fields.']['tstamp.']['type'] = 'unindexed';\n $mapper = tx_rnbase::makeInstance('tx_mksearch_service_engine_lucene_DataTypeMapper', $cfg);\n self::assertEquals('unindexed', $mapper->getDataType('tstamp'), 'Wrong data type found');\n // Die anderen sollten weiter normal funktionieren\n self::assertEquals('keyword', $mapper->getDataType('uid'), 'Wrong data type found');\n }", "protected function getMapping($type)\n {\n switch ($type) {\n case 'article':\n return [\n 'txtArtikel' => 'name',\n 'txtshortdescription' => 'description',\n 'txtlangbeschreibung' => 'descriptionLong',\n 'txtshippingtime' => 'shippingTime',\n 'txtzusatztxt' => 'additionalText',\n 'txtkeywords' => 'keywords',\n 'txtpackunit' => 'packUnit',\n ];\n case 'variant':\n return [\n 'txtshippingtime' => 'shippingTime',\n 'txtzusatztxt' => 'additionalText',\n 'txtpackunit' => 'packUnit',\n ];\n case 'link':\n return [\n 'linkname' => 'description',\n ];\n case 'download':\n return [\n 'downloadname' => 'description',\n ];\n case 'config_countries':\n return [\n 'countryname' => 'name',\n 'notice' => 'description',\n ];\n case 'config_units':\n return [\n 'description' => 'name',\n ];\n case 'config_dispatch':\n return [\n 'dispatch_name' => 'name',\n 'dispatch_description' => 'description',\n 'dispatch_status_link' => 'statusLink',\n ];\n default:\n return false;\n }\n }", "public function changeFieldType($field)\n {\n\tif ( !$field->getRecastCallback())\n\t{\n\t throw new Exception(\"Unable to recast value as recast callback was not set for field '\".$field->getName().\"'\");\n\t}\n\n\t$builder= PerfORMController::getBuilder('fieldretype');\n\t\n\t$tmpfield= $field->getName().'_'.md5(time());\n\t$template= $builder->getTemplate('field-add');\n\t$fieldInfo= $builder->getField($field);\n\t$fieldInfo->name= $tmpfield;\n\t$fieldInfo->nullable= true;\n\t$template->field= $fieldInfo;\n\tPerfORMController::getBuilder()->addToBuffer($builder->renderTemplate($template), 'alters');\n\t//PerfORMController::getConnection()->nativeQuery($sql);\n\n\t$result= PerfORMController::getConnection()->query('select * from %n',\n\t $field->getModel()->getTableName()\n\t);\n\n\t$pk= $field->getModel()->getPrimaryKey();\n\n\tforeach($result as $row )\n\t{\n\t if ( is_callable($field->getRecastCallback()))\n\t {\n\t\t$value= call_user_func($field->getRecastCallback(), $row);\n\t\tif ( !$field->isNullable() and is_null($value))\n\t\t{\n\t\t throw new Exception(\"Unable to recast null value for field '\".$field->getName().\"' (id=\".$row->{$pk}.\") as field is not null\");\n\t\t}\n\t }\n\t else\n\t {\n\t\tthrow new Exception(\"Unable to recast value for field '\".$field->getName().\"' (id=\".$row->{$pk}.\")\");\n\t }\n\n\t $sql= PerfORMController::getConnection()->sql('update %n set %n = %'.$field->getType().' where %n = %i;',\n\t\t$field->getModel()->getTableName(),\n\t\t$tmpfield,\n\t\t$value,\n\t\t$pk,\n\t\t$row->{$pk}\n\t );\n\t PerfORMController::getBuilder()->addToBuffer($sql, 'alters');\n\t}\n\n\tif (!$field->isNullable())\n\t{\n\t $fieldInfo->nullable= false;\n\t $template= $builder->getTemplate('field-change-nullable');\n\t $template->field= $fieldInfo;\n\t $sql= $builder->renderTemplate($template);\n\t PerfORMController::getBuilder()->addToBuffer($sql, 'alters');\n\t //PerfORMController::getConnection()->nativeQuery($sql);\n\t}\n\n\tPerfORMController::getBuilder()->dropField($field->getName(), $field->getModel());\n\tPerfORMController::getBuilder()->renameField($field, $tmpfield);\n\t$this->updateFieldSync($field);\n }", "public function _toMongoType($data, $type = null)\n {\n if($type == 'id')\n {\n return new MongoId($data);\n }\n\n if($data instanceof DateTime)\n {\n return new MongoDate($data->getTimestamp());\n }\n if($type == 'date')\n {\n return new MongoDate($data->getTimestamp());\n }\n }", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public function setTransformer() {\n\t\tif ($this->isPassword()) {\n\t\t\t$this->addTransformer('password');\n\t\t} else {\n\t\t\t$dbType = $this->getDbType();\n\t\t\tif ($dbType == 'datetime') {\n\t\t\t\t$this->addTransformer('datetime');\n\t\t\t}\n\t\t}\n\t}", "protected function getMap()\n {\n return config('codegenerator.eloquent_type_to_html_type');\n }", "abstract public function getFieldByColumnType($name, $type, array $parameters = null);", "function getDatatypesMapping() {\n return ['Protein' => ['pdb','swissprot','datacitesbgrid'],\n 'Phenotype' => ['clinvar','dbgap','mpd','datacitemorphobank'],\n 'Gene Expression' => ['geo', 'arrayexpress', 'gemma','nursadatasets','lsdb','genenetwork','gtexldacc'],\n 'Nucleotide Sequence' => ['sra','datacitebgi'],\n 'Morphology'=>['neuromorpho'],\n 'Clinical Trials'=>['clinicaltrials','ctn'],\n 'Proteomics Data'=>['peptideatlas','proteomexchange','yped'],\n 'Physiological Signals'=>['physiobank'],\n 'Epigenetic Data'=>['epigenomics'],\n 'Data from Papers'=>['datacitepeerj','ndarpapers'],\n\n 'Omics Data'=>['omicsdi'],\n 'Survey Data'=> ['datacitefdz'],\n 'Cell Signaling'=>['datacitesdscsg'],\n 'Imaging Data'=>['cvrg','neuromorpho','cia','openfmri','cil','bmrb','retina','emdb', 'nitrcir','neurovaultatlases','neurovaultcols','neurovaultnidm','datacitecxidb','datacitembf','datacitecandi'],\n 'Unspecified' => ['lincs','bioproject','dryad','dataverse','niddkcr','icpsr','gdc','rgd','vectorbase','datacitegnd','datacitezenodo',\n 'datacitecrcns','immport','datacitedatabrary','datacitelshtm','datacitejhu',\n 'simtk',\n 'datacitebils',\n 'dataciteada',\n 'dataciteukda',\n 'dataciteadaptive',\n 'datacitemit',\n 'datacitectsi',\n 'datacitenimh',\n 'nsrr','naturedata','datacitethieme','datacitefigshare','dataciteccdc','wormbase','metabolomics'],\n ];\n}", "public function boot()\n {\n Relation::morphMap([\n 'customer' => Customer::class,\n 'vendor' => Vendor::class,\n 'order' => Order::class,\n 'invoice'=> Invoice::class\n ]);\n\n\n\n\n\n\n }", "protected function __loadDaoMap()\n\t{\n\t DaoMap::setManyToOne('root', get_class($this), null, true);\n\t DaoMap::setManyToOne('parent', get_class($this), null, true);\n\t\tDaoMap::setStringType('position', 'varchar', 255, false, '1');\n\t parent::__loadDaoMap();\n\t}", "function _db_process_field($field) {\n\n if (!isset($field['size'])) {\n $field['size'] = 'normal';\n }\n\n // Set the correct database-engine specific datatype.\n if (!isset($field['mysql_type'])) {\n $map = db_type_map();\n $field['mysql_type'] = $map[$field['type'] .':'. $field['size']];\n }\n\n if ($field['type'] == 'serial') {\n $field['auto_increment'] = TRUE;\n }\n\n return $field;\n}", "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'int' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}',\n 'timestamp' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}'\n ];\n }", "function _token_rules_map_type($type) {\r\n if (($data_type = rules_get_data_types($type)) && isset($data_type['token type'])) {\r\n return $data_type['token type'];\r\n }\r\n return $type;\r\n}", "abstract protected function initDataTypes();", "protected function translateSimpleColumnTypes(array &$info)\n {\n $type = (isset($info['type'])) ? $info['type'] : null;\n switch ($type) {\n // some types need massaging, some need other required properties\n case 'pk':\n case ColumnSchema::TYPE_ID:\n $info['type'] = 'int';\n $info['allow_null'] = false;\n $info['auto_increment'] = true;\n $info['is_primary_key'] = true;\n break;\n\n case 'fk':\n case ColumnSchema::TYPE_REF:\n $info['type'] = 'int';\n $info['is_foreign_key'] = true;\n // check foreign tables\n break;\n\n case ColumnSchema::TYPE_DATETIME:\n $info['type'] = 'datetime2';\n break;\n case ColumnSchema::TYPE_TIMESTAMP:\n $info['type'] = 'datetimeoffset';\n break;\n case ColumnSchema::TYPE_TIMESTAMP_ON_CREATE:\n case ColumnSchema::TYPE_TIMESTAMP_ON_UPDATE:\n $info['type'] = 'datetimeoffset';\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (!isset($default)) {\n $default = 'CURRENT_TIMESTAMP';\n $info['default'] = ['expression' => $default];\n }\n break;\n case ColumnSchema::TYPE_USER_ID:\n case ColumnSchema::TYPE_USER_ID_ON_CREATE:\n case ColumnSchema::TYPE_USER_ID_ON_UPDATE:\n $info['type'] = 'int';\n break;\n\n case ColumnSchema::TYPE_BOOLEAN:\n $info['type'] = 'bit';\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (isset($default)) {\n // convert to bit 0 or 1, where necessary\n $info['default'] = (int)filter_var($default, FILTER_VALIDATE_BOOLEAN);\n }\n break;\n\n case ColumnSchema::TYPE_INTEGER:\n $info['type'] = 'int';\n break;\n\n case ColumnSchema::TYPE_DOUBLE:\n $info['type'] = 'float';\n $info['type_extras'] = '(53)';\n break;\n\n case ColumnSchema::TYPE_TEXT:\n $info['type'] = 'varchar';\n $info['type_extras'] = '(max)';\n break;\n case 'ntext':\n $info['type'] = 'nvarchar';\n $info['type_extras'] = '(max)';\n break;\n case 'image':\n $info['type'] = 'varbinary';\n $info['type_extras'] = '(max)';\n break;\n\n case ColumnSchema::TYPE_STRING:\n $fixed =\n (isset($info['fixed_length'])) ? filter_var($info['fixed_length'], FILTER_VALIDATE_BOOLEAN) : false;\n $national =\n (isset($info['supports_multibyte'])) ? filter_var($info['supports_multibyte'],\n FILTER_VALIDATE_BOOLEAN) : false;\n if ($fixed) {\n $info['type'] = ($national) ? 'nchar' : 'char';\n } elseif ($national) {\n $info['type'] = 'nvarchar';\n } else {\n $info['type'] = 'varchar';\n }\n break;\n\n case ColumnSchema::TYPE_BINARY:\n $fixed =\n (isset($info['fixed_length'])) ? filter_var($info['fixed_length'], FILTER_VALIDATE_BOOLEAN) : false;\n $info['type'] = ($fixed) ? 'binary' : 'varbinary';\n break;\n }\n }", "protected function fromDatabase( $data )\n\t{\n\t\tforeach ( $data AS $field => $value ) \n\t\t{\t\n\t\t\tif ( isset( static::$schema[ $field ] ) )\n\t\t\t{\n\t\t\t\tif ( is_array( static::$schema[ $field ] ) )\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ][ 'type' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ];\n\t\t\t\t}\n\t\n\t\t\t\t$this->data[ $field ] = $this->sanitize( $type, $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->loaded = true;\n\t}", "function set_ms_layer_type(&$ms_layer, $db_layer){\n\t\tswitch ($db_layer->geom_type){\n\t\t\t// point\n\t\t\tcase \"point\":\n\t\t\tcase \"multipoint\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POINT);\n\t\t\t\tbreak;\n\t\t\t// line\t\n\t\t\tcase \"line\":\n\t\t\tcase \"linestring\":\n\t\t\tcase \"multilinestring\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_LINE);\n\t\t\t\tbreak;\n\t\t\t// polygon\n\t\t\tcase \"polygon\":\n\t\t\tcase \"multipolygon\":\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POLYGON);\n\t\t\t\tbreak;\n\t\t\t// default\n\t\t\tdefault:\n\t\t\t\t$ms_layer->set(\"type\", MS_LAYER_POLYGON);\n\t\t}\n\t}", "public function ormObject();", "protected function mapType(Param $param) {\n switch($param->type) {\n case 'gboolean':\n $param->zppSpec = 'b';\n $param->zppType = 'zend_bool';\n $param->ztype = 'bool';\n return;\n case 'guint':\n case 'guint64': // NOTE: may need to do this as a string!\n case 'glong':\n case 'gsize':\n case 'guint8':\n case 'gssize':\n case 'gint64':\n case 'guint32':\n case 'gdouble':\n case 'gulong':\n case 'gint32':\n case 'gint':\n $param->zppSpec = 'l';\n $param->zppType = 'long';\n $param->ztype = 'int';\n return;\n case 'utf8':\n case 'gchar':\n $param->zppSpec = 's';\n $param->zppType = ['char *', 'int'];\n return;\n case 'gpointer':\n echo \"have no idea what to do with gpointer omg\\n\";\n return;\n case 'DestroyNotify':\n case 'CompareFunc':\n case 'CompareDataFunc':\n case 'HRFunc':\n case 'HFunc':\n case 'HashFunc':\n case 'EqualFunc':\n case 'HookFindFunc':\n case 'HookCompareFunc':\n case 'HookMarshaller':\n case 'HookCheckMarshaller':\n case 'Func':\n case 'SourceFuncs':\n case 'SourceFunc':\n case 'PollFunc':\n case 'NodeForeachFunc':\n case 'CopyFunc':\n case 'NodeTraverseFunc':\n case 'ThreadFunc':\n case 'TranslateFunc':\n case 'OptionErrorFunc':\n case 'OptionParseFunc':\n case 'RegexEvalCallback':\n case 'SequenceIterCompareFunc':\n case 'SourceCallbackFuncs':\n case 'TraverseFunc':\n case 'Variant':\n echo \"I believe this is a callback - that'll be fun\\n\";\n return;\n case 'TimeVal':\n case 'Bytes':\n case 'ChecksumType':\n case 'Mutex':\n case 'Date':\n case 'DateDay':\n case 'DateMonth':\n case 'DateYear':\n case 'Time':\n case 'DateWeekday':\n case 'TimeSpan':\n case 'DateTime':\n case 'TimeZone':\n case 'Quark':\n case 'GLib.HashTable':\n case 'Hook':\n case 'HookList':\n case 'String':\n case 'GLib.List':\n case 'MarkupParser':\n case 'Node':\n case 'OptionGroup':\n case 'OptionEntry':\n case 'PatternSpec':\n case 'MatchInfo':\n case 'GLib.SList':\n case 'ScannerConfig':\n case 'SequenceIter':\n case 'Source':\n case 'MainContext':\n case 'TestCase':\n case 'TestSuite':\n case 'TrashStack':\n echo \"and I think this is an object\\n\";\n return;\n case 'filename':\n echo \"no clue at all what THIS is\\n\";\n return;\n case 'gunichar':\n echo \"hmm, this one is weird\\n\";\n return;\n case 'SeekType':\n case 'IOFlags':\n case 'KeyFileFlags':\n case 'PollFD':\n case 'Cond':\n case 'MarkupParseFlags':\n case 'TraverseFlags':\n case 'TraverseType':\n case 'RegexMatchFlags':\n case 'RegexCompileFlags':\n case 'TokenType':\n case 'TimeType':\n case 'VariantType':\n echo \"this might be an enum!\\n\";\n return;\n case 'va_list':\n echo \"this one is going to be fun *\\n\";\n return;\n default:\n throw new UnknownTypeException($param->type . $param->identifer);\n }\n }", "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'item_type'\t=> 'itemtype',\n 'name' => 'name',\n 'description' => 'description',\n 'cash'\t=> 'cashCost',\n 'diamond' => 'diamondCost',\n );\n }", "abstract public function setDAO($type);", "public static function setMappings()\n {\n $command = static::getDb()->createCommand();\n foreach (static::$languages as $lang => $analyzer) {\n $index = static::index() . \"-$lang\";\n if (!$command->indexExists($index)) {\n $command->createIndex($index);\n $command->setMapping($index, static::type(), [\n static::type() => [\n 'properties' => [\n 'version' => ['type' => 'string', 'index' => 'not_analyzed'],\n 'language' => ['type' => 'string', 'index' => 'not_analyzed'],\n 'name' => ['type' => 'string', 'index' => 'not_analyzed'],\n 'type' => ['type' => 'string', 'index' => 'not_analyzed'],\n\n 'title' => [\n 'type' => 'string',\n // sub-fields added for language\n 'fields' => [\n 'stemmed' => [\n 'type' => 'string',\n 'analyzer' => $analyzer,\n ],\n ],\n ],\n 'body' => [\n 'type' => 'string',\n // sub-fields added for language\n 'fields' => [\n 'stemmed' => [\n 'type' => 'string',\n 'analyzer' => $analyzer,\n ],\n ],\n ],\n ]\n ]\n ]);\n $command->flushIndex(static::index());\n }\n }\n }", "public function addType($type);", "protected function transformValueFromDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_STRING) {\n return (string)$value;\n }\n\n if($type==SettingInterface::TYPE_INTEGER) {\n return (integer)$value;\n }\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n if(in_array($value,[true,1,'y','yes','true'])) {\n return true;\n }\n if(in_array($value,[false,0,'n','no','false'])) {\n return false;\n }\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n return \\DateTime::createFromFormat('Y-m-d H:i:s',$value);\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n return json_decode($value,true);\n }\n\n return $value;\n }" ]
[ "0.73811954", "0.6838151", "0.6722298", "0.6606369", "0.6455383", "0.6401928", "0.6341051", "0.62335956", "0.61254036", "0.60378027", "0.5999117", "0.5973201", "0.58936816", "0.5887092", "0.58120924", "0.5799634", "0.576904", "0.5754756", "0.5724368", "0.5701635", "0.56007457", "0.5567213", "0.5554558", "0.5548148", "0.5541597", "0.5536038", "0.5529358", "0.55150455", "0.55126995", "0.5507032", "0.54984534", "0.546395", "0.5446629", "0.543291", "0.54183996", "0.5397621", "0.53920406", "0.53920406", "0.5385753", "0.5346317", "0.5329765", "0.5326655", "0.53040344", "0.5282997", "0.5279609", "0.5267657", "0.52640325", "0.52408683", "0.5237809", "0.5221185", "0.52173394", "0.52121806", "0.5172574", "0.5169671", "0.51549035", "0.5147791", "0.514451", "0.514214", "0.5139924", "0.5132343", "0.5128103", "0.5119255", "0.51100457", "0.5107083", "0.50978136", "0.5094047", "0.508759", "0.50859606", "0.5082254", "0.50785965", "0.5077626", "0.5061912", "0.5061034", "0.50557745", "0.5045652", "0.5021758", "0.50212914", "0.50099593", "0.49989998", "0.4991269", "0.49911097", "0.49791822", "0.4977277", "0.49734458", "0.49708167", "0.49703762", "0.49661177", "0.49635345", "0.4962834", "0.49522677", "0.49388927", "0.49319145", "0.49293986", "0.49221128", "0.4918248", "0.49163085", "0.49107268", "0.4910172", "0.4910046", "0.4902055" ]
0.5154957
54
removes a data type
public function removeDataType($dataType) { if ($this->hasDataType($dataType)) { unset($this->dataTypeMapping[$dataType]); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetDataTypes()\n\t{\n\t\t$this->_dataTypes\t= array();\n\t}", "public function unset(): void\n\t{\n\t\t$this->_value = $this->_allowNull ? null : self::setType('', gettype($this->_value));\n\t}", "function _acf_query_remove_post_type($sql)\n{\n}", "function remove_product_types( $types ){\n unset( $types['grouped'] );\n unset( $types['external'] );\n\n return $types;\n}", "public function dropAllTypes()\n {\n $types = [];\n\n foreach ($this->getAllTypes() as $row) {\n $row = (array) $row;\n\n $types[] = reset($row);\n }\n\n if (empty($types)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTypes($types)\n );\n }", "public function dropAllTypes()\n {\n $types = [];\n\n foreach ($this->getAllTypes() as $row) {\n $row = (array) $row;\n\n $types[] = reset($row);\n }\n\n if (empty($types)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTypes($types)\n );\n }", "function remove_note_types() {\r\n\t\t$this->code = str_replace('<type', '<type stripme=\"y\"', $this->code, $count);\r\n\t\t$this->logMsgIf('note types removed', $count);\r\n\t}", "private function CleanData(&$data, $type = ''){\n\t\tswitch($type) {\n\t\t\tcase 'none':\n\t\t\t\t$data = $data;\n\t\t\t\tbreak;\n\t\t\tcase 'str':\n\t\t\t\tsettype( $data, 'string');\n\t\t\t\tbreak;\n\t\t\tcase 'int':\n\t\t\t\tsettype( $data, 'integer');\n\t\t\t\tbreak;\n\t\t\tcase 'float':\n\t\t\t\tsettype( $data, 'float');\n\t\t\t\tbreak;\n\t\t\tcase 'bool':\n\t\t\t\tsettype( $data, 'boolean');\n\t\t\t\tbreak;\n\t\t\t\t// Y-m-d H:i:s\n\t\t\t\t// 2014-01-01 12:30:30\n\t\t\tcase 'datetime':\n\t\t\t\t$data = trim( $data );\n\t\t\t\t$data = preg_replace('/[^\\d\\-: ]/i', '', $data);\n\t\t\t\tpreg_match( '/^([\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2})$/', $data, $matches );\n\t\t\t\t$data = $matches[1];\n\t\t\t\tbreak;\n\t\t\tcase 'ts2dt':\n\t\t\t\tsettype( $data, 'integer');\n\t\t\t\t$data = date('Y-m-d H:i:s', $data);\n\t\t\t\tbreak;\n\n\t\t\t\t// bonus types\n\t\t\tcase 'hexcolor':\n\t\t\t\tpreg_match( '/(#[0-9abcdef]{6})/i', $data, $matches );\n\t\t\t\t$data = $matches[1];\n\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\t$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$data = '';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $data;\n\t}", "public function clearDataByType($type) {\n $sql = 'DELETE shadow_objects.*, shadow_object_relations.* FROM shadow_object_relations LEFT JOIN shadow_objects ON shadow_object_relations.real_object_id = shadow_objects.id WHERE shadow_objects.type = ?';\n $this->database->execute($sql, array($type));\n\n $sql = 'DELETE from `shadow_meta` WHERE type = ?';\n $this->database->execute($sql, array($type));\n }", "abstract protected function getDataTypesToExclude();", "public function clean($data,$type='string'){\n return $this->purify($data,$type);\n }", "public function remove($typeId);", "public function removeType($type)\n {\n foreach ($this->fields as $fieldname => $field) {\n if ($field->type == $type) {\n unset($this->fields[$fieldname]);\n }\n }\n return $this;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_MONEY] = null;\n }", "function remove_id_type($id_type_id = '')\n\t{\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->delete('id_type');\n\n\t\t$this->session->set_flashdata('success', 'ID type has been deleted successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "public function disableTypeChecks() {\n $this->doTypeChecks = false;\n }", "function <%= functionPrefix %>_remove_type_attr($tag, $handle) {\n return preg_replace( \"/type=['\\\"]text\\/(javascript|css)['\\\"]/\", '', $tag );\n}", "public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id', 1)->get();\n foreach ( $records as $record )\n $record->forceDelete();\n\n //delete the lookup definition itself\n $record = LookupType::find(1);\n $record->forceDelete();\n }", "public function uninstall()\n\t\t{\n\t\t\t$this->_Parent->Database->delete('tbl_pages_types', \"`page_id` = 4294967295\");\n\t\t}", "public function getDataType() {\n return null;\n }", "private function removeAttribute( $attr )\n {\n if (isset($this->attributeTypes[$attr]) || array_key_exists($attr, $this->attributeTypes))\n unset( $this->attributeTypes[$attr] ); // forma de remover un valor de un array...\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_BINARY] = null;\n $this->values[self::_REPLAY] = null;\n }", "function hook_bootstrap_inline_element_types_alter(array &$types) {\n // Remove certain types from the list.\n foreach (['number', 'tel'] as $type) {\n $index = array_search($type, $types);\n if ($index !== FALSE) {\n unset($types[$index]);\n }\n }\n}", "public function wipe($type) {\n\t\t$table = $this->safeTable($type);\n\t\t$this->adapter->exec(\"DELETE FROM $table\");\n\t}", "public function unshift(\\SetaPDF_Core_Type_AbstractType $value) {}", "private static function remove_types() {\n\n\t\treturn [\n\t\t\t'attachment',\n\t\t\t'revision',\n\t\t\t'nav_menu_item'\n\t\t];\n\n\t}", "function convertizer_remove() {\ndelete_option('convertizer_data');\n}", "public function dropAllTypes()\n {\n throw new LogicException('This database driver does not support dropping all types.');\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_VALUE] = null;\n }", "function beforeSave() {\r\n\t\t$fields = $this->getColumnTypes();\r\n\t\tforeach ($fields as $k => $v) {\r\n\t\t\tif (isset($this->data[$this->name][$k]) and ($v == 'integer' or $v == 'float')\r\n\t\t\t\t and $this->data[$this->name][$k] === '') {\r\n\t\t\t\t $this->data[$this->name][$k] = NULL; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::beforeSave(); \r\n\t}", "function oh_remove_type_attr($tag, $handle) {\n return preg_replace( \"/ type=['\\\"]text\\/(javascript|css)['\\\"]/\", '', $tag );\n}", "function timetracking_type_delete(timetrackingType $type) {\n $type->delete();\n}", "protected function removeType($array)\n {\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $array[$key] = $this->removeEmpty($array[$key]);\n }\n\n if ($key === \"___type\") {\n unset($array[$key]);\n }\n }\n\n return $array;\n }", "private function removeValueFromConstantType(\\PHPStan\\Type\\Type $type) : \\PHPStan\\Type\\Type\n {\n if ($type instanceof \\PHPStan\\Type\\Constant\\ConstantFloatType) {\n return new \\PHPStan\\Type\\FloatType();\n }\n if ($type instanceof \\PHPStan\\Type\\Constant\\ConstantStringType) {\n return new \\PHPStan\\Type\\StringType();\n }\n if ($type instanceof \\PHPStan\\Type\\Constant\\ConstantIntegerType) {\n return new \\PHPStan\\Type\\IntegerType();\n }\n if ($type instanceof \\PHPStan\\Type\\Constant\\ConstantBooleanType) {\n return new \\PHPStan\\Type\\BooleanType();\n }\n return $type;\n }", "public function delete_type_record($id){\n\t\t$this->db->where('training_type_id', $id);\n\t\t$this->db->delete('training_types');\n\t\t\n\t}", "public function destroy(DataType $dataType)\n {\n $dataType->delete();\n return $this->api->success()->message(\"Data Type has been deleted\")->payload($dataType)->code(200)->send();\n }", "public function deregister_field($type_name, $field_name)\n {\n }", "public function remove_nvar_type($vals)\n {\n /* BENCHMARK */ $this->benchmark->mark('func_remove_nvar_type_start');\n\n $this->db->delete('nvar_type', array('node_id'=>$vals['node_id'],'var_type_id'=>$vals['vtype_id']));\n\n /* BENCHMARK */ $this->benchmark->mark('func_remove_nvar_type_end');\n }", "public function unregisterTypeInferenceRule(string $phpType): void\n {\n unset($this->typeInferenceRules[$phpType]);\n }", "function calendar_display_type_delete() {\n\t\t$db = new DB ;\n\t\tif(isset($_GET['id']) > 0)\n\t\t{\n\t\t\t// update all events who use this event_type we set the event_type to 'other'.\n\t\t\t// if we don't do this, the events who use this event_type can't be edited anymore.\n\t\t\t$result = $this->set_types_to_other($_GET['id']);\n\n\t\t\t// delete the event_type\n\t\t\t$sql = \"delete from event_type where event_type_id = \".$_GET['id'];\n\t\t\t$db->execute_statement($sql);\n\n\t\t\tinclude_once(SF_CLASS_PATH.'/calendar/calendar.inc');\n $calendar_obj = new Calendar ;\n $calendar_obj->cache_event_type_array();\n\t\t\t\t\t\t\t\n\t\t}\n\t\theader('Location: /admin/calendar/display_type_list.php');\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_AMOUNT] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_AMOUNT] = null;\n }", "private function filter_type( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tswitch ( $this->type->case() ) {\n\t\t\tcase Schema_Type::NUMBER:\n\t\t\t\treturn (int) $value;\n\n\t\t\tcase Schema_Type::BOOL:\n\t\t\t\treturn (bool) $value;\n\n\t\t\tcase Schema_Type::STRING:\n\t\t\t\treturn (string) $value;\n\n\t\t\tcase Schema_Type::ARRAY:\n\t\t\t\treturn (array) $value;\n\t\t}\n\n\t\treturn $value;\n\t}", "public static function nothingMatchesTheInputType($data)\n {\n throw new E4xx_UnsupportedType(SimpleType::from($data));\n }", "public function scrub($data);", "public function remove_attr($type){\n\t\tif(isset($this->attr[$type])){\n\t\t\tunset($this->attr[$type]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function delete_type($id)\n\t\t{\n\t\t\n\t\t$this->db->where('revenue_id',$id);\n\t\t\n\t\t$this->db->delete($this->table_name);\n\t\t\n\t\t}", "function remove_post_type_support($post_type, $feature)\n {\n }", "protected function uninstall_points_type_settings() {\n\n\t\t$routine = new WordPoints_Reset_Points_Uninstaller_Points_Types_Settings();\n\t\t$routine->run();\n\t}", "function _cleanData($value, $type){\n $value = trim($value);\n if(!$value) return '';\n if (is_array($type)) {\n if (isset($type['enum']) &&\n !preg_match('/(^|,\\s*)' . preg_quote_cb($value) . '($|\\s*,)/', $type['enum'])) {\n return '';\n }\n $type = $type['type'];\n }\n switch($type){\n case 'dt':\n if(preg_match('/^(\\d\\d\\d\\d)-(\\d\\d?)-(\\d\\d?)$/',$value,$m)){\n return sprintf('%d-%02d-%02d',$m[1],$m[2],$m[3]);\n }\n return '';\n case 'url':\n if(!preg_match('!^[a-z]+://!i',$value)) $value='http://'.$value;\n return $value;\n case 'mail':\n $email = '';\n $name = '';\n $part = '';\n $parts = preg_split('/\\s+/',$value);\n do{\n $part = array_shift($parts);\n if(!$email && mail_isvalid($part)){\n $email = strtolower($part);\n continue;\n }\n $name .= $part.' ';\n }while($part);\n return trim($email.' '.$name);\n case 'page': case 'nspage':\n return cleanID($value);\n default:\n return $value;\n }\n }", "public function resetReportTypes()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportTypeList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "abstract protected function unSerializeData();", "function delete_user_type($user_type_id)\n\t\t{\n\t\t\t$eventlogbol = new eventlogbol();\n\t\t\t$old_values='';\n\t\t\t$new_values_arr = array();\n\t\t\t$new_values_arr['user_type_id'] = $user_type_id;\n\t\t\t$event_result = $eventlogbol->save_eventlog('Delete','tbl_user_type',$new_values_arr,$old_values);\n\t\t\tif($event_result)\n\t\t\t{\n\t\t\t\t$query=\"DELETE FROM tbl_user_type WHERE user_type_id=:user_type_id \";\t\t\n\t\t\t\t$result = execute_non_query($query, array(':user_type_id' => $user_type_id));\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}", "public function getDataType()\n {\n return $this->data_type;\n }", "public function remove_data($name)\n\t{\n\t\tunset($this->_data[$name]);\n\t}", "public function scrubFloat(float $data) : float;", "public function withoutValue();", "function deregister_graphql_field(string $type_name, string $field_name)\n {\n }", "public function unsetVehTypePref($index)\n {\n unset($this->vehTypePref[$index]);\n }", "public function removeData($type, $id)\n { \n if($type == 'section'){\n Category_sections::destroy($id);\n }elseif($type == 'question'){\n Section_questions::destroy($id);\n }elseif($type == 'answer'){\n Question_answers::destroy($id);\n }\n \n return response()->json(['success' => 1]); \n \n }", "public function deleteType($type){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"])||$user[\"status\"]!=DBConfig::$userStatus[\"admin\"]){\n\t\t\treturn false;\n\t\t}\n\t\t$type = $this->getType($type);\n\t\tif(!isset($type[\"id\"]))return false;\n\t\t$query = Queries::deletetype($type[\"id\"]);\n\t\t$result = $this->query($query);\n\t\tif(!$result)return false;\n\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes type $type\");\n\t\t$query = Queries::removetypefromentries($type[\"id\"]);\n\t\treturn $this->query($query);\n\t}", "public static function removeNonUTF8($data)\n\t{\n\t\t// Array || object\n\t\tif(is_array($data) || is_object($data)){\n\t\t\tforeach($data as $key => &$val){\n\t\t\t\t$val = self::removeNonUTF8($val);\n\t\t\t}\n\t\t\tunset($key, $val);\n\t\t\t\n\t\t\t//String\n\t\t}else{\n\t\t\tif(!preg_match('//u', $data))\n\t\t\t\t$data = 'Nulled. Not UTF8 encoded or malformed.';\n\t\t}\n\t\treturn $data;\n\t}", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public static function uninstall() {\n // tenemos que borrar el custom post type\n // Es conveniente borrar todos los datos que ha generado el plugin en la BBDD\n }", "public function getDataType() {\n return $this->dataType;\n }", "public function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\t\t\n\t}", "public function unFilterData($type, $data, $key = null)\n {\n $tmp = unserialize($data, ['allowed_classes' => false]);\n if ($tmp === false) {\n $tmp = unserialize(utf8_decode($data), ['allowed_classes' => false]);\n }\n if ($tmp === false) {\n return [];\n }\n if ($key !== null) {\n $tmp = $tmp[$key];\n }\n $map = $this->getMapping($type);\n if ($map === false) {\n return $tmp;\n }\n foreach ($map as $from => $to) {\n if (isset($tmp[$from])) {\n $tmp[$to] = $tmp[$from];\n unset($tmp[$from]);\n }\n }\n\n return $tmp;\n }", "public static function removeType($doctrineType)\n {\n unset(static::$typeMap[$doctrineType]);\n }", "private function clearData($data ) {\r\r\n $remove_keys = array('asp_options_serialized');\r\r\n\r\r\n if ( is_array($data) ) {\r\r\n foreach ($remove_keys as $key) {\r\r\n if ( isset($data[$key]) )\r\r\n unset($data[$key]);\r\r\n }\r\r\n }\r\r\n\r\r\n return $data;\r\r\n }", "function unregister_block_type($name)\n {\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType() {}", "public static function _clean($source, $type) {\n switch (strtoupper($type)) {\n case 'INT' :\n case 'INTEGER' :\n // Only use the first integer value\n preg_match('/-?[0-9]+/', (string) $source, $matches);\n $result = @ (int) $matches[0];\n break;\n\n case 'FLOAT' :\n case 'DOUBLE' :\n // Only use the first floating point value\n preg_match('/-?[0-9]+(\\.[0-9]+)?/', (string) $source, $matches);\n $result = @ (float) $matches[0];\n break;\n\n case 'BOOL' :\n case 'BOOLEAN' :\n $result = (bool) $source;\n break;\n\n case 'WORD' :\n $result = (string) preg_replace('/[^A-Z_]/i', '', $source);\n break;\n\n case 'ALNUM' :\n $result = (string) preg_replace('/[^A-Z0-9]/i', '', $source);\n break;\n\n case 'CMD' :\n $result = (string) preg_replace('/[^A-Z0-9_\\.-]/i', '', $source);\n $result = ltrim($result, '.');\n break;\n\n case 'BASE64' :\n $result = (string) preg_replace('/[^A-Z0-9\\/+=]/i', '', $source);\n break;\n\n case 'STRING' :\n $result = (string) $source;\n break;\n\n case 'ARRAY' :\n $result = (array) $source;\n break;\n\n case 'PATH' :\n $pattern = '/^[A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*([\\\\\\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\\.-]*)*$/';\n preg_match($pattern, (string) $source, $matches);\n $result = @ (string) $matches[0];\n break;\n\n case 'USERNAME' :\n $result = (string) preg_replace('/[\\x00-\\x1F\\x7F<>\"\\'%&]/', '', $source);\n break;\n\n\n\n default :\n $result = $source;\n break;\n }\n\n return $result;\n }", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "public function getDatatype() {}", "public function removeRootBindingType($typeName);", "public function deleteByIdType($id, $type);", "public function testCastNoTypeWhenWriting() {\r\n // Create record\r\n $po = new test_persistence_AbstractPersistenceAdapterTestPersistentObjectNoType();\r\n $po->booleanValue = true;\r\n $po->intValue = 2147483647;\r\n $po->stringValue = 'Hallo Welt!';\r\n // Store new record\r\n $this->setExpectedException('Exception', 'Type of persistent object property not set.');\r\n $this->getPersistenceAdapter()->save($po);\r\n }", "public function unsetNumberValue(): void\n {\n $this->numberValue = [];\n }", "protected function remove($type)\n {\n unset($this->alerts[$type]);\n }", "function delete_post_type_event(){\n\tunregister_post_type( 'event' );\n}", "protected function editDataType($data_type = null, $column_name = '')\n {\n if ($data_type === null) {\n throw new RuntimeException(\n 'Query-editDataType Method: No Datatype provided for Column: ' . $column_name\n );\n }\n }", "function clearType($type) {\n $keyGroups = array();\n $theKey = 'keyGroup' . ucfirst($type);\n if (isset($this->$theKey)) {\n $keyGroups = $this->$theKey;\n }\n\n $cache = Zend_Registry::get('cache');\n $keys = $cache->get('SITEKEYS');\n foreach ($keyGroups AS $keyGroup) {\n if (isset($keys[$keyGroup])) {\n foreach ($keys[$keyGroup] AS $singleKey) { \n $cache->remove($singleKey);\n } \n $keys[$keyGroup] = array();\n }\n }\n $cache->set($keys, 'SITEKEYS');\n }", "#[@test]\n public function differentTypesNotEqual() {\n $this->assertNotEquals(new Integer(1), new Long(1), 'integer = long');\n $this->assertNotEquals(new Byte(1), new Short(1), 'byte = short');\n $this->assertNotEquals(new Double(1.0), new Float(1.0), 'double = float');\n }", "public function getDataType() {\n\t\treturn $this -> dataType;\n\t}", "function search_index_remove($object_id, $type) {\n return call_user_func_array(array(SEARCH_ENGINE, 'remove'), array($object_id, $type));\n }", "function deleteType($id) {\n \t$sql = \"DELETE FROM type WHERE id=:id\";\n try {\n $db = getConnection(\"alcapp\");\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"id\", $id);\n $stmt->execute();\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n }", "static function remove_dispaly_tables_existing_data($camp_id, $type){\n\t\tglobal $wpdb;\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t$camp_id = (int) $camp_id;\n\t\t\n\t\t$sql = \"DELETE FROM $display WHERE camp_id = $camp_id AND type = '$type'\";\n\t\t$wpdb->query($sql);\n\t}", "function hook_commerce_adyen_payment_types_alter(array &$payment_types) {\n unset($payment_types['openinvoice']);\n}", "public function offsetUnset ($offset) {\n $this->__fields[$offset]['data'] = null;\n }", "protected function removeUnWantedfields(&$data) {\n unset($data['uuid']);\n unset($data['langcode']);\n unset($data['dependencies']);\n unset($data['id']);\n }", "public function get_datatype() {\n return $this->datatype;\n }", "public static function findTypesRemovedFromUnions(\\GraphQL\\Type\\Schema $oldSchema, \\GraphQL\\Type\\Schema $newSchema)\n {\n }", "public function apply(Type $type)\n {\n foreach ($this->blacklistedFields as $blacklistedField) {\n if (isset($type->$blacklistedField)) {\n unset($type->$blacklistedField);\n }\n }\n\n return $type;\n }" ]
[ "0.6517857", "0.6418251", "0.6355398", "0.6110722", "0.6069087", "0.6069087", "0.6035349", "0.5994052", "0.59864736", "0.5881831", "0.58596563", "0.5857601", "0.58493507", "0.58144987", "0.58114815", "0.5808125", "0.5797045", "0.5727947", "0.57100236", "0.56980497", "0.5694956", "0.56923634", "0.56855536", "0.5663995", "0.56636816", "0.56409645", "0.5622941", "0.5610734", "0.5604402", "0.55582154", "0.5557501", "0.5555359", "0.55354786", "0.55241674", "0.5488836", "0.5488549", "0.54873884", "0.5486733", "0.5479369", "0.54777086", "0.5465695", "0.5465695", "0.5461515", "0.54571575", "0.5445816", "0.54266703", "0.5411749", "0.53968465", "0.53819555", "0.5379924", "0.53757477", "0.5352538", "0.5348004", "0.5339753", "0.5307014", "0.52918756", "0.5287592", "0.5284342", "0.52793425", "0.52757895", "0.52708507", "0.52341574", "0.52236956", "0.52236956", "0.5223146", "0.5223146", "0.52213234", "0.5219335", "0.52080697", "0.51754016", "0.51734024", "0.5172482", "0.51683015", "0.5149464", "0.5149464", "0.5149464", "0.5149464", "0.51476556", "0.5139024", "0.5137076", "0.5132637", "0.5121848", "0.51192623", "0.51023704", "0.50970256", "0.5094966", "0.50932497", "0.5086791", "0.5082531", "0.50774544", "0.50732", "0.5071655", "0.50679153", "0.5067769", "0.50627255", "0.50620323", "0.5061679", "0.5049564", "0.5036792", "0.5027401" ]
0.6388032
2
checks, if data type is defined
public function hasDataType($dataType) { return isset($this->dataTypeMapping[$dataType]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validDataTypes();", "public function isSetDataType()\n {\n return !is_null($this->_fields['DataType']['FieldValue']);\n }", "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "private function supportData()\n {\n $dataClass = $this->type->getDataClass();\n\n return $this->data instanceof $dataClass || $dataClass === get_class($this->data);\n }", "private function _valid_data_type($type=NULL){\n\t\tif(!empty($type)){\n\t\t\tif ($type == Minematic_Connector_Model_Config::DATA_TYPE_ALL ||\n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_ITEMS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_USERS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_EVENTS){\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function checkForDataTypes($modifyModel = false) {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForDataType($fieldName, $fieldInfo, $modifyModel) && $res; \n }\n return $res;\n }", "public function isValidDataType(string $type): bool\r\n {\r\n return in_array($type, static::DATA_TYPES);\r\n }", "protected function _check($data)\n {\n if ($this->_count != 0) {\n $this->_type($data);\n } elseif (is_array($data)) {\n $this->_type($data);\n }\n }", "public function hasValueType() {\n return $this->_has(7);\n }", "public function getDatatype() {}", "public function checkDataFormat(&$data)\n {\n return true;\n }", "public function validType($key, $type, &$data) {\n\n\n if(!is_bool($data) && !is_array($data) && is_string($data) && !strlen($data)) return false;\n\n // database conversion types\n $type = preg_replace('/\\(.*/','',$type);\n\n switch (strtolower($type)) {\n case \"varbinary\": case \"varchar\": case \"char\": case \"string\": return is_string($data);\n case \"text\": case \"txt\": return is_string($data);\n case \"integer\": if(strval(intval($data))===strval($data)) $data=intval($data);return is_integer($data);\n case \"decimal\": case \"float\": if(floatval($data)!=0 || $data===\"0\" || $data === 0) $data=floatval($data);return is_float($data);\n case \"bit\": if(strval(intval($data))===strval($data)) $data=intval($data);return ($data==0 || $data==1);\n case \"model\": return is_array($data) && !empty($data);\n case \"json\": if(is_array($data)) $data = json_encode($data);return is_string($data) && is_array(json_decode($data,true));\n case \"name\": return $this->validateName($key,$data);\n case \"ip\": return filter_var($data,FILTER_VALIDATE_IP);\n case \"url\": return filter_var($data,FILTER_VALIDATE_URL);\n case \"email\": return is_string($data) && $this->validateEmail($key,\"email\",$data);\n case \"emails\": return is_array($data) && $this->validateEmail($key,\"email\",$data);\n case \"phone\": return is_string($data);\n case \"zip\": return is_string($data);\n case \"keyname\": return is_string($data);\n case \"key\": return is_string($data);\n case \"date\": return $this->validateDate($data);\n case \"datetime\": return $this->validateDateTime($data);\n case \"datetimeiso\": return $this->validateDateTimeISO($data);\n case \"currency\": return is_numeric($data);\n case \"boolean\": if(!is_bool($data) && ($data=='true' || $data=='false')) $data = ($data == 'true');return is_bool($data);\n case \"array\": return is_array($data);\n case \"list\": return is_array($data);\n case \"array_to_string\": if(is_array($data)) $data=implode(\",\",$data);return is_string($data);\n default: return false;\n }\n }", "public function testSpecialDataTypes()\n\t{\n\t\ttestpack( 'Special data types' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = 'someday';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'TEXT' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::nuke();\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'NUMERIC' );\n\t}", "function recognize_data_type($string)\n{\n\t$string = mb_strtolower(trim($string), 'UTF-8');\n\n\t// if the data type is empty string or any of bool representations set it as bool\n\tif(empty($string) || is_bool(filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)))\n\t\treturn \"BIT\";\n\tif(is_int(filter_var($string, FILTER_VALIDATE_INT))) // else if int set as int\n\t\treturn \"INT\";\n\tif(is_float(filter_var($string, FILTER_VALIDATE_FLOAT))) // or float\n\t\treturn \"FLOAT\";\n\n\treturn \"NTEXT\"; // if neither of them set it to NTEXT (doesn't mather if it is attribute or not, it will be decided later)\n}", "public function getDataType() {}", "public function typeIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return !is_null($this->scan_attributes->template_type);\n }", "public function checkType() {\n\t\t//Because the DB gave us a string for the card type, we must\n\t\t//ensure that they are strings and compare accordingly.\n\t\tif (strcmp($this->getTypeAsStr(), \"aspect\")==0) {\n\t\t\t$this->boostInfo = 0;\n\t\t\t$this->magnitude = 0;\n\t\t}\n\t}", "private function isValidData($data) {\n\t\tif (!is_string($data) && !is_int($data) && !is_float($data) && !is_array($data)) {\n\t\t\tthrow new FlintstoneException('Invalid data type');\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasType(){\n return $this->_has(9);\n }", "function checkType ($value, $type) {\n\tswitch ($type) {\n\t\tcase STRING : $r = is_string ($value); break;\n\t\tcase BOOL : $r = is_bool ($value); break;\n\t\tcase NUMERIC : $r = is_int ($value); break;\n\t\tcase REAL : $r = (is_real ($value) or is_int ($value)); break;\n\t\tdefault : return new Error ('TYPE_NOT_RECOGNIZED'); \n\t}\n\t\n\tif ($r === true) {\n\t\treturn true;\n\t} else {\n\t\treturn new Error ('TYPE_MISMATCH_VALUE', $type, $value);\n\t}\n}", "public function checkDataFormat($data) {\n return true;\n }", "public function hasType(){\n return !empty($this->type);\n }", "public function hasType(){\n return $this->_has(4);\n }", "public function validEntrytype($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\n\t\t/* Load the Entrytype model */\n\t\tApp::import(\"Webzash.Model\", \"Entrytype\");\n\t\t$Entrytype = new Entrytype();\n\n\t\tif ($Entrytype->exists($value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasVariableType() {\n return $this->_has(4);\n }", "public function hasVariableType() {\n return $this->_has(4);\n }", "function is_field_type($name)\n {\n }", "abstract public function checkValueType($arg_value);", "protected function validateType($value)\n {\n }", "public function testDataTypeWithLengthNotSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'id';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"int\", $field->getDataType());\n $this->assertNull($field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "public abstract function get_supported_datatypes();", "private static function checkIfTypeDefinedByNumberIsProper(int $inputDataType) : bool {\n // if passed int is in array of available types return true\n return in_array(\n $inputDataType,\n array_values(Data::INPUT_DATA_TYPES_ALIASES)\n );\n }", "public function acceptsDataStructure($type)\n {\n return false;\n }", "final public function createdDataTypeInstanceHasCorrectProperties(): void\n {\n $dataType = new DataTypeMock();\n $this->assertEquals(PHP_INT_SIZE << 3, $dataType->getSystemMaxBits());\n $this->assertNull($dataType->getValue());\n $this->assertEquals('object', $dataType->getPrimitiveType());\n }", "private static function checkDataType($array)\n {\n if(count($array) <= 1)\n {\n return true;\n }\n\n $last = count($array) - 1;\n\n $type = self::getCustomDataType($array[$last]);\n\n if ($type != self::getCustomDataType($array[0]))\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "private function _isTypeLiteral($xsdDataType){\n\t\treturn isset($this->_xsdTypes[$xsdDataType]);\n\t}", "public function hasType(){\r\n return $this->_has(7);\r\n }", "public function getDataWithTypeField() {}", "abstract protected function initDataTypes();", "function reqType($data, $type = \"string\") {\n\t\tif (!settype($data, $type))\n\t\t\tstop(3, \"Type Mismatch! \\\"$data\\\" is not a $type\", 400);\n\t\t\n\t\treturn $data;\n\t}", "public function hasType(){\r\n return $this->_has(1);\r\n }", "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function isValue()\n {\n return\n $this->type === 'string' ||\n $this->type === 'number' ||\n $this->type === 'null' ||\n $this->type === 'boolTrue' ||\n $this->type === 'boolFalse';\n }", "public function add_type($data){\n\t\t$this->db->insert('training_types', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function isDataValid() \n {\n return true;\n }", "public function hasType() {\n return $this->_has(3);\n }", "function isDateType($type)\n{\n return($type == \"date\" or $type == \"year\" or isTimeType($type));\n}", "function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\DataDownloadType;\n\t}", "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "public function hasType(){\n return $this->_has(5);\n }", "public function hasType(){\n return $this->_has(5);\n }", "function is($type);", "function CheckChangeColumnType() {\r\n\t\t// Create connection\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t$sql = \"SELECT DATA_TYPE FROM information_schema.COLUMNS WHERE TABLE_NAME = 'tbldmlmapcontent' AND COLUMN_NAME = 'CntField7'\";\r\n\t\t$result = $conn->query($sql);\r\n\r\n\t\t// There are valid data for current page. So, shows the map\r\n\t\t\t\r\n\t\t$array = array();\r\n\t\twhile($row = $result->fetch_assoc()) {\r\n\t\t\t$array[] = $row;\r\n\t\t}\r\n\t\t\r\n\t\t$myResult;\r\n\t\t$myColumnType = $array[0]['DATA_TYPE'];\r\n\t\tif ( $myColumnType == 'mediumtext' || $myColumnType == 'MEDIUMTEXT' ) {\r\n\t\t\t// The type of the column is OK. Runs saving data to the database\r\n\t\t\t$myResult = 1;\r\n\t\t} else {\r\n\t\t\t$myResult = dmlChangeColumnType();\r\n\t\t}\r\n\t\techo $myResult;\r\n\r\n\t\t$conn->close();\r\n\t}", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "public function getDataWithTypeParameters() {}", "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "function is_type_int($typ)\n{\n\t$ints = @array(\"int\",\"serial\",\"bigserial\",\"oid\",\"float\",\"numeric\",\"real\",\"double\",\"smallint\");//\"date\",\"time\"\n\t$typ = @strtolower($typ);\n\tforeach ($ints as $v){\n\t\t$pos = @strpos($typ,$v);\n\t\tif ($pos!==false && !$pos) return 1;\n\t}\n}", "private function isTypeValid($param)\n {\n return is_array($param) || is_string($param) || is_null($param);\n }", "public function hasType()\n {\n return isset($this->type);\n }", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "public function hasTypeIdentifier()\n {\n return count($this->get(self::TYPE_IDENTIFIER)) !== 0;\n }", "protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }", "public function isDataValid(): bool;", "public function testDataTypeWithLengthSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'name';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"varchar\", $field->getDataType());\n $this->assertSame(\"100\", $field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "public function testDataType()\n {\n $user = User::inRandomOrder()->first();\n $this -> assertInternalType('int',$user->id);\n $this -> assertInternalType('string', $user -> name);\n $this -> assertInternalType('string', $user -> email);\n $this -> assertInstanceOf('App\\User',$user);\n }", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "public function hasType(){\n return $this->_has(2);\n }", "public function getDataType()\n {\n return $this->data_type;\n }", "public function hasType() {\n return $this->_has(2);\n }", "protected function has_data()\n {\n }", "function data_type($type) {\r\n\t\t$return_value = '';\r\n\t\t$type = (string) $type;\r\n\r\n\t\tswitch (strtolower($type)) {\r\n\t\t\t// supported scalar types\r\n\t\t\tcase 'ENTITIES':\r\n\t\t\tcase 'ENTITY':\r\n\t\t\tcase 'ID':\r\n\t\t\tcase 'IDREF':\r\n\t\t\tcase 'IDREFS':\r\n\t\t\tcase 'NCName':\r\n\t\t\tcase 'NMTOKEN':\r\n\t\t\tcase 'NMTOKENS':\r\n\t\t\tcase 'Name':\r\n\t\t\tcase 'anySimpleType':\r\n\t\t\tcase 'anyType':\r\n\t\t\tcase 'base64':\r\n\t\t\tcase 'base64Binary':\r\n\t\t\tcase 'boolean':\r\n\t\t\tcase 'byte':\r\n\t\t\tcase 'date':\r\n\t\t\tcase 'dateTime':\r\n\t\t\tcase 'decimal':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'duration':\r\n\t\t\tcase 'float':\r\n\t\t\tcase 'gDay':\r\n\t\t\tcase 'gMonth':\r\n\t\t\tcase 'gMonthDay':\r\n\t\t\tcase 'gYear':\r\n\t\t\tcase 'gYearMonth':\r\n\t\t\tcase 'hexBinary':\r\n\t\t\tcase 'i4':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'language':\r\n\t\t\tcase 'long':\r\n\t\t\tcase 'negativeInteger':\r\n\t\t\tcase 'nonNegativeInteger':\r\n\t\t\tcase 'nonPositiveInteger':\r\n\t\t\tcase 'normalizedString':\r\n\t\t\tcase 'positiveInteger':\r\n\t\t\tcase 'short':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'time':\r\n\t\t\tcase 'timeInstant':\r\n\t\t\tcase 'token':\r\n\t\t\tcase 'unsignedByte':\r\n\t\t\tcase 'unsignedInt':\r\n\t\t\tcase 'unsignedLong':\r\n\t\t\tcase 'unsignedShort':\r\n\t\t\tcase 'ur-type':\r\n\t\t\t\t$return_value = 'xsd:' . $type;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\tforeach ($this->types as $id => $type_definition) {\r\n\r\n\t\t\t\t\tif ($type_definition['name'] == $type) {\r\n\t\t\t\t\t\t$return_value = 'tns:' . $type;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} // end: if\r\n\t\t\t\t} // end: foreach\r\n\t\t} // end: switch\r\n\r\n\t\treturn $return_value;\r\n\t}", "public function isValueValid($value) {\n\t\treturn $value instanceof DataType\\TextType;\n\t}", "public function testGetData_Types()\n {\n $this->assertInstanceOf('CPC\\ServerMonitor\\Resource\\Hostname', $this->Hostname);\n $this->assertInternalType('array', $this->Hostname->getData());\n }", "static function validate ($type, $v)\n {\n if (is_null ($v) || $v === '')\n return true;\n\n switch ($type) {\n\n case type::binding:\n return is_string ($v);\n\n case type::any:\n case type::bool: // Any value can be typecast to boolean.\n return true;\n\n case type::data:\n return is_array ($v) || is_object ($v)\n || $v instanceof \\Traversable\n || (is_string ($v) && strpos ($v, '{') !== false);\n\n case type::id:\n return !!preg_match ('#^[\\w\\-]+$#', $v);\n\n case type::content:\n return $v instanceof Metadata || is_string ($v); // Note: content props can be specified in attribute syntax.\n\n case type::metadata:\n return $v instanceof Metadata;\n\n case type::collection:\n return is_array ($v);\n\n case type::number:\n return is_numeric ($v);\n\n case type::string:\n return is_scalar ($v) || (is_object ($v) && method_exists ($v, '__toString'));\n }\n return false;\n }", "public static function validateType()\n\t{\n\t\treturn array(\n\t\t\tarray(__CLASS__, 'checkType')\n\t\t);\n\t}", "public function check()\n {\n return ctype_digit($this->value);\n }", "public function getValidTypes()\r\n\t{\r\n\t\treturn array(\"Float\", \"Integer\", \"Location\", \"Text\", \"Boolean\", \r\n\t\t\t\"MultiText\", \"Date\", \"DateTime\", \"Enum\", \"MultiEnum\", \"Group\");\t\r\n\t}", "public function getDataType() {\n return null;\n }", "public function hasType($name);", "abstract protected function getValidType(): string;", "public function setup_types()\n {\n }", "public function testSetupTypes()\n {\n $this->assertInstanceOf('CPC\\ServerMonitor\\Resource\\Memory', $this->Memory);\n $this->assertInternalType('array', $this->Memory->getData());\n }", "function verify($var, $strict = false, $type = 'string'){\n if(!isset($var) || empty($var) || is_null($var)){\n return false;\n }\n else {\n if($strict){\n switch($type){\n case 'number':\n if(is_numeric($var)){\n return true;\n }\n break;\n case 'string':\n return true;\n break;\n case 'array':\n if(is_array($var)){\n return true;\n }\n break;\n default:\n return false;\n break;\n }\n }\n else {\n return true;\n }\n\n }\n }", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "public function hasType(): bool\n {\n return $this->node->type !== null;\n }", "function hasValidDataField()\r\n {\r\n $result=false;\r\n\r\n if ($this->_datafield!=\"\")\r\n {\r\n if ($this->_datasource!=null)\r\n {\r\n if ($this->_datasource->Dataset!=null)\r\n {\r\n $result=true;\r\n }\r\n }\r\n }\r\n\r\n return($result);\r\n }", "function mDATATYPE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DATATYPE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:241:3: ( 'datatype' ) \n // Tokenizer11.g:242:3: 'datatype' \n {\n $this->matchString(\"datatype\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "protected function checkType(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Type) && $this->_Type !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Type} is not a valid value for Type\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && $this->_Type != '' && !in_array($this->_Type, array(self::TYPE_SOURCE, self::TYPE_THUMBNAIL, self::TYPE_FILE, self::TYPE_CCA)) ) {\n\t\t\t$inMessage .= \"Type must be one of TYPE_SOURCE, TYPE_THUMBNAIL, TYPE_FILE\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\treturn $isValid;\n\t}", "public function getDataType(): ?string {\n $val = $this->getBackingStore()->get('dataType');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'dataType'\");\n }", "public static function data_is_set() {\r\n\t\treturn self::$page_data instanceof PageData;\r\n\t}", "function isTimeType($type)\n{\n return($type == \"datetime\" or $type == \"time\" or $type == \"timestamp\");\n}", "function check( $value, $type='text' )\n {\n return Pgg_Validate::is( $value, $type );\n }", "public function setDataType($value)\n\t{\n\t\t$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String);\n\t}", "static public function isString($data)\n {\n return is_string($data);\n }", "public function enableTypeChecks() {\n $this->doTypeChecks = true;\n }", "function pgtype_isnumber ($field_type) {\n\tswitch (strtolower(trim($field_type))) {\n\t\tcase 'bool': // a boolean from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'int2': // a small integer from a pg database\n\t\tcase 'int4': // an integer from a pg database\n\t\tcase 'int8': // a long integer from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'numeric': // a \"numeric\" real number field from a pg database\n\t\tcase 'float4': // a single precision real number field from a pg database\n\t\tcase 'float8': // a double precision real number field from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'date': // a date field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'time': // a time field from a pg database\n\t\tcase 'timetz': // a time field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'timestamp': // a timestamp field from a pg database\n\t\tcase 'timestamptz': // a timestamp field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'text': // a text field from a pg database\n\t\tcase 'varchar': // a varchar field from a pg database\n\t\tcase 'bpchar': // a bpchar field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated field type, put a text box or single selects, but may not work\n\t\t\t$output = false;\n\t}\n\treturn $output;\n}" ]
[ "0.7604812", "0.711981", "0.6885448", "0.68116325", "0.66620356", "0.6641195", "0.6477782", "0.646445", "0.64446574", "0.6331044", "0.6327958", "0.6294597", "0.6248369", "0.62343603", "0.62250036", "0.6213766", "0.6209819", "0.6203476", "0.6166224", "0.61465687", "0.613947", "0.6127594", "0.6113492", "0.6104646", "0.6086965", "0.6086965", "0.60688555", "0.6042281", "0.6019065", "0.60167104", "0.59997326", "0.59991324", "0.59951586", "0.5992567", "0.59859073", "0.5972194", "0.59510076", "0.593951", "0.5934842", "0.593174", "0.59118515", "0.5908215", "0.5901337", "0.5901337", "0.5901337", "0.58941007", "0.58926886", "0.5885491", "0.5881242", "0.5857238", "0.58547467", "0.5854344", "0.5846045", "0.58256775", "0.58256775", "0.580476", "0.58026725", "0.57875466", "0.57865816", "0.578261", "0.5763362", "0.5761959", "0.57575953", "0.57490176", "0.573904", "0.57310206", "0.573043", "0.57289404", "0.57065046", "0.56862664", "0.5683899", "0.5682985", "0.56728345", "0.5665379", "0.56534475", "0.5641118", "0.56283027", "0.56275976", "0.5620187", "0.5616768", "0.56125695", "0.560639", "0.5599662", "0.5597473", "0.558784", "0.5585595", "0.55841446", "0.5582101", "0.55765307", "0.5573546", "0.5571603", "0.55706453", "0.5567895", "0.5554702", "0.55539113", "0.55490506", "0.55489916", "0.5542909", "0.55417037", "0.5539544" ]
0.5738076
65
checks, if orm data type is defined
public function hasOrmType($ormDataType) { return isset($this->ormDataTypeInstance[$ormDataType]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasColumnType($name);", "public function hasColumnType($name);", "public function validDataTypes();", "function checkForDataTypes($modifyModel = false) {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForDataType($fieldName, $fieldInfo, $modifyModel) && $res; \n }\n return $res;\n }", "public function getDbFieldType()\n {\n }", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function testGetInvalidFieldType()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=rocket_orm', 'orm_username', 'orm_password');\r\n\t\t\t\r\n\t\t\t$user = User::load(1);\r\n\r\n\t\t\t$user->get(array());\r\n\t\t}", "private function supportData()\n {\n $dataClass = $this->type->getDataClass();\n\n return $this->data instanceof $dataClass || $dataClass === get_class($this->data);\n }", "public function testCastTypeUnknownWhenReading() {\r\n $uuid = 'abcdefg';\r\n $bool = true;\r\n $int = 1234567;\r\n $string = 'avorium';\r\n // Write data to the database\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$uuid.'\\','.($bool ? 1:0).','.$int.', \\''.$string.'\\')');\r\n // Read data out and cast it to persistent object\r\n $this->setExpectedException('Exception', 'Database column type \\'unknowntype\\' is not known to the persistence adapter.');\r\n $this->getPersistenceAdapter()->get('test_persistence_AbstractPersistenceAdapterTestPersistentObjectUnknownType', $uuid);\r\n }", "public function getDataWithTypeDb() {}", "public function testDataType()\n {\n $user = User::inRandomOrder()->first();\n $this -> assertInternalType('int',$user->id);\n $this -> assertInternalType('string', $user -> name);\n $this -> assertInternalType('string', $user -> email);\n $this -> assertInstanceOf('App\\User',$user);\n }", "public function getDatatype() {}", "private function _valid_data_type($type=NULL){\n\t\tif(!empty($type)){\n\t\t\tif ($type == Minematic_Connector_Model_Config::DATA_TYPE_ALL ||\n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_ITEMS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_USERS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_EVENTS){\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "private function loadDataTypes() {\n if(count($this->dbConfigs) > 0){\n switch ($this->dbConfigs[\"driver\"]) {\n case \"mysql\":\n $this->arrDataTypes = array('char', 'varchar', 'tinytext', 'text', 'mediumtext', 'longtext', 'tinyblob', 'mediumblob',\n 'blob', 'longblob', 'enum', 'set', 'date', 'datetime', 'time', 'year');\n break;\n\n case \"mssql\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary');\n break;\n\n case \"sqlsrv\":\n $this->arrDataTypes = array('smalldatetime', 'datetime', 'char', 'varchar', 'text', 'nchar', 'nvarchar', 'ntext', 'binary', 'varbinary','date');\n break;\n }\n }\n }", "public function dbFieldType()\n {\n return 'string';\n }", "public function loadColumnType($name);", "public function testSpecialDataTypes()\n\t{\n\t\ttestpack( 'Special data types' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = 'someday';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'TEXT' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::nuke();\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'NUMERIC' );\n\t}", "public function getDataType() {}", "public function canRequireSQLConversion()\n {\n return true;\n }", "public function testDataTypeWithLengthNotSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'id';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"int\", $field->getDataType());\n $this->assertNull($field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function isSetDataType()\n {\n return !is_null($this->_fields['DataType']['FieldValue']);\n }", "function is_field_type($name)\n {\n }", "function beforeSave() {\r\n\t\t$fields = $this->getColumnTypes();\r\n\t\tforeach ($fields as $k => $v) {\r\n\t\t\tif (isset($this->data[$this->name][$k]) and ($v == 'integer' or $v == 'float')\r\n\t\t\t\t and $this->data[$this->name][$k] === '') {\r\n\t\t\t\t $this->data[$this->name][$k] = NULL; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::beforeSave(); \r\n\t}", "protected function columnType()\n {\n $table = $this->ask('Enter the name of desired table');\n $this->checkInput($table);\n $column = $this->ask('Enter the desired column');\n $this->checkInput($column);\n $this->service->columnType($table, $column);\n }", "function oci_field_type($statement, $field)\n{\n}", "public function getDataWithTypeField() {}", "public function testCastNoTypeWhenReading() {\r\n $uuid = 'abcdefg';\r\n $bool = true;\r\n $int = 1234567;\r\n $string = 'avorium';\r\n // Write data to the database\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$uuid.'\\','.($bool ? 1:0).','.$int.', \\''.$string.'\\')');\r\n // Read data out and cast it to persistent object\r\n $this->setExpectedException('Exception', 'Type of persistent object property not set.');\r\n $this->getPersistenceAdapter()->get('test_persistence_AbstractPersistenceAdapterTestPersistentObjectNoType', $uuid);\r\n }", "public function columnTypes()\n {\n return \\array_merge(\\array_filter(parent::columnTypes(), function($elem) {\n if ($elem[0] === Schema::TYPE_JSON) {\n return false;\n }\n return true;\n }), [\n [\n Schema::TYPE_JSON,\n $this->json(),\n \"json\",\n \"json CHECK ([[{name}]] is null or json_valid([[{name}]]))\"\n ]\n ]);\n }", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "public function registerColumnTypes();", "public function isValidColumnType($column);", "public function testSaveDataTableIncorrectDataType() {\r\n $this->setExpectedException('Exception', 'Data table is not of correct datatype.');\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', 'Incorrect data type');\r\n\t}", "public function meta_type();", "function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}", "function CheckChangeColumnType() {\r\n\t\t// Create connection\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t$sql = \"SELECT DATA_TYPE FROM information_schema.COLUMNS WHERE TABLE_NAME = 'tbldmlmapcontent' AND COLUMN_NAME = 'CntField7'\";\r\n\t\t$result = $conn->query($sql);\r\n\r\n\t\t// There are valid data for current page. So, shows the map\r\n\t\t\t\r\n\t\t$array = array();\r\n\t\twhile($row = $result->fetch_assoc()) {\r\n\t\t\t$array[] = $row;\r\n\t\t}\r\n\t\t\r\n\t\t$myResult;\r\n\t\t$myColumnType = $array[0]['DATA_TYPE'];\r\n\t\tif ( $myColumnType == 'mediumtext' || $myColumnType == 'MEDIUMTEXT' ) {\r\n\t\t\t// The type of the column is OK. Runs saving data to the database\r\n\t\t\t$myResult = 1;\r\n\t\t} else {\r\n\t\t\t$myResult = dmlChangeColumnType();\r\n\t\t}\r\n\t\techo $myResult;\r\n\r\n\t\t$conn->close();\r\n\t}", "public function testCastTypeUnknownWhenWriting() {\r\n // Create record\r\n $po = new test_persistence_AbstractPersistenceAdapterTestPersistentObjectUnknownType();\r\n $po->booleanValue = true;\r\n $po->intValue = 2147483647;\r\n $po->stringValue = 'Hallo Welt!';\r\n // Store new record\r\n $this->setExpectedException('Exception', 'Database column type \\'unknowntype\\' is not known to the persistence adapter.');\r\n $this->getPersistenceAdapter()->save($po);\r\n }", "public function sql_field_type($res, $pointer)\n {\n // mysql_field_type compatibility map\n // taken from: http://www.php.net/manual/en/mysqli-result.fetch-field-direct.php#89117\n // Constant numbers see http://php.net/manual/en/mysqli.constants.php\n $mysql_data_type_hash = [\n 1 => 'tinyint',\n 2 => 'smallint',\n 3 => 'int',\n 4 => 'float',\n 5 => 'double',\n 7 => 'timestamp',\n 8 => 'bigint',\n 9 => 'mediumint',\n 10 => 'date',\n 11 => 'time',\n 12 => 'datetime',\n 13 => 'year',\n 16 => 'bit',\n // 252 is currently mapped to all text and blob types (MySQL 5.0.51a)\n 253 => 'varchar',\n 254 => 'char',\n 246 => 'decimal'\n ];\n if ($this->debug_check_recordset($res)) {\n $metaInfo = $res->fetch_field_direct($pointer);\n if ($metaInfo === false) {\n return false;\n }\n return $mysql_data_type_hash[$metaInfo->type];\n } else {\n return false;\n }\n }", "public abstract function get_supported_datatypes();", "public function testCreateTableUnknownType() {\r\n // Drop table\r\n $this->executeQuery('drop table POTEST');\r\n // Automatically create table\r\n $this->setExpectedException('Exception', 'Database column type \\'unknowntype\\' is not known to the persistence adapter.');\r\n $this->getPersistenceAdapter()->updateOrCreateTable('test_persistence_AbstractPersistenceAdapterTestPersistentObjectUnknownType');\r\n }", "public function supportsDenormalization($data, $type, $format = null)\n {\n return is_a($type, Setting::class, true);\n }", "public function checkType() {\n\t\t//Because the DB gave us a string for the card type, we must\n\t\t//ensure that they are strings and compare accordingly.\n\t\tif (strcmp($this->getTypeAsStr(), \"aspect\")==0) {\n\t\t\t$this->boostInfo = 0;\n\t\t\t$this->magnitude = 0;\n\t\t}\n\t}", "public function supportsDenormalization($data, string $type, string $format = null): bool\n {\n return \\in_array($type, [DateTime::class, \\DateTimeImmutable::class]);\n }", "public static function type($_value) {\n\t\tif (is_null($_value))\n\t\t\treturn PDO::PARAM_NULL;\n\t\telseif (is_bool($_value))\n\t\t\treturn PDO::PARAM_BOOL;\n\t\telseif (is_int($_value))\n\t\t\treturn PDO::PARAM_INT;\n\t\telseif (is_string($_value))\n\t\t\treturn PDO::PARAM_STR;\n\t\treturn PDO::PARAM_LOB;\n\t}", "function ae_check_db_fields( ) {\n\n $count = 0;\n $cols = ae_get_db_fields();\n $foo = ae_db_queries();\n if( $cols ){\n foreach($cols as $col) {\n\n if( isset($foo[$col->COLUMN_NAME]) ) {\n\n if(\n $col->DATA_TYPE != $foo[$col->COLUMN_NAME]['type'] ||\n $col->CHARACTER_MAXIMUM_LENGTH < $foo[$col->COLUMN_NAME]['numb']\n ) {\n $count++;\n }\n }\n }\n }\n\n return $count;\n}", "public static function isDbTypeNumeric($db_type)\n {\n if ($db_type == 'int' || $db_type == 'double' || $db_type == 'smallint' || $db_type == 'tinyint') {\n return true;\n }\n\n return false;\n }", "function is_model($obj)\n {\n return is_subclass_of($obj, 'C_DataMapper_Model') or get_class($obj) == 'C_DataMapper_Model';\n }", "function getArgType($arg) {\n switch (gettype($arg)) {\n case 'double': return SQLITE3_FLOAT;\n case 'integer': return SQLITE3_INTEGER;\n case 'boolean': return SQLITE3_INTEGER;\n case 'NULL': return SQLITE3_NULL;\n case 'string': return SQLITE3_TEXT;\n case 'string': return SQLITE3_TEXT;\n default: \n $type_error = 'Argument is of invalid type '.gettype($arg);\n $this->register_error($type_error);\n $this->show_errors ? trigger_error($type_error,E_USER_WARNING) : null;\n return false;\n }\n }", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "public function isValidDataType(string $type): bool\r\n {\r\n return in_array($type, static::DATA_TYPES);\r\n }", "function isValidDocType($docType){\n $qh = new QueryHelper();\n\n $columnName = \"DocumentTypeVal\";\n $selectDocumentType = \"SELECT * FROM DocumentType;\";\n if($qh -> verifyDropDownInput($docType, $selectDocumentType, $columnName)){\n return true;\n }\n else{\n echo \"invalid doc type\";\n return false;\n }\n }", "private function initializeMappedTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'mappedTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array('foo' => Type::INTEGER));\n }", "public function testDataTypeWithLengthSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'name';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"varchar\", $field->getDataType());\n $this->assertSame(\"100\", $field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "function PMA_isTablefieldChar($field)\n{\n // If check to ensure types such as \"enum('one','two','char',..)\" or\n // \"enum('one','two','varchar',..)\" are not categorized as char.\n if (stripos($field['Type'], 'char') === 0\n || stripos($field['Type'], 'varchar') === 0\n ) {\n return stristr($field['Type'], 'char');\n } else {\n return false;\n }\n}", "public function testUpdateTableUnknownType() {\r\n // Drop table\r\n $this->executeQuery('drop table POTEST');\r\n // Manually create table with UUID column only\r\n $this->createTestTable();\r\n // Automatically update table\r\n $this->setExpectedException('Exception', 'Database column type \\'unknowntype\\' is not known to the persistence adapter.');\r\n $this->getPersistenceAdapter()->updateOrCreateTable('test_persistence_AbstractPersistenceAdapterTestPersistentObjectUnknownType');\r\n }", "public function getDatabaseType();", "public function getDatabaseType();", "function db_type_name_exists()\r\n {\r\n $toReturn = false;\r\n $dbmgr = new DB_Mgr(\"sites\");\r\n $stmt = \"SELECT count(*) FROM SI_PHONE_TYPE WHERE name = '\" . $this->name . \"'\";\r\n $dbmgr->query($stmt);\r\n $row = $dbmgr->get_a_row();\r\n $num = $row[0];\r\n return($num);\r\n }", "private function isCompatibleTypes($dbType, $modelType) {\n\t\t// remove precision\n\t\tif (strpos($dbType, '(') !== false) {\n\t\t\t$dbType = strstr($dbType, '(', true);\n\t\t}\n\t\tif (strpos($modelType, '(') !== false) {\n\t\t\t$modelType = strstr($modelType, '(', true);\n\t\t}\n\t\treturn strtoupper($dbType) == strtoupper($modelType) \n\t\t\t|| (\n\t\t\t\tarray_key_exists(strtoupper($modelType), self::COMPATIBLE_TYPES)\n\t\t\t\t&& in_array(strtoupper($dbType), self::COMPATIBLE_TYPES[strtoupper($modelType)])\n\t\t\t);\n\t}", "function pgtype_isnumber ($field_type) {\n\tswitch (strtolower(trim($field_type))) {\n\t\tcase 'bool': // a boolean from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'int2': // a small integer from a pg database\n\t\tcase 'int4': // an integer from a pg database\n\t\tcase 'int8': // a long integer from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'numeric': // a \"numeric\" real number field from a pg database\n\t\tcase 'float4': // a single precision real number field from a pg database\n\t\tcase 'float8': // a double precision real number field from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'date': // a date field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'time': // a time field from a pg database\n\t\tcase 'timetz': // a time field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'timestamp': // a timestamp field from a pg database\n\t\tcase 'timestamptz': // a timestamp field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'text': // a text field from a pg database\n\t\tcase 'varchar': // a varchar field from a pg database\n\t\tcase 'bpchar': // a bpchar field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated field type, put a text box or single selects, but may not work\n\t\t\t$output = false;\n\t}\n\treturn $output;\n}", "public function getDataType(): string;", "public function getDataType(): string;", "public function supportsDenormalization($data, $type, $format = null)\n {\n return class_exists($type) && is_a($type, \\Exception::class, true);\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "protected function isSql($dsstr, $type = '')\n{\n\tif (!is_string($dsstr)) return false;\n\t$dsstr = trim($dsstr);\n\tif (!strpos($dsstr, ' ')) return false;\n\tif (!$type) return true;\n\t$dstype = strtolower(substr($dsstr, 0, strpos($dsstr,' ')));\n\treturn ($dstype == $type);\n}", "function PMA_isTableFieldBinary($field)\n{\n // The type column.\n // Fix for bug #3152931 'ENUM and SET cannot have \"Binary\" option'\n // If check to ensure types such as \"enum('one','two','binary',..)\" or\n // \"enum('one','two','varbinary',..)\" are not categorized as binary.\n if (stripos($field['Type'], 'binary') === 0\n || stripos($field['Type'], 'varbinary') === 0\n ) {\n return stristr($field['Type'], 'binary');\n } else {\n return false;\n }\n\n}", "protected function editDataType($data_type = null, $column_name = '')\n {\n if ($data_type === null) {\n throw new RuntimeException(\n 'Query-editDataType Method: No Datatype provided for Column: ' . $column_name\n );\n }\n }", "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'int' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}',\n 'timestamp' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}'\n ];\n }", "public function testLoadInvalidObjectIDType()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=rocket_orm', 'orm_username', 'orm_password');\r\n\t\t\t\r\n\t\t\t$user = User::load(array());\r\n\t\t}", "public function isTemporalType()\n {\n return PropelTypes::isTemporalType($this->getType());\n }", "function getFieldsTypes()\n {\n return array(\n'id' =>'integer',\n'paypalid'=>'string',\n'notifyid'=>'string',\n\n\t\t\t\n\t );\n }", "protected function initializeDoctrineTypeMappings()\n {\n $this->doctrineTypeMapping = array(\n 'int' => 'integer',\n 'timestamp' => 'datetime',\n 'time' => 'datetime',\n 'date' => 'date',\n 'varchar' => 'string',\n 'char' => 'string',\n 'double' => 'float',\n 'float' => 'float',\n 'int64' => 'float',\n 'smallint' => 'integer',\n );\n }", "public function getColumnType($name);", "public function getColumnType($name);", "abstract protected function initDataTypes();", "private function initializeCustomTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'customTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array(Type::INTEGER));\n }", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}", "public function validateColumnType($type)\n {\n if (! in_array($type, $this->columnTypes)) {\n throw new UnexpectedValueException('Attribute type \"'.$type.'\" is not supported.');\n }\n }", "function PMA_istableFieldBlob($field)\n{\n // If check to ensure types such as \"enum('one','two','blob',..)\" or\n // \"enum('one','two','tinyblob',..)\" etc. are not categorized as blob.\n if (stripos($field['Type'], 'blob') === 0\n || stripos($field['Type'], 'tinyblob') === 0\n || stripos($field['Type'], 'mediumblob') === 0\n || stripos($field['Type'], 'longblob') === 0\n ) {\n return stristr($field['Type'], 'blob');\n } else {\n return false;\n }\n}", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "public function testQueryArgumentTypesDetect()\n {\n $client = (new ClientTest())->testInstantiation();\n\n $query = $client->query(\n 'INSERT INTO typish (_0_int, _1_float, _2_decimal, _3_varchar, _4_blob, _5_date, _6_datetime, _7_nvarchar)\n VALUES (?, ?, ?, ?, null, ?, ?, ?)',\n [\n 'name' => __FUNCTION__,\n 'validate_params' => static::VALIDATE_PARAMS,\n 'sql_minify' => true,\n 'affected_rows' => true,\n ]\n );\n\n $types = '';\n\n $time = new Time();\n $args = [\n '_0_int' => 0,\n '_1_float' => 1.0,\n '_2_decimal' => '2.0',\n '_3_varchar' => 'arguments types detected',\n /*'_4_blob' => [\n sprintf(\"%08d\", decbin(4)),\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_VARBINARY('max'),\n ],*/\n '_5_date' => $time,\n '_6_datetime' => $time,\n '_7_nvarchar' => 'n varchar',\n ];\n TestHelper::queryPrepareLogOnError($query, $types, $args);\n $result = TestHelper::logOnError('query execute', $query, 'execute');\n static::assertInstanceOf(MsSqlResult::class, $result);\n static::assertSame(1, $result->affectedRows());\n }", "public static function initActiveRecordByType()\r\n\t{\r\n\t\trequire_once \"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php\";\r\n\t}", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t// SQL-92\n\t\t\t'bit' => array('type' => 'string', 'exact' => true),\n\t\t\t'bit varying' => array('type' => 'string'),\n\t\t\t'char' => array('type' => 'string', 'exact' => true),\n\t\t\t'char varying' => array('type' => 'string'),\n\t\t\t'character' => array('type' => 'string', 'exact' => true),\n\t\t\t'character varying' => array('type' => 'string'),\n\t\t\t'date' => array('type' => 'string'),\n\t\t\t'dec' => array('type' => 'float', 'exact' => true),\n\t\t\t'decimal' => array('type' => 'float', 'exact' => true),\n\t\t\t'double precision' => array('type' => 'float'),\n\t\t\t'float' => array('type' => 'float'),\n\t\t\t'int' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'integer' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'interval' => array('type' => 'string'),\n\t\t\t'national char' => array('type' => 'string', 'exact' => true),\n\t\t\t'national char varying' => array('type' => 'string'),\n\t\t\t'national character' => array('type' => 'string', 'exact' => true),\n\t\t\t'national character varying' => array('type' => 'string'),\n\t\t\t'nchar' => array('type' => 'string', 'exact' => true),\n\t\t\t'nchar varying' => array('type' => 'string'),\n\t\t\t'numeric' => array('type' => 'float', 'exact' => true),\n\t\t\t'real' => array('type' => 'float'),\n\t\t\t'smallint' => array('type' => 'int', 'min' => '-32768', 'max' => '32767'),\n\t\t\t'time' => array('type' => 'string'),\n\t\t\t'time with time zone' => array('type' => 'string'),\n\t\t\t'timestamp' => array('type' => 'string'),\n\t\t\t'timestamp with time zone' => array('type' => 'string'),\n\t\t\t'varchar' => array('type' => 'string'),\n\t\t\t// SQL:1999\n\t\t\t'binary large object' => array('type' => 'string', 'binary' => true),\n\t\t\t'blob' => array('type' => 'string', 'binary' => true),\n\t\t\t'boolean' => array('type' => 'bool'),\n\t\t\t'char large object' => array('type' => 'string'),\n\t\t\t'character large object' => array('type' => 'string'),\n\t\t\t'clob' => array('type' => 'string'),\n\t\t\t'national character large object' => array('type' => 'string'),\n\t\t\t'nchar large object' => array('type' => 'string'),\n\t\t\t'nclob' => array('type' => 'string'),\n\t\t\t'time without time zone' => array('type' => 'string'),\n\t\t\t'timestamp without time zone' => array('type' => 'string'),\n\t\t\t// SQL:2003\n\t\t\t'bigint' => array('type' => 'int', 'min' => '-9223372036854775808', 'max' => '9223372036854775807'),\n\t\t\t// SQL:2008\n\t\t\t'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),\n\t\t\t'binary varying' => array('type' => 'string', 'binary' => true),\n\t\t\t'varbinary' => array('type' => 'string', 'binary' => true)\n\t\t);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn array();\n\t}", "public function isScalar(): bool\n {\n return $this->phpType === self::INTEGER\n || $this->phpType === self::FLOAT\n || $this->phpType === self::STRING\n || $this->phpType === self::BOOLEAN\n || $this->phpType === self::NULL;\n }", "protected function checkStandardDataTable()\n {\n Piwik::checkObjectTypeIs($this->dataTable, array('\\Piwik\\DataTable'));\n }", "function isDateType($type)\n{\n return($type == \"date\" or $type == \"year\" or isTimeType($type));\n}", "public static function attributeTypeExists(AttributeType $data) {\n $model = self::_getDataType();\n $idName = $model::_getPrimaryIdKey();\n $method = \"get\".ucfirst($idName);\n $pId = $data->$method();\n if($pId > 0) {\n return parent::dbRecordExists($data);\n } elseif((string) $data->getName() !== '') {\n $rec = self::getAttributeTypeByName($data->getName());\n return (boolean) ($rec instanceof $model);\n } else {\n throw new \\Exception(__METHOD__.\" requires valid/populated model as input\");\n }\n }", "protected function get_object_type()\n {\n }", "public function setup_types()\n {\n }", "public function hasSize($sqlType);", "public function getAllowedDataTypes() {\n return array(\n self::ATTRIBUTE_DATA_TYPE_TEXT,\n self::ATTRIBUTE_DATA_TYPE_NUMBER,\n self::ATTRIBUTE_DATA_TYPE_DATE,\n );\n }", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "public function getPDOType()\n {\n return PropelTypes::getPDOType($this->getType());\n }", "public function isPhpObjectType()\n {\n return PropelTypes::isPhpObjectType($this->getPhpType());\n }", "public function hasType(){\n return $this->_has(4);\n }", "public function field_metatype($result, $index){\r\n $obj_field = new ADOFieldObject();\r\n $obj_field = $result->FetchField($index);\r\n //print_r($obj_field);\r\n $type = $result->MetaType($obj_field->type, $obj_field->max_length); // Since ADOdb 3.0, MetaType accepts $fieldobj as the first parameter, instead of $nativeDBType.\r\n \r\n return $type; \r\n }", "public function hasType(){\n return $this->_has(9);\n }" ]
[ "0.6779968", "0.6779968", "0.65375775", "0.61960137", "0.6142332", "0.61381054", "0.6133925", "0.60168415", "0.6004895", "0.5985088", "0.5967284", "0.5937227", "0.58961135", "0.5891779", "0.5876222", "0.58553946", "0.58493406", "0.58295697", "0.5820066", "0.5801198", "0.5779217", "0.5778589", "0.57576704", "0.5733833", "0.5732014", "0.5687857", "0.56836194", "0.5676692", "0.56546843", "0.56539774", "0.56436837", "0.5642489", "0.56269443", "0.5601335", "0.55954707", "0.55939263", "0.55910534", "0.5589698", "0.55864966", "0.5580527", "0.55777246", "0.55582535", "0.55552435", "0.554469", "0.5532434", "0.55265045", "0.5524517", "0.5519127", "0.5514763", "0.5513925", "0.5509319", "0.5486878", "0.5467286", "0.5451831", "0.54479", "0.54472333", "0.5446587", "0.5446587", "0.5433485", "0.54312474", "0.54274875", "0.5425746", "0.5425746", "0.54227257", "0.54225975", "0.54188764", "0.54138327", "0.54092497", "0.54083896", "0.53957295", "0.5390009", "0.53863865", "0.5362542", "0.53577775", "0.53577775", "0.535745", "0.5353536", "0.53507304", "0.5347253", "0.53445923", "0.5343225", "0.5339915", "0.53358895", "0.5335433", "0.5323654", "0.53163606", "0.53126156", "0.5296844", "0.5295339", "0.52869207", "0.52860636", "0.52829593", "0.5267703", "0.5265614", "0.5260787", "0.52588063", "0.5255963", "0.52548635", "0.52522624", "0.5251802" ]
0.5966308
11
gets orm data type
public function getMappedOrmType($dataType) { return $this->hasDataType($dataType) ? $this->dataTypeMapping[$dataType] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDbFieldType()\n {\n }", "public function getDatatype() {}", "public function getDataType() {}", "public function dbFieldType()\n {\n return 'string';\n }", "public function getDataType(): string;", "public function getDataType(): string;", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function get_datatype() {\n return $this->datatype;\n }", "public function getDataWithTypeDb() {}", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "public function getDatabaseType();", "public function getDatabaseType();", "public function getDataTypeAttribute(): string\n {\n return $this->config['data_type'];\n }", "public function getDataType()\n {\n return $this->data_type;\n }", "public function getPDOType()\n {\n return PropelTypes::getPDOType($this->getType());\n }", "public function getTableDatatype()\r\n\t{\r\n\t\treturn $this->Table_Column->Table_Datatype;\r\n\t}", "public function getColumnType($name);", "public function getColumnType($name);", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function _getType() {\n $modelName = self::_getModelName();\n return $modelName::_getDataTypeName();\n }", "public function getDataType() {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->_fields['DataType']['FieldValue'];\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getMDB2DataType()\n\t{\n\t\tif($this->mdb2DataType != '')\n\t\t{\n\t\t\treturn $this->mdb2DataType;\n\t\t}\n\t}", "public function getDataWithTypeField() {}", "public static function getDBColumnType($userField)\n\t{\n\t\tglobal $DB;\n\t\tswitch($DB->type)\n\t\t{\n\t\t\tcase \"MYSQL\":\n\t\t\t\treturn \"int(11)\";\n\t\t\tcase \"ORACLE\":\n\t\t\t\treturn \"number(18)\";\n\t\t\tcase \"MSSQL\":\n\t\t\t\treturn \"int\";\n\t\t}\n\t}", "public function get_type();", "public function getDataType() {\n\t\treturn $this -> dataType;\n\t}", "abstract protected function getDataTypeString(): string;", "public function getType()\n {\n $result = \"\";\n if (preg_match('/int/',$this->type))\n $result = \"int\";\n\n if (preg_match('/year/',$this->type))\n $result = \"int\";\n\n if (preg_match('/integer/',$this->type))\n $result = \"int\";\n\n if (preg_match('/tynyint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/smallint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/mediumint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/bigint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/varchar/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/text/',$this->type))\n $result = \"string\";\n\n if (preg_match('/tyntext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/mediumtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/longtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/enum/',$this->type))\n $result = \"enum\";\n\n if (preg_match('/set/',$this->type))\n $result = \"string\";\n\n if (preg_match('/date/',$this->type))\n $result = \"date\";\n\n if (preg_match('/time/',$this->type))\n $result = \"time\";\n\n if (preg_match('/datetime/',$this->type))\n $result = \"datetime\";\n\n if (preg_match('/decimal/',$this->type))\n $result = \"float\";\n\n if (preg_match('/float/',$this->type))\n $result = \"float\";\n\n if (preg_match('/double/',$this->type))\n $result = \"double\";\n\n if (preg_match('/real/',$this->type))\n $result = \"real\";\n\n if (preg_match('/fixed/',$this->type))\n $result = \"float\";\n\n if (preg_match('/numeric/',$this->type))\n $result = \"float\";\n\n if (empty($result)){\n // $result = $this->type;\n $result = \"string\";\n }\n\n // TODO EVALUATES BIT, TIMESTAMP, VARBINARY, BLOB MySQL data types\n return $result;\n }", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t// SQL-92\n\t\t\t'bit' => array('type' => 'string', 'exact' => true),\n\t\t\t'bit varying' => array('type' => 'string'),\n\t\t\t'char' => array('type' => 'string', 'exact' => true),\n\t\t\t'char varying' => array('type' => 'string'),\n\t\t\t'character' => array('type' => 'string', 'exact' => true),\n\t\t\t'character varying' => array('type' => 'string'),\n\t\t\t'date' => array('type' => 'string'),\n\t\t\t'dec' => array('type' => 'float', 'exact' => true),\n\t\t\t'decimal' => array('type' => 'float', 'exact' => true),\n\t\t\t'double precision' => array('type' => 'float'),\n\t\t\t'float' => array('type' => 'float'),\n\t\t\t'int' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'integer' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'interval' => array('type' => 'string'),\n\t\t\t'national char' => array('type' => 'string', 'exact' => true),\n\t\t\t'national char varying' => array('type' => 'string'),\n\t\t\t'national character' => array('type' => 'string', 'exact' => true),\n\t\t\t'national character varying' => array('type' => 'string'),\n\t\t\t'nchar' => array('type' => 'string', 'exact' => true),\n\t\t\t'nchar varying' => array('type' => 'string'),\n\t\t\t'numeric' => array('type' => 'float', 'exact' => true),\n\t\t\t'real' => array('type' => 'float'),\n\t\t\t'smallint' => array('type' => 'int', 'min' => '-32768', 'max' => '32767'),\n\t\t\t'time' => array('type' => 'string'),\n\t\t\t'time with time zone' => array('type' => 'string'),\n\t\t\t'timestamp' => array('type' => 'string'),\n\t\t\t'timestamp with time zone' => array('type' => 'string'),\n\t\t\t'varchar' => array('type' => 'string'),\n\t\t\t// SQL:1999\n\t\t\t'binary large object' => array('type' => 'string', 'binary' => true),\n\t\t\t'blob' => array('type' => 'string', 'binary' => true),\n\t\t\t'boolean' => array('type' => 'bool'),\n\t\t\t'char large object' => array('type' => 'string'),\n\t\t\t'character large object' => array('type' => 'string'),\n\t\t\t'clob' => array('type' => 'string'),\n\t\t\t'national character large object' => array('type' => 'string'),\n\t\t\t'nchar large object' => array('type' => 'string'),\n\t\t\t'nclob' => array('type' => 'string'),\n\t\t\t'time without time zone' => array('type' => 'string'),\n\t\t\t'timestamp without time zone' => array('type' => 'string'),\n\t\t\t// SQL:2003\n\t\t\t'bigint' => array('type' => 'int', 'min' => '-9223372036854775808', 'max' => '9223372036854775807'),\n\t\t\t// SQL:2008\n\t\t\t'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),\n\t\t\t'binary varying' => array('type' => 'string', 'binary' => true),\n\t\t\t'varbinary' => array('type' => 'string', 'binary' => true)\n\t\t);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn array();\n\t}", "public function getTypeDoctrine()\n {\n if (isset(self::$doctrineTypeMap[$this->getType()])) {\n return self::$doctrineTypeMap[$this->getType()];\n }\n\n // our fallback default\n return self::$doctrineTypeMap[self::TYPE_STRING];\n }", "private function get_db_type() {\n global $CFG;\n return $CFG->dbtype;\n }", "public function get_data_type() { return \"json\"; }", "public function field_metatype($result, $index){\r\n $obj_field = new ADOFieldObject();\r\n $obj_field = $result->FetchField($index);\r\n //print_r($obj_field);\r\n $type = $result->MetaType($obj_field->type, $obj_field->max_length); // Since ADOdb 3.0, MetaType accepts $fieldobj as the first parameter, instead of $nativeDBType.\r\n \r\n return $type; \r\n }", "public function getDataType() {\n return null;\n }", "function oci_field_type($statement, $field)\n{\n}", "public function meta_type();", "private function _transformType($dataType)\n {\n switch ($dataType) {\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BOOLEAN:\n return self::PHP_TYPE_BOOLEAN;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_INTEGER:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_SMALLINT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BIGINT:\n return self::PHP_TYPE_INTEGER;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DECIMAL:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_FLOAT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DOUBLE_PRECISION:\n return self::PHP_TYPE_FLOAT;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BLOB:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TEXT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_CHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BINARY_VARYING:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_VARCHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_ENUM:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATE:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIME:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIMESTAMP:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATETIME:\n return self::PHP_TYPE_STRING;\n\n default:\n return \"unknown ({$dataType})\";\n break;\n }\n }", "private function get_type() {\n\n\t}", "function getType(){\r\n\t\tif($this->inDB==false||$this->type==null){\r\n\t\t\t$temp=$this->dbq->getAnswerType($this->answer_id);\r\n\t\t\t$this->type = $temp;\r\n\t\t}\r\n\t\treturn $this->type;\r\n\t}", "public static function type($_value) {\n\t\tif (is_null($_value))\n\t\t\treturn PDO::PARAM_NULL;\n\t\telseif (is_bool($_value))\n\t\t\treturn PDO::PARAM_BOOL;\n\t\telseif (is_int($_value))\n\t\t\treturn PDO::PARAM_INT;\n\t\telseif (is_string($_value))\n\t\t\treturn PDO::PARAM_STR;\n\t\treturn PDO::PARAM_LOB;\n\t}", "public function getFieldDataType() {\n\t\t$fieldDataType = '';\n\t\t$uitype = $this->get('uitype');\n\t\tif ($uitype == '9') {\n\t\t\t$fieldDataType = 'percent';\n\t\t}\n\n\t\tif (!$fieldDataType) {\n\t\t\t$webserviceField = $this->getWebserviceFieldObject();\n\t\t\t$fieldDataType = $webserviceField->getFieldDataType();\n\t\t\tswitch($fieldDataType) {\n\t\t\t\tcase 'text' : $fieldDataType = 'textArea'; break;\n\t\t\t\tcase 'boolean' : $fieldDataType = 'checkBox'; break;\n\t\t\t case 'multipicklist' : $fieldDataType = 'multiSelectCombo'; break;\n\t\t\t}\n\t\t}\n\t\treturn $fieldDataType;\n\t}", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type(): string;", "public static function default_data_type()\n {\n return self::config()->default_data_type;\n }", "public function getDatatype($type, $user){\r\r\n\t\t$dataType = DataType::model()->findByAttributes(array('name' => $type));\r\r\n\t\tif($dataType == null)\r\r\n\t\t\tthrow new Exception('Data type not exists');\r\r\n\t\t$userDataType = UserDataType::model()\r\r\n\t\t\t->findByAttributes(array(\r\r\n\t\t\t\t\t'data_type_id'=>$dataType->data_type_id,\r\r\n\t\t\t\t\t'users_id' => $user\r\r\n\t\t\t));\r\r\n\t\tif($userDataType == null)\r\r\n\t\t\t$userDataType = $this->createDatatype($dataType->data_type_id, $user);\r\r\n\t\treturn $userDataType;\r\r\n\t}", "public function loadColumnType($name);", "public function delegateGetDbalColumnType(&$dbal_type, array $drupal_field_specs);", "protected function getDataType($value)\n {\n if (is_bool($value))\n {\n return PDO::PARAM_BOOL;\n }\n if (is_null($value))\n {\n return PDO::PARAM_NULL;\n }\n if (is_integer($value))\n {\n return PDO::PARAM_INT;\n }\n return PDO::PARAM_STR;\n }", "protected function getDataType()\n {\n return 'JSON';\n }", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "function data_type($type) {\r\n\t\t$return_value = '';\r\n\t\t$type = (string) $type;\r\n\r\n\t\tswitch (strtolower($type)) {\r\n\t\t\t// supported scalar types\r\n\t\t\tcase 'ENTITIES':\r\n\t\t\tcase 'ENTITY':\r\n\t\t\tcase 'ID':\r\n\t\t\tcase 'IDREF':\r\n\t\t\tcase 'IDREFS':\r\n\t\t\tcase 'NCName':\r\n\t\t\tcase 'NMTOKEN':\r\n\t\t\tcase 'NMTOKENS':\r\n\t\t\tcase 'Name':\r\n\t\t\tcase 'anySimpleType':\r\n\t\t\tcase 'anyType':\r\n\t\t\tcase 'base64':\r\n\t\t\tcase 'base64Binary':\r\n\t\t\tcase 'boolean':\r\n\t\t\tcase 'byte':\r\n\t\t\tcase 'date':\r\n\t\t\tcase 'dateTime':\r\n\t\t\tcase 'decimal':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'duration':\r\n\t\t\tcase 'float':\r\n\t\t\tcase 'gDay':\r\n\t\t\tcase 'gMonth':\r\n\t\t\tcase 'gMonthDay':\r\n\t\t\tcase 'gYear':\r\n\t\t\tcase 'gYearMonth':\r\n\t\t\tcase 'hexBinary':\r\n\t\t\tcase 'i4':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'language':\r\n\t\t\tcase 'long':\r\n\t\t\tcase 'negativeInteger':\r\n\t\t\tcase 'nonNegativeInteger':\r\n\t\t\tcase 'nonPositiveInteger':\r\n\t\t\tcase 'normalizedString':\r\n\t\t\tcase 'positiveInteger':\r\n\t\t\tcase 'short':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'time':\r\n\t\t\tcase 'timeInstant':\r\n\t\t\tcase 'token':\r\n\t\t\tcase 'unsignedByte':\r\n\t\t\tcase 'unsignedInt':\r\n\t\t\tcase 'unsignedLong':\r\n\t\t\tcase 'unsignedShort':\r\n\t\t\tcase 'ur-type':\r\n\t\t\t\t$return_value = 'xsd:' . $type;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\tforeach ($this->types as $id => $type_definition) {\r\n\r\n\t\t\t\t\tif ($type_definition['name'] == $type) {\r\n\t\t\t\t\t\t$return_value = 'tns:' . $type;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} // end: if\r\n\t\t\t\t} // end: foreach\r\n\t\t} // end: switch\r\n\r\n\t\treturn $return_value;\r\n\t}", "private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}", "public function getModelType() {}", "public function get_record_type() {\n return 0;\n }", "function toDB($value, $type) {\n\t\t// everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\tif($value instanceof DateTime) return $value->format('c');\n\t\t}\n\t\treturn $value;\n\t}", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "function getDataType($connection, $idDataType){\n\t$query = \"SELECT * FROM tDataType WHERE idDataType =\".$idDataType;\n\treturn fetchRowFromDBOnID($connection, $query, $idDataType, \"DataType\");\n}", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "private function getSqlType(Session $session, string $model_name, string $property): string\n {\n $model = $session->getModel($model_name);\n $structure = $model->getStructure();\n\n return $structure->getTypeFor($property);\n }", "public function getCast()\n {\n $result = $this->getType();\n if ($result == \"date\")\n $result = \"string\";\n if ($result == \"datetime\")\n $result = \"string\";\n if ($result == \"enum\")\n $result = \"string\";\n if ($result == \"time\")\n $result = \"string\";\n // BIT, TIMESTAMP, VARBINARY, BLOB\n return \"(\" . $result . \")\";\n }", "protected static function getPhpType($sqlDataType)\n {\n if (strpos($sqlDataType, \"char\") !== false)\n return \"string\";\n \n if (strpos($sqlDataType, \"decimal\") !== false)\n return \"float\";\n \n if (strpos($sqlDataType, \"date\") !== false ||\n strpos($sqlDataType, \"time\") !== false)\n return \"DateTime\";\n \n if (strpos($sqlDataType, \"tinyint\") !== false ||\n strpos($sqlDataType, \"bool\") !== false)\n return \"bool\";\n \n if (strpos($sqlDataType, \"int\") !== false)\n return \"int\";\n \n return \"string\";\n }", "function getTypeConverter() ;", "public function type();", "public function type();", "public function type();", "public function type();", "public static function inputType($field, $model)\n {\n $record = new $model;\n $table = $record->getTable();\n $column_type = '';\n\n //find column type\n $columns = DB::select('SHOW COLUMNS FROM ' . $table);\n foreach($columns as $column) {\n if ($column->Field == $field) {\n $column_type = $column->Type;\n break;\n }\n }\n\n //convert to options:\n //int, float, boolean, date, timestamp, password, text (default)\n\n //check password\n if ($field == 'password') {\n return 'password';\n }\n //check boolean\n if ($column_type == 'tinyint(1)') {\n return 'boolean';\n }\n //check integer\n if (strpos($column_type, 'int') !== false) {\n return 'integer';\n }\n //check decimal\n foreach(['double', 'decimal', 'float'] as $check) {\n if (strpos($column_type, $check) !== false) {\n return 'decimal';\n }\n }\n //check timestamp\n if (strpos($column_type, 'timestamp') !== false) {\n return 'timestamp';\n }\n //check date\n if (strpos($column_type, 'date') !== false) {\n return 'date';\n }\n\n //default to text\n return 'text';\n }", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t'blob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '65535'),\n\t\t\t'bool' => array('type' => 'bool'),\n\t\t\t'bigint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '18446744073709551615'),\n\t\t\t'datetime' => array('type' => 'string'),\n\t\t\t'decimal unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'double' => array('type' => 'float'),\n\t\t\t'double precision unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'double unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'enum' => array('type' => 'string'),\n\t\t\t'fixed' => array('type' => 'float', 'exact' => TRUE),\n\t\t\t'fixed unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'float unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'geometry' => array('type' => 'string', 'binary' => TRUE),\n\t\t\t'int unsigned' => array('type' => 'int', 'min' => '0', 'max' => '4294967295'),\n\t\t\t'integer unsigned' => array('type' => 'int', 'min' => '0', 'max' => '4294967295'),\n\t\t\t'longblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '4294967295'),\n\t\t\t'longtext' => array('type' => 'string', 'character_maximum_length' => '4294967295'),\n\t\t\t'mediumblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '16777215'),\n\t\t\t'mediumint' => array('type' => 'int', 'min' => '-8388608', 'max' => '8388607'),\n\t\t\t'mediumint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '16777215'),\n\t\t\t'mediumtext' => array('type' => 'string', 'character_maximum_length' => '16777215'),\n\t\t\t'national varchar' => array('type' => 'string'),\n\t\t\t'numeric unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'nvarchar' => array('type' => 'string'),\n\t\t\t'point' => array('type' => 'string', 'binary' => TRUE),\n\t\t\t'real unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'set' => array('type' => 'string'),\n\t\t\t'smallint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '65535'),\n\t\t\t'text' => array('type' => 'string', 'character_maximum_length' => '65535'),\n\t\t\t'tinyblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '255'),\n\t\t\t'tinyint' => array('type' => 'int', 'min' => '-128', 'max' => '127'),\n\t\t\t'tinyint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '255'),\n\t\t\t'tinytext' => array('type' => 'string', 'character_maximum_length' => '255'),\n\t\t\t'year' => array('type' => 'string'),\n\t\t);\n\n\t\t$type = str_replace(' zerofill', '', $type);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn parent::getDataType($type);\n\t}", "protected function getColumnPhpType($type)\r\n {\r\n static $typeMap = [\r\n // abstract type => php type\r\n 'text' => 'string',\r\n 'number' => 'integer',\r\n 'container' => 'resource',\r\n 'date' => 'date',\r\n 'time' => 'time',\r\n 'timestamp' => 'timestamp',\r\n ];\r\n if (isset($typeMap[$type])) {\r\n return $typeMap[$type];\r\n } else {\r\n return 'string';\r\n }\r\n }", "public function getDataType(): ?string {\n $val = $this->getBackingStore()->get('dataType');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'dataType'\");\n }", "public function getOrderDataType(): ?string {\n\t\treturn Hash::get($this->_config, 'orderDataType');\n\t}", "protected function getTypeMapping()\n {\n return self::$mysqlTypeMap;\n }", "function mscaffolding_get_type($type)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"string\":\n\t\t\t\treturn \" VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"text\":\n\t\t\t\treturn \" TEXT CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"boolean\":\n\t\t\t\treturn \" TINYINT NOT NULL,\";\n\t\t\tcase \"integer\":\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t\tdefault:\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t}\n\t}", "function tipoCampo($result, $indice){\n\t // echo \"<br><br>\".mysql_field_type($result, $indice);\n\t\treturn mysql_field_type($result, $indice);\t\n\t}", "public function getContentColumnType(): string {\n return Schema::TYPE_TEXT;\n }", "public function fieldType($result = false, $field_offset = 0){\n $this->resCalc($result); \n return mysql_field_type($result, $field_offset); \n }", "public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }", "function getOrigamiColumnType(&$Model, $column) {\n $attribute = $this->getAttribute($Model, $column);\n if (isset($attribute['Datatype']['format']))\n return $attribute['Datatype']['format'];\n return null;\n }", "private function _columnTypeTranslation($type) {\n $map = array(\n 'datetime' => 'timestamp',\n );\n if(!empty($map[$type])) {\n return $map[$type];\n }\n return $type;\n }", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "public function getTypeDdl(){\n return $this->_typeDdl;\n }", "abstract protected function get_typestring();", "function getFieldsTypes()\n {\n return array(\n'id' =>'integer',\n'paypalid'=>'string',\n'notifyid'=>'string',\n\n\t\t\t\n\t );\n }", "final public static function convertValueForSql($type, $value)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Core::TYPE_INTEGER:\n\t\t\t\treturn intval($value);\n\n\t\t\tcase Core::TYPE_FLOAT:\n\t\t\t\treturn floatval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase Core::TYPE_BOOLEAN:\n\t\t\t\treturn $value ? 1 : 0;\n\n\t\t\tcase Core::TYPE_STRING:\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars_decode($value, ENT_QUOTES);\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars($temp, ENT_QUOTES, Core::$current_db_is_utf8 ? 'UTF-8' : 'ISO-8859-1');\n\t\t\t\treturn '\"'.$temp.'\"';\n\n\t\t\tcase Core::TYPE_DATE:\n\t\t\tcase Core::TYPE_TIME:\n\t\t\tcase Core::TYPE_DATETIME:\n\t\t\tcase Core::TYPE_TIMESTAMP:\n\t\t\tcase Core::TYPE_YEAR:\n\t\t\t\t$format\t\t\t=\tnull;\n\n\t\t\t\tif(empty($value)) {\n\t\t\t\t\treturn 'NULL';\n\t\t\t\t}\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase Core::TYPE_TIME:\t\t$format\t=\t'H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_DATETIME:\t$format\t=\t'Y-m-d H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_TIMESTAMP:\t$format\t=\t'YmdHis'; break;\n\t\t\t\t\tcase Core::TYPE_YEAR:\t\t$format\t=\t'Y'; break;\n\t\t\t\t\tcase Core::TYPE_DATE:\t\t$format\t=\t'Y-m-d'; break;\n\t\t\t\t}\n\n\t\t\t\treturn\t'\"'.(is_numeric($value)\n\t\t\t\t\t\t? @date($format, $value)\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t$value instanceof \\DateTime\n\t\t\t\t\t\t\t? $value->format($format)\n\t\t\t\t\t\t\t: $value\n\t\t\t\t\t\t)).'\"';\n\n\t\t\tdefault:\n\t\t\t\treturn $value;\n\t\t}\n\t}", "public function getType() {\n return $this->field->type;\n }", "private function getObjType($obj){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"tbloggetti\");\n\t\t\t$query->fields = array(\"TipoOggetto\");\n\t\t\t$query->filters = \"ID=\".$obj;\n\n\t\t\tif ($query->Open()){\n\t\t\t\t$row = $query->GetNextRecord();\n\t\t\t\treturn $row[0];\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}", "public function getFieldType(){\n \treturn $this->field_type;\n }" ]
[ "0.7447562", "0.7431843", "0.7368935", "0.7338101", "0.7139873", "0.7139873", "0.70480204", "0.6993981", "0.6902445", "0.6833043", "0.68257284", "0.6812871", "0.6791835", "0.6791835", "0.6779235", "0.6766996", "0.67507184", "0.66035813", "0.65801", "0.65801", "0.6579874", "0.6558623", "0.65562314", "0.65512776", "0.6548456", "0.6548456", "0.6548456", "0.6548456", "0.6546435", "0.65030295", "0.64745283", "0.64628005", "0.6445524", "0.64217937", "0.6414283", "0.640929", "0.6403511", "0.63972604", "0.63933474", "0.6380337", "0.63655686", "0.6362192", "0.6301709", "0.6297458", "0.6292535", "0.6270268", "0.6252353", "0.62485623", "0.6248", "0.62475365", "0.62475365", "0.6247181", "0.6246574", "0.6241634", "0.62305486", "0.62262505", "0.62107444", "0.6206802", "0.6195439", "0.61949784", "0.6168543", "0.6165042", "0.61639905", "0.61399525", "0.61302245", "0.6121039", "0.6107735", "0.608358", "0.6078635", "0.6078152", "0.6075805", "0.6060341", "0.60508764", "0.60404587", "0.6037109", "0.6032224", "0.6032224", "0.6032224", "0.6032224", "0.6018085", "0.601745", "0.6013485", "0.6013141", "0.60110444", "0.6009988", "0.6007662", "0.6005925", "0.5999237", "0.59899473", "0.59858227", "0.59635234", "0.5947119", "0.59461087", "0.59444517", "0.5939617", "0.5935099", "0.59338355", "0.5932822", "0.59327674", "0.59276193" ]
0.62907004
45
gets mapped data type for given orm type
public function getMappedDataType($ormType, $length = 0) { if (!isset($this->ormTypeMapping[$ormType])) { return $ormType; } $mapping = $this->ormTypeMapping[$ormType]; if (is_string($mapping)) { return $mapping; } $defaultType = isset($mapping['default']) ? $mapping['default'] : null; if (!isset($mapping['types'])) { return $defaultType; } if ($defaultType && ($length === null || $length === 0)) { return $defaultType; } $unit = isset($mapping['unit']) ? $mapping['unit'] : 'chars'; if ($unit === self::UNIT_BYTES) { $length = (int)floor((log(pow(10, $length)) / log(2)) / 8); } return $this->getBestMatchingType($mapping['types'], $defaultType, $length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMappedOrmType($dataType)\n {\n return $this->hasDataType($dataType)\n ? $this->dataTypeMapping[$dataType]\n : null;\n }", "public function getTypeDoctrine()\n {\n if (isset(self::$doctrineTypeMap[$this->getType()])) {\n return self::$doctrineTypeMap[$this->getType()];\n }\n\n // our fallback default\n return self::$doctrineTypeMap[self::TYPE_STRING];\n }", "public function getTypeMapper();", "public function getDbFieldType()\n {\n }", "public function castDataType($type)\n {\n return ApiDataType::get($type);\n }", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "public function getColumnType($name);", "public function getColumnType($name);", "protected function getTypeMapping()\n {\n return self::$mysqlTypeMap;\n }", "public function getMappingEntityType();", "private function _transformType($dataType)\n {\n switch ($dataType) {\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BOOLEAN:\n return self::PHP_TYPE_BOOLEAN;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_INTEGER:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_SMALLINT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BIGINT:\n return self::PHP_TYPE_INTEGER;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DECIMAL:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_FLOAT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DOUBLE_PRECISION:\n return self::PHP_TYPE_FLOAT;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BLOB:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TEXT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_CHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BINARY_VARYING:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_VARCHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_ENUM:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATE:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIME:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIMESTAMP:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATETIME:\n return self::PHP_TYPE_STRING;\n\n default:\n return \"unknown ({$dataType})\";\n break;\n }\n }", "public function delegateGetDbalColumnType(&$dbal_type, array $drupal_field_specs);", "public function loadColumnType($name);", "protected function getColumnPhpType($type)\r\n {\r\n static $typeMap = [\r\n // abstract type => php type\r\n 'text' => 'string',\r\n 'number' => 'integer',\r\n 'container' => 'resource',\r\n 'date' => 'date',\r\n 'time' => 'time',\r\n 'timestamp' => 'timestamp',\r\n ];\r\n if (isset($typeMap[$type])) {\r\n return $typeMap[$type];\r\n } else {\r\n return 'string';\r\n }\r\n }", "public function getMappedEntityType();", "public function getDatatype($type, $user){\r\r\n\t\t$dataType = DataType::model()->findByAttributes(array('name' => $type));\r\r\n\t\tif($dataType == null)\r\r\n\t\t\tthrow new Exception('Data type not exists');\r\r\n\t\t$userDataType = UserDataType::model()\r\r\n\t\t\t->findByAttributes(array(\r\r\n\t\t\t\t\t'data_type_id'=>$dataType->data_type_id,\r\r\n\t\t\t\t\t'users_id' => $user\r\r\n\t\t\t));\r\r\n\t\tif($userDataType == null)\r\r\n\t\t\t$userDataType = $this->createDatatype($dataType->data_type_id, $user);\r\r\n\t\treturn $userDataType;\r\r\n\t}", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t// SQL-92\n\t\t\t'bit' => array('type' => 'string', 'exact' => true),\n\t\t\t'bit varying' => array('type' => 'string'),\n\t\t\t'char' => array('type' => 'string', 'exact' => true),\n\t\t\t'char varying' => array('type' => 'string'),\n\t\t\t'character' => array('type' => 'string', 'exact' => true),\n\t\t\t'character varying' => array('type' => 'string'),\n\t\t\t'date' => array('type' => 'string'),\n\t\t\t'dec' => array('type' => 'float', 'exact' => true),\n\t\t\t'decimal' => array('type' => 'float', 'exact' => true),\n\t\t\t'double precision' => array('type' => 'float'),\n\t\t\t'float' => array('type' => 'float'),\n\t\t\t'int' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'integer' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'interval' => array('type' => 'string'),\n\t\t\t'national char' => array('type' => 'string', 'exact' => true),\n\t\t\t'national char varying' => array('type' => 'string'),\n\t\t\t'national character' => array('type' => 'string', 'exact' => true),\n\t\t\t'national character varying' => array('type' => 'string'),\n\t\t\t'nchar' => array('type' => 'string', 'exact' => true),\n\t\t\t'nchar varying' => array('type' => 'string'),\n\t\t\t'numeric' => array('type' => 'float', 'exact' => true),\n\t\t\t'real' => array('type' => 'float'),\n\t\t\t'smallint' => array('type' => 'int', 'min' => '-32768', 'max' => '32767'),\n\t\t\t'time' => array('type' => 'string'),\n\t\t\t'time with time zone' => array('type' => 'string'),\n\t\t\t'timestamp' => array('type' => 'string'),\n\t\t\t'timestamp with time zone' => array('type' => 'string'),\n\t\t\t'varchar' => array('type' => 'string'),\n\t\t\t// SQL:1999\n\t\t\t'binary large object' => array('type' => 'string', 'binary' => true),\n\t\t\t'blob' => array('type' => 'string', 'binary' => true),\n\t\t\t'boolean' => array('type' => 'bool'),\n\t\t\t'char large object' => array('type' => 'string'),\n\t\t\t'character large object' => array('type' => 'string'),\n\t\t\t'clob' => array('type' => 'string'),\n\t\t\t'national character large object' => array('type' => 'string'),\n\t\t\t'nchar large object' => array('type' => 'string'),\n\t\t\t'nclob' => array('type' => 'string'),\n\t\t\t'time without time zone' => array('type' => 'string'),\n\t\t\t'timestamp without time zone' => array('type' => 'string'),\n\t\t\t// SQL:2003\n\t\t\t'bigint' => array('type' => 'int', 'min' => '-9223372036854775808', 'max' => '9223372036854775807'),\n\t\t\t// SQL:2008\n\t\t\t'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),\n\t\t\t'binary varying' => array('type' => 'string', 'binary' => true),\n\t\t\t'varbinary' => array('type' => 'string', 'binary' => true)\n\t\t);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn array();\n\t}", "public function getDataType() {}", "private function _columnTypeTranslation($type) {\n $map = array(\n 'datetime' => 'timestamp',\n );\n if(!empty($map[$type])) {\n return $map[$type];\n }\n return $type;\n }", "public function get_type();", "function getDataType($connection, $idDataType){\n\t$query = \"SELECT * FROM tDataType WHERE idDataType =\".$idDataType;\n\treturn fetchRowFromDBOnID($connection, $query, $idDataType, \"DataType\");\n}", "public function getDataWithTypeField() {}", "protected function getDoctrineColumnType( $type )\n\t{\n\t\t$type = strtolower( $type );\n\n\t\tswitch ( $type )\n\t\t{\n\t\t\tcase 'biginteger':\n\t\t\t\t$type = 'bigint';\n\t\t\t\tbreak;\n\t\t\tcase 'smallinteger':\n\t\t\t\t$type = 'smallint';\n\t\t\t\tbreak;\n\t\t\tcase 'mediumtext':\n\t\t\tcase 'longtext':\n\t\t\t\t$type = 'text';\n\t\t\t\tbreak;\n\t\t\tcase 'binary':\n\t\t\t\t$type = 'blob';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn Type::getType( $type );\n\t}", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t'blob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '65535'),\n\t\t\t'bool' => array('type' => 'bool'),\n\t\t\t'bigint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '18446744073709551615'),\n\t\t\t'datetime' => array('type' => 'string'),\n\t\t\t'decimal unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'double' => array('type' => 'float'),\n\t\t\t'double precision unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'double unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'enum' => array('type' => 'string'),\n\t\t\t'fixed' => array('type' => 'float', 'exact' => TRUE),\n\t\t\t'fixed unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'float unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'geometry' => array('type' => 'string', 'binary' => TRUE),\n\t\t\t'int unsigned' => array('type' => 'int', 'min' => '0', 'max' => '4294967295'),\n\t\t\t'integer unsigned' => array('type' => 'int', 'min' => '0', 'max' => '4294967295'),\n\t\t\t'longblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '4294967295'),\n\t\t\t'longtext' => array('type' => 'string', 'character_maximum_length' => '4294967295'),\n\t\t\t'mediumblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '16777215'),\n\t\t\t'mediumint' => array('type' => 'int', 'min' => '-8388608', 'max' => '8388607'),\n\t\t\t'mediumint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '16777215'),\n\t\t\t'mediumtext' => array('type' => 'string', 'character_maximum_length' => '16777215'),\n\t\t\t'national varchar' => array('type' => 'string'),\n\t\t\t'numeric unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => '0'),\n\t\t\t'nvarchar' => array('type' => 'string'),\n\t\t\t'point' => array('type' => 'string', 'binary' => TRUE),\n\t\t\t'real unsigned' => array('type' => 'float', 'min' => '0'),\n\t\t\t'set' => array('type' => 'string'),\n\t\t\t'smallint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '65535'),\n\t\t\t'text' => array('type' => 'string', 'character_maximum_length' => '65535'),\n\t\t\t'tinyblob' => array('type' => 'string', 'binary' => TRUE, 'character_maximum_length' => '255'),\n\t\t\t'tinyint' => array('type' => 'int', 'min' => '-128', 'max' => '127'),\n\t\t\t'tinyint unsigned' => array('type' => 'int', 'min' => '0', 'max' => '255'),\n\t\t\t'tinytext' => array('type' => 'string', 'character_maximum_length' => '255'),\n\t\t\t'year' => array('type' => 'string'),\n\t\t);\n\n\t\t$type = str_replace(' zerofill', '', $type);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn parent::getDataType($type);\n\t}", "public function getDatatype() {}", "public function getDataWithTypeDb() {}", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "public function getDataType(): string;", "public function getDataType(): string;", "public function field_metatype($result, $index){\r\n $obj_field = new ADOFieldObject();\r\n $obj_field = $result->FetchField($index);\r\n //print_r($obj_field);\r\n $type = $result->MetaType($obj_field->type, $obj_field->max_length); // Since ADOdb 3.0, MetaType accepts $fieldobj as the first parameter, instead of $nativeDBType.\r\n \r\n return $type; \r\n }", "abstract public function getColumnTypeByField(Entity\\ScalarField $field);", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "public function _getType() {\n $modelName = self::_getModelName();\n return $modelName::_getDataTypeName();\n }", "public function dbFieldType()\n {\n return 'string';\n }", "abstract public function getFieldByColumnType($name, $type, array $parameters = null);", "public function get_cast_for_type($type = '')\n {\n }", "public function get_cast_for_type($type = '')\n {\n }", "function getTypeConverter() ;", "protected function getMappedType($type, $jvalue = null)\n {\n\n $class = @$jvalue->__class;\n if($class) $type = $class;\n if (isset($this->classMap[$type])) {\n $target = $this->classMap[$type];\n } else if (is_string($type) && $type !== '' && $type[0] == '\\\\'\n && isset($this->classMap[substr($type, 1)])\n ) {\n $target = $this->classMap[substr($type, 1)];\n } else {\n $target = null;\n }\n if ($target) {\n if (is_callable($target)) {\n $type = $target($type, $jvalue);\n } else {\n $type = $target;\n }\n }\n return $type;\n }", "public static function getDBColumnType($userField)\n\t{\n\t\tglobal $DB;\n\t\tswitch($DB->type)\n\t\t{\n\t\t\tcase \"MYSQL\":\n\t\t\t\treturn \"int(11)\";\n\t\t\tcase \"ORACLE\":\n\t\t\t\treturn \"number(18)\";\n\t\t\tcase \"MSSQL\":\n\t\t\t\treturn \"int\";\n\t\t}\n\t}", "protected function initializeDoctrineTypeMappings()\n {\n $this->doctrineTypeMapping = array(\n 'int' => 'integer',\n 'timestamp' => 'datetime',\n 'time' => 'datetime',\n 'date' => 'date',\n 'varchar' => 'string',\n 'char' => 'string',\n 'double' => 'float',\n 'float' => 'float',\n 'int64' => 'float',\n 'smallint' => 'integer',\n );\n }", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "function getUserType(){\r\n\t\t$select = \"SELECT user_types.type FROM user_types \r\n\t\t\tLEFT JOIN users ON user_types.id = users.type\r\n\t\t\tWHERE users.id = $this->user_id\";\r\n\r\n global $pdo;\r\n $stmt = $pdo->query($select);\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $row['type'];\r\n\t}", "protected abstract function get_meta_type();", "public function meta_type();", "public function getEntityType();", "private function getSqlType(Session $session, string $model_name, string $property): string\n {\n $model = $session->getModel($model_name);\n $structure = $model->getStructure();\n\n return $structure->getTypeFor($property);\n }", "public function getFieldByColumnType($name, $type, array $parameters = null)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase MYSQLI_TYPE_TINY:\n\t\t\tcase MYSQLI_TYPE_SHORT:\n\t\t\tcase MYSQLI_TYPE_LONG:\n\t\t\tcase MYSQLI_TYPE_INT24:\n\t\t\tcase MYSQLI_TYPE_CHAR:\n\t\t\t\treturn new ORM\\Fields\\IntegerField($name);\n\n\t\t\tcase MYSQLI_TYPE_DECIMAL:\n\t\t\tcase MYSQLI_TYPE_NEWDECIMAL:\n\t\t\tcase MYSQLI_TYPE_FLOAT:\n\t\t\tcase MYSQLI_TYPE_DOUBLE:\n\t\t\t\treturn new ORM\\Fields\\FloatField($name);\n\n\t\t\tcase MYSQLI_TYPE_DATETIME:\n\t\t\tcase MYSQLI_TYPE_TIMESTAMP:\n\t\t\t\treturn new ORM\\Fields\\DatetimeField($name);\n\n\t\t\tcase MYSQLI_TYPE_DATE:\n\t\t\tcase MYSQLI_TYPE_NEWDATE:\n\t\t\t\treturn new ORM\\Fields\\DateField($name);\n\t\t}\n\t\t//MYSQLI_TYPE_BIT\n\t\t//MYSQLI_TYPE_LONGLONG\n\t\t//MYSQLI_TYPE_TIME\n\t\t//MYSQLI_TYPE_YEAR\n\t\t//MYSQLI_TYPE_INTERVAL\n\t\t//MYSQLI_TYPE_ENUM\n\t\t//MYSQLI_TYPE_SET\n\t\t//MYSQLI_TYPE_TINY_BLOB\n\t\t//MYSQLI_TYPE_MEDIUM_BLOB\n\t\t//MYSQLI_TYPE_LONG_BLOB\n\t\t//MYSQLI_TYPE_BLOB\n\t\t//MYSQLI_TYPE_VAR_STRING\n\t\t//MYSQLI_TYPE_STRING\n\t\t//MYSQLI_TYPE_GEOMETRY\n\t\treturn new ORM\\Fields\\StringField($name);\n\t}", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "public function getPDOType()\n {\n return PropelTypes::getPDOType($this->getType());\n }", "public static function typeDef(string $type) {\n // Check for the unsigned signifier.\n $unsigned = null;\n if ($type[0] === 'u') {\n $unsigned = true;\n $type = substr($type, 1);\n } elseif (preg_match('`(.+)\\s+unsigned`i', $type, $m)) {\n $unsigned = true;\n $type = $m[1];\n }\n\n // Remove brackets from the type.\n $brackets = null;\n if (preg_match('`^(.*)\\((.*)\\)$`', $type, $m)) {\n $brackets = $m[2];\n $type = $m[1];\n }\n\n // Look for the type.\n $type = strtolower($type);\n if (isset(self::$types[$type])) {\n $row = self::$types[$type];\n $dbtype = $type;\n\n // Resolve an alias.\n if (is_string($row)) {\n $dbtype = $row;\n $row = self::$types[$row];\n }\n } else {\n return null;\n }\n\n // Now that we have a type row we can build a schema for it.\n $schema = [\n 'type' => $row['type'],\n 'dbtype' => $dbtype\n ];\n\n if (!empty($row['schema'])) {\n $schema += $row['schema'];\n }\n\n if ($row['type'] === 'integer' && $unsigned) {\n $schema['unsigned'] = true;\n\n if (!empty($schema['maximum'])) {\n $schema['maximum'] = $schema['maximum'] * 2 + 1;\n $schema['minimum'] = 0;\n }\n }\n\n if (!empty($row['length'])) {\n $schema['maxLength'] = (int)$brackets ?: 255;\n }\n\n if (!empty($row['precision'])) {\n $parts = array_map('trim', explode(',', $brackets));\n $schema['precision'] = (int)$parts[0];\n if (isset($parts[1])) {\n $schema['scale'] = (int)$parts[1];\n }\n }\n\n if (!empty($row['enum'])) {\n $enum = explode(',', $brackets);\n $schema['enum'] = array_map(function ($str) {\n return trim($str, \"'\\\" \\t\\n\\r\\0\\x0B\");\n }, $enum);\n }\n\n return $schema;\n }", "public function getDatabaseType();", "public function getDatabaseType();", "public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }", "private function getType(string $doctrineType = null): string\n {\n if (null === $doctrineType || Type::FLOAT === $doctrineType) {\n return 'string';\n }\n\n if (Type::FLOAT === $doctrineType) {\n return 'float';\n }\n\n return 'int';\n }", "function getTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id={$id}\", 'type_name');\n}", "function data_type($type) {\r\n\t\t$return_value = '';\r\n\t\t$type = (string) $type;\r\n\r\n\t\tswitch (strtolower($type)) {\r\n\t\t\t// supported scalar types\r\n\t\t\tcase 'ENTITIES':\r\n\t\t\tcase 'ENTITY':\r\n\t\t\tcase 'ID':\r\n\t\t\tcase 'IDREF':\r\n\t\t\tcase 'IDREFS':\r\n\t\t\tcase 'NCName':\r\n\t\t\tcase 'NMTOKEN':\r\n\t\t\tcase 'NMTOKENS':\r\n\t\t\tcase 'Name':\r\n\t\t\tcase 'anySimpleType':\r\n\t\t\tcase 'anyType':\r\n\t\t\tcase 'base64':\r\n\t\t\tcase 'base64Binary':\r\n\t\t\tcase 'boolean':\r\n\t\t\tcase 'byte':\r\n\t\t\tcase 'date':\r\n\t\t\tcase 'dateTime':\r\n\t\t\tcase 'decimal':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'duration':\r\n\t\t\tcase 'float':\r\n\t\t\tcase 'gDay':\r\n\t\t\tcase 'gMonth':\r\n\t\t\tcase 'gMonthDay':\r\n\t\t\tcase 'gYear':\r\n\t\t\tcase 'gYearMonth':\r\n\t\t\tcase 'hexBinary':\r\n\t\t\tcase 'i4':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'language':\r\n\t\t\tcase 'long':\r\n\t\t\tcase 'negativeInteger':\r\n\t\t\tcase 'nonNegativeInteger':\r\n\t\t\tcase 'nonPositiveInteger':\r\n\t\t\tcase 'normalizedString':\r\n\t\t\tcase 'positiveInteger':\r\n\t\t\tcase 'short':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'time':\r\n\t\t\tcase 'timeInstant':\r\n\t\t\tcase 'token':\r\n\t\t\tcase 'unsignedByte':\r\n\t\t\tcase 'unsignedInt':\r\n\t\t\tcase 'unsignedLong':\r\n\t\t\tcase 'unsignedShort':\r\n\t\t\tcase 'ur-type':\r\n\t\t\t\t$return_value = 'xsd:' . $type;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\tforeach ($this->types as $id => $type_definition) {\r\n\r\n\t\t\t\t\tif ($type_definition['name'] == $type) {\r\n\t\t\t\t\t\t$return_value = 'tns:' . $type;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} // end: if\r\n\t\t\t\t} // end: foreach\r\n\t\t} // end: switch\r\n\r\n\t\treturn $return_value;\r\n\t}", "private function get_type() {\n\n\t}", "public abstract function getType();", "function cast_query_results($rs)\n{\n $fields = mysqli_fetch_fields($rs);\n $data = array();\n $types = array();\n foreach ($fields as $field) {\n switch ($field->type) {\n case 3:\n $types[$field->name] = 'int';\n break;\n case 4:\n $types[$field->name] = 'float';\n break;\n default:\n $types[$field->name] = 'string';\n break;\n }\n }\n while ($row = mysqli_fetch_assoc($rs)) {\n array_push($data, $row);\n }\n\n for ($i = 0; $i < count($data); $i++) {\n foreach ($types as $orgname => $type) {\n settype($data[$i][$orgname], $type);\n }\n }\n return $data;\n}", "public function getMDB2DataType()\n\t{\n\t\tif($this->mdb2DataType != '')\n\t\t{\n\t\t\treturn $this->mdb2DataType;\n\t\t}\n\t}", "public function getMappingType(): string\n {\n return (string) $this->mappingType;\n }", "public function get_type(): string;", "public abstract function getTypeAttribute();", "public function setType(){\n switch($this->security){\n case 'H':\n case 'L':\n case '0.0':\n $typeId = 2; // k-space\n break;\n case 'A':\n $typeId = 3; // a-space\n break;\n default:\n $typeId = 1; // w-space\n }\n\n /**\n * @var $type MapTypeModel\n */\n $type = $this->rel('typeId');\n $type->getById($typeId);\n $this->typeId = $type;\n }", "public function dataForType($type)//, $name = null)\n {\n $length = DatabaseHelper::typeLength($type);\n\n if ($length > 255) {\n $length = 255; // if length is not null, limit to 255 for now\n }\n\n // if ($name) {\n // $closure = $this->guesser->guessFormat($name, $length);\n //\n // if ($closure) {\n // $guess = $closure();\n //\n // if ($guess) {\n // return $guess;\n // }\n // }\n // }\n\n switch (DatabaseHelper::unconstrainedType($type)) {\n case 'bigint':\n case 'int':\n case 'mediumint':\n case 'smallint':\n case 'tinyint':\n return $this->faker->randomNumber();\n\n case 'decimal':\n case 'double':\n case 'float':\n return $this->faker->randomFloat();\n\n case 'blob':\n case 'char':\n case 'longblob':\n case 'longtext':\n case 'mediumblob':\n case 'mediumtext':\n case 'text':\n case 'tinyblob':\n case 'tinytext':\n case 'varchar':\n return $this->faker->text($length ?: 255);\n\n case 'date':\n case 'datetime':\n case 'time':\n case 'timestamp':\n case 'year':\n return $this->faker->dateTime();\n\n case 'enum':\n default:\n return $this->faker->text($length ?: 255);\n }\n }", "function lim_get_type(&$value, $key) {\n\t$value = objet_type(table_objet($key));\n}", "abstract public function getEntityTypeCode();", "abstract protected function getType();", "public function getType(): EntityType;", "public static function get_meta_type();", "public function getDataType()\n {\n return $this->data_type;\n }", "public function getSqlType($type, $limit = null);", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function getDataTypeAttribute(): string\n {\n return $this->config['data_type'];\n }", "public function getTypeConverter() {}", "public function getDataType()\n {\n return $this->_fields['DataType']['FieldValue'];\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type');\n }", "public function getTypeAttribute();", "protected abstract function getType();", "public function setMappedEntityType($entity_type);", "public function fieldType($field) {\n\t\tif (strstr($field, \".\")) {\n\t\t\t// use the path to get to the data poing\n\t\t\t$fieldParts = explode(\".\", $field);\n\t\t\t$key = array_pop($fieldParts);\n\t\t\t\n\t\t\t// add the field parts to the entityPath to get the correct model\n\t\t\tEntity::_setEntityPath($fieldParts);\n\t\t} else {\n\t\t\t$key = $field;\n\t\t\t$fieldParts = array();\n\t\t}\n\t\t\n\t\t$model = Entity::currentPathClass();\n\t\t\n\t\tEntity::_revertEntityPath(count($fieldParts));\n\t\t\n\t\tApp::uses($model, \"Model\");\n\t\t\n\t\t$modelConf = $this->entityConfig($model, \"Fields\", $key);\n\t\t\t\n\t\tif (is_array($modelConf) && isset($modelConf['type'])) {\n\t\t\treturn $modelConf['type'];\n\t\t}\n\t\t\n\t\tif ($key == $this->primaryKey($model)) {\n\t\t\treturn \"primary\";\n\t\t}\n\n\t\t// if field is not defined in db, and it's not a defined html helper func, then just print whatever it is\n\t\t$types = $this->entityFields($model);\n\t\t\n\t\tif (@$types[$key] == \"virtual\") {\n\t\t\t$type = \"text\";\n\t\t} else {\n\t\t\tif (isset($types[$key]))\n\t\t\t\t$type = $types[$key];\n\t\t\telse\n\t\t\t\t$type = \"text\";\n\t\t}\n\t\t\n\t\tif (substr($type, 0, 5) == \"enum(\") {\n\t\t\t$this->_enumopts[$key] = explode(\"','\", substr($type, 6, -2));\n\t\t\t$type = \"enum\";\n\t\t}\n\t\t\n\t\treturn $type;\n\t}", "public function userType() {\n // hasOne('Model', 'id column of foreign key', 'local column with foreign key')\n return $this->hasOne('UserType', 'id', 'type');\n }", "protected static function getPhpType($sqlDataType)\n {\n if (strpos($sqlDataType, \"char\") !== false)\n return \"string\";\n \n if (strpos($sqlDataType, \"decimal\") !== false)\n return \"float\";\n \n if (strpos($sqlDataType, \"date\") !== false ||\n strpos($sqlDataType, \"time\") !== false)\n return \"DateTime\";\n \n if (strpos($sqlDataType, \"tinyint\") !== false ||\n strpos($sqlDataType, \"bool\") !== false)\n return \"bool\";\n \n if (strpos($sqlDataType, \"int\") !== false)\n return \"int\";\n \n return \"string\";\n }", "abstract public function type();", "abstract public function type();", "public function getModelType() {}", "public function _toMongoType($data, $type = null)\n {\n if($type == 'id')\n {\n return new MongoId($data);\n }\n\n if($data instanceof DateTime)\n {\n return new MongoDate($data->getTimestamp());\n }\n if($type == 'date')\n {\n return new MongoDate($data->getTimestamp());\n }\n }", "public function getEntityType() {\n return $this->datasource()->getEntityType();\n }", "function getDataType($key=false) {\n\t\t\n\t\t$output = $this->getDataTypes();\n\t\t\n\t\tif (!$key) {\n \t\treturn $output;\n \t} else {\n \t\treturn $output[$key];\n \t}\n\t\t\n\t}", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "public function get_type()\n {\n }", "public function get_type()\n {\n }" ]
[ "0.72476715", "0.6878628", "0.66546255", "0.66415125", "0.6619879", "0.6587381", "0.65685695", "0.65685695", "0.64811766", "0.6466056", "0.6463914", "0.6405813", "0.6400301", "0.63959956", "0.63904804", "0.6385907", "0.6370004", "0.6351379", "0.63503575", "0.63249356", "0.6276496", "0.62716866", "0.62547386", "0.617907", "0.6131383", "0.6119748", "0.611316", "0.6105412", "0.60633093", "0.6061477", "0.6061477", "0.60588044", "0.60535145", "0.6049871", "0.6032097", "0.60283595", "0.60271215", "0.60265166", "0.60265166", "0.60236526", "0.5981782", "0.59437746", "0.5938758", "0.5912185", "0.59102494", "0.59049815", "0.5898527", "0.58959913", "0.58914953", "0.58866936", "0.5875204", "0.5875204", "0.5875204", "0.5875204", "0.5875204", "0.5875204", "0.5873982", "0.5865381", "0.5863556", "0.5863556", "0.58425796", "0.5835353", "0.58233404", "0.5817721", "0.58133787", "0.5796292", "0.57926875", "0.57869965", "0.5778658", "0.5778523", "0.5775377", "0.577435", "0.5773022", "0.57723767", "0.5770548", "0.5768791", "0.5766766", "0.5761987", "0.57549953", "0.57450396", "0.5742245", "0.57396775", "0.5721225", "0.571918", "0.5717823", "0.5711283", "0.5710483", "0.5697397", "0.56951606", "0.56893325", "0.5688578", "0.5677772", "0.5677772", "0.5675188", "0.566812", "0.56614983", "0.56601554", "0.5658604", "0.5656904", "0.5656904" ]
0.68427837
2
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'title' => 'required|min:5|max:255', 'document' => 'required|file|max:5000|mimes:pdf', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Create a manytoone (and onetoone) relation
public function hasOne(Entity|string $entityRelation, string $foreignKey = ''): HasOne|false { try { $entityRelation = $this->getEntity($entityRelation); $primaryKey = $entityRelation->getPrimaryKey(); $preForeignKey = strtolower((new ReflectionClass($entityRelation))->getShortName()); $foreignKey = $foreignKey ?: $preForeignKey . '_' . $primaryKey; $relation = new HasOne($this, $entityRelation, $foreignKey); $name = debug_backtrace()[1]['function'] ?? $entityRelation->getManager()->getTable(); return $this->relations[$name] = $relation; } catch (Exception $ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function one_to_one()\n {\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function hasOne($class, $foreignKey = null, $localKey = null);", "public function isAddToRelationship();", "protected static function _addOneToOneRelation(array $params)\n {\n $name = $params['foreignClass'];\n\n $params['type'] = self::ONE_TO_ONE;\n\n static::$_relations[$name] = $params;\n }", "public function palmares() {\n $relation = $this->hasOne(\"Palmares\");\n return $relation;\n }", "public function post(): HasOne\n {\n return $this->hasOne(\\Forme\\Framework\\Models\\Post::class);\n }", "public function relationship(){\n return $this->hasOne('App\\Relationship','id','relationship_id');\n }", "public function Pedido(){\n return $this->hasOne(\"App\\Models\\Pedido\");\n }", "public function user() {\n return $this->hasOne('App\\Models\\User', 'user_id');\n}", "public function createRelationship() {\n\t\tthrow new CmisNotImplementedException(\"createRelationship\");\n\t}", "private function belongsTo($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\tif(!$this->isSelected)$this->selectOne();\n\t\t$forId = $this->columns[$forKey];\n\t\t$entity = new $model($forId);\n\t\treturn $entity;\n\t}", "public function table(): HasOne\n {\n return $this->hasOne(Donnee::class, 'id', 'table_id');\n }", "public function setUp()\n {\n parent::setUp();\n $this->hasOne('WebsiteIdiomas', array(\n 'local' => 'id_idioma',\n 'foreign' => 'cod_id'));\n }", "public function __construct( $args = array(), $isSimpleInstance = false )\n { \n // Este atributo lo inyecto aunque la instancia sea simple, porque se utiliza en el YuppConventions::tableName.\n // 5: Nombre de la clase, para soporte de herencia.\n $this->attributeTypes[\"class\"] = Datatypes::TEXT; // Los tipos de los deleted son boolean.\n $this->attributeValues[\"class\"] = get_class($this); // No esta borrado.\n\n // 4: Inyecta el atributo deleted de tipo boolean.\n $this->attributeTypes[\"deleted\"] = Datatypes::BOOLEAN; // Los tipos de los deleted son boolean.\n $this->attributeValues[\"deleted\"] = false; // No esta borrado.\n\n $this->errors = new Errors(); // core.validate.Errors\n\n // Si es simple, no hago nada.\n if ( $isSimpleInstance ) return;\n \n // Inyecta atributos de referencia hasOne.\n // VERIFY: Ojo, yo puedo tener un hasOne, pero el otro puede tener un hasMany con migo adentro! o sea *..1 bidireccional!!!!! no 1..1\n // 1: Se fija todas las relaciones 1??..1 a otras clases persistentes y agrega lso atributos de FK como \"email_id\".\n // Si se hace getEmailId, se devuelve el valor del id ese atributo, si es que no es null. TODO: Modificar __call.\n \n foreach ( $this->hasOne as $attr => $type )\n {\n // Se fija que la declaracion del hasOne sea a un PO.\n /* esta verificacion se hace en addHasOne\n if ( !is_subclass_of($type, 'PersistentObject') )\n {\n throw new Exception(\"HasOne, atributo $attr del tipo $type no es persistente.\");\n }\n */\n \n $newAttrName = DatabaseNormalization::simpleAssoc( $attr ); // Atributo email_id inyectado!\n $this->attributeTypes[ $newAttrName ] = Datatypes::INT_NUMBER; // Los tipos de los ids son int.\n $this->attributeValues[ $newAttrName ] = NULL; // FIXME: Esto no es un objeto, es su Id, por eso le pongo NULL y no NOT_LOADED.\n\n // Inyecto el atributo \"email\" y lo inicializo en NOT_LOADED...\n $this->attributeValues[ $attr ] = self::NOT_LOADED_ASSOC;\n\n // ningun objeto asociado, pero en este caso es que el objeto no esta ni siquiera cargado, para poner NULL habria que ver si\n // hay algun objeto y constatar de que no hay ninguno.\n }\n\n // 2: Inicializo los arrays para los valores de los objetos de los que se tienen varios.\n // FIXME: si en args viene un array con POs para un atributos hasMany, tengo que setearlo... y verificar q es un array y verificar que lo que tiene el array son objetos del tipo declarado en el hasMany.\n // No es necesario el chequeo porque es un array vacio.\n //foreach ( $this->hasMany as $attr => $type )\n //{\n // Esta verificacion ya se hace en addHasMany\n //if ( is_subclass_of($type, 'PersistentObject') )\n //{\n \n // TODO: esta inicializacion se podria hacer en el addHasMany\n // TODO: OJO! puede haber operaciones ahora que piensan que esto es un array y no consideran en NOT LOADED...\n //$this->attributeValues[ $attr ] = self::NOT_LOADED_ASSOC;\n \n //}\n // Else: podria ver como manejar listas de objetos simples como enteros y strings.\n // OJO, las listas de atributos simples no se si estaria bien declararlas en hasMany!\n //}\n\n // debe ir aqui porque si me viene un valor para un atributo inyectado y hago esto luego, \n // no me va a poner el valor xq el atributo no estaba inyectado!\n\n // 3: Inyecta el atributo id de tipo int.\n $this->attributeTypes['id'] = Datatypes::INT_NUMBER; // Los tipos de los ids son int.\n $this->attributeValues['id'] = NULL; // No tengo ningun objeto asociado.\n\n\n // Me fijo si en args viene algun valor de atributo\n // FIXME: no deberia poder modificar valor de atributos inyectados, el comportamiento posterior es impredecible.\n foreach ( $args as $attr => $value )\n {\n // Si es inyectado, no se deberia setear con los params, por ejemplo si viene un 'id'.\n if ($this->isInyectedAttribute($attr)) continue;\n \n // FIXME: hace lo mismo que setProperties pero distinto\n if (isset($this->attributeTypes[$attr]) || array_key_exists($attr, $this->attributeTypes))\n {\n // Si es un valor simple y string, lo limpio por espacios extras.\n // Sino es string, al hacerle trim lo transforma a string y genera errores de tipo.\n //$this->attributeValues[$attr] = ((is_string($value))? trim($value) : $value); \n \n // Si es una instancia nueva, siempre estara dirty si le pongo valores simples.\n $this->dirty = true;\n }\n else if (isset($this->hasOne[$attr]) || array_key_exists($attr, $this->hasOne))\n {\n if (!is_subclass_of($value, 'PersistentObject')) throw new Exception('Se espera un valor de tipo PersistentObject para el atributo '.$attr);\n \n //$this->attributeValues[$attr] = $value;\n \n // Si es una instancia nueva, siempre estara dirty si le pongo valores simples.\n $this->dirtyOne = true;\n }\n else if (isset($this->hasMany[$attr]) || array_key_exists($attr, $this->hasMany))\n {\n if (!is_array($value)) throw new Exception('Se espera un valor de tipo array para el atributo '.$attr);\n \n //$this->attributeValues[$attr] = $value;\n \n // Si es una instancia nueva, siempre estara dirty si le pongo valores simples.\n $this->dirtyMany = true;\n }\n \n $this->attributeValues[$attr] = ((is_string($value))? trim($value) : $value);\n }\n }", "public function user(): HasOne\n {\n return $this->hasOne(User::class);\n }", "public function pronostic() {\n $relation = $this->hasOne(\"Pronostic\");\n return $relation;\n }", "public function test_model_relation_handler_create()\n {\n $this->assertNull(Member::where('phonenumber', '407-925-1076')->where('email', '[email protected]')->get()->first());\n // First we insert the individual model to the database\n $model = Individual::create([\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n ]);\n $model = QueryableRelations::new($model)->create(['member'], [\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n 'member' => [\n 'phonenumber' => '407-925-1076',\n 'email' => '[email protected]',\n ],\n ]);\n $this->assertNotNull(Member::where('phonenumber', '407-925-1076')->where('email', '[email protected]')->get()->first());\n $this->assertNotNull(Individual::where('firstname', 'David')->where('address', '1237 McDonald Avenue')->get()->first());\n }", "public function morphOne($class, $prefix, $typeAttribute = null, $foreignKey = null);", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function setupAssociations() \n {\n \n }", "function relUser(){\n return $this->hasOne('App\\User', 'id', 'id_user');\n }", "public function initialize()\n {\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('foreignKey' => true,'alias' => 'Produto'));\n }", "public function testUpdateRecordWithHasOneRelation()\n {\n $this->expectQueries(\n [\n [\n 'SELECT hasOne.pk, hasOne.fk, hasOneRelation.primaryKey as hasOneRelation_primaryKey FROM hasOne' .\n ' LEFT JOIN related hasOneRelation ON hasOne.fk=hasOneRelation.primaryKey WHERE hasOne.pk=?',\n [2],\n [\n [\n 'pk' => 1,\n 'fk' => null,\n 'hasOneRelation_primaryKey' => null\n ]\n ]\n ],\n [\n 'SELECT primaryKey FROM related WHERE primaryKey=?',\n [2],\n [\n [\n 'primaryKey' => 2\n ]\n ]\n ],\n ['UPDATE hasOne SET fk=? WHERE pk=?', [2, 1]]\n ]\n );\n\n $entity = $this->entityManager->get('HasOneRelationEntity');\n $object = $entity->find()->with('hasOneRelation')->get(2);\n\n $this->assertNull($object->relation);\n\n $object->relation = $this->entityManager\n ->get('RelatedEntity')\n ->create(['primaryKey' => 2]);\n\n $entity->save($object);\n\n $this->entityManager->commit();\n }", "public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }", "public function mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne() {}", "public function has_one($from_table, $to_table, $from_column = NULL, $to_column = NULL) {\r\n return $this->belongs_to($to_table, $from_table, $from_column, $to_column);\r\n }", "protected function createRelation(User $user1, User $user2, $relationId)\n {\n // add relation to pivot table\n $user1->relationships()->sync([$user2->id => ['relation_id' => $relationId]]);\n // define the inverse\n $user2->relationships()->sync([$user1->id => ['relation_id' => $relationId]]);\n }", "public function tour(): HasOne\n {\n return $this->hasOne(Tour::class);\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "public function test_model_relation_handler_create_moral_create_morph_member()\n {\n $this->assertNull(Member::where('phonenumber', '954-438-2314')->where('email', '[email protected]')->get()->first());\n // First we insert the individual model to the database\n $model = Moral::create([\n 'label' => 'AZLAB\\'s Ltd.',\n 'address' => '3378 West Fork Drive',\n ]);\n $model = QueryableRelations::new($model)->create(['member'], [\n 'label' => 'AZLAB\\'s Ltd.',\n 'address' => '3378 West Fork Drive',\n 'member' => [\n 'phonenumber' => '954-438-2314',\n 'email' => '[email protected]',\n ],\n ]);\n $this->assertNotNull(Member::where('phonenumber', '954-438-2314')->where('email', '[email protected]')->get()->first());\n $this->assertNotNull(Moral::where('label', 'AZLAB\\'s Ltd.')->get()->first());\n }", "public function user(){\n return $this->hasOne('App\\User');\n }", "public function userone()\n {\n return $this->belongsTo(config('talk.user.model', 'App\\User'), 'user_one');\n }", "private function hasOne($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->limit(1)->get();\n\t\t$result = $this->_db()->result();\n\t\t$priId = $result[$priKey];\n\t\t$entity = new $model($priId);\n\t\treturn $entity;\n\t}", "public function setUp() {\n\t\t// A book\n\t\t$this->hasOne('Blipoteka_Book as book', array('local' => 'book_id', 'foreign' => 'book_id', 'onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));\n\t\t// User who borrows a book\n\t\t$this->hasOne('Blipoteka_User as borrower', array('local' => 'borrower_id', 'foreign' => 'user_id', 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'));\n\t\t// User who lends a book\n\t\t$this->hasOne('Blipoteka_User as lender', array('local' => 'lender_id', 'foreign' => 'user_id', 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'));\n\t}", "private function hasOne($table, $foreignTableName) {\n $foreignTableName = strtolower($foreignTableName);\n assert('!empty($table->primaryKey); // table needs to have primary key defined for table join');\n\n // can we load the foreign table?\n if (class_exists(ucfirst($foreignTableName))) {\n // capitalize\n $foreignTableName = ucfirst($foreignTableName);\n // note the foreign table might have relationships of its own...\n $foreignTable = new $foreignTableName();\n assert('!empty($foreignTable->primaryKey); // foreign table needs to have primary key defined');\n\n // create the join on custom primary key and (optionally) custom table name\n $table->join($foreignTable->tableName, array(\n \"{$table->tableName}.{$foreignTable->tableName}_{$table->primaryKey}\"\n => \"{$foreignTable->tableName}.{$foreignTable->primaryKey}\"\n ));\n // as an added bonus, we might have a relationship in the foreign table, add it...\n $table->join .= $foreignTable->join;\n } else {\n // we will have to rely on our primary key\n // create the join where \"foreignTable_id = id\"\n $table->join($foreignTableName, array(\n \"{$table->tableName}.{$foreignTableName}_{$table->primaryKey}\"\n => \"{$foreignTableName}.{$table->primaryKey}\"\n ));\n }\n }", "public function foto(){\n \treturn $this->hasOne('App\\Foto');\n }", "function setup(&$Model, $settings = array()){\n $Model->bindModel(array('hasOne' => array(\n 'Favorite' => array(\n 'dependent' => true,\n 'foreignKey' => 'foreign_id',\n 'conditions' => array('user_id' => User::get('id'))\n )\n )), false);\n }", "public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }", "public function fieldOne(): BelongsTo\n {\n return $this->belongsTo(Field::class, 'field_one_id');\n }", "public function link($from,$to)\n {\n //\n $relation = new Relation;\n\t$relation->from = $from;\n $relation->to = $to;\n\t$relation->save();\n\t\n }", "public function hasOneDeepFromReverse(HasManyDeep $relation): HasOneDeep\n {\n return $this->hasOneDeep(...$this->hasOneOrManyDeepFromReverse($relation));\n }", "public function persist($oneOrManyEntities): void;", "public function addHasOne( $name, $clazz, $relName = NULL )\n {\n if (!is_subclass_of( $clazz, 'PersistentObject')) throw new Exception(\"La clase $clazz del atributo $name debe ser subclase de PersistentObject\");\n \n // TEST:\n // El nombre de la relacion relName se usa cuando hay multiples hasMany declarados hacia la\n // misma clase, si esa clase tiene relaciones con esta (o sea bidireccional).\n // Asi se puede saber que rol de una clase correponde al rol en la clase asociada, porque\n // se tiene el mimo nombre de relacion codificado en el rol.\n if ($relName != NULL) $name .= '__'.$relName; // rol__relName\n \n // TODO: habria que verificar que en la clase asociada hay una relacion con el mismo nombre declarada con clase this->getClass.\n \n \n $this->hasOne[$name] = $clazz;\n $this->attributeValues[$name] = self::NOT_LOADED_ASSOC; // Se inicializa como no cargada, luego en el constructor se le puede setear un valor.\n }", "public function initialize()\n {\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('alias' => 'Datospersonales'));\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('foreignKey' => true));\n }", "public function Table_1()\n {\n return $this->hasOne('App\\Table_1')->withDefault([\n \n 'name' => 'Guest Author',\n \n ]);\n }", "public function parent() : HasOne\n {\n return $this->hasOne('App\\Category', 'parent_id');\n }", "public function cliente(){\n return $this->hasOne('App\\Cliente','cuentaUsuario','cuentaUsuario');\n }", "public function carpeta(){\n return $this->hasOne('App\\CarpetaAdjuntos','id_carpeta_adjuntos','id_carpeta_adjuntos');\n }", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "public function __construct()\n\t{\n\t\t$this->has_one['product'] = array('Products_m', 'id', 'product_id');\n\t\t// $this->soft_deletes = TRUE;\n\t\tparent::__construct();\n\t}", "public function category(): HasOne\n {\n return $this->hasOne(Category::class, 'id', 'category_id');\n }", "public function order_product(){\n return $this->hasOne(Order_product::class);\n }", "public function initialize()\n {\n $this->belongsTo('id_deuda', 'NbDeudas', 'id_deuda', array('alias' => 'NbDeudas'));\n $this->belongsTo('id_deuda', 'Nbdeudas', 'id_deuda', array('foreignKey' => true));\n }", "public function hasOne()\n {\n if ($this->relationship === null)\n {\n $this->relationship = DataModel_Relationship::HAS_ONE;\n return $this;\n }\n else\n {\n \treturn $this->relationship & DataModel_Relationship::HAS_ONE;\n }\n }", "public function contact(): \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n {\n return $this->hasOne('App\\Models\\UserContactDetail');\n }", "public function student(){\n return $this->hasOne('App\\Students');\n }", "public function address(): MorphOne\n {\n return $this->morphOne(Address::class, 'addressable');\n }", "public static function hasOne($model) {\n return new static(['type' => DbRelations::HAS_ONE, 'model' => $model]);\n }", "public function parent(): HasOne\n {\n return $this->hasOne(Category::class, 'id', 'parent_id');\n }", "public function createEntity();", "public function post()\n {\n return $this->hasOne('App\\post');\n }", "function has_one($field, $options = null) {\n\t\t$this->associations[$field] = &new HasOneAssociation($this, $field, $options);\n\n\t\treturn true;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->timestamps = FALSE;\n $this->return_as = 'array';\n $this->has_one[\"auth_role\"] = array(\"auth_role\", \"role_id\", \"role_id\"); \n }", "public function initialize()\n {\n $this->belongsTo('posicao_id', 'Ecommerce\\Admin\\Models\\Posicao', 'id', array('alias' => 'Posicao'));\n }", "public function setUp() {\n\t\tparent::setUp(); \n\t\t\n\t\t$this->hasOne('UserAccount as user',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'local' => 'userid',\n\t\t\t\t\t\t\t'foreign' => 'id'\n\t\t\t\t\t\t)\n\t\t);\n\t\t$this->hasOne('UserAccount as addedby',\n\t\t\t\tarray(\n\t\t\t\t\t\t'local' => 'addedbyid',\n\t\t\t\t\t\t'foreign' => 'id'\n\t\t\t\t)\n\t\t);\n\t\t$this->hasOne('Shift as session',\n\t\t\t\tarray(\n\t\t\t\t\t\t'local' => 'sessionid',\n\t\t\t\t\t\t'foreign' => 'id'\n\t\t\t\t)\n\t\t);\n\t}", "public function getIdRelatorio0()\n {\n return $this->hasOne(Relatorio::className(), ['idRelatorio' => 'idRelatorio']);\n }", "public function referee()\n {\n return $this->hasOne('App\\Models\\Referee');\n }", "public function animal() {\n $this->hasOne('App\\Animal', 'id', 'animalID');\n }", "public function tipoVotacao(): HasOne\n {\n return $this->hasOne(TipoVotacaoModel::class, 'votacao_id', 'id');\n }", "public function create_join_table($model_one, $model_two) {\n $table_name = NimbleAssociation::generate_join_table_name(array($model_one, $model_two));\n $table = $this->create_table($table_name, array('id' => false));\n $table->references($model_one);\n $table->references($model_two);\n $table->go();\n }", "public function curso1()\n{\n return $this->hasOne(Curso::class, 'tipo_curso_id');\n}", "public function morphOne($related, $name, $type = null, $id = null, $localKey = null){\n\t\t$localKey = $localKey ?: with(new $related)->getForeignKey();\n\n\t\treturn parent::morphOne($related, $name, $type, $id, $localKey);\n\t}", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "public function picture(): HasOne\n {\n return $this->hasOne(Picture::class, 'id', 'picture_id');\n }", "public function initialize()\n {\n $this->belongsTo('user_id', 'Users', 'id');\n }", "public function position(){\n \t\t\n return $this->hasOne('App\\Position');\n\n }", "public function user(): BelongsTo;", "public function user(){\n return $this->belongsTo(User::class, 'user_id', 'id');//https://laravel.com/docs/5.8/eloquent-relationships#one-to-many\n }", "public function initiator()\n{\n return $this->belongsTo('App\\User', 'user_id', 'id');\n}", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "public function testCrossAssociation() {\n\t\t$ARTPost = new ARTPost(array('title' => 'lala', 'message' => '', 'writer_id' => 1));\n\t\t$ARTComment = new ARTComment(array('message' => 'coment1 lala1'));\n\t\t$ARTComment->Post = $ARTPost;\n\t\t$ARTPost->Comments[] = $ARTComment;\n\t\t$ARTPost->save();\n\t\t$this->assertCount(1, $ARTPost->Comments);\n\n\t\t$ARTPost->id = 666;\n\t\t$ARTPost->save();\n\t\t$this->assertCount(1, $ARTPost->Comments);\n\t}", "public function blog()\n {\n return $this->hasOne('App\\Blog');\n }", "public function save($oneOrManyEntities): void;", "public function initialize()\n {\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', array('alias' => 'Documentosbeneficios'));\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', NULL);\n }", "private function makeRelationBetweenCategoryAndDummyTable() {}", "public function CreateRelationship($type = self::RT_OFFICE_DOCUMENT, $target = 'document.xml') {\n\t\t$el = $this->createElement('Relationship');\n\t\t$this->_Relationships[] = $el;\n\t\t$el->setAttribute('Id', \"rId\".count($this->_Relationships));\n\t\t$el->setIdAttribute('Id', true);\n\t\t$el->setAttribute('Type', $type);\n\t\t$el->setAttribute('Target', $target);\n\t\t$this->_DocumentRoot->appendChild($el);\n\t}", "function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\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// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "protected static function _addOneToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::ONE_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function name(): string\n {\n return 'hasOne';\n }", "public function address(): MorphOne\n {\n return $this->morphOne(Address::getProxiedClass(), 'addressable')->withDefault();\n }", "private function addPolymorphicOneRelation(string $modelName, string $method = 'morphOne', bool $plural = false)\n {\n $path = app_path(\"{$modelName}.php\");\n\n File::append($path,\n $this->replacePolymorphicOneRelationNames($modelName, $method, $plural)\n );\n }", "public function hasOne($model, $foreignKey = '', $localKey = '')\n {\n // the default local key would look like `user_id`\n // for a model named User\n if (!$foreignKey) {\n $inflector = Inflector::get();\n $foreignKey = strtolower($inflector->underscore(static::modelName())).'_id';\n }\n\n if (!$localKey) {\n $localKey = self::DEFAULT_ID_PROPERTY;\n }\n\n return new HasOne($model, $foreignKey, $localKey, $this);\n }", "private function addThroughRelation(string $stub = 'has-one-through')\n {\n $path = app_path(\"{$this->farParent}.php\");\n\n File::append($path,\n $this->replaceThroughRelationNames($stub)\n );\n }", "public function getRelated()\n {\n return new $this->morphType();\n }", "public function worker(){ \n return $this->hasOne('App\\Models\\User','id','worker_id');\n }", "public function endereco(){\n return $this->hasOne(Endereco::class);\n\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function hasOne(string $name, string $related, ?string $foreignKey = null, ?string $localKey = null): self\n {\n return $this->relationship($name, function (AbstractModel $model) use ($related, $foreignKey, $localKey) {\n return $model->hasOne($related, $foreignKey, $localKey);\n });\n }", "public function initialize()\n {\n //$this->setSchema(\"service_services\");\n $this->setSource(\"favoriteUsers\");\n $this->belongsTo('userobject', '\\Users', 'userid', ['alias' => 'Users']);\n $this->belongsTo('usersubject', '\\Users', 'userid', ['alias' => 'Users']);\n }", "public function hasOne($related, $foreignKey = null, $localKey = null)\n {\n $instance = $this->newRelatedInstance($related);\n\n $foreignKey = $foreignKey ?? $instance->getKeysName();\n\n $localKey = $localKey ?? $this->getKeysName();\n\n\n return new HasOne($instance->newQuery(), $this, $foreignKey, $localKey);\n }" ]
[ "0.7084667", "0.63699645", "0.6071527", "0.59792995", "0.59470546", "0.5859", "0.5841298", "0.578341", "0.5720019", "0.5690512", "0.56543446", "0.56434494", "0.56288576", "0.5625724", "0.5596756", "0.5556394", "0.55047804", "0.5483632", "0.5475374", "0.5474761", "0.5467317", "0.5462407", "0.5449963", "0.54367477", "0.54283494", "0.54279435", "0.5420518", "0.54204834", "0.5416969", "0.5413327", "0.5412775", "0.5388166", "0.53880006", "0.5380917", "0.53764546", "0.5371425", "0.53551", "0.5352597", "0.534829", "0.53298914", "0.53289855", "0.53184766", "0.5315686", "0.52991855", "0.52739984", "0.52699333", "0.52587855", "0.52497405", "0.5246404", "0.52413625", "0.521439", "0.52091056", "0.5201564", "0.5189594", "0.51894283", "0.5188893", "0.51867783", "0.5184516", "0.5180537", "0.518033", "0.5176276", "0.51734585", "0.5173066", "0.5165857", "0.5164768", "0.51608145", "0.51535964", "0.5153078", "0.5144775", "0.51387227", "0.5135428", "0.51351506", "0.51265526", "0.51244265", "0.5124116", "0.5122176", "0.5119891", "0.5115969", "0.51134956", "0.51120716", "0.51105815", "0.51055837", "0.51051974", "0.51028585", "0.51019394", "0.5101344", "0.50973165", "0.5096297", "0.50935763", "0.5093201", "0.5090059", "0.50846565", "0.5082202", "0.50795746", "0.5068082", "0.50652623", "0.5062831", "0.505994", "0.50529224", "0.50455666", "0.5037683" ]
0.0
-1
Create a onetomany relation
public function hasMany(Entity|string $entityRelation, string $foreignKey = ''): HasMany|false { try { $entityRelation = $this->getEntity($entityRelation); $primaryKey = $this->getPrimaryKey(); $preForeignKey = strtolower((new ReflectionClass($this))->getShortName()); $foreignKey = $foreignKey ?: $preForeignKey . '_' . $primaryKey; $relation = new HasMany($this, $entityRelation, $foreignKey); $name = debug_backtrace()[1]['function'] ?? $entityRelation->getManager()->getTable(); return $this->relations[$name] = $relation; } catch (Exception $ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createRelation()\n {\n $this->createBuilder();\n }", "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "protected static function _relations() {\n\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "abstract function relations();", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function buildRelations()\n\t{\n $this->addRelation('CuadreCaja', 'CuadreCaja', RelationMap::MANY_TO_ONE, array('id_cuadre_caja' => 'id_cuadre_caja', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdPersona', 'Persona', RelationMap::MANY_TO_ONE, array('id_persona' => 'id_persona', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdAutoriza', 'Persona', RelationMap::MANY_TO_ONE, array('id_autoriza' => 'id_persona', ), 'RESTRICT', null);\n\t}", "protected static function _addOneToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::ONE_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }", "public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Attribute', '\\\\Thelia\\\\Model\\\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Feature', '\\\\Thelia\\\\Model\\\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('ChoiceFilterOther', '\\\\ChoiceFilter\\\\Model\\\\ChoiceFilterOther', RelationMap::MANY_TO_ONE, array('other_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Category', '\\\\Thelia\\\\Model\\\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Template', '\\\\Thelia\\\\Model\\\\Template', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', 'RESTRICT');\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Track', 'Track', RelationMap::MANY_TO_ONE, array('track_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectortype', 'Featurevectortype', RelationMap::MANY_TO_ONE, array('featurevectortype_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('File', 'File', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackAId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_a_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackBId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_b_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Distancejob', 'Distancejob', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectorsegment', 'Featurevectorsegment', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n\t}", "public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }", "protected static function _addManyToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::MANY_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "private function makeRelationBetweenCategoryAndDummyTable() {}", "public function buildRelations()\n {\n $this->addRelation('CastleType', 'CastleType', RelationMap::MANY_TO_ONE, array('castle_type_id' => 'id', ), null, null);\n $this->addRelation('CastleLocation', 'CastleLocation', RelationMap::MANY_TO_ONE, array('castle_location_id' => 'id', ), null, null);\n $this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), null, null);\n $this->addRelation('Attack2castle', 'Attack2castle', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'Attack2castles');\n $this->addRelation('TargetActions', 'TargetActions', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'TargetActionss');\n $this->addRelation('Attack', 'Attack', RelationMap::MANY_TO_MANY, array(), null, null, 'Attacks');\n }", "public function setRelations() {}", "public function buildRelations()\n {\n $this->addRelation('RombonganBelajar', 'DataDikdas\\\\Model\\\\RombonganBelajar', RelationMap::MANY_TO_ONE, array('rombongan_belajar_id' => 'rombongan_belajar_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('EkstraKurikuler', 'DataDikdas\\\\Model\\\\EkstraKurikuler', RelationMap::MANY_TO_ONE, array('id_ekskul' => 'id_ekskul', ), 'RESTRICT', 'RESTRICT');\n }", "protected static function _addOneToOneRelation(array $params)\n {\n $name = $params['foreignClass'];\n\n $params['type'] = self::ONE_TO_ONE;\n\n static::$_relations[$name] = $params;\n }", "public function has_or_relation()\n {\n }", "public function buildRelations()\n\t{\n $this->addRelation('Provincie', 'Provincie', RelationMap::MANY_TO_ONE, array('provincie_id' => 'id', ), null, null);\n $this->addRelation('OrganisatieType', 'OrganisatieType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), null, null);\n $this->addRelation('Persoon', 'Persoon', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Vervolgactie', 'Vervolgactie', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Kans', 'Kans', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n\t}", "function project_project_modifier(&$node)\n {\n userelation(\"atkonetomanyrelation\");\n $node->add(new atkOneToManyRelation(\"user_stories\", \"xp.story\", \"project\", AF_HIDE_LIST), \"user_stories\");\n }", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Skill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':skill_id',\n 1 => ':id',\n ),\n), 'CASCADE', null, null, false);\n $this->addRelation('Reference', '\\\\gossi\\\\trixionary\\\\model\\\\Reference', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':reference_id',\n 1 => ':id',\n ),\n), null, null, null, false);\n $this->addRelation('FeaturedSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':video_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedSkills', false);\n $this->addRelation('FeaturedTutorialSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':tutorial_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedTutorialSkills', false);\n }", "public function buildRelations()\n {\n $this->addRelation('UnitUsaha', 'DataDikdas\\\\Model\\\\UnitUsaha', RelationMap::MANY_TO_ONE, array('unit_usaha_id' => 'unit_usaha_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Mou', 'DataDikdas\\\\Model\\\\Mou', RelationMap::MANY_TO_ONE, array('mou_id' => 'mou_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('SumberDana', 'DataDikdas\\\\Model\\\\SumberDana', RelationMap::MANY_TO_ONE, array('sumber_dana_id' => 'sumber_dana_id', ), 'RESTRICT', 'RESTRICT');\n }", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "public function isAddToRelationship();", "public static function workflowRelations();", "public function products(): MorphToMany;", "public function createMany(array $attributes): bool;", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "public function buildRelations()\n {\n $this->addRelation('SalesHistory', '\\\\SalesHistory', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, null, false);\n $this->addRelation('SalesHistoryDetail', '\\\\SalesHistoryDetail', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n 1 =>\n array (\n 0 => ':OedhLine',\n 1 => ':OedhLine',\n ),\n), null, null, null, false);\n $this->addRelation('ItemMasterItem', '\\\\ItemMasterItem', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':InitItemNbr',\n 1 => ':InitItemNbr',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'plan_id', ), null, null, 'Usuarios');\n }", "public function buildRelations()\n {\n $this->addRelation('Attendance', '\\\\lwops\\\\lwops\\\\Attendance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Attendances', false);\n $this->addRelation('Casualemployeepayslip', '\\\\lwops\\\\lwops\\\\Casualemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Casualemployeepayslips', false);\n $this->addRelation('Employeeloan', '\\\\lwops\\\\lwops\\\\Employeeloan', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeloans', false);\n $this->addRelation('Employeeotherdeduction', '\\\\lwops\\\\lwops\\\\Employeeotherdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeotherdeductions', false);\n $this->addRelation('Employeepurchases', '\\\\lwops\\\\lwops\\\\Employeepurchases', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeepurchasess', false);\n $this->addRelation('Employeerole', '\\\\lwops\\\\lwops\\\\Employeerole', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeroles', false);\n $this->addRelation('Employeesalaryexpenseallocation', '\\\\lwops\\\\lwops\\\\Employeesalaryexpenseallocation', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeesalaryexpenseallocations', false);\n $this->addRelation('Employeetermination', '\\\\lwops\\\\lwops\\\\Employeetermination', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeterminations', false);\n $this->addRelation('Fteemployeepayslip', '\\\\lwops\\\\lwops\\\\Fteemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Fteemployeepayslips', false);\n $this->addRelation('Ftesalaryadvance', '\\\\lwops\\\\lwops\\\\Ftesalaryadvance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Ftesalaryadvances', false);\n $this->addRelation('Medicaldeduction', '\\\\lwops\\\\lwops\\\\Medicaldeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Medicaldeductions', false);\n $this->addRelation('Nssfdeduction', '\\\\lwops\\\\lwops\\\\Nssfdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Nssfdeductions', false);\n $this->addRelation('Parttimedetail', '\\\\lwops\\\\lwops\\\\Parttimedetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Parttimedetails', false);\n $this->addRelation('Salary', '\\\\lwops\\\\lwops\\\\Salary', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Salaries', false);\n }", "public function export_addFilesFromRelations() {}", "public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }", "private function addPolymorphicToRelation()\n {\n $path = app_path(\"{$this->polymorphicName}.php\");\n\n File::append($path,\n $this->replacePolymorphicRelationNames()\n );\n }", "abstract public static function create(Relation $query): Collection;", "public function buildRelation()\n {\n $this->buildForeignRelation($this->getRelationName());\n $this->buildLocalRelation('Record');\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), null, null);\n\t\t$this->addRelation('Departamento', 'Departamento', RelationMap::MANY_TO_ONE, array('departamento_id' => 'id', ), null, null);\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), null, null);\n\t\t$this->addRelation('Auditoria', 'Auditoria', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Auditorias');\n\t\t$this->addRelation('AvaliacaoRespostaForum', 'AvaliacaoRespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'AvaliacaoRespostaForums');\n\t\t$this->addRelation('ColetaPesquisa', 'ColetaPesquisa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ColetaPesquisas');\n\t\t$this->addRelation('ComentarioNoticia', 'ComentarioNoticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ComentarioNoticias');\n\t\t$this->addRelation('CurtidaForum', 'CurtidaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'CurtidaForums');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Noticias');\n\t\t$this->addRelation('Pesquisa', 'Pesquisa', RelationMap::ONE_TO_MANY, array('id' => 'criador_id', ), null, null, 'Pesquisas');\n\t\t$this->addRelation('PesquisaHabilitada', 'PesquisaHabilitada', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'PesquisaHabilitadas');\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Premios');\n\t\t$this->addRelation('RespostaForum', 'RespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'RespostaForums');\n\t\t$this->addRelation('SolicitacaoResgateRelatedByAprovadorId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'aprovador_id', ), null, null, 'SolicitacaoResgatesRelatedByAprovadorId');\n\t\t$this->addRelation('SolicitacaoResgateRelatedBySolicitanteId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'solicitante_id', ), null, null, 'SolicitacaoResgatesRelatedBySolicitanteId');\n\t}", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "protected function createRelationHandlerInstance() {}", "public function buildRelations()\n {\n $this->addRelation('Evaluacion', '\\\\Evaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_evaluacion',\n 1 => ':eval_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Objetivo', '\\\\Objetivo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_objetivo',\n 1 => ':obje_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_pregunta',\n 1 => ':preg_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Seccion', '\\\\Seccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_seccion',\n 1 => ':secc_codigo',\n ),\n), null, 'CASCADE', null, false);\n }", "public function one_to_one()\n {\n }", "public function palmares() {\n $relation = $this->hasOne(\"Palmares\");\n return $relation;\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function setupAssociations() \n {\n \n }", "private function hasMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$priKey]);\t\n\t\t}\n\t\treturn $entities;\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::MANY_TO_ONE, array('batch_job_id' => 'id', ), null, null);\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::ONE_TO_MANY, array('id' => 'batch_job_lock_id', ), null, null);\n\t}", "public function addRelation(RelationInterface $relation);", "public function addNewPivot(BelongsToMany $relation, array $attributes): PivotValueable;", "public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }", "public function buildRelations()\n {\n $this->addRelation('Vendor', '\\\\Vendor', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n), null, null, null, false);\n $this->addRelation('PurchaseOrder', '\\\\PurchaseOrder', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApihPoNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, null, false);\n $this->addRelation('ApInvoiceDetail', '\\\\ApInvoiceDetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':ApidInvNbr',\n 1 => ':ApihInvNbr',\n ),\n 1 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n 2 =>\n array (\n 0 => ':ApidPayToKey',\n 1 => ':ApihPayToKey',\n ),\n 3 =>\n array (\n 0 => ':ApidPoNbr',\n 1 => ':ApihPoNbr',\n ),\n 4 =>\n array (\n 0 => ':ApidCtrlNbr',\n 1 => ':ApihCtrlNbr',\n ),\n 5 =>\n array (\n 0 => ':ApidSeq',\n 1 => ':ApihSeq',\n ),\n), null, null, 'ApInvoiceDetails', false);\n }", "function create_fam_relation($eParent, $personRec, $tag)\n\t{\n\t\t//throw new exception(\"create fam rel - this function is not implemented\");\n\t}", "function creasit_relation_post_types() {\n p2p_register_connection_type( array(\n 'name' => 'posts_to_pages',\n 'from' => 'page',\n 'to' => 'post',\n 'title' => array(\n 'from' => __( 'Actualités liées', 'solution' ),\n ),\n ) );\n\n p2p_register_connection_type( array(\n 'name' => 'pages_to_pages',\n 'from' => 'page',\n 'to' => 'page',\n 'title' => array(\n 'from' => __( 'Pages liées', 'solution' ),\n ),\n 'admin_box' => array(\n 'show' => 'from',\n )\n ) );\n}", "protected function createRelation(Collection $models, Model $model, string $name, string $line)\n {\n $methods = Method::parseManyMethods($line);\n\n $relation = new MorphToManyOrMorphedByMany([\n 'name' => $name,\n 'type' => $methods->first()->name,\n 'methods' => $methods,\n 'model' => $models->get(optional($methods->first()->arguments->first())->value),\n 'relationKey' => optional($methods->first()->arguments->get(1))->value,\n ]);\n\n $relation->validateWithDefault($model);\n\n $this->validateRelation($model, $relation);\n\n $this->mayGetDeclaredPivotModel($models, $model, $relation);\n\n return $relation;\n }", "public function buildRelations()\n {\n $this->addRelation('Year', 'AppBundle\\\\Model\\\\Year', RelationMap::MANY_TO_ONE, array('year_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('SubFileCat', 'AppBundle\\\\Model\\\\FileCat', RelationMap::MANY_TO_ONE, array('sub_file_cat_id' => 'id', ), null, null);\n $this->addRelation('FileCat', 'AppBundle\\\\Model\\\\FileCat', RelationMap::ONE_TO_MANY, array('id' => 'sub_file_cat_id', ), null, null, 'FileCats');\n $this->addRelation('File', 'AppBundle\\\\Model\\\\File', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), 'CASCADE', null, 'Files');\n $this->addRelation('DocCat', 'AppBundle\\\\Model\\\\DocCat', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), null, null, 'DocCats');\n $this->addRelation('AccountRelatedByFileCatLev1Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev1_id', ), null, null, 'AccountsRelatedByFileCatLev1Id');\n $this->addRelation('AccountRelatedByFileCatLev2Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev2_id', ), null, null, 'AccountsRelatedByFileCatLev2Id');\n $this->addRelation('AccountRelatedByFileCatLev3Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev3_id', ), null, null, 'AccountsRelatedByFileCatLev3Id');\n $this->addRelation('Project', 'AppBundle\\\\Model\\\\Project', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), null, null, 'Projects');\n }", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function publications(): MorphMany\n {\n return $this->morphMany(Publication::class, 'publicable');\n }", "public function newRelation($array)\n {\n $model = new Relation($array);\n $model->createdAt = new DateTime();\n\n return $model;\n }", "public function initialize()\n {\n $this->hasMany(\"id\", \"Modules\\Models\\Orders\", \"member_id\", array(\n 'alias' => 'orders'\n ));\n }", "function __construct(\\entity $e, array $foreigns, $type='INNER JOIN'){\n //\n //Every join must have a type which is a string i.e inner join \n //outer join etc\n $this->type=$type;\n //\n //Get the join \n $this->entity= $e;\n //\n $this->foreigns=$foreigns;\n //\n //Formulate the on clauses \n $this->ons= $this->get_ons();\n }", "public function buildRelations()\n\t{\n $this->addRelation('Tbformacao', 'Tbformacao', RelationMap::MANY_TO_ONE, array('id_formacao' => 'id_formacao', ), null, null);\n $this->addRelation('Tbcurso', 'Tbcurso', RelationMap::MANY_TO_ONE, array('cod_curso' => 'cod_curso', ), null, null);\n $this->addRelation('Tbturno', 'Tbturno', RelationMap::MANY_TO_ONE, array('id_turno' => 'id_turno', ), null, null);\n $this->addRelation('Tbcampus', 'Tbcampus', RelationMap::MANY_TO_ONE, array('id_campus' => 'id_campus', ), null, null);\n $this->addRelation('Tbsetor', 'Tbsetor', RelationMap::MANY_TO_ONE, array('id_setor' => 'id_setor', ), null, null);\n $this->addRelation('Tbalunomatricula', 'Tbalunomatricula', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbalunobackup', 'Tbalunobackup', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbfilacalouros', 'Tbfilacalouros', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbvagas', 'Tbvagas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbloadaluno', 'Tbloadaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbaluno', 'Tbaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcurriculodisciplinas', 'Tbcurriculodisciplinas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinarequisitos', 'Tbdisciplinarequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinacorequisitos', 'Tbdisciplinacorequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcoordenadorcurso', 'Tbcoordenadorcurso', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n\t}", "function userelation($relation) { atkuse(\"relation\" , $relation); }", "public function initialize()\n {\n\t\t$this->hasMany(\"id\", \"PostTags\", \"tags_id\", NULL);\n\n }", "public function isRelated();" ]
[ "0.66931814", "0.62585574", "0.62386155", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.6210066", "0.62069756", "0.61834407", "0.6174265", "0.6161916", "0.61482066", "0.6146997", "0.61420286", "0.6134204", "0.61137855", "0.61064994", "0.6101711", "0.6091913", "0.60816044", "0.60816044", "0.60816044", "0.60816044", "0.60816044", "0.60816044", "0.60816044", "0.60816044", "0.6023224", "0.59871745", "0.59711456", "0.59694904", "0.5952817", "0.59481996", "0.5944524", "0.5938384", "0.5930396", "0.5916866", "0.59015715", "0.58588535", "0.58568764", "0.58254147", "0.58226013", "0.57992995", "0.57946366", "0.5780986", "0.57748896", "0.5743254", "0.5731589", "0.5708004", "0.568748", "0.5673192", "0.56692195", "0.56647784", "0.5656643", "0.56272453", "0.5604453", "0.55963504", "0.55902", "0.5587821", "0.55732936", "0.55680966", "0.5555578", "0.55341184", "0.55216986", "0.55196637", "0.5504291", "0.55020463", "0.5490899", "0.54902035", "0.5475094", "0.54666984", "0.5444855", "0.5418436", "0.5416832", "0.541388", "0.541388", "0.53774494", "0.5367151", "0.53550875", "0.53412855", "0.5320161", "0.531694", "0.53143495", "0.53100413", "0.5304046", "0.53020537", "0.53016436", "0.528041", "0.5273772", "0.5271505", "0.52590424", "0.5258348", "0.52558446", "0.52551526", "0.52387124", "0.5237031" ]
0.0
-1
Create a manytomany relation
public function manyToMany(Entity|string $entityRelation, string $pivot = '', string $foreignKeyOne = '', string $foreignKeyTwo = '', string $primaryKeyPivot = 'id'): ManyToMany|false { try { $primaryKeyOne = $this->getPrimaryKey(); $entityRelation = $this->getEntity($entityRelation); $primaryKeyTwo = $entityRelation->getPrimaryKey(); $preForeignKeyOne = strtolower((new ReflectionClass($this))->getShortName()); $preForeignKeyTwo = strtolower((new ReflectionClass($entityRelation))->getShortName()); $foreignKeyOne = $foreignKeyOne ?: $preForeignKeyOne . '_' . $primaryKeyOne; $foreignKeyTwo = $foreignKeyTwo ?: $preForeignKeyTwo . '_' . $primaryKeyTwo; $all = DB::query( 'SHOW TABLES FROM ' . config('database.connections.mysql.name', 'mkyframework') ); if (empty($pivot)) { foreach ($all as $a) { if (str_contains($a['Tables_in_' . config('database.connections.mysql.name', 'mkyframework')], '_')) { $test = explode('_', $a['Tables_in_' . config('database.connections.mysql.name', 'mkyframework')]); if (in_array($preForeignKeyOne, $test) && in_array($preForeignKeyTwo, $test)) { $pivot = $a['Tables_in_' . config('database.connections.mysql.name', 'mkyframework')]; } } } } $name = debug_backtrace()[1]['function'] ?? $preForeignKeyOne . '_' . $preForeignKeyTwo; $relation = new ManyToMany($this, $entityRelation, $foreignKeyOne, $foreignKeyTwo, $pivot, $primaryKeyPivot); return $this->relations[$name] = $relation; } catch (Exception $ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function _addManyToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::MANY_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function createMany(array $attributes): bool;", "public function products(): MorphToMany;", "private function manyToMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$forKey = $result['forKey'];\n\t\t$this->_db()->select($forKey)->from($table)->where($priKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach ($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$forKey]);\n\t\t}\n\t\treturn $entities;\n\t}", "public function createMany(array $data): Model\n {\n return $this->model->createMany($data);\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function testPostMany()\n {\n $data = $this->createMany(10);\n $this->postManyTest($data);\n }", "protected static function _addOneToManyRelation(array $params)\n {\n $name = $params['foreignClass'] . 's';\n\n $params['type'] = self::ONE_TO_MANY;\n\n static::$_relations[$name] = $params;\n }", "public function setRelations() {}", "public function permissions(){ return new manytomany_link($this, 'permission', 'rolepermissions');\n }", "private function hasMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$priKey]);\t\n\t\t}\n\t\treturn $entities;\n\t}", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "public function addNewPivot(BelongsToMany $relation, array $attributes): PivotValueable;", "public function roles(): MorphToMany;", "public function manyToManyRelation(Request $request){\n $userData = User::with('getUserRoles')->get();\n $roleData = Role::with('getRoleUsers')->get();\n \n return view('pages.many_to_many', compact('userData', 'roleData'));\n }", "public static function manyToMany($model) {\n return new static(['type' => DbRelations::MANY_TO_MANY, 'model' => $model]);\n }", "public function testUpdateRecordWithManyToManyRelation()\n {\n $this->expectQueries(\n [\n [\n 'SELECT many_many.pk, many_many.fk, relation.primaryKey as relation_primaryKey FROM many_many ' .\n 'LEFT JOIN joinTable ON many_many.fk=joinTable.many_many_fk ' .\n 'LEFT JOIN related relation ON joinTable.related_primaryKey=relation.primaryKey ' .\n 'WHERE many_many.pk=?',\n [2],\n [\n [\n 'pk' => 1,\n 'fk' => 1,\n 'relation_primaryKey' => 1\n ],\n [\n 'pk' => 1,\n 'fk' => 1,\n 'relation_primaryKey' => 2\n ]\n ]\n ],\n ['INSERT INTO related () VALUES ()'],\n ['DELETE FROM joinTable WHERE (many_many_fk=? AND related_primaryKey=?)', [1, 1]],\n ['INSERT INTO joinTable (many_many_fk, related_primaryKey) VALUES (?, ?)', [1, 3]],\n [\n 'INSERT INTO joinTable (many_many_fk, related_primaryKey) VALUES (?, ?)',\n [1, null]\n ]\n ]\n );\n\n $entity = $this->entityManager->get('ManyManyRelationEntity');\n $object = $entity->find()->with('relation')->get(2);\n\n unset($object->relation[1]);\n\n $object->relation[] = 3;\n $object->relation[] = new RelatedEntity;\n\n $entity->save($object);\n\n $this->entityManager->commit();\n }", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function getHasMany()\n {\n return $this->hasMany;\n }", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function author()\n {\n /// ManyToMany\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(Hotstream::userModel(), Hotstream::membershipModel())\n ->withPivot('role')\n ->withTimestamps()\n ->as('membership');\n }", "public function permissions(){\n return new manytomany_link($this, 'permission', 'staffpermissions');\n }", "public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }", "public function testHasMany()\n {\n $plan = $this->factory(Plan::class)->create();\n\n $this->factory(Member::class, 3)\n ->state(PremiumMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->factory(Member::class)\n ->state(RegularMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->assertCount(3, $plan->members->filter(function ($member) {\n return $member instanceof PremiumMember;\n }));\n\n $this->assertCount(1, $plan->members->filter(function ($member) {\n return $member instanceof RegularMember;\n }));\n }", "protected static function _relations() {\n\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "private function compileHasManyRelations()\n {\n //get all foreign keys\n $foreignKeys = $this->schema->listForeignKeys();\n\n //get all foreign keys, where foreign table is equal to this table\n $filteredForeignKeys = [];\n foreach ($foreignKeys as $foreignKey) {\n if ($foreignKey->getForeignTableName() === $this->tableName) {\n array_push($filteredForeignKeys, $foreignKey);\n }\n }\n\n //get \"has many\" relations and call compiler for each\n $relationsCompiled = '';\n foreach ($filteredForeignKeys as $foreignKey) {\n\n $localTableName = $foreignKey->getLocalTableName();\n\n $modelName = Helper::tableNameToModelName($localTableName, $this->dbTablePrefix);\n\n $relationCompiler = new HasManyRelationCompiler();\n $relationsCompiled .= \"\\n\\n\\t\" . $relationCompiler->compile([\n 'modelName' => $modelName,\n 'foreignKey' => $foreignKey->getColumns()[0],\n 'modelsNamespace' => $this->modelsNamespace,\n ]);\n\n //add new param\n $this->relationTableModelParams[] = new RelationTableModelParamBag(\n str_plural(camel_case($modelName)),\n $localTableName,\n $modelName);\n }\n\n //{{HasManyRelations}}\n $this->replaceInStub(['{{HasManyRelations}}' => $relationsCompiled]);\n }", "public function fieldMany(): BelongsTo\n {\n return $this->belongsTo(Field::class, 'field_many_id');\n }", "public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }", "public function createMany(array $attributes): bool\n {\n return $this->model->insert($attributes);\n }", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "public function createMany(array $data) {\n\t\t$this->request = array(\n\t\t\t'uri' => array(\n\t\t\t\t'path' => 'create_many.json'\n\t\t\t),\n\t\t\t'method' => 'POST',\n\t\t\t'body' => array('users' => $data) // users must be plural here\n\t\t\t);\n\n\t\treturn $this->update($data);\n\t}", "public function products(): HasMany\n {\n return $this->hasMany(Product::class);\n }", "public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }", "abstract protected function createEntities();", "public function products() {\r\n return $this->belongsToMany('App\\Product');\r\n }", "public function todos(): HasMany\n {\n return $this->hasMany(Todo::class);\n }", "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "public function tramites(): HasMany\n {\n return $this->hasMany(Tramite::class);\n }", "public function users(): MorphToMany\n {\n return $this->morphedByMany(\n getModelForGuard($this->attributes['guard_name']),\n 'model',\n config('permission.table_names.model_has_permissions'),\n 'rbac_permission_id',\n 'model_id'\n );\n }", "public static function hasMany($model) {\n return new static(['type' => DbRelations::HAS_MANY, 'model' => $model]);\n }", "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "public function posts()\n {\n return $this->belongsToMany('App\\Post');\n }", "public function posts()\n {\n return $this->belongsToMany('App\\Post');\n }", "public function posts()\n {\n return $this->belongsToMany('App\\Post');\n }", "public function posts()\n {\n return $this->belongsToMany('App\\Post');\n }", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "public function morphMany($class, $prefix, $typeAttribute = null, $foreignKey = null);", "public function users(): MorphToMany\n {\n return $this->morphedByMany(\n getModelForGuard($this->attributes['guard_name']),\n 'model',\n config('acl.table_names.model_has_permissions'),\n 'permission_id',\n 'model_id'\n );\n }", "public function alumnos()\n {\n \treturn $this->belongsToMany('App\\Alumno');\n }", "public function users(){\n return $this->belongsToMany('App\\User');\n }", "public function skills()\n {\n return $this->belongsToMany(Skill::class,'skill_social_auth','id','skill_id');\n }", "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "public function users(){\n return $this->belongsToMany('App\\User');\n }", "public function teams(): BelongsToMany\n {\n return $this\n ->belongsToMany(\n Team::class,\n 'team_user',\n 'user_id',\n 'team_id'\n );\n }", "public function permissions(): BelongsToMany\n {\n return $this->belongsToMany(\n Permission::class,\n 'role_permissions',\n 'role_id',\n 'permission_id'\n );\n }", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "public function roles(){\n return $this->belongsToMany('App\\Role');\n }", "public function products(){\n return $this->belongsToMany('App\\Product', 'enumber_products', 'enumber_id', 'products_id');\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "public function users(): BelongsToMany\n {\n return $this->belongsToMany(User::class)->using(AchievementUser::class)->withTimestamps();\n }", "public function users() : BelongsToMany\n {\n return $this->belongsToMany(User::class);\n }", "public function initialize(){\n $this->hasMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\",\n array(\n \"reusable\" => true\n )\n );\n \n $this->hasManyToMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\", \n \"vendor_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Vendor\", \n \"vendor_id\",\n array(\n \"reusable\" => true,\n \"alias\" => \"AliasVendorPro\"\n )\n );\n }", "public function has_many($from_table, $to_table) {\r\n $result = true;\r\n $trough_table = $from_table . '_' . $to_table;\r\n $result = $result && $this->create_table($trough_table, array());\r\n $result = $result && $this->belongs_to($trough_table, $from_table);\r\n $result = $result && $this->belongs_to($trough_table, $to_table);\r\n return $result;\r\n }", "public function lessons(): BelongsToMany\n {\n return $this->belongsToMany(Lesson::class, 'lesson_user')\n ->withTimestamps();\n }", "public function setupAssociations() \n {\n \n }", "public function isAddToRelationship();", "public function groups(): MorphToMany;", "protected function queryHasMany($table)\n {\n $destinationTable = Helpers::renameValuePlural($table);\n $id = self::PREFIX_FOREIGN . $this->table;\n $className = ucwords($table, '_');\n $class = new $className();\n $listItem = $class->getAll([$id => $this->id]);\n foreach ($listItem as $item) {\n $this->{$destinationTable}[] = $item;\n }\n }", "public function hasMany($class, $foreignKey = null, $localKey = null);", "public function photo_categories(): BelongsToMany\n {\n return $this->belongsToMany(PhotoCategory::class, 'photo_categories_photos');\n }", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "public function createMany($count): array\n {\n $data = parent::createMany($count);\n\n return array_map(function (array $arr) {\n $arr['id'] = (string) $arr['id'];\n\n return $arr;\n }, $data);\n }", "public function createMany($count): array\n {\n $data = parent::createMany($count);\n\n return array_map(function (array $arr) {\n $arr['id'] = (string) $arr['id'];\n\n return $arr;\n }, $data);\n }", "public function tournaments(){\n return $this->belongsToMany('App\\Tournament','tournament_teams')->withTimestamps();\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function products()\n {\n return $this->belongsToMany('App\\Product');\n }" ]
[ "0.68628234", "0.6438887", "0.63818794", "0.63563186", "0.6321703", "0.62837064", "0.62233645", "0.615086", "0.60595834", "0.6022016", "0.59891456", "0.5939837", "0.5917573", "0.58942574", "0.58543646", "0.58322924", "0.58320683", "0.5830366", "0.5785774", "0.57576805", "0.5756204", "0.57282645", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.57280385", "0.5699472", "0.56817377", "0.5667043", "0.56579727", "0.5638127", "0.562236", "0.56030715", "0.56030715", "0.56030715", "0.56030715", "0.56030715", "0.56030715", "0.56030715", "0.56030715", "0.5596706", "0.55842054", "0.5577942", "0.5573843", "0.556793", "0.5561519", "0.5560904", "0.55394393", "0.55380124", "0.55234605", "0.5516141", "0.5507098", "0.55050945", "0.5500551", "0.54967654", "0.54958487", "0.54848474", "0.54815036", "0.54815036", "0.54815036", "0.54815036", "0.5476889", "0.54680043", "0.54591876", "0.54588884", "0.5458359", "0.5457838", "0.5455681", "0.5450835", "0.54399896", "0.54367626", "0.54364574", "0.5433676", "0.5428582", "0.5425327", "0.5425308", "0.54236776", "0.5415982", "0.5409643", "0.54076713", "0.5398571", "0.5396377", "0.53961015", "0.539557", "0.53938514", "0.53912693", "0.5387719", "0.53877014", "0.5384802", "0.53843516", "0.53843516", "0.5380179", "0.5373945", "0.5373945", "0.5368342" ]
0.5421537
82